@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;
    --on-primary: #ffffff;
    --ink: #26251e;
    --body: #5a5852;
    --body-strong: #26251e;
    --muted: #807d72;
    --muted-soft: #a09c92;
    --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;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--canvas);
    color: var(--body);
    font-family: 'Inter', system-ui, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

code, pre {
    font-family: 'JetBrains Mono', monospace;
}

.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;
    height: 100%;
    gap: 32px;
}

.nav-wordmark {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.3px;
    white-space: nowrap;
}

.nav-wordmark span {
    color: var(--primary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 4px;
    flex: 1;
}

.nav-menu a {
    display: block;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--body);
    border-radius: var(--rounded-sm);
    transition: color 0.15s, background 0.15s;
}

.nav-menu a:hover {
    color: var(--ink);
    background: var(--surface-strong);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: var(--on-primary);
    font-size: 14px;
    font-weight: 500;
    padding: 10px 18px;
    height: 40px;
    border-radius: var(--rounded-md);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: background 0.15s;
    white-space: nowrap;
}

.btn-primary:hover {
    background: var(--primary-active);
}

.btn-secondary {
    background: var(--surface-card);
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
    padding: 10px 18px;
    height: 40px;
    border-radius: var(--rounded-md);
    border: 1px solid var(--hairline-strong);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: background 0.15s;
    white-space: nowrap;
}

.btn-secondary:hover {
    background: var(--surface-strong);
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: all 0.2s;
}

/* ---- HERO ---- */
.hero-band {
    padding: 80px 0;
    background: var(--canvas);
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    background: var(--surface-strong);
    color: var(--ink);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: var(--rounded-pill);
    margin-bottom: 20px;
}

.hero-band h1 {
    font-size: 52px;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -1.5px;
    color: var(--ink);
    margin-bottom: 20px;
}

.hero-band .hero-sub {
    font-size: 16px;
    line-height: 1.5;
    color: var(--body);
    margin-bottom: 32px;
    max-width: 480px;
}

.hero-meta {
    font-size: 13px;
    color: var(--muted);
    margin-top: 16px;
}

.hero-image-wrap {
    position: relative;
    border-radius: var(--rounded-lg);
    overflow: hidden;
    border: 1px solid var(--hairline);
    background: var(--surface-card);
    aspect-ratio: 4/3;
}

.hero-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(38, 37, 30, 0.7);
    color: rgba(247, 247, 244, 0.9);
    font-size: 11px;
    padding: 8px 14px;
    font-family: 'Inter', sans-serif;
}

/* ---- SECTIONS ---- */
.section {
    padding: 80px 0;
}

.section-alt {
    background: var(--canvas-soft);
}

.section-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 12px;
    display: block;
}

.section-title {
    font-size: 36px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.72px;
    color: var(--ink);
    margin-bottom: 16px;
}

.section-lead {
    font-size: 16px;
    line-height: 1.5;
    color: var(--body);
    max-width: 640px;
    margin-bottom: 48px;
}

.section-head-center {
    text-align: center;
}

.section-head-center .section-lead {
    margin-left: auto;
    margin-right: auto;
}

/* ---- CARDS ---- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.cards-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.feature-card {
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-lg);
    padding: 24px;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 10px;
    line-height: 1.4;
}

.feature-card p {
    font-size: 14px;
    line-height: 1.5;
    color: var(--body);
}

.feature-card .card-icon {
    font-size: 24px;
    margin-bottom: 16px;
}

.article-card {
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.article-card-img {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--surface-strong);
}

.article-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.article-card:hover .article-card-img img {
    transform: scale(1.03);
}

.article-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card-tag {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 10px;
}

.article-card-body h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.4;
    margin-bottom: 10px;
    letter-spacing: -0.11px;
}

.article-card-body p {
    font-size: 14px;
    line-height: 1.5;
    color: var(--body);
    flex: 1;
    margin-bottom: 20px;
}

.article-card-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-bottom: 1px solid var(--hairline-strong);
    padding-bottom: 2px;
    align-self: flex-start;
    transition: border-color 0.15s, color 0.15s;
}

.article-card-link:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* ---- DIVIDER ---- */
.divider {
    border: none;
    border-top: 1px solid var(--hairline);
    margin: 0;
}

/* ---- ARTICLE PAGE ---- */
.article-header {
    padding: 64px 0 48px;
    background: var(--canvas);
    border-bottom: 1px solid var(--hairline);
}

.article-breadcrumb {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 24px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.article-breadcrumb a {
    color: var(--muted);
    transition: color 0.15s;
}

.article-breadcrumb a:hover {
    color: var(--ink);
}

.article-header h1 {
    font-size: 42px;
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -1px;
    color: var(--ink);
    margin-bottom: 16px;
    max-width: 760px;
}

.article-header .article-lead {
    font-size: 18px;
    line-height: 1.5;
    color: var(--body);
    max-width: 640px;
    margin-bottom: 24px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--muted);
}

.article-meta-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--muted);
}

.article-hero-img {
    border-radius: var(--rounded-lg);
    overflow: hidden;
    border: 1px solid var(--hairline);
    margin: 48px 0;
    aspect-ratio: 21/9;
    background: var(--surface-strong);
}

.article-hero-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-img-caption {
    font-size: 13px;
    color: var(--muted);
    margin-top: 10px;
    font-style: italic;
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 64px;
    padding: 64px 0 80px;
    align-items: start;
}

.article-content h2 {
    font-size: 26px;
    font-weight: 400;
    letter-spacing: -0.325px;
    color: var(--ink);
    line-height: 1.25;
    margin: 40px 0 16px;
}

.article-content h2:first-child {
    margin-top: 0;
}

.article-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.3;
    margin: 28px 0 12px;
}

.article-content p {
    font-size: 16px;
    line-height: 1.65;
    color: var(--body);
    margin-bottom: 20px;
}

.article-content ul, .article-content ol {
    padding-left: 24px;
    margin-bottom: 20px;
}

.article-content li {
    font-size: 16px;
    line-height: 1.65;
    color: var(--body);
    margin-bottom: 6px;
}

.article-content a {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article-content a:hover {
    color: var(--primary);
}

.info-box {
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-left: 3px solid var(--ink);
    border-radius: var(--rounded-md);
    padding: 20px 24px;
    margin: 28px 0;
}

.info-box p {
    margin: 0;
    font-size: 15px;
}

.article-sidebar {
    position: sticky;
    top: 80px;
}

.sidebar-card {
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-lg);
    padding: 24px;
    margin-bottom: 20px;
}

.sidebar-card h4 {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 16px;
}

.sidebar-toc {
    list-style: none;
}

.sidebar-toc li {
    margin-bottom: 8px;
}

.sidebar-toc a {
    font-size: 14px;
    color: var(--body);
    transition: color 0.15s;
    display: block;
    padding: 4px 0;
    border-bottom: 1px solid var(--hairline-soft);
}

.sidebar-toc a:last-child {
    border-bottom: none;
}

.sidebar-toc a:hover {
    color: var(--ink);
}

.related-links {
    list-style: none;
}

.related-links li {
    margin-bottom: 8px;
}

.related-links a {
    font-size: 14px;
    color: var(--body);
    display: flex;
    gap: 8px;
    align-items: flex-start;
    transition: color 0.15s;
    padding: 4px 0;
    border-bottom: 1px solid var(--hairline-soft);
}

.related-links li:last-child a {
    border-bottom: none;
}

.related-links a:hover {
    color: var(--ink);
}

/* ---- TABLE ---- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin: 24px 0;
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-lg);
    overflow: hidden;
}

.data-table th {
    background: var(--surface-strong);
    color: var(--ink);
    font-weight: 600;
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--hairline);
}

.data-table td {
    padding: 12px 16px;
    color: var(--body);
    border-bottom: 1px solid var(--hairline-soft);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: var(--canvas-soft);
}

/* ---- STATS ROW ---- */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--hairline);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-lg);
    overflow: hidden;
    margin: 48px 0;
}

.stat-item {
    background: var(--surface-card);
    padding: 28px 24px;
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: 400;
    color: var(--ink);
    letter-spacing: -0.72px;
    line-height: 1.1;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.4;
}

/* ---- CONTACT FORM ---- */
.contact-section {
    padding: 80px 0;
    background: var(--canvas);
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.contact-info h2 {
    font-size: 36px;
    font-weight: 400;
    letter-spacing: -0.72px;
    color: var(--ink);
    line-height: 1.2;
    margin-bottom: 16px;
}

.contact-info p {
    font-size: 16px;
    line-height: 1.5;
    color: var(--body);
    margin-bottom: 32px;
}

.contact-detail {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-detail-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.contact-detail-icon {
    font-size: 18px;
    line-height: 1;
    margin-top: 2px;
}

.contact-detail-text {
    font-size: 14px;
    color: var(--body);
    line-height: 1.5;
}

.contact-detail-text strong {
    display: block;
    color: var(--ink);
    font-weight: 600;
    margin-bottom: 2px;
    font-size: 13px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.contact-form {
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-lg);
    padding: 32px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 6px;
    letter-spacing: 0.1px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: var(--canvas);
    border: 1px solid var(--hairline-strong);
    border-radius: var(--rounded-md);
    padding: 12px 16px;
    font-size: 16px;
    font-family: inherit;
    color: var(--ink);
    line-height: 1.4;
    transition: border-color 0.15s;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--ink);
    background: var(--surface-card);
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--muted-soft);
}

.form-submit-btn {
    width: 100%;
    background: var(--ink);
    color: var(--canvas);
    font-size: 14px;
    font-weight: 500;
    padding: 12px 20px;
    height: 44px;
    border-radius: var(--rounded-md);
    border: none;
    cursor: pointer;
    transition: opacity 0.15s;
    font-family: inherit;
}

.form-submit-btn:hover {
    opacity: 0.85;
}

.form-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-message {
    display: none;
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: var(--rounded-md);
    font-size: 14px;
    font-weight: 500;
}

.form-message.success {
    background: #e8f5f0;
    color: var(--semantic-success);
    border: 1px solid #b3dece;
}

.form-error {
    font-size: 12px;
    color: var(--semantic-error);
    margin-top: 4px;
    display: none;
}

/* ---- COOKIE BANNER ---- */
#cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: calc(100% - 48px);
    max-width: 720px;
    background: var(--ink);
    color: var(--canvas);
    border-radius: var(--rounded-lg);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 24px rgba(38, 37, 30, 0.2);
}

#cookie-banner p {
    font-size: 14px;
    line-height: 1.5;
    flex: 1;
    color: rgba(247, 247, 244, 0.85);
}

#cookie-banner a {
    color: var(--canvas);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-actions {
    display: flex;
    gap: 8px;
    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;
    transition: background 0.15s;
}

.cookie-accept:hover {
    background: var(--primary-active);
}

.cookie-reject {
    background: transparent;
    color: rgba(247, 247, 244, 0.7);
    border: 1px solid rgba(247, 247, 244, 0.3);
    border-radius: var(--rounded-md);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s, color 0.15s;
}

.cookie-reject:hover {
    border-color: rgba(247, 247, 244, 0.6);
    color: var(--canvas);
}

/* ---- 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.5;
    margin-top: 12px;
    max-width: 260px;
}

.footer-col h5 {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    color: var(--ink);
    margin-bottom: 16px;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a {
    font-size: 14px;
    color: var(--body);
    transition: color 0.15s;
}

.footer-col a:hover {
    color: var(--ink);
}

.footer-bottom {
    border-top: 1px solid var(--hairline);
    padding-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer-bottom p {
    font-size: 14px;
    color: var(--muted);
}

.footer-bottom-links {
    display: flex;
    gap: 20px;
}

.footer-bottom-links a {
    font-size: 14px;
    color: var(--muted);
    transition: color 0.15s;
}

.footer-bottom-links a:hover {
    color: var(--ink);
}

/* ---- PAGE HERO (inner pages) ---- */
.page-hero {
    padding: 64px 0;
    background: var(--canvas);
    border-bottom: 1px solid var(--hairline);
}

.page-hero h1 {
    font-size: 42px;
    font-weight: 400;
    color: var(--ink);
    letter-spacing: -1px;
    line-height: 1.15;
    margin-bottom: 12px;
}

.page-hero p {
    font-size: 18px;
    color: var(--body);
    line-height: 1.5;
    max-width: 560px;
}

.page-content {
    padding: 64px 0 80px;
}

.page-content h2 {
    font-size: 26px;
    font-weight: 400;
    letter-spacing: -0.325px;
    color: var(--ink);
    line-height: 1.25;
    margin: 40px 0 16px;
}

.page-content h2:first-child {
    margin-top: 0;
}

.page-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    margin: 24px 0 10px;
}

.page-content p {
    font-size: 16px;
    line-height: 1.65;
    color: var(--body);
    margin-bottom: 20px;
    max-width: 720px;
}

.page-content ul, .page-content ol {
    padding-left: 24px;
    margin-bottom: 20px;
    max-width: 720px;
}

.page-content li {
    font-size: 16px;
    line-height: 1.65;
    color: var(--body);
    margin-bottom: 6px;
}

.page-content a {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.updated-date {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 32px;
    display: block;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
    .hero-band h1 {
        font-size: 42px;
    }

    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 32px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--canvas);
        border-bottom: 1px solid var(--hairline);
        flex-direction: column;
        padding: 12px;
        gap: 2px;
    }

    .nav-menu.open {
        display: flex;
    }

    .hamburger {
        display: flex;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-band h1 {
        font-size: 32px;
        letter-spacing: -0.8px;
    }

    .article-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .article-sidebar {
        position: static;
    }

    .contact-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .cards-grid-2 {
        grid-template-columns: 1fr;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .section-title {
        font-size: 28px;
    }

    #cookie-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .stats-row {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .article-header h1 {
        font-size: 28px;
    }
}
