@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;
    --timeline-thinking: #dfa88f;
    --timeline-grep: #9fc9a2;
    --timeline-read: #9fbbe0;
    --timeline-edit: #c0a8dd;
    --timeline-done: #c08532;
    --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 {
    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;
}

a {
    color: inherit;
    text-decoration: none;
}

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;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.nav-brand {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.3px;
}

.nav-brand span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
}

.nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--body);
    line-height: 1.4;
    transition: color 0.15s;
}

.nav-links a:hover {
    color: var(--ink);
}

.nav-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
}

.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 24px;
}

.nav-mobile.open {
    display: block;
}

.nav-mobile ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.nav-mobile a {
    font-size: 14px;
    font-weight: 500;
    color: var(--body);
}

/* Hero */
.hero-band {
    background: var(--canvas);
    padding: 80px 0;
    text-align: center;
}

.hero-band h1 {
    font-size: 72px;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -2.16px;
    color: var(--ink);
    max-width: 900px;
    margin: 0 auto 24px;
}

.hero-band .hero-sub {
    font-size: 16px;
    color: var(--body);
    max-width: 560px;
    margin: 0 auto 32px;
    line-height: 1.5;
}

.hero-ctas {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    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;
    transition: background 0.15s;
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--primary-active);
    color: var(--on-primary);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    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;
    transition: border-color 0.15s;
    text-decoration: none;
}

.btn-secondary:hover {
    border-color: var(--muted);
}

.btn-download {
    display: inline-flex;
    align-items: center;
    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;
    text-decoration: none;
}

/* Section */
section {
    padding: 80px 0;
}

.section-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: 16px;
}

.section-title {
    font-size: 36px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.72px;
    color: var(--ink);
    margin-bottom: 16px;
}

.section-desc {
    font-size: 16px;
    color: var(--body);
    max-width: 600px;
    line-height: 1.5;
}

/* Feature Cards Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 48px;
}

.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);
    line-height: 1.4;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 14px;
    color: var(--body);
    line-height: 1.5;
}

.feature-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--rounded-md);
    margin-bottom: 16px;
}

/* Article Cards */
.articles-section {
    background: var(--canvas);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 48px;
}

.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%;
    height: 200px;
    object-fit: cover;
}

.article-card-body {
    padding: 20px 24px 24px;
}

.article-card-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}

.article-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.4;
    margin-bottom: 8px;
}

.article-card p {
    font-size: 14px;
    color: var(--body);
    line-height: 1.5;
}

.article-card-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
}

/* Article Page */
.article-hero {
    background: var(--canvas);
    padding: 60px 0 0;
}

.article-meta {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 16px;
}

.article-meta span {
    margin-right: 16px;
}

.article-hero h1 {
    font-size: 36px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.72px;
    color: var(--ink);
    max-width: 780px;
    margin-bottom: 20px;
}

.article-hero .article-intro {
    font-size: 18px;
    color: var(--body);
    max-width: 700px;
    line-height: 1.5;
    margin-bottom: 40px;
}

.article-hero-img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: var(--rounded-lg);
    margin-bottom: 0;
}

.article-body {
    max-width: 780px;
    margin: 0 auto;
    padding: 60px 24px 80px;
}

.article-body h2 {
    font-size: 26px;
    font-weight: 400;
    letter-spacing: -0.325px;
    color: var(--ink);
    margin: 48px 0 16px;
}

.article-body h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    margin: 32px 0 12px;
}

.article-body p {
    font-size: 16px;
    color: var(--body);
    line-height: 1.5;
    margin-bottom: 20px;
}

.article-body ul,
.article-body ol {
    margin: 0 0 20px 24px;
    font-size: 16px;
    color: var(--body);
    line-height: 1.5;
}

.article-body li {
    margin-bottom: 8px;
}

.article-body .code-block {
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-lg);
    padding: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--ink);
    margin: 24px 0;
    overflow-x: auto;
}

.article-body figure {
    margin: 32px 0;
}

.article-body figure img {
    border-radius: var(--rounded-lg);
    width: 100%;
}

.article-body figcaption {
    font-size: 13px;
    color: var(--muted);
    margin-top: 8px;
    line-height: 1.4;
}

.article-body .tip-block {
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-left: 3px solid var(--timeline-done);
    border-radius: var(--rounded-lg);
    padding: 16px 20px;
    margin: 24px 0;
}

.article-body .tip-block p {
    margin: 0;
    font-size: 14px;
}

.article-body a {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Badge pill */
.badge-pill {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.88px;
    text-transform: uppercase;
    background: var(--surface-strong);
    color: var(--ink);
    padding: 4px 10px;
    border-radius: var(--rounded-pill);
}

/* Timeline pills */
.timeline-thinking { background: var(--timeline-thinking); color: var(--ink); }
.timeline-grep     { background: var(--timeline-grep);     color: var(--ink); }
.timeline-read     { background: var(--timeline-read);     color: var(--ink); }
.timeline-edit     { background: var(--timeline-edit);     color: var(--ink); }
.timeline-done     { background: var(--timeline-done);     color: var(--on-primary); }

/* Steps list */
.steps-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 32px 0;
}

.step-item {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--hairline-soft);
}

.step-item:last-child {
    border-bottom: none;
}

.step-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    font-family: 'JetBrains Mono', monospace;
}

.step-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 4px;
}

.step-content p {
    font-size: 14px;
    color: var(--body);
    margin: 0;
}

/* CTA Band */
.cta-band {
    background: var(--canvas);
    border-top: 1px solid var(--hairline);
    text-align: center;
    padding: 96px 0;
}

.cta-band h2 {
    font-size: 36px;
    font-weight: 400;
    letter-spacing: -0.72px;
    color: var(--ink);
    margin-bottom: 32px;
    line-height: 1.2;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 780px;
    background: var(--surface-card);
    border: 1px solid var(--hairline-strong);
    border-radius: var(--rounded-lg);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    z-index: 200;
    box-shadow: none;
}

.cookie-banner p {
    font-size: 14px;
    color: var(--body);
    line-height: 1.5;
    margin: 0;
}

.cookie-banner p a {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Contact Form */
.contact-section {
    background: var(--canvas);
    padding: 80px 0;
}

.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: 12px 16px;
    font-size: 16px;
    color: var(--ink);
    font-family: inherit;
    transition: border-color 0.15s;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--muted);
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

.form-message {
    font-size: 14px;
    color: var(--semantic-success);
    margin-top: 12px;
    display: none;
}

.form-message.visible {
    display: block;
}

/* Footer */
.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: 32px;
    margin-bottom: 48px;
}

.footer-brand {
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 12px;
}

.footer-brand span {
    color: var(--primary);
}

.footer-tagline {
    font-size: 14px;
    color: var(--body);
    line-height: 1.5;
}

.footer-col h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: 0.3px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul a {
    font-size: 14px;
    color: var(--body);
    line-height: 1.5;
    transition: color 0.15s;
}

.footer-col ul 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;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-bottom p {
    font-size: 14px;
    color: var(--muted);
}

.footer-bottom nav {
    display: flex;
    gap: 20px;
}

.footer-bottom nav a {
    font-size: 14px;
    color: var(--muted);
    transition: color 0.15s;
}

.footer-bottom nav a:hover {
    color: var(--ink);
}

/* About / Static pages */
.page-hero {
    padding: 60px 0 40px;
    border-bottom: 1px solid var(--hairline);
}

.page-hero h1 {
    font-size: 36px;
    font-weight: 400;
    letter-spacing: -0.72px;
    color: var(--ink);
    margin-bottom: 16px;
}

.page-hero p {
    font-size: 16px;
    color: var(--body);
    max-width: 600px;
    line-height: 1.5;
}

.page-body {
    max-width: 780px;
    padding: 60px 24px 80px;
    margin: 0 auto;
}

.page-body h2 {
    font-size: 26px;
    font-weight: 400;
    letter-spacing: -0.325px;
    color: var(--ink);
    margin: 40px 0 14px;
}

.page-body p {
    font-size: 16px;
    color: var(--body);
    line-height: 1.5;
    margin-bottom: 16px;
}

.page-body ul {
    margin: 0 0 16px 24px;
    font-size: 16px;
    color: var(--body);
    line-height: 1.5;
}

.page-body li {
    margin-bottom: 8px;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-band h1 {
        font-size: 56px;
        letter-spacing: -1.5px;
    }
    .feature-grid,
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .nav-hamburger {
        display: flex;
    }
    .hero-band h1 {
        font-size: 32px;
        letter-spacing: -1px;
    }
    .feature-grid,
    .articles-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .cookie-banner {
        flex-direction: column;
        align-items: flex-start;
    }
    .section-title {
        font-size: 28px;
    }
}

@media (max-width: 640px) {
    .hero-band {
        padding: 48px 0;
    }
    section {
        padding: 60px 0;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
    .article-hero h1 {
        font-size: 26px;
    }
}
