/* ── Reset & base ─────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-feature-settings: "ss01", "cv11";
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: var(--brown); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; display: block; }

h1, h2, h3 {
    font-family: 'Lora', Georgia, 'Times New Roman', serif;
    font-weight: 500;
    color: var(--ink);
    letter-spacing: -0.012em;
}

/* ── Tokens (1:1 with /opt/inkframe/src/lib/theme.ts) ──── */
:root {
    --paper: #F6EFE5;
    --paper-deep: #EDE3D2;
    --card: #FBF6EC;
    --card-elevated: #FFFFFF;
    --ink: #2C2620;
    --ink-soft: #5A4F44;
    --ink-muted: #8A7C6E;
    --ink-faint: #B9AC9C;
    --hairline: #E2D7C5;
    --brown: #8C6A4A;
    --brown-deep: #6B4F36;
    --brown-soft: #C9A98A;
    --green: #7A9479;
    --green-soft: #D9E3D6;
    --amber: #C9A14A;
    --amber-soft: #F2E5C4;
    --red: #B36460;
    --red-soft: #EFD7D5;
    --on-brown: #FBF6EC;
}

/* ── Eyebrow / small-caps utility ─────────────── */
.eyebrow {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--brown);
}

/* ── Nav ──────────────────────────────────────── */
.nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(246, 239, 229, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--hairline);
}
.nav-inner {
    max-width: 1100px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 28px;
}
.nav-brand {
    display: flex; align-items: center; gap: 10px;
    color: var(--ink);
    font-family: 'Lora', serif;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.nav-brand:hover { text-decoration: none; }
.nav-icon { width: 30px; height: 30px; border-radius: 7px; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
    color: var(--ink-soft);
    font-size: 14px;
    font-weight: 500;
}
.nav-links a:hover { color: var(--brown); text-decoration: none; }
.nav-menu-btn { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-menu-btn span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 1px; }

@media (max-width: 740px) {
    .nav-menu-btn { display: block; }
    .nav-links {
        display: none;
        position: absolute; top: 100%; left: 0; right: 0;
        background: var(--paper);
        flex-direction: column; gap: 0; padding: 8px 0;
        border-bottom: 1px solid var(--hairline);
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 14px 28px; width: 100%; }
}

/* ── Hero (typographic, editorial) ────────────── */
.hero { padding: 88px 28px 96px; position: relative; overflow: hidden; }
.hero::before {
    /* Faint warm sun on the upper right */
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 88% 0%, rgba(201, 161, 74, 0.18) 0, transparent 50%);
    pointer-events: none;
}
.hero-inner {
    max-width: 1100px; margin: 0 auto;
    position: relative;
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 72px;
    align-items: center;
}
.hero-eyebrow {
    display: inline-block;
    margin-bottom: 22px;
    padding-bottom: 4px;
    border-bottom: 2px solid var(--brown);
}
.hero h1 {
    font-size: clamp(2.6rem, 5.4vw, 4.4rem);
    line-height: 1.05;
    font-weight: 500;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}
.hero h1 em {
    font-style: italic;
    color: var(--brown);
}
.hero-sub {
    font-size: 1.15rem;
    line-height: 1.65;
    color: var(--ink-soft);
    margin-bottom: 32px;
    max-width: 34em;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.hero-meta {
    font-size: 13px;
    color: var(--ink-muted);
    letter-spacing: 0.2px;
}

/* Hero-side healing-arc diagram. Editorial dots-and-line, not a UI mock. */
.healing-arc {
    position: relative;
    padding: 6px 12px;
}
.arc-rule {
    position: absolute;
    left: 28px;
    top: 24px;
    bottom: 24px;
    width: 1px;
    background: linear-gradient(180deg,
        var(--brown-soft) 0%,
        var(--brown) 32%,
        var(--amber) 64%,
        var(--green) 100%);
}
.arc-stage {
    position: relative;
    padding: 14px 0 14px 64px;
}
.arc-stage + .arc-stage { margin-top: 2px; }
.arc-dot {
    position: absolute;
    left: 18px; top: 18px;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--card-elevated);
    border: 2px solid var(--brown-soft);
}
.arc-stage.active .arc-dot { border-color: var(--brown); background: var(--brown); box-shadow: 0 0 0 6px rgba(140, 106, 74, 0.12); }
.arc-stage.complete .arc-dot { border-color: var(--green); background: var(--green); }
.arc-stage.future .arc-dot { border-style: dashed; background: var(--paper); }
.arc-label {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--ink-muted);
}
.arc-text {
    font-family: 'Lora', serif;
    font-size: 1.25rem;
    line-height: 1.3;
    color: var(--ink);
    margin-top: 2px;
}
.arc-detail { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }

@media (max-width: 880px) {
    .hero { padding: 56px 24px 64px; }
    .hero-inner { grid-template-columns: 1fr; gap: 48px; }
    .healing-arc { order: -1; max-width: 420px; }
}

/* ── Buttons ──────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 14px 26px;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-weight: 600; font-size: 15px;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: transform 90ms ease, box-shadow 140ms ease, background 140ms ease;
}
.btn:hover { text-decoration: none; }
.btn-primary {
    background: var(--brown);
    color: var(--on-brown);
    box-shadow: 0 6px 18px -8px rgba(140, 106, 74, 0.55);
}
.btn-primary:hover { background: var(--brown-deep); transform: translateY(-1px); }
.btn-ghost {
    background: transparent;
    color: var(--brown);
    border-color: var(--brown);
}
.btn-ghost:hover { background: rgba(140, 106, 74, 0.06); }
.btn-store {
    background: var(--card-elevated);
    color: var(--ink-soft);
    border: 1.5px dashed var(--brown-soft);
    cursor: default;
    padding: 12px 22px;
    font-size: 14px;
}

/* ── Section scaffolding ──────────────────────── */
.section { padding: 92px 28px; }
.section-alt { background: var(--paper-deep); }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section h2 {
    font-size: clamp(2rem, 3.6vw, 2.8rem);
    margin-bottom: 14px;
    line-height: 1.15;
    max-width: 22ch;
    letter-spacing: -0.018em;
}
.section h2 em { font-style: italic; color: var(--brown); }
.section-sub {
    color: var(--ink-soft);
    font-size: 1.08rem;
    line-height: 1.6;
    margin-bottom: 48px;
    max-width: 44em;
}

.section-eyebrow {
    display: inline-block;
    margin-bottom: 14px;
}

/* Italic Lora signature divider between sections, for editorial rhythm */
.divider {
    display: flex; justify-content: center;
    padding: 14px 0;
    color: var(--brown-soft);
}
.divider::before {
    content: '·   ·   ·';
    letter-spacing: 6px;
    font-family: 'Lora', serif;
    font-size: 18px;
}

/* ── Feature grid (sage-dot bullets, no emoji) ─── */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.feature {
    background: var(--card-elevated);
    border: 1px solid var(--hairline);
    border-radius: 16px;
    padding: 28px 26px;
    transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}
.feature:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px -22px rgba(44, 38, 32, 0.22);
    border-color: var(--brown-soft);
}
.feature h3 {
    font-size: 1.32rem;
    margin-bottom: 10px;
    padding-left: 18px;
    position: relative;
    line-height: 1.3;
}
.feature h3::before {
    content: '';
    position: absolute;
    left: 0; top: 0.55em;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--green);
}
.feature h3 a { color: var(--ink); }
.feature h3 a:hover { color: var(--brown); text-decoration: none; }
.feature p {
    color: var(--ink-soft);
    font-size: 0.98rem;
    padding-left: 18px;
}

/* ── Steps (numbered, editorial) ──────────────── */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
}
.step {
    padding: 32px 28px;
    background: var(--card);
    border-radius: 16px;
    border: 1px solid var(--hairline);
    position: relative;
}
.step-num {
    display: inline-block;
    font-family: 'Lora', serif;
    font-size: 38px;
    font-weight: 500;
    line-height: 1;
    color: var(--brown);
    margin-bottom: 14px;
    border-bottom: 2px solid var(--brown-soft);
    padding: 0 6px 6px 0;
}
.step h3 { font-size: 1.22rem; margin-bottom: 8px; }
.step p { color: var(--ink-soft); font-size: 0.98rem; }

/* ── Family grid (cleaner, no emoji) ──────────── */
.family-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}
.family-card {
    padding: 22px 22px;
    background: var(--card-elevated);
    border: 1px solid var(--hairline);
    border-radius: 14px;
    transition: border-color 140ms ease, transform 120ms ease;
}
.family-card:hover { border-color: var(--brown-soft); transform: translateY(-2px); }
.family-card h3 {
    font-size: 1.15rem;
    margin-bottom: 6px;
}
.family-card h3 a { color: var(--ink); }
.family-card h3 a:hover { color: var(--brown); text-decoration: none; }
.family-card p {
    color: var(--ink-soft);
    font-size: 0.92rem;
    line-height: 1.5;
}

/* ── FAQ ──────────────────────────────────────── */
.faq {
    background: var(--card-elevated);
    border: 1px solid var(--hairline);
    border-radius: 14px;
    padding: 24px 26px;
    margin-bottom: 14px;
}
.faq h3 { font-size: 1.15rem; margin-bottom: 8px; }
.faq p { color: var(--ink-soft); }

/* ── CTA ──────────────────────────────────────── */
.section-cta {
    background: var(--ink);
    color: var(--paper);
    padding: 88px 28px;
}
.section-cta .section-inner { text-align: center; }
.section-cta .eyebrow { color: var(--brown-soft); }
.section-cta h2 {
    color: var(--paper);
    font-size: clamp(2rem, 3.6vw, 2.6rem);
    margin: 14px auto 16px;
    max-width: 20ch;
}
.section-cta h2 em { color: var(--amber); }
.section-cta p {
    color: var(--ink-faint);
    font-size: 1.05rem;
    margin-bottom: 28px;
    max-width: 40em;
    margin-left: auto;
    margin-right: auto;
}
.download-buttons {
    display: flex; justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.section-cta .btn-store {
    background: rgba(251, 246, 236, 0.06);
    color: var(--paper);
    border: 1.5px dashed rgba(251, 246, 236, 0.32);
}

/* ── Footer ───────────────────────────────────── */
.footer {
    background: var(--paper-deep);
    border-top: 1px solid var(--hairline);
    color: var(--ink-soft);
    padding: 36px 28px;
}
.footer-inner {
    max-width: 1100px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
    gap: 24px; flex-wrap: wrap;
}
.footer-brand-row {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 4px;
}
.footer-icon { width: 28px; height: 28px; border-radius: 6px; }
.footer-logo {
    font-family: 'Lora', serif;
    font-size: 20px;
    font-weight: 500;
    color: var(--ink);
}
.footer p { color: var(--ink-muted); font-size: 13px; }
.footer-links { display: flex; gap: 22px; }
.footer-links a {
    color: var(--ink-soft);
    font-size: 14px;
}
.footer-links a:hover { color: var(--brown); text-decoration: none; }

/* ── Aux pages (privacy/terms/support) ────────── */
.page-content {
    max-width: 760px; margin: 0 auto;
    padding: 64px 28px 96px;
}
.breadcrumb {
    font-size: 13px; color: var(--ink-muted);
    margin-bottom: 18px;
}
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb a:hover { color: var(--brown); }
.breadcrumb span { padding: 0 8px; color: var(--ink-faint); }
.page-content h1 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin-bottom: 8px;
}
.page-meta {
    color: var(--ink-soft);
    font-size: 1rem;
    margin-bottom: 24px;
}
.page-content h2 {
    font-size: 1.6rem;
    margin: 40px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--hairline);
}
.page-content h3 {
    font-size: 1.2rem;
    margin: 28px 0 8px;
}
.page-content p,
.page-content li {
    color: var(--ink-soft);
    margin-bottom: 12px;
}
.page-content ol,
.page-content ul {
    padding-left: 22px;
    margin-bottom: 14px;
}
.page-content a { color: var(--brown); }
.page-content a:hover { color: var(--brown-deep); }
