/* ==========================================================================
   Renue — Design System
   Palette: warm paper + deep indigo + brass. Type: Fraunces (display) /
   Inter (body) / IBM Plex Mono (numerals, labels — a ledger cue for a
   money app). Signature: the orbit — subscriptions as things that renew
   in cycles, not a generic dashboard-graph hero.
   ========================================================================== */

:root {
    /* Ink & paper (light) */
    --ink: #1B1712;
    --ink-soft: #56503F;
    --ink-faint: #8E8574;
    --paper: #FBF8F2;
    --paper-alt: #F1EADC;
    --surface: #FFFFFF;
    --line: rgba(27, 23, 18, 0.12);
    --line-strong: rgba(27, 23, 18, 0.22);

    /* Brand */
    --brand: #4B3BD6;
    --brand-solid: #4B3BD6;
    --brand-solid-hover: #3A2CB0;
    --brand-soft: #ECE9FB;
    --brand-glow: rgba(75, 59, 214, 0.22);

    /* Accent — brass, stands for value/savings */
    --accent: #9C7A3F;
    --accent-strong: #7A5F30;
    --accent-soft: #F2E6CC;

    /* Status */
    --green: #3E7657;
    --green-bg: rgba(62, 118, 87, 0.12);
    --amber: #97591F;
    --amber-bg: rgba(151, 89, 31, 0.12);

    /* Feature tones — muted, cycle across the grid */
    --tone-1-bg: rgba(107, 126, 92, 0.14);  --tone-1-fg: #4E6142;   /* sage */
    --tone-2-bg: rgba(84, 111, 148, 0.14);  --tone-2-fg: #3B577A;  /* slate */
    --tone-3-bg: rgba(150, 96, 132, 0.14);  --tone-3-fg: #7A4863;  /* mauve */
    --tone-4-bg: rgba(156, 122, 63, 0.16);  --tone-4-fg: #7A5F30;  /* brass */
    --tone-5-bg: rgba(163, 90, 61, 0.14);   --tone-5-fg: #8C4A31;  /* rust */
    --tone-6-bg: rgba(69, 128, 121, 0.14);  --tone-6-fg: #34645E;  /* teal */

    /* Elevation */
    --shadow-sm: 0 1px 2px rgba(27, 23, 18, 0.06);
    --shadow: 0 10px 26px -10px rgba(27, 23, 18, 0.18);
    --shadow-lg: 0 26px 60px -16px rgba(27, 23, 18, 0.26);

    /* Shape */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 18px;
    --radius-xl: 28px;
    --radius-full: 999px;
    --max-width: 1180px;

    /* Type */
    --font-display: 'Fraunces', 'Iowan Old Style', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        --ink: #F3EEE3;
        --ink-soft: #B7AE9C;
        --ink-faint: #756D5D;
        --paper: #14111C;
        --paper-alt: #191521;
        --surface: #1D1926;
        --line: rgba(243, 238, 227, 0.10);
        --line-strong: rgba(243, 238, 227, 0.20);

        --brand: #9083FF;
        --brand-solid: #6C5CE8;
        --brand-solid-hover: #7E6FF5;
        --brand-soft: rgba(144, 131, 255, 0.14);
        --brand-glow: rgba(144, 131, 255, 0.30);

        --accent: #DDB876;
        --accent-strong: #E8C88E;
        --accent-soft: rgba(221, 184, 118, 0.14);

        --green: #6FBF95;
        --green-bg: rgba(111, 191, 149, 0.14);
        --amber: #E0A85C;
        --amber-bg: rgba(224, 168, 92, 0.14);

        --tone-1-bg: rgba(150, 173, 132, 0.16); --tone-1-fg: #AFC79E;
        --tone-2-bg: rgba(129, 165, 209, 0.16); --tone-2-fg: #A9C7E8;
        --tone-3-bg: rgba(207, 145, 182, 0.16); --tone-3-fg: #DBA9C4;
        --tone-4-bg: rgba(221, 184, 118, 0.18); --tone-4-fg: #E8C88E;
        --tone-5-bg: rgba(214, 138, 105, 0.16); --tone-5-fg: #E3A98C;
        --tone-6-bg: rgba(118, 187, 178, 0.16); --tone-6-fg: #A6D9D1;

        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
        --shadow: 0 10px 26px -10px rgba(0, 0, 0, 0.5);
        --shadow-lg: 0 30px 70px -18px rgba(0, 0, 0, 0.6);
    }
}

/* ---------- Reset & base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background: var(--paper);
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.2s ease, color 0.2s ease;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
ul { list-style: none; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

a:focus-visible, button:focus-visible, summary:focus-visible, .download-card:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

.eyebrow {
    font-family: var(--font-mono);
    text-transform: uppercase;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    color: var(--accent-strong);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}
.eyebrow::before {
    content: '';
    width: 18px; height: 1px;
    background: var(--accent-strong);
    display: inline-block;
}

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---------- Reveal-on-scroll (progressive enhancement; content is fully
   visible without JS — see script.js) ---------- */
.js-ready .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js-ready .reveal.in-view { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js-ready .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- Buttons ---------- */
.btn-primary, .btn-secondary {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 30px; border-radius: var(--radius-full);
    font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
    cursor: pointer; transition: all 0.2s ease; border: 1px solid transparent;
}
.btn-primary { background: var(--brand-solid); color: #FFFFFF; }
.btn-primary:hover { background: var(--brand-solid-hover); transform: translateY(-2px); box-shadow: 0 10px 26px var(--brand-glow); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink-soft); }
.btn-full { width: 100%; }

/* ---------- Nav ---------- */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: color-mix(in srgb, var(--paper) 82%, transparent);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.nav-logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 1.35rem; color: var(--ink); }
.nav-logo-mark {
    width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(155deg, var(--brand-solid), var(--brand-solid-hover));
    display: flex; align-items: center; justify-content: center; font-size: 0.9rem;
}
.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a {
    font-family: var(--font-mono); font-size: 0.74rem; font-weight: 500; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--ink-soft); transition: color 0.2s;
}
.nav-links a:hover { color: var(--brand); }
.nav-cta {
    background: var(--ink); color: var(--paper); padding: 9px 20px; border-radius: var(--radius-full);
    font-family: var(--font-mono); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
    transition: all 0.2s;
}
.nav-cta:hover { background: var(--brand-solid); color: #fff; }

/* ---------- Hero ---------- */
.hero { padding: 168px 0 60px; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; }
.hero-copy { max-width: 520px; }
.hero h1 { font-size: 3.4rem; line-height: 1.08; font-weight: 600; margin-bottom: 22px; }
.hero h1 em { font-style: italic; color: var(--brand); }
.hero p.lede { font-size: 1.1rem; color: var(--ink-soft); line-height: 1.7; margin-bottom: 34px; max-width: 460px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 46px; }

/* Download cards */
.download-row { display: flex; gap: 14px; flex-wrap: wrap; }
.download-card {
    display: inline-flex; flex-direction: column; gap: 3px; padding: 12px 20px;
    border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
    transition: all 0.2s; min-width: 168px;
}
.download-card:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow); }
.download-card.disabled { opacity: 0.55; cursor: default; }
.download-card.disabled:hover { border-color: var(--line); transform: none; box-shadow: none; }
.download-card .store-label { font-family: var(--font-mono); font-size: 0.62rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.download-card .store-name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.badge { display: inline-block; padding: 1px 8px; border-radius: var(--radius-full); font-size: 0.62rem; font-weight: 600; }
.badge.available { background: var(--green-bg); color: var(--green); }
.badge.soon { background: var(--amber-bg); color: var(--amber); }

/* Orbit signature */
.hero-visual { position: relative; height: 420px; display: flex; align-items: center; justify-content: center; }
.orbit { position: relative; width: 320px; height: 320px; }
.orbit-ring { position: absolute; border: 1px solid var(--line-strong); border-radius: 50%; }
.orbit-ring.r1 { inset: 0; }
.orbit-ring.r2 { inset: 38px; }
.orbit-ring.r3 { inset: 76px; }
.orbit-core {
    position: absolute; inset: 0; margin: auto; width: 108px; height: 108px; border-radius: 50%;
    background: linear-gradient(155deg, var(--brand-solid), var(--brand-solid-hover));
    display: flex; align-items: center; justify-content: center; font-size: 2.1rem;
    box-shadow: 0 20px 40px -12px var(--brand-glow);
    z-index: 2;
}
.orbit-spin { position: absolute; inset: 0; animation: orbit-spin 46s linear infinite; }
@keyframes orbit-spin { to { transform: rotate(360deg); } }
.orbit-node { position: absolute; top: 50%; left: 50%; width: 11px; height: 11px; border-radius: 50%; margin: -5.5px; }
.orbit-node.n1 { background: var(--accent); transform: rotate(20deg) translateX(160px); }
.orbit-node.n2 { background: var(--brand); transform: rotate(150deg) translateX(160px); }
.orbit-node.n3 { background: var(--tone-6-fg); transform: rotate(95deg) translateX(122px); }
.orbit-node.n4 { background: var(--tone-3-fg); transform: rotate(255deg) translateX(122px); }
.orbit-node.n5 { background: var(--accent); transform: rotate(310deg) translateX(84px); }
.orbit-node.n6 { background: var(--brand); transform: rotate(190deg) translateX(84px); }

.floating-card {
    position: absolute; background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-lg); padding: 14px 16px; box-shadow: var(--shadow-lg);
    font-size: 0.82rem; z-index: 3; max-width: 210px;
}
.floating-card .fc-label { font-family: var(--font-mono); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); margin-bottom: 4px; }
.floating-card .fc-main { font-weight: 600; color: var(--ink); }
.floating-card .fc-sub { font-family: var(--font-mono); color: var(--ink-soft); font-size: 0.78rem; margin-top: 2px; }
.floating-card.reminder { top: 4px; right: -10px; }
.floating-card.spend { bottom: 6px; left: -18px; }

/* ---------- Sections ---------- */
.section { padding: 108px 0; }
.section-alt { background: var(--paper-alt); }
.section-head { max-width: 620px; margin-bottom: 56px; }
.section-title { font-size: 2.5rem; font-weight: 600; line-height: 1.15; margin-bottom: 16px; }
.section-sub { font-size: 1.08rem; color: var(--ink-soft); line-height: 1.7; }

/* Features */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 18px; }
.feature-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; transition: all 0.25s; }
.feature-card:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-3px); }
.feature-icon { width: 42px; height: 42px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; margin-bottom: 16px; }
.feature-card h3 { font-size: 1.08rem; font-weight: 600; margin-bottom: 8px; }
.feature-card p { color: var(--ink-soft); font-size: 0.93rem; line-height: 1.65; }

/* How it works — ledger style */
.ledger { max-width: 720px; }
.ledger-row { display: grid; grid-template-columns: 64px 1fr; gap: 24px; padding: 30px 0; border-top: 1px solid var(--line); }
.ledger-row:last-child { border-bottom: 1px solid var(--line); }
.ledger-num { font-family: var(--font-mono); font-size: 1.4rem; color: var(--accent); font-weight: 500; }
.ledger-content h3 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; margin-bottom: 6px; }
.ledger-content p { color: var(--ink-soft); font-size: 0.96rem; max-width: 520px; }

/* Why Renue */
.why-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.why-card { background: var(--surface); padding: 34px 30px; }
.why-icon { font-size: 1.6rem; margin-bottom: 14px; }
.why-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; }
.why-card p { color: var(--ink-soft); font-size: 0.93rem; line-height: 1.65; }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; max-width: 860px; }
.pricing-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 38px 32px; position: relative; }
.pricing-card.featured { border-color: var(--brand); box-shadow: var(--shadow-lg); }
.pricing-card.featured::before {
    content: 'Most popular'; position: absolute; top: -12px; left: 32px;
    background: var(--ink); color: var(--paper); padding: 4px 14px; border-radius: var(--radius-full);
    font-family: var(--font-mono); font-size: 0.66rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
}
.plan-name { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; color: var(--ink-soft); margin-bottom: 14px; }
.plan-price { font-family: var(--font-display); font-size: 3rem; font-weight: 600; margin-bottom: 4px; }
.plan-price span { font-family: var(--font-mono); font-size: 0.95rem; font-weight: 400; color: var(--ink-soft); }
.plan-desc { color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 26px; }
.plan-list { margin-bottom: 28px; }
.plan-list li { padding: 7px 0; font-size: 0.9rem; color: var(--ink-soft); display: flex; gap: 10px; border-top: 1px solid var(--line); }
.plan-list li:first-child { border-top: none; }
.plan-list li::before { content: '＋'; color: var(--accent); font-weight: 600; }

/* FAQ — native disclosure, zero JS */
.faq-list { max-width: 760px; display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
    list-style: none; cursor: pointer; padding: 24px 4px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
    font-family: var(--font-display); font-size: 1.08rem; font-weight: 600;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+'; font-family: var(--font-mono); font-size: 1.3rem; font-weight: 400; color: var(--accent);
    flex-shrink: 0; transition: transform 0.25s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 4px 24px; color: var(--ink-soft); font-size: 0.96rem; line-height: 1.7; max-width: 620px; }

/* CTA */
.cta {
    text-align: center; padding: 120px 24px; position: relative; overflow: hidden;
    background: radial-gradient(ellipse 60% 80% at 50% 0%, var(--brand-soft) 0%, transparent 70%);
}
.cta h2 { font-size: 2.6rem; margin-bottom: 16px; }
.cta p { color: var(--ink-soft); font-size: 1.08rem; margin: 0 auto 36px; max-width: 480px; }
.cta .download-row { justify-content: center; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 64px 0 40px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer-brand .nav-logo { margin-bottom: 14px; }
.footer-brand p { color: var(--ink-soft); font-size: 0.9rem; max-width: 280px; line-height: 1.6; }
.footer-col h4 { font-family: var(--font-mono); text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.08em; color: var(--ink-faint); margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 0.9rem; color: var(--ink-soft); transition: color 0.2s; }
.footer-col a:hover { color: var(--brand); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 28px; border-top: 1px solid var(--line); }
.footer-bottom span { color: var(--ink-faint); font-size: 0.82rem; font-family: var(--font-mono); }

/* ---------- Legal / prose pages ---------- */
.page-head { padding: 160px 0 60px; }
.page-head .eyebrow { margin-bottom: 22px; }
.page-head h1 { font-size: 2.8rem; margin-bottom: 14px; }
.page-head .updated { color: var(--ink-faint); font-family: var(--font-mono); font-size: 0.82rem; }
.prose { max-width: 720px; padding-bottom: 120px; }
.prose h2 { font-size: 1.5rem; margin: 44px 0 14px; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--ink-soft); font-size: 0.98rem; line-height: 1.75; margin-bottom: 16px; }
.prose ul { margin: 0 0 16px; display: flex; flex-direction: column; gap: 8px; }
.prose ul li { color: var(--ink-soft); font-size: 0.98rem; line-height: 1.7; padding-left: 20px; position: relative; }
.prose ul li::before { content: '—'; position: absolute; left: 0; color: var(--accent); }
.prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--ink); font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-copy { max-width: none; }
    .hero-visual { height: auto; margin-top: 30px; }
    .floating-card { position: static; margin-top: 14px; max-width: none; }
    .floating-card.reminder, .floating-card.spend { top: auto; right: auto; bottom: auto; left: auto; }
    .why-grid { grid-template-columns: 1fr; }
    .footer-top { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 640px) {
    .nav-links { display: none; }
    .hero { padding: 128px 0 40px; }
    .hero h1 { font-size: 2.2rem; }
    .section { padding: 72px 0; }
    .section-title { font-size: 1.9rem; }
    .features-grid, .pricing-grid { grid-template-columns: 1fr; }
    .page-head { padding: 128px 0 44px; }
    .page-head h1 { font-size: 2.1rem; }
}
