/* ═══════════════════════════════════════════════════════════════
   Meaning in the Age of AI — Shared Design System
   Brand: Warm cream palette, Crimson Text + Inter, rust/sage accents
   ═══════════════════════════════════════════════════════════════ */

/* ── Custom Properties ── */
:root {
    --warm-cream: #f5f1eb;
    --warm-tan: #e8dcc8;
    --warm-brown: #8b7355;
    --deep-brown: #3d2f24;
    --accent-rust: #c85a42;
    --accent-sage: #7a9b8e;
    --text-primary: #2b2620;
    --text-secondary: #5a5047;
    --text-muted-gold: #8b6f47;
    --border-light: #d9cfc3;
    --font-serif: 'Crimson Text', serif;
    --font-sans: 'Inter', sans-serif;
}

/* ── Reset & Base ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    background: var(--warm-cream);
    line-height: 1.75;
    font-size: 18px;
}

a { color: var(--accent-rust); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ── Typography ── */
h1, h2, h3 { font-family: var(--font-serif); }

h1 {
    font-size: clamp(2.8rem, 8vw, 4.5rem);
    font-weight: 400;
    color: var(--deep-brown);
    line-height: 1.15;
}

h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--deep-brown);
    margin-bottom: 0.75rem;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--deep-brown);
    margin-bottom: 0.5rem;
}

p {
    font-size: 16px;
    line-height: 1.75;
    margin-bottom: 1.25rem;
}

p:last-child { margin-bottom: 0; }

.lead {
    font-size: 18px;
    font-weight: 500;
    color: var(--accent-rust);
    line-height: 1.8;
}

.kicker {
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-rust);
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 16px;
}

.subtitle {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    color: var(--text-muted-gold);
    font-weight: 400;
    max-width: 700px;
    line-height: 1.7;
}

/* ── Layout ── */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-wide {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: 4rem 1.5rem;
}

section.cream { background: var(--warm-cream); }
section.white { background: white; }

/* ── Site Nav ── */
.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
    background: var(--warm-cream);
    position: relative;
    z-index: 100;
}

.site-nav .brand {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-rust);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
}

.site-nav .brand:hover { text-decoration: none; opacity: 0.85; }

.site-nav .nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.site-nav .nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    letter-spacing: 0.3px;
    transition: color 0.2s;
}

.site-nav .nav-links a:hover { color: var(--accent-rust); text-decoration: none; }

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-secondary);
}

.nav-toggle svg { display: block; }

/* ── Sticky Header CTA ── */
.sticky-cta {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: rgba(61, 47, 36, 0.97);
    padding: 10px 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.sticky-cta.visible { transform: translateY(0); }

.sticky-cta p {
    color: rgba(245, 241, 235, 0.9);
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

.sticky-cta .btn-sm {
    padding: 6px 16px;
    font-size: 13px;
}

/* ── Hero ── */
.hero {
    background: linear-gradient(135deg, #f5f1eb 0%, #faf3ea 100%);
    padding: 4.5rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero > * { position: relative; z-index: 2; }

.hero h1 { margin-bottom: 1.5rem; }

.hero .subtitle {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
}

.hero .scroll-hint {
    margin-top: 40px;
    font-size: 13px;
    color: var(--text-muted-gold);
    cursor: pointer;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(8px); }
}

/* Da Vinci Notebook geometry — hero background */
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        radial-gradient(50px 38px at 75% 60%, transparent 36px, rgba(88,76,60,0.07) 37px, rgba(88,76,60,0.07) 38.5px, transparent 39.5px),
        radial-gradient(88px 65px at 72% 63%, transparent 63px, rgba(82,72,58,0.06) 64px, rgba(82,72,58,0.06) 65.5px, transparent 66.5px),
        radial-gradient(150px 105px at 78% 57%, transparent 103px, rgba(80,70,55,0.055) 104px, rgba(80,70,55,0.055) 105.5px, transparent 106.5px),
        radial-gradient(240px 160px at 70% 65%, transparent 158px, rgba(82,72,58,0.045) 159px, rgba(82,72,58,0.045) 160.5px, transparent 161.5px),
        repeating-linear-gradient(58deg, transparent, transparent 290px, rgba(80,72,58,0.05) 290px, rgba(80,72,58,0.05) 291px),
        repeating-linear-gradient(63deg, transparent, transparent 340px, rgba(85,75,60,0.04) 340px, rgba(85,75,60,0.04) 341px);
    pointer-events: none;
    z-index: 0;
}

/* ── Cards ── */
.card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card .card-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 12px;
}

.card .card-badge.essay {
    background: rgba(122, 155, 142, 0.12);
    color: var(--accent-sage);
}

.card .card-badge.tool {
    background: rgba(200, 90, 66, 0.10);
    color: var(--accent-rust);
}

.card h3 a {
    color: var(--deep-brown);
    text-decoration: none;
}

.card h3 a:hover { color: var(--accent-rust); text-decoration: none; }

.card .card-date {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.card .card-excerpt {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-top: 8px;
}

/* ── Lead Magnet Feature Card ── */
.magnet-card {
    background: white;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.magnet-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-rust), var(--accent-sage));
}

.magnet-card .magnet-type {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-rust);
    background: rgba(200, 90, 66, 0.08);
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 1rem;
}

.magnet-card h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--deep-brown);
    margin-bottom: 0.75rem;
}

.magnet-card p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.magnet-card .status-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-sage);
    background: rgba(122, 155, 142, 0.10);
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 1rem;
}

/* ── Buttons ── */
.btn {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    letter-spacing: 0.3px;
}

.btn:hover { text-decoration: none; }

.btn-primary {
    background: var(--accent-rust);
    color: white;
}

.btn-primary:hover { background: #b5503a; color: white; }

.btn-outline {
    background: transparent;
    color: var(--accent-rust);
    border: 1.5px solid var(--accent-rust);
}

.btn-outline:hover { background: rgba(200, 90, 66, 0.06); }

.btn-sm {
    padding: 8px 18px;
    font-size: 13px;
}

/* ── Subscribe Forms ── */
.subscribe-block {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.subscribe-block h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.subscribe-block p {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 1.25rem;
}

.subscribe-form {
    display: flex;
    gap: 10px;
    max-width: 440px;
    margin: 0 auto;
}

.subscribe-form input[type="email"] {
    flex: 1;
    padding: 12px 16px;
    border: 1.5px solid var(--border-light);
    border-radius: 6px;
    background: white;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.subscribe-form input[type="email"]::placeholder { color: #a09888; }
.subscribe-form input[type="email"]:focus { border-color: var(--accent-rust); }

.subscribe-form button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    background: var(--accent-rust);
    color: white;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.subscribe-form button:hover { background: #b5503a; }
.subscribe-form button:disabled { opacity: 0.5; cursor: not-allowed; }

.form-message {
    margin-top: 10px;
    font-size: 14px;
    min-height: 20px;
}

.form-message.success { color: var(--accent-sage); }
.form-message.error { color: var(--accent-rust); }

/* ── Inline Subscribe CTA (mid-essay) ── */
.inline-cta {
    background: linear-gradient(135deg, rgba(200,90,66,0.04), rgba(122,155,142,0.04));
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 2.5rem;
    margin: 3rem 0;
    text-align: center;
}

/* ── End-of-Essay CTA ── */
.end-cta {
    background: var(--deep-brown);
    padding: 3.5rem 1.5rem;
    text-align: center;
}

.end-cta h3 {
    color: var(--warm-cream);
    font-family: var(--font-serif);
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.end-cta p {
    color: rgba(245, 241, 235, 0.7);
    font-size: 15px;
}

.end-cta .subscribe-form input[type="email"] {
    background: rgba(255,255,255,0.08);
    border-color: rgba(245,241,235,0.15);
    color: var(--warm-cream);
}

.end-cta .subscribe-form input[type="email"]::placeholder {
    color: rgba(245,241,235,0.4);
}

.end-cta .subscribe-form input[type="email"]:focus {
    border-color: var(--accent-rust);
}

/* ── Site Footer ── */
.site-footer {
    background: var(--deep-brown);
    color: rgba(245, 241, 235, 0.6);
    padding: 3rem 1.5rem 2rem;
    font-size: 13px;
}

.footer-inner {
    max-width: 800px;
    margin: 0 auto;
}

.footer-brand {
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
    color: rgba(245, 241, 235, 0.5);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: rgba(245, 241, 235, 0.6);
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover { color: rgba(245, 241, 235, 0.9); text-decoration: none; }

.footer-divider {
    height: 1px;
    background: rgba(245, 241, 235, 0.1);
    margin: 1.5rem 0;
}

.footer-also {
    font-size: 12px;
    color: rgba(245, 241, 235, 0.35);
    margin-bottom: 1rem;
}

.footer-also a {
    color: rgba(245, 241, 235, 0.5);
    text-decoration: none;
}

.footer-also a:hover { color: rgba(245, 241, 235, 0.8); }

.footer-copy {
    font-size: 12px;
    color: rgba(245, 241, 235, 0.3);
}

/* ── Archive List ── */
.archive-list { list-style: none; }

.archive-item {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-light);
}

.archive-item:last-child { border-bottom: none; }

.archive-item .archive-badge {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 3px;
    width: 52px;
    text-align: center;
}

.archive-item .archive-badge.essay {
    background: rgba(122, 155, 142, 0.12);
    color: var(--accent-sage);
}

.archive-item .archive-badge.tool {
    background: rgba(200, 90, 66, 0.10);
    color: var(--accent-rust);
}

.archive-item .archive-title {
    flex: 1;
}

.archive-item .archive-title a {
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 16px;
}

.archive-item .archive-title a:hover { color: var(--accent-rust); }

.archive-item .archive-hook {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 2px;
    line-height: 1.5;
}

.archive-item .archive-date {
    flex-shrink: 0;
    font-size: 13px;
    color: var(--text-secondary);
}

/* ── Callout ── */
.callout {
    border-left: 4px solid var(--accent-rust);
    background: white;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
}

.callout p {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0;
}

/* ── Stat Cards ── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.stat-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 1.75rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.stat-card .stat-value {
    font-family: var(--font-serif);
    font-size: 48px;
    font-weight: 700;
    color: var(--accent-rust);
    line-height: 1;
}

.stat-card .stat-label {
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* ── Page Hero (for non-essay pages) ── */
.page-hero {
    background: linear-gradient(135deg, #f5f1eb 0%, #faf3ea 100%);
    padding: 3.5rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        radial-gradient(50px 38px at 25% 40%, transparent 36px, rgba(88,76,60,0.05) 37px, rgba(88,76,60,0.05) 38.5px, transparent 39.5px),
        radial-gradient(88px 65px at 80% 30%, transparent 63px, rgba(82,72,58,0.04) 64px, rgba(82,72,58,0.04) 65.5px, transparent 66.5px),
        repeating-linear-gradient(55deg, transparent, transparent 320px, rgba(80,72,58,0.035) 320px, rgba(80,72,58,0.035) 321px);
    pointer-events: none;
    z-index: 0;
}

.page-hero > * { position: relative; z-index: 2; }

/* ── Prose (about, terms, privacy body text) ── */
.prose { max-width: 680px; margin: 0 auto; }

.prose h2 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
}

.prose h3 {
    font-size: 1.15rem;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

.prose p {
    margin-bottom: 1.25rem;
}

.prose ul, .prose ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.prose li {
    font-size: 16px;
    line-height: 1.75;
    margin-bottom: 0.5rem;
}

.prose a { text-decoration: underline; }

/* ── Fade-in Animation ── */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .site-nav .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--warm-cream);
        border-bottom: 1px solid var(--border-light);
        flex-direction: column;
        padding: 1rem 1.5rem;
        gap: 1rem;
    }

    .site-nav .nav-links.open { display: flex; }

    .nav-toggle { display: block; }

    .subscribe-form {
        flex-direction: column;
    }

    .subscribe-form button { width: 100%; }

    .archive-item {
        flex-direction: column;
        gap: 0.5rem;
    }

    .archive-item .archive-date {
        order: -1;
    }

    .sticky-cta { gap: 0.5rem; padding: 8px 1rem; }
    .sticky-cta p { font-size: 12px; }

    .magnet-card { padding: 1.75rem; }
}
