@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;
    --hairline: #e6e5e0;
    --hairline-soft: #efeee8;
    --hairline-strong: #cfcdc4;
    --ink: #26251e;
    --body: #5a5852;
    --body-strong: #26251e;
    --muted: #807d72;
    --muted-soft: #a09c92;
    --primary: #f54e00;
    --primary-active: #d04200;
    --on-primary: #ffffff;
    --success: #1f8a65;
    --error: #cf2d56;
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-pill: 9999px;
    --space-xxs: 4px;
    --space-xs: 8px;
    --space-sm: 12px;
    --space-base: 16px;
    --space-md: 20px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-xxl: 48px;
    --space-section: 80px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; 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;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--primary); }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ===== NAVIGATION ===== */
.site-nav {
    background-color: var(--canvas);
    border-bottom: 1px solid var(--hairline);
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-logo {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.3px;
}

.nav-logo span { color: var(--primary); }

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    list-style: none;
}

.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;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
    flex-direction: column;
    gap: 5px;
}

.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--ink);
    transition: 0.2s;
}

.nav-mobile {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--canvas);
    border-bottom: 1px solid var(--hairline);
    padding: var(--space-base) var(--space-xl);
    list-style: none;
    gap: var(--space-base);
    flex-direction: column;
}

.nav-mobile.open { display: flex; }
.nav-mobile a { font-size: 15px; font-weight: 500; color: var(--body); display: block; padding: var(--space-xs) 0; }
.nav-mobile a:hover { color: var(--ink); }

/* ===== HERO ===== */
.hero {
    padding: var(--space-section) 0;
    border-bottom: 1px solid var(--hairline);
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-section);
    align-items: center;
}

.hero-text {}

.hero-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: var(--space-lg);
}

.hero-title {
    font-size: 56px;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -1.5px;
    color: var(--ink);
    margin-bottom: var(--space-lg);
}

.hero-desc {
    font-size: 16px;
    color: var(--body);
    line-height: 1.6;
    max-width: 480px;
}

.hero-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--hairline);
    aspect-ratio: 4/3;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== SECTION HEADERS ===== */
.section-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: var(--space-base);
    display: block;
}

.section-title {
    font-size: 36px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.72px;
    color: var(--ink);
    margin-bottom: var(--space-xxl);
}

/* ===== ARTICLE CARDS ===== */
.articles-section {
    padding: var(--space-section) 0;
    border-bottom: 1px solid var(--hairline);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.article-card {
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 0.15s;
}

.article-card:hover { border-color: var(--hairline-strong); }

.article-card-image {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.article-card:hover .article-card-image img { transform: scale(1.03); }

.article-card-body {
    padding: var(--space-lg);
}

.article-card-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    background: var(--surface-strong);
    color: var(--muted);
    border-radius: var(--radius-pill);
    padding: 3px 10px;
    margin-bottom: var(--space-sm);
}

.article-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.4;
    margin-bottom: var(--space-xs);
}

.article-card-excerpt {
    font-size: 14px;
    color: var(--body);
    line-height: 1.55;
    margin-bottom: var(--space-base);
}

.article-card-meta {
    font-size: 13px;
    color: var(--muted);
}

/* ===== INTRO BAND ===== */
.intro-band {
    padding: var(--space-section) 0;
    border-bottom: 1px solid var(--hairline);
}

.intro-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-section);
    align-items: start;
}

.intro-body p {
    font-size: 16px;
    color: var(--body);
    line-height: 1.6;
    margin-bottom: var(--space-base);
}

.intro-body p:last-child { margin-bottom: 0; }

.intro-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-base);
}

.stat-item {
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.stat-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: var(--space-xs);
    display: block;
}

.stat-value {
    font-size: 22px;
    font-weight: 400;
    color: var(--ink);
    letter-spacing: -0.11px;
    line-height: 1.3;
}

/* ===== ARTICLE PAGE ===== */
.article-page {
    padding: var(--space-section) 0;
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 680px) 1fr;
    gap: 64px;
}

.article-header {
    margin-bottom: var(--space-xxl);
}

.article-header .article-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    background: var(--surface-strong);
    color: var(--muted);
    border-radius: var(--radius-pill);
    padding: 3px 10px;
    margin-bottom: var(--space-base);
}

.article-header h1 {
    font-size: 48px;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -1.2px;
    color: var(--ink);
    margin-bottom: var(--space-base);
}

.article-meta {
    font-size: 13px;
    color: var(--muted);
    display: flex;
    gap: var(--space-base);
    flex-wrap: wrap;
}

.article-hero-img {
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--hairline);
    margin-bottom: var(--space-xxl);
}

.article-hero-img img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.img-caption {
    font-size: 13px;
    color: var(--muted);
    padding: var(--space-xs) var(--space-base);
    background: var(--canvas-soft);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.article-content h2 {
    font-size: 26px;
    font-weight: 400;
    letter-spacing: -0.325px;
    color: var(--ink);
    line-height: 1.25;
    margin-top: var(--space-xxl);
    margin-bottom: var(--space-base);
}

.article-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.4;
    margin-top: var(--space-xl);
    margin-bottom: var(--space-xs);
}

.article-content p {
    font-size: 16px;
    color: var(--body);
    line-height: 1.65;
    margin-bottom: var(--space-base);
}

.article-content ul, .article-content ol {
    padding-left: var(--space-xl);
    margin-bottom: var(--space-base);
}

.article-content li {
    font-size: 16px;
    color: var(--body);
    line-height: 1.65;
    margin-bottom: var(--space-xs);
}

.article-content a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.15s;
}

.article-content a:hover { text-decoration-color: var(--primary); color: var(--primary); }

.article-content strong { font-weight: 600; color: var(--ink); }

.article-img-block {
    margin: var(--space-xxl) 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--hairline);
}

.article-img-block img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
}

.info-box {
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin: var(--space-xl) 0;
}

.info-box h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: var(--space-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-box p, .info-box li {
    font-size: 14px;
    color: var(--body);
    line-height: 1.55;
    margin-bottom: var(--space-xxs);
}

.info-box ul { padding-left: var(--space-base); margin-bottom: 0; }

/* ===== SIDEBAR ===== */
.article-sidebar {}

.sidebar-card {
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-base);
    position: sticky;
    top: 80px;
}

.sidebar-card h3 {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: var(--space-base);
}

.sidebar-toc { list-style: none; }

.sidebar-toc li {
    border-bottom: 1px solid var(--hairline-soft);
    padding: var(--space-xs) 0;
}

.sidebar-toc li:last-child { border-bottom: none; }

.sidebar-toc a {
    font-size: 14px;
    color: var(--body);
    transition: color 0.15s;
}

.sidebar-toc a:hover { color: var(--ink); }

.related-item {
    display: flex;
    gap: var(--space-sm);
    align-items: flex-start;
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--hairline-soft);
}

.related-item:last-child { margin-bottom: 0; border-bottom: none; padding-bottom: 0; }

.related-item-text { font-size: 13px; line-height: 1.45; color: var(--body); }
.related-item-text a { color: var(--ink); font-weight: 500; }
.related-item-text a:hover { color: var(--primary); }

/* ===== DATA TABLES ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-xl) 0;
    font-size: 14px;
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.data-table th {
    background: var(--surface-strong);
    color: var(--ink);
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: var(--space-sm) var(--space-base);
    text-align: left;
}

.data-table td {
    padding: var(--space-sm) var(--space-base);
    color: var(--body);
    border-top: 1px solid var(--hairline-soft);
}

.data-table tr:hover td { background: var(--canvas-soft); }

/* ===== GENERAL PAGES ===== */
.page-hero {
    padding: var(--space-xxl) 0 var(--space-section);
    border-bottom: 1px solid var(--hairline);
}

.page-hero h1 {
    font-size: 48px;
    font-weight: 400;
    letter-spacing: -1.2px;
    color: var(--ink);
    margin-bottom: var(--space-base);
    line-height: 1.1;
}

.page-hero p {
    font-size: 16px;
    color: var(--body);
    max-width: 560px;
    line-height: 1.6;
}

.page-content {
    padding: var(--space-section) 0;
}

.page-content h2 {
    font-size: 26px;
    font-weight: 400;
    letter-spacing: -0.325px;
    color: var(--ink);
    margin-top: var(--space-xxl);
    margin-bottom: var(--space-base);
}

.page-content h2:first-child { margin-top: 0; }

.page-content p {
    font-size: 16px;
    color: var(--body);
    line-height: 1.65;
    margin-bottom: var(--space-base);
}

.page-content ul, .page-content ol {
    padding-left: var(--space-xl);
    margin-bottom: var(--space-base);
}

.page-content li {
    font-size: 16px;
    color: var(--body);
    line-height: 1.65;
    margin-bottom: var(--space-xs);
}

.page-content a { color: var(--primary); }
.page-content a:hover { text-decoration: underline; }

.page-layout {
    display: grid;
    grid-template-columns: minmax(0, 680px) 1fr;
    gap: 64px;
}

/* ===== CONTACT FORM ===== */
.contact-form-wrap {
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    padding: var(--space-xxl);
}

.contact-form-wrap h2 {
    font-size: 22px;
    font-weight: 400;
    letter-spacing: -0.11px;
    color: var(--ink);
    margin-bottom: var(--space-base);
}

.contact-form-wrap p {
    font-size: 14px;
    color: var(--body);
    margin-bottom: var(--space-xl);
    line-height: 1.55;
}

.form-group {
    margin-bottom: var(--space-base);
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: var(--space-xxs);
    letter-spacing: 0.1px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    background: var(--surface-card);
    color: var(--ink);
    border: 1px solid var(--hairline-strong);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    height: 44px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.15s;
    outline: none;
}

.form-group textarea {
    height: auto;
    min-height: 100px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--ink);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--muted-soft); }

.form-group .field-error {
    display: none;
    font-size: 12px;
    color: var(--error);
    margin-top: var(--space-xxs);
}

.form-group.has-error input,
.form-group.has-error textarea {
    border-color: var(--error);
}

.form-group.has-error .field-error { display: block; }

.btn-submit {
    background: var(--ink);
    color: var(--canvas);
    border: none;
    border-radius: var(--radius-md);
    padding: 12px 20px;
    height: 44px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    transition: background 0.15s;
    min-width: 160px;
    justify-content: center;
}

.btn-submit:hover { background: var(--primary); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.form-message {
    display: none;
    padding: var(--space-base);
    border-radius: var(--radius-md);
    font-size: 14px;
    margin-top: var(--space-base);
}

.form-message.success {
    display: block;
    background: #e8f5f0;
    color: var(--success);
    border: 1px solid #b3dece;
}

/* ===== COOKIE BANNER ===== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--ink);
    color: var(--canvas);
    padding: var(--space-base) var(--space-xl);
    z-index: 200;
    display: none;
}

.cookie-banner.visible { display: block; }

.cookie-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xl);
    max-width: 1200px;
    margin: 0 auto;
}

.cookie-text {
    font-size: 14px;
    line-height: 1.5;
    color: #c4c2ba;
}

.cookie-text a { color: var(--canvas); text-decoration: underline; }

.cookie-buttons {
    display: flex;
    gap: var(--space-xs);
    flex-shrink: 0;
}

.btn-cookie-accept {
    background: var(--primary);
    color: var(--on-primary);
    border: none;
    border-radius: var(--radius-md);
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    height: 36px;
}

.btn-cookie-accept:hover { background: var(--primary-active); }

.btn-cookie-reject {
    background: transparent;
    color: var(--canvas-soft);
    border: 1px solid #4a4840;
    border-radius: var(--radius-md);
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    height: 36px;
}

.btn-cookie-reject:hover { border-color: #807d72; }

/* ===== FOOTER ===== */
.site-footer {
    background: var(--canvas);
    border-top: 1px solid var(--hairline);
    padding: 64px var(--space-xl) 48px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: var(--space-xxl);
}

.footer-brand .nav-logo {
    font-size: 16px;
    margin-bottom: var(--space-base);
    display: block;
}

.footer-brand p {
    font-size: 14px;
    color: var(--body);
    line-height: 1.55;
    max-width: 260px;
}

.footer-col h4 {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: var(--space-base);
}

.footer-col ul { list-style: none; }

.footer-col li { margin-bottom: var(--space-xs); }

.footer-col a {
    font-size: 14px;
    color: var(--body);
    transition: color 0.15s;
}

.footer-col a:hover { color: var(--ink); }

.footer-bottom {
    max-width: 1200px;
    margin: var(--space-xxl) auto 0;
    padding-top: var(--space-xl);
    border-top: 1px solid var(--hairline);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-base);
    flex-wrap: wrap;
}

.footer-bottom p { font-size: 13px; color: var(--muted); }

.footer-bottom a { color: var(--muted); transition: color 0.15s; }
.footer-bottom a:hover { color: var(--ink); }

/* ===== BREADCRUMBS ===== */
.breadcrumbs {
    padding: var(--space-base) 0;
    border-bottom: 1px solid var(--hairline-soft);
    margin-bottom: var(--space-xxl);
}

.breadcrumbs nav {
    font-size: 13px;
    color: var(--muted);
    display: flex;
    gap: var(--space-xs);
    align-items: center;
}

.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--ink); }
.breadcrumbs .sep { color: var(--hairline-strong); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .hero-title { font-size: 48px; }
    .articles-grid { grid-template-columns: 1fr 1fr; }
    .article-layout { grid-template-columns: 1fr; }
    .article-sidebar { display: none; }
    .page-layout { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
    .intro-inner { grid-template-columns: 1fr; gap: var(--space-xxl); }
}

@media (max-width: 768px) {
    :root { --space-section: 56px; }
    .container { padding: 0 var(--space-base); }
    .nav-links { display: none; }
    .nav-hamburger { display: flex; }
    .hero-inner { grid-template-columns: 1fr; }
    .hero-title { font-size: 36px; letter-spacing: -0.8px; }
    .hero-image { display: none; }
    .section-title { font-size: 28px; }
    .articles-grid { grid-template-columns: 1fr; }
    .intro-stats { grid-template-columns: 1fr 1fr; }
    .footer-inner { grid-template-columns: 1fr 1fr; gap: var(--space-xl); }
    .footer-brand { grid-column: 1 / -1; }
    .page-hero h1 { font-size: 36px; }
    .article-header h1 { font-size: 34px; }
    .cookie-inner { flex-direction: column; align-items: flex-start; }
    .site-footer { padding: 48px var(--space-base) 32px; }
    .contact-form-wrap { padding: var(--space-xl); }
}

@media (max-width: 480px) {
    .hero-title { font-size: 30px; }
    .articles-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; }
    .intro-stats { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
}
