@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --canvas: #f7f7f4;
    --canvas-soft: #fafaf7;
    --surface-card: #ffffff;
    --surface-strong: #e6e5e0;
    --primary: #f54e00;
    --primary-active: #d04200;
    --ink: #26251e;
    --body: #5a5852;
    --body-strong: #26251e;
    --muted: #807d72;
    --muted-soft: #a09c92;
    --on-primary: #ffffff;
    --hairline: #e6e5e0;
    --hairline-soft: #efeee8;
    --hairline-strong: #cfcdc4;
    --success: #1f8a65;
    --error: #cf2d56;
    --rounded-xs: 4px;
    --rounded-sm: 6px;
    --rounded-md: 8px;
    --rounded-lg: 12px;
    --rounded-xl: 16px;
    --rounded-pill: 9999px;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--canvas);
    color: var(--body);
    font-size: 16px;
    line-height: 1.5;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--primary); }

img { max-width: 100%; height: auto; display: block; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* TOP NAV */
.top-nav {
    background: var(--canvas);
    border-bottom: 1px solid var(--hairline);
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-logo {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.5px;
}

.nav-logo span { color: var(--primary); }

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
    align-items: center;
}

.nav-menu a {
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    transition: color 0.15s;
}

.nav-menu a:hover, .nav-menu a.active { color: var(--ink); }

.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}

.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: all 0.2s;
}

.mobile-nav {
    display: none;
    background: var(--canvas);
    border-bottom: 1px solid var(--hairline);
    padding: 16px 24px;
}

.mobile-nav.open { display: block; }

.mobile-nav a {
    display: block;
    padding: 10px 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--ink);
    border-bottom: 1px solid var(--hairline-soft);
}

.mobile-nav a:last-child { border-bottom: none; }

/* HERO */
.hero {
    padding: 80px 0;
    border-bottom: 1px solid var(--hairline);
}

.hero-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--surface-strong);
    padding: 4px 10px;
    border-radius: var(--rounded-pill);
    margin-bottom: 24px;
}

.hero h1 {
    font-size: 52px;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -1.5px;
    color: var(--ink);
    max-width: 780px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 18px;
    color: var(--body);
    max-width: 560px;
    line-height: 1.6;
    margin-bottom: 40px;
}

.hero-img {
    border-radius: var(--rounded-lg);
    border: 1px solid var(--hairline);
    overflow: hidden;
    margin-top: 48px;
}

.hero-img img {
    width: 100%;
    height: 420px;
    object-fit: cover;
}

/* SECTIONS */
.section { padding: 80px 0; }
.section-alt { background: var(--canvas-soft); }

.section-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 16px;
}

.section-title {
    font-size: 36px;
    font-weight: 400;
    color: var(--ink);
    letter-spacing: -0.72px;
    line-height: 1.2;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--body);
    max-width: 560px;
    line-height: 1.6;
    margin-bottom: 48px;
}

/* CARDS GRID */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.card {
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-lg);
    padding: 24px;
    transition: border-color 0.15s;
}

.card:hover { border-color: var(--hairline-strong); }

.card-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--surface-strong);
    padding: 3px 8px;
    border-radius: var(--rounded-pill);
    margin-bottom: 12px;
}

.card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.4;
    margin-bottom: 8px;
}

.card p {
    font-size: 14px;
    color: var(--body);
    line-height: 1.5;
}

.card-img {
    border-radius: var(--rounded-md);
    overflow: hidden;
    margin-bottom: 16px;
}

.card-img img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.card-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
}

/* ARTICLE PAGE */
.article-header {
    padding: 60px 0 40px;
    border-bottom: 1px solid var(--hairline);
}

.article-header h1 {
    font-size: 42px;
    font-weight: 400;
    color: var(--ink);
    letter-spacing: -1px;
    line-height: 1.15;
    max-width: 780px;
    margin-bottom: 16px;
}

.article-meta {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.article-meta span {
    font-size: 13px;
    color: var(--muted);
}

.article-meta span strong {
    color: var(--body-strong);
    font-weight: 500;
}

.article-body {
    padding: 48px 0 80px;
}

.article-content {
    max-width: 720px;
}

.article-content h2 {
    font-size: 26px;
    font-weight: 400;
    color: var(--ink);
    letter-spacing: -0.325px;
    line-height: 1.25;
    margin: 40px 0 16px;
}

.article-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--ink);
    margin: 28px 0 12px;
}

.article-content p {
    font-size: 16px;
    color: var(--body);
    line-height: 1.7;
    margin-bottom: 20px;
}

.article-content ul, .article-content ol {
    padding-left: 24px;
    margin-bottom: 20px;
}

.article-content li {
    font-size: 16px;
    color: var(--body);
    line-height: 1.7;
    margin-bottom: 8px;
}

.article-img {
    border-radius: var(--rounded-lg);
    overflow: hidden;
    border: 1px solid var(--hairline);
    margin: 32px 0;
}

.article-img img {
    width: 100%;
    height: 360px;
    object-fit: cover;
}

.article-img figcaption {
    font-size: 13px;
    color: var(--muted);
    padding: 10px 16px;
    background: var(--canvas-soft);
}

.article-sidebar {
    position: sticky;
    top: 80px;
}

.sidebar-box {
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-lg);
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-box h4 {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 12px;
}

.sidebar-box ul { list-style: none; }
.sidebar-box ul li { margin-bottom: 8px; }
.sidebar-box ul li a {
    font-size: 14px;
    color: var(--body);
    line-height: 1.4;
}
.sidebar-box ul li a:hover { color: var(--primary); }

.article-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 48px;
    align-items: start;
}

/* INFO BOX */
.info-box {
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-left: 3px solid var(--primary);
    border-radius: var(--rounded-md);
    padding: 16px 20px;
    margin: 24px 0;
}

.info-box p {
    font-size: 14px;
    color: var(--body);
    margin: 0;
}

/* STAT BLOCKS */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--hairline);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-lg);
    overflow: hidden;
    margin: 40px 0;
}

.stat-item {
    background: var(--surface-card);
    padding: 28px 24px;
    text-align: center;
}

.stat-item .stat-value {
    font-size: 32px;
    font-weight: 400;
    color: var(--ink);
    letter-spacing: -1px;
    display: block;
    margin-bottom: 4px;
}

.stat-item .stat-label {
    font-size: 13px;
    color: var(--muted);
}

/* FORM */
.form-section {
    padding: 80px 0;
    border-top: 1px solid var(--hairline);
}

.form-wrap {
    max-width: 560px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: var(--surface-card);
    border: 1px solid var(--hairline-strong);
    border-radius: var(--rounded-md);
    padding: 12px 16px;
    font-size: 16px;
    font-family: inherit;
    color: var(--ink);
    height: 44px;
    transition: border-color 0.15s;
}

.form-group textarea {
    height: auto;
    min-height: 120px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--ink);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--muted-soft);
}

.btn-primary {
    background: var(--primary);
    color: var(--on-primary);
    border: none;
    border-radius: var(--rounded-md);
    padding: 10px 20px;
    height: 40px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover { background: var(--primary-active); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.form-message {
    display: none;
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: var(--rounded-md);
    font-size: 14px;
}

.form-message.success {
    background: #e8f5f0;
    color: var(--success);
    border: 1px solid #b8ddd0;
    display: block;
}

/* COOKIE BANNER */
#cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 24px;
    right: 24px;
    max-width: 600px;
    background: var(--ink);
    color: var(--canvas);
    border-radius: var(--rounded-lg);
    padding: 20px 24px;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 24px rgba(38,37,30,0.18);
}

#cookie-banner p {
    font-size: 14px;
    color: #c8c6bf;
    line-height: 1.5;
    margin-bottom: 16px;
}

#cookie-banner p a { color: var(--canvas); text-decoration: underline; }

.cookie-btns {
    display: flex;
    gap: 10px;
}

.btn-cookie-accept {
    background: var(--primary);
    color: var(--on-primary);
    border: none;
    border-radius: var(--rounded-md);
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
}

.btn-cookie-reject {
    background: transparent;
    color: var(--canvas);
    border: 1px solid #4a4940;
    border-radius: var(--rounded-md);
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
}

/* FOOTER */
.site-footer {
    background: var(--canvas);
    border-top: 1px solid var(--hairline);
    padding: 64px 0 48px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 48px;
}

.footer-brand p {
    font-size: 14px;
    color: var(--body);
    line-height: 1.6;
    margin-top: 10px;
    max-width: 260px;
}

.footer-col h5 {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: 0.3px;
    margin-bottom: 14px;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a {
    font-size: 14px;
    color: var(--body);
    transition: color 0.15s;
}
.footer-col ul li a:hover { color: var(--ink); }

.footer-bottom {
    border-top: 1px solid var(--hairline);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-bottom p {
    font-size: 13px;
    color: var(--muted);
}

.footer-bottom a {
    font-size: 13px;
    color: var(--muted);
}

.footer-bottom a:hover { color: var(--ink); }

/* PAGE HEADER (inner pages) */
.page-header {
    padding: 60px 0 48px;
    border-bottom: 1px solid var(--hairline);
}

.page-header h1 {
    font-size: 42px;
    font-weight: 400;
    color: var(--ink);
    letter-spacing: -1px;
    line-height: 1.15;
    margin-bottom: 12px;
}

.page-header p {
    font-size: 16px;
    color: var(--body);
    max-width: 560px;
}

.page-body {
    padding: 48px 0 80px;
    max-width: 760px;
}

.page-body h2 {
    font-size: 26px;
    font-weight: 400;
    color: var(--ink);
    letter-spacing: -0.325px;
    margin: 36px 0 14px;
}

.page-body h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--ink);
    margin: 24px 0 10px;
}

.page-body p, .page-body li {
    font-size: 16px;
    color: var(--body);
    line-height: 1.7;
    margin-bottom: 16px;
}

.page-body ul, .page-body ol {
    padding-left: 24px;
    margin-bottom: 16px;
}

/* DIVIDER */
.divider {
    border: none;
    border-top: 1px solid var(--hairline);
    margin: 40px 0;
}

/* BREADCRUMB */
.breadcrumb {
    padding: 14px 0;
    border-bottom: 1px solid var(--hairline-soft);
}

.breadcrumb a, .breadcrumb span {
    font-size: 13px;
    color: var(--muted);
}

.breadcrumb a:hover { color: var(--ink); }
.breadcrumb .sep { margin: 0 6px; }

/* RELATED ARTICLES */
.related-section {
    padding: 60px 0;
    border-top: 1px solid var(--hairline);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 32px;
}

/* SPINNER */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* RESPONSIVE */
@media (max-width: 1024px) {
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
    .article-layout { grid-template-columns: 1fr; }
    .article-sidebar { position: static; }
    .stats-row { grid-template-columns: 1fr; }
    .stat-item { text-align: left; }
}

@media (max-width: 768px) {
    .nav-menu { display: none; }
    .nav-hamburger { display: flex; }
    .hero h1 { font-size: 36px; letter-spacing: -1px; }
    .hero p { font-size: 16px; }
    .section-title { font-size: 28px; }
    .cards-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .article-header h1 { font-size: 30px; }
    .related-grid { grid-template-columns: 1fr; }
    #cookie-banner { left: 16px; right: 16px; bottom: 16px; }
}

@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
    .hero-img img { height: 240px; }
}
