@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400&display=swap');

: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;
    --semantic-success: #1f8a65;
    --semantic-error: #cf2d56;
    --rounded-xs: 4px;
    --rounded-sm: 6px;
    --rounded-md: 8px;
    --rounded-lg: 12px;
    --rounded-xl: 16px;
    --rounded-pill: 9999px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; 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;
    font-weight: 400;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

h1, h2, h3, h4 {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 400;
    color: var(--ink);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h1 { font-size: 52px; letter-spacing: -0.04em; line-height: 1.1; }
h2 { font-size: 36px; letter-spacing: -0.02em; line-height: 1.2; }
h3 { font-size: 26px; letter-spacing: -0.012em; line-height: 1.25; }
h4 { font-size: 22px; line-height: 1.3; }

p { color: var(--body); line-height: 1.6; }

.section-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 16px;
    display: block;
}

/* ——— TOP NAV ——— */
.site-nav {
    background-color: var(--canvas);
    border-bottom: 1px solid var(--hairline);
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-logo {
    font-size: 17px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.nav-logo span { color: var(--primary); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--body);
    transition: color 0.15s;
}

.nav-links a:hover { color: var(--ink); }

.nav-links a.active { color: var(--ink); }

.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
}

.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: all 0.2s;
}

.nav-mobile {
    display: none;
    background: var(--canvas);
    border-bottom: 1px solid var(--hairline);
    padding: 16px 0;
}

.nav-mobile.open { display: block; }

.nav-mobile a {
    display: block;
    padding: 10px 24px;
    font-size: 15px;
    font-weight: 500;
    color: var(--body);
    border-bottom: 1px solid var(--hairline-soft);
}

.nav-mobile a:last-child { border-bottom: none; }

/* ——— HERO ——— */
.hero-band {
    padding: 80px 0;
    border-bottom: 1px solid var(--hairline);
}

.hero-band .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.hero-text h1 {
    font-size: 56px;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

.hero-text p {
    font-size: 18px;
    line-height: 1.6;
    color: var(--body);
    max-width: 480px;
}

.hero-image img {
    border-radius: var(--rounded-lg);
    border: 1px solid var(--hairline);
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
}

/* ——— SECTIONS ——— */
.section { padding: 80px 0; }

.section-border { border-bottom: 1px solid var(--hairline); }

.section-head {
    margin-bottom: 48px;
}

.section-head h2 { margin-bottom: 12px; }
.section-head p { color: var(--body); font-size: 16px; max-width: 600px; }

/* ——— CARDS ——— */
.card-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.card-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-lg);
    padding: 24px;
}

.feature-card h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--ink);
}

.feature-card p { font-size: 14px; color: var(--body); line-height: 1.6; }

/* ——— ARTICLE CARD ——— */
.article-card {
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-lg);
    overflow: hidden;
    transition: border-color 0.15s;
}

.article-card:hover { border-color: var(--hairline-strong); }

.article-card-img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}

.article-card-body { padding: 20px 24px 24px; }

.article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.article-tag {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--surface-strong);
    border-radius: var(--rounded-pill);
    padding: 3px 10px;
}

.article-date { font-size: 13px; color: var(--muted-soft); }

.article-card-body h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--ink);
    letter-spacing: -0.01em;
}

.article-card-body h3 a { color: var(--ink); }
.article-card-body h3 a:hover { color: var(--primary); }

.article-card-body p { font-size: 14px; color: var(--body); line-height: 1.6; }

/* ——— ARTICLE PAGE ——— */
.article-hero {
    padding: 64px 0 0;
    border-bottom: 1px solid var(--hairline);
}

.article-hero .container {
    max-width: 800px;
}

.article-hero h1 {
    font-size: 44px;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
}

.article-hero-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    font-size: 13px;
    color: var(--muted);
}

.article-hero-img {
    width: 100%;
    aspect-ratio: 16/7;
    object-fit: cover;
    border-radius: var(--rounded-lg) var(--rounded-lg) 0 0;
    border: 1px solid var(--hairline);
    border-bottom: none;
}

.article-body {
    padding: 48px 0 80px;
}

.article-body .container {
    max-width: 800px;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 64px;
    align-items: start;
}

.article-content h2 {
    font-size: 28px;
    margin-top: 40px;
    margin-bottom: 16px;
    padding-top: 40px;
    border-top: 1px solid var(--hairline-soft);
}

.article-content h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }

.article-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin-top: 28px;
    margin-bottom: 12px;
}

.article-content p { margin-bottom: 20px; font-size: 16px; color: var(--body); line-height: 1.7; }

.article-content ul, .article-content ol {
    margin-bottom: 20px;
    padding-left: 20px;
    color: var(--body);
}

.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }

.article-content li { margin-bottom: 8px; font-size: 16px; line-height: 1.6; }

.article-content code {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 13px;
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-xs);
    padding: 2px 6px;
    color: var(--ink);
}

.article-content blockquote {
    border-left: 3px solid var(--hairline-strong);
    padding-left: 20px;
    margin: 28px 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.7;
}

.info-box {
    background: var(--canvas-soft);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-lg);
    padding: 20px 24px;
    margin: 28px 0;
}

.info-box-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 8px;
    display: block;
}

.info-box p { margin-bottom: 0; font-size: 14px; }

.article-sidebar { position: sticky; top: 88px; }

.sidebar-widget {
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-lg);
    padding: 20px 24px;
    margin-bottom: 24px;
}

.sidebar-widget h4 {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 16px;
}

.sidebar-toc a {
    display: block;
    font-size: 14px;
    color: var(--body);
    padding: 6px 0;
    border-bottom: 1px solid var(--hairline-soft);
    line-height: 1.4;
}

.sidebar-toc a:last-child { border-bottom: none; }
.sidebar-toc a:hover { color: var(--ink); }

.sidebar-links a {
    display: block;
    font-size: 14px;
    color: var(--body);
    padding: 6px 0;
    border-bottom: 1px solid var(--hairline-soft);
}

.sidebar-links a:last-child { border-bottom: none; }
.sidebar-links a:hover { color: var(--primary); }

/* ——— CONTACT FORM ——— */
.form-band {
    padding: 80px 0;
    background: var(--canvas-soft);
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
}

.contact-form { 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: 11px 16px;
    font-size: 15px;
    font-family: inherit;
    color: var(--ink);
    height: 44px;
    outline: none;
    transition: border-color 0.15s;
}

.form-group textarea {
    height: auto;
    min-height: 120px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--ink);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--on-primary);
    font-size: 14px;
    font-weight: 500;
    padding: 10px 20px;
    height: 40px;
    border-radius: var(--rounded-md);
    border: none;
    cursor: pointer;
    transition: background-color 0.15s;
    font-family: inherit;
}

.btn-primary:hover { background: var(--primary-active); color: var(--on-primary); }
.btn-primary:disabled { opacity: 0.6; cursor: default; }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-card);
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
    padding: 10px 20px;
    height: 40px;
    border-radius: var(--rounded-md);
    border: 1px solid var(--hairline-strong);
    cursor: pointer;
    transition: border-color 0.15s;
    font-family: inherit;
}

.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }

.form-message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: var(--rounded-md);
    font-size: 14px;
    display: none;
}

.form-message.success {
    display: block;
    background: #ecf8f4;
    border: 1px solid #9fd4be;
    color: var(--semantic-success);
}

.form-message.error {
    display: block;
    background: #fdf0f3;
    border: 1px solid #f5b8c4;
    color: var(--semantic-error);
}

.spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-right: 8px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ——— COOKIE BANNER ——— */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--ink);
    color: var(--canvas);
    padding: 16px 24px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    font-size: 14px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.cookie-banner p { color: var(--canvas-soft); font-size: 14px; margin: 0; }
.cookie-banner a { color: var(--canvas); text-decoration: underline; }

.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }

.cookie-accept {
    background: var(--primary);
    color: var(--on-primary);
    border: none;
    border-radius: var(--rounded-md);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
}

.cookie-reject {
    background: transparent;
    color: var(--canvas);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: var(--rounded-md);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
}

/* ——— BREADCRUMB ——— */
.breadcrumb {
    padding: 16px 0;
    border-bottom: 1px solid var(--hairline-soft);
}

.breadcrumb ol {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
}

.breadcrumb li { display: flex; align-items: center; gap: 6px; }

.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb .sep { color: var(--muted-soft); }
.breadcrumb .current { color: var(--body); }

/* ——— 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;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.footer-brand h3 span { color: var(--primary); }

.footer-brand p {
    font-size: 14px;
    color: var(--muted);
    max-width: 280px;
    line-height: 1.6;
}

.footer-col h4 {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--ink);
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    font-size: 14px;
    color: var(--body);
    margin-bottom: 10px;
    transition: color 0.15s;
}

.footer-col a:hover { color: var(--ink); }

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--hairline);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-bottom p { font-size: 13px; color: var(--muted); }

.footer-disclaimer {
    font-size: 12px;
    color: var(--muted-soft);
    margin-top: 16px;
    line-height: 1.6;
    padding-top: 16px;
    border-top: 1px solid var(--hairline-soft);
}

/* ——— PAGE HEADER (for inner pages) ——— */
.page-header {
    padding: 64px 0 48px;
    border-bottom: 1px solid var(--hairline);
}

.page-header h1 { font-size: 44px; margin-bottom: 12px; }
.page-header p { font-size: 17px; color: var(--body); max-width: 560px; }

/* ——— ABOUT PAGE ——— */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

/* ——— PROSE (static pages) ——— */
.prose h2 {
    font-size: 26px;
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 16px;
    color: var(--ink);
    padding-top: 40px;
    border-top: 1px solid var(--hairline-soft);
}

.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }

.prose h3 {
    font-size: 18px;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 10px;
    color: var(--ink);
}

.prose p { font-size: 16px; color: var(--body); line-height: 1.7; margin-bottom: 18px; }

.prose ul, .prose ol {
    margin-bottom: 18px;
    padding-left: 20px;
    color: var(--body);
}

.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 8px; font-size: 16px; line-height: 1.6; }

.prose a { color: var(--primary); text-decoration: underline; }
.prose a:hover { color: var(--primary-active); }

/* ——— UTILITIES ——— */
.text-muted { color: var(--muted); }
.text-sm { font-size: 14px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

.divider {
    border: none;
    border-top: 1px solid var(--hairline);
    margin: 0;
}

/* ——— RESPONSIVE ——— */
@media (max-width: 1024px) {
    h1 { font-size: 44px; }
    .hero-band .container { grid-template-columns: 1fr; gap: 40px; }
    .hero-text h1 { font-size: 44px; }
    .card-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .article-body .container { grid-template-columns: 1fr; }
    .article-sidebar { position: static; }
    .about-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 768px) {
    h1 { font-size: 34px; }
    h2 { font-size: 28px; }
    h3 { font-size: 22px; }
    .nav-links { display: none; }
    .nav-hamburger { display: flex; }
    .hero-band { padding: 48px 0; }
    .hero-text h1 { font-size: 34px; }
    .section { padding: 48px 0; }
    .card-grid-3, .card-grid-2 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
    .article-hero h1 { font-size: 32px; }
    .page-header h1 { font-size: 32px; }
    .cookie-banner { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    h1 { font-size: 28px; }
}
