*, *::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;
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-pill: 9999px;
    --font-sans: 'Inter', system-ui, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--body);
    background-color: var(--canvas);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Cookie banner */
#cookie-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--ink);
    color: var(--canvas);
    padding: 16px 24px;
    z-index: 1000;
    border-top: 1px solid var(--hairline-strong);
}
#cookie-banner.visible { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
#cookie-banner p { flex: 1; font-size: 14px; min-width: 200px; }
#cookie-banner a { color: var(--primary); text-decoration: underline; }
.cookie-actions { display: flex; gap: 12px; }

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: var(--on-primary);
    border: none;
    border-radius: var(--radius-md);
    padding: 10px 18px;
    height: 40px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
    display: inline-flex;
    align-items: center;
}
.btn-primary:hover { background: var(--primary-active); text-decoration: none; }

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

/* Header */
.site-header {
    background: var(--canvas);
    border-bottom: 1px solid var(--hairline);
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.site-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.logo-text {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.3px;
    color: var(--ink);
}
.logo-text span { color: var(--primary); }

/* Nav */
.site-nav ul {
    display: flex;
    gap: 8px;
    align-items: center;
}
.site-nav a {
    font-size: 14px;
    font-weight: 500;
    color: var(--body);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: color 0.15s;
}
.site-nav a:hover, .site-nav a.active {
    color: var(--ink);
    text-decoration: none;
}
.site-nav a.active { background: var(--surface-strong); }

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: all 0.2s;
}

/* Hero */
.hero {
    padding: 80px 0;
    background: var(--canvas);
    border-bottom: 1px solid var(--hairline-soft);
}
.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    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;
    border-radius: var(--radius-pill);
    padding: 4px 10px;
    margin-bottom: 20px;
}
.hero h1 {
    font-size: 48px;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -1px;
    color: var(--ink);
    margin-bottom: 20px;
}
.hero-sub {
    font-size: 16px;
    color: var(--body);
    line-height: 1.6;
    margin-bottom: 32px;
    max-width: 440px;
}
.hero-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--hairline);
}
.hero-image img {
    width: 100%;
    height: 380px;
    object-fit: cover;
}

/* Section */
section { padding: 80px 0; }
section + section { border-top: 1px solid var(--hairline-soft); }

.section-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 12px;
}
.section-title {
    font-size: 36px;
    font-weight: 400;
    letter-spacing: -0.72px;
    line-height: 1.2;
    color: var(--ink);
    margin-bottom: 16px;
}
.section-sub {
    font-size: 16px;
    color: var(--body);
    line-height: 1.6;
    max-width: 600px;
    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(--radius-lg);
    padding: 24px;
    transition: border-color 0.15s;
}
.card:hover { border-color: var(--hairline-strong); }
.card-img {
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 20px;
}
.card-img img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.card-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}
.card-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink);
    margin-bottom: 10px;
}
.card-title a { color: inherit; }
.card-title a:hover { text-decoration: underline; }
.card-excerpt {
    font-size: 14px;
    color: var(--body);
    line-height: 1.6;
    margin-bottom: 16px;
}
.card-meta {
    font-size: 13px;
    color: var(--muted);
}

/* Feature strip */
.feature-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.feature-item {
    padding: 32px 28px;
    border-right: 1px solid var(--hairline);
}
.feature-item:last-child { border-right: none; }
.feature-number {
    font-size: 36px;
    font-weight: 400;
    color: var(--primary);
    letter-spacing: -1px;
    margin-bottom: 8px;
}
.feature-item h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 8px;
}
.feature-item p {
    font-size: 14px;
    color: var(--body);
    line-height: 1.6;
}

/* Two-col layout */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}
.two-col-img {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--hairline);
}
.two-col-img img {
    width: 100%;
    height: 360px;
    object-fit: cover;
}

/* Article layout */
.article-hero {
    padding: 60px 0 40px;
    border-bottom: 1px solid var(--hairline-soft);
}
.article-meta-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.tag-pill {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    background: var(--surface-strong);
    color: var(--ink);
    border-radius: var(--radius-pill);
    padding: 4px 10px;
}
.article-date { font-size: 13px; color: var(--muted); }
.article-hero h1 {
    font-size: 42px;
    font-weight: 400;
    letter-spacing: -0.8px;
    line-height: 1.15;
    color: var(--ink);
    margin-bottom: 20px;
    max-width: 760px;
}
.article-intro {
    font-size: 18px;
    color: var(--body);
    line-height: 1.6;
    max-width: 680px;
    margin-bottom: 32px;
}
.article-cover {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--hairline);
    margin-top: 40px;
}
.article-cover img {
    width: 100%;
    height: 460px;
    object-fit: cover;
}
.article-caption {
    font-size: 13px;
    color: var(--muted);
    padding: 10px 16px;
    background: var(--canvas-soft);
    border-top: 1px solid var(--hairline);
}

.article-body {
    padding: 60px 0 80px;
}
.article-content {
    max-width: 720px;
}
.article-content h2 {
    font-size: 26px;
    font-weight: 400;
    letter-spacing: -0.325px;
    color: var(--ink);
    margin-top: 48px;
    margin-bottom: 16px;
    line-height: 1.25;
}
.article-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    margin-top: 32px;
    margin-bottom: 12px;
}
.article-content p {
    font-size: 16px;
    color: var(--body);
    line-height: 1.7;
    margin-bottom: 20px;
}
.article-content ul, .article-content ol {
    margin-bottom: 20px;
    padding-left: 20px;
}
.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }
.article-content li {
    font-size: 16px;
    color: var(--body);
    line-height: 1.7;
    margin-bottom: 8px;
}
.article-content a { color: var(--ink); text-decoration: underline; }
.article-content strong { color: var(--ink); font-weight: 600; }

.info-box {
    background: var(--canvas-soft);
    border: 1px solid var(--hairline);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin: 32px 0;
}
.info-box p { margin-bottom: 0; font-size: 15px; }

.article-sidebar {
    padding-top: 8px;
}
.sidebar-card {
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}
.sidebar-card h4 {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 16px;
}
.sidebar-card ul { list-style: none; }
.sidebar-card ul li {
    border-bottom: 1px solid var(--hairline-soft);
    padding: 10px 0;
    font-size: 14px;
}
.sidebar-card ul li:last-child { border-bottom: none; padding-bottom: 0; }
.sidebar-card ul li a { color: var(--ink); }
.sidebar-card ul li a:hover { text-decoration: underline; }

.article-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 60px;
    align-items: start;
}

/* Contact form */
.contact-form-section {
    background: var(--canvas-soft);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    padding: 40px;
}
.contact-form-section h2 {
    font-size: 22px;
    font-weight: 400;
    letter-spacing: -0.11px;
    color: var(--ink);
    margin-bottom: 8px;
}
.contact-form-section p {
    font-size: 15px;
    color: var(--body);
    margin-bottom: 28px;
}
.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);
    color: var(--ink);
    border: 1px solid var(--hairline-strong);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    height: 44px;
    font-family: var(--font-sans);
    font-size: 15px;
    transition: border-color 0.15s;
    outline: none;
}
.form-group textarea { height: 120px; resize: vertical; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--ink); }
.form-group input.error, .form-group textarea.error { border-color: var(--semantic-error); }
.field-error {
    font-size: 13px;
    color: var(--semantic-error);
    margin-top: 4px;
    display: none;
}
.form-message {
    display: none;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 15px;
    margin-top: 16px;
}
.form-message.success {
    background: #e8f5f0;
    color: var(--semantic-success);
    border: 1px solid #b0ddd0;
}
.form-loading {
    display: none;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 14px;
    margin-top: 12px;
}
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--hairline);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Page content */
.page-hero {
    padding: 60px 0 40px;
    border-bottom: 1px solid var(--hairline-soft);
}
.page-hero h1 {
    font-size: 42px;
    font-weight: 400;
    letter-spacing: -0.8px;
    color: var(--ink);
    margin-bottom: 16px;
}
.page-hero p {
    font-size: 17px;
    color: var(--body);
    max-width: 600px;
}
.page-body {
    padding: 60px 0 80px;
    max-width: 760px;
}
.page-body h2 {
    font-size: 22px;
    font-weight: 400;
    letter-spacing: -0.11px;
    color: var(--ink);
    margin-top: 40px;
    margin-bottom: 12px;
}
.page-body p {
    font-size: 16px;
    color: var(--body);
    line-height: 1.7;
    margin-bottom: 16px;
}
.page-body ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 16px;
}
.page-body li {
    font-size: 16px;
    color: var(--body);
    line-height: 1.7;
    margin-bottom: 6px;
}
.page-updated {
    font-size: 13px;
    color: var(--muted);
    margin-top: -8px;
    margin-bottom: 32px;
}

/* Articles index */
.articles-list {
    display: grid;
    gap: 1px;
    background: var(--hairline);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.article-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0;
    background: var(--surface-card);
    transition: background 0.12s;
}
.article-row:hover { background: var(--canvas-soft); }
.article-row-img img {
    width: 140px;
    height: 100px;
    object-fit: cover;
}
.article-row-body {
    padding: 20px 24px;
}
.article-row-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
}
.article-row-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 6px;
    line-height: 1.3;
}
.article-row-title a { color: inherit; }
.article-row-title a:hover { text-decoration: underline; }
.article-row-excerpt {
    font-size: 14px;
    color: var(--body);
    line-height: 1.5;
}

/* Footer */
.site-footer {
    background: var(--canvas);
    border-top: 1px solid var(--hairline);
    padding-top: 64px;
}
.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 48px;
}
.footer-brand {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    display: block;
    margin-bottom: 12px;
}
.footer-tagline {
    font-size: 14px;
    color: var(--body);
    line-height: 1.6;
}
.footer-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 12px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a {
    font-size: 14px;
    color: var(--body);
}
.footer-col ul li a:hover { color: var(--ink); text-decoration: underline; }
.footer-note { font-size: 13px; color: var(--muted); line-height: 1.6; }
.footer-bottom {
    border-top: 1px solid var(--hairline-soft);
    padding: 20px 0;
}
.footer-bottom p { font-size: 13px; color: var(--muted); }

/* Responsive */
@media (max-width: 1024px) {
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
    .article-layout { grid-template-columns: 1fr; }
    .article-sidebar { display: none; }
}
@media (max-width: 768px) {
    .hero h1 { font-size: 36px; }
    .section-title { font-size: 28px; }
    .hero-inner { grid-template-columns: 1fr; }
    .hero-image { display: none; }
    .two-col { grid-template-columns: 1fr; }
    .two-col-img { display: none; }
    .feature-strip { grid-template-columns: 1fr; border-radius: var(--radius-lg); }
    .feature-item { border-right: none; border-bottom: 1px solid var(--hairline); }
    .feature-item:last-child { border-bottom: none; }
    .nav-toggle { display: flex; }
    #main-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--canvas);
        border-bottom: 1px solid var(--hairline);
        padding: 12px 24px 20px;
    }
    #main-nav.open { display: block; }
    .site-nav ul { flex-direction: column; align-items: flex-start; gap: 4px; }
    .site-nav a { font-size: 16px; padding: 8px 12px; }
    .article-hero h1 { font-size: 30px; }
    .article-cover img { height: 260px; }
    .footer-inner { grid-template-columns: 1fr; }
    .cards-grid { grid-template-columns: 1fr; }
    .contact-form-section { padding: 24px; }
    .article-row { grid-template-columns: 1fr; }
    .article-row-img { display: none; }
}
@media (max-width: 640px) {
    .hero { padding: 48px 0; }
    section { padding: 48px 0; }
}
