/* Subscription Book — marketing + legal site
   Design system: ledger emerald + marigold on warm paper, full dark theme.
   Fonts: Bricolage Grotesque (display), IBM Plex Sans (body), IBM Plex Mono (figures). */

:root {
  /* App-matched palette: brand indigo/violet on a cool lavender-grey paper. */
  --bg: #f1f0f7;
  --surface: #ffffff;
  --surface-2: #eae8f5;
  --ink: #141329;
  --ink-muted: #4e4a6b;
  --line: #d5d2e4;
  --line-strong: #c5c1db;
  --primary: #3d35a6;
  --primary-strong: #2a2478;
  --primary-soft: #e3e1f7;
  --accent: #8a5a00;
  --accent-soft: #fdecc8;
  --credit: #00695c;   /* Paid */
  --debit: #b3261e;    /* Due  */
  --on-primary: #ffffff;
  /* Hero surfaces: the app's indigo gradient — deep in both themes, so white ink both ways. */
  --hero-grad: linear-gradient(135deg, #2a2478 0%, #3d35a6 55%, #4a41c4 100%);
  --on-hero: #ffffff;
  --on-hero-muted: #d8d5f0;
  --hero-btn-ink: #2a2478;
  --shadow: 0 1px 2px rgba(20, 19, 41, .07), 0 8px 30px rgba(20, 19, 41, .07);
  --shadow-lift: 0 2px 6px rgba(20, 19, 41, .09), 0 18px 48px rgba(20, 19, 41, .14);
  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1120px;
  --readw: 68ch;

  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --step--1: 0.86rem;
  --step-0: 1.05rem;
  --step-1: 1.22rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.7rem, 1.3rem + 1.6vw, 2.15rem);
  --step-4: clamp(2.1rem, 1.5rem + 2.6vw, 3rem);
  --step-5: clamp(2.6rem, 1.7rem + 4.2vw, 4.3rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #100e22;
    --surface: #161331;
    --surface-2: #221d42;
    --ink: #e4e9f2;
    --ink-muted: #a9a4cc;
    --line: #3d3766;
    --line-strong: #4a4478;
    --primary: #b5aff0;
    --primary-strong: #cfcbf5;
    --primary-soft: #2a2478;
    --accent: #f5a524;
    --accent-soft: #2a2008;
    --credit: #5ee9b5;
    --debit: #ffb4ab;
    --on-primary: #181449;
    --hero-grad: linear-gradient(135deg, #1e1a55 0%, #272170 55%, #2f2888 100%);
    --on-hero: #ffffff;
    --on-hero-muted: #c4c0e8;
    --hero-btn-ink: #2a2478;
    --shadow: 0 1px 2px rgba(0,0,0,.45), 0 10px 30px rgba(0,0,0,.4);
    --shadow-lift: 0 2px 6px rgba(0,0,0,.55), 0 22px 52px rgba(0,0,0,.55);
  }
}

:root[data-theme="dark"] {
  --bg: #100e22;
  --surface: #161331;
  --surface-2: #221d42;
  --ink: #e4e9f2;
  --ink-muted: #a9a4cc;
  --line: #3d3766;
  --line-strong: #4a4478;
  --primary: #b5aff0;
  --primary-strong: #cfcbf5;
  --primary-soft: #2a2478;
  --accent: #f5a524;
  --accent-soft: #2a2008;
  --credit: #5ee9b5;
  --debit: #ffb4ab;
  --on-primary: #181449;
  --hero-grad: linear-gradient(135deg, #1e1a55 0%, #272170 55%, #2f2888 100%);
  --on-hero: #ffffff;
  --on-hero-muted: #c4c0e8;
  --hero-btn-ink: #2a2478;
  --shadow: 0 1px 2px rgba(0,0,0,.45), 0 10px 30px rgba(0,0,0,.4);
  --shadow-lift: 0 2px 6px rgba(0,0,0,.55), 0 22px 52px rgba(0,0,0,.55);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--primary-strong); text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.08; text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }

:focus-visible {
  outline: 2.5px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2.4rem); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--primary-strong);
  margin: 0 0 .7rem;
}
.tnum { font-variant-numeric: tabular-nums; }
.rupee { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font: 600 var(--step-0)/1 var(--font-body);
  padding: .82rem 1.3rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--primary-strong); box-shadow: var(--shadow-lift); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary-strong); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 1.2rem; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-weight: 800; font-size: 1.16rem; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: var(--primary); color: var(--on-primary);
  font-family: var(--font-mono); font-weight: 600; font-size: 1.05rem; box-shadow: var(--shadow);
}
.nav-links { display: flex; gap: 1.35rem; margin-left: auto; align-items: center; }
.nav-links a { color: var(--ink-muted); text-decoration: none; font-weight: 500; font-size: .98rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: .6rem; margin-left: 1.1rem; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); cursor: pointer;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary-strong); }
.icon-btn svg { width: 19px; height: 19px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun,
:root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-toggle .moon { display: block; } }
.nav-toggle { display: none; }

@media (max-width: 720px) {
  .nav-links { display: none; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--surface); border-bottom: 1px solid var(--line); padding: .4rem 0; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .85rem clamp(1.1rem, 4vw, 2.4rem); border-top: 1px solid var(--line); }
  .nav-actions { margin-left: auto; }
  .nav-toggle { display: grid; margin-left: .5rem; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(2.4rem, 5vw, 4.6rem) 0 clamp(2rem, 4vw, 3.4rem); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { font-size: var(--step-5); margin: .2rem 0 0; }
.hero h1 .hl { color: var(--primary-strong); }
.hero-lead { font-size: var(--step-1); color: var(--ink-muted); max-width: 32ch; margin-top: 1.1rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.7rem; }
.hero-note { margin-top: 1.1rem; font-size: var(--step--1); color: var(--ink-muted); display: flex; align-items: center; gap: .5rem; }
.hero-note svg { width: 16px; height: 16px; color: var(--primary); flex: none; }

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-mock { order: 2; max-width: 440px; }
}

/* ---------- Collection-sheet mock (the subject's own artifact) ---------- */
.hero-mock { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lift); overflow: hidden; }
.mock-top { background: var(--hero-grad); color: var(--on-hero); padding: 1.15rem 1.25rem 1.3rem; }
.mock-top .k { font-size: .78rem; letter-spacing: .04em; opacity: .85; margin: 0; }
.mock-top .v { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 1.9rem; font-weight: 600; margin: .1rem 0 0; }
.mock-top .row2 { display: flex; gap: 2rem; margin-top: 1rem; }
.mock-top .row2 .k { opacity: .8; }
.mock-top .row2 .s { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; font-size: 1.02rem; }
.mock-list { padding: .35rem .35rem .5rem; }
.mock-item { display: grid; grid-template-columns: 34px 1fr auto; gap: .8rem; align-items: center; padding: .7rem .8rem; border-bottom: 1px solid var(--line); }
.mock-item:last-child { border-bottom: 0; }
.mock-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-strong); display: grid; place-items: center; font-weight: 700; font-size: .82rem; }
.mock-name { font-weight: 600; font-size: .96rem; }
.mock-sub { font-size: .8rem; color: var(--ink-muted); }
.mock-right { text-align: right; }
.mock-amt { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; font-size: .95rem; }
.chip { display: inline-block; font-size: .7rem; font-weight: 600; padding: .16rem .5rem; border-radius: 999px; letter-spacing: .02em; margin-top: .18rem; }
.chip.paid { background: color-mix(in srgb, var(--credit) 16%, transparent); color: var(--credit); }
.chip.due { background: color-mix(in srgb, var(--debit) 15%, transparent); color: var(--debit); }

/* ---------- Section scaffolding ---------- */
section { padding: clamp(2.6rem, 6vw, 5rem) 0; }
.section-head { max-width: 46ch; margin-bottom: clamp(1.6rem, 4vw, 2.6rem); }
.section-head h2 { font-size: var(--step-4); }
.section-head p { color: var(--ink-muted); margin-top: .7rem; font-size: var(--step-1); }
.ledger-top { border-top: 1px solid var(--line); }

/* ---------- Feature grid ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (max-width: 860px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }
.feature { background: var(--surface); padding: 1.5rem 1.4rem 1.6rem; }
.feature .fi { width: 40px; height: 40px; border-radius: 10px; background: var(--primary-soft); color: var(--primary-strong); display: grid; place-items: center; margin-bottom: 1rem; }
.feature .fi svg { width: 21px; height: 21px; }
.feature h3 { font-size: var(--step-1); }
.feature p { color: var(--ink-muted); margin-top: .45rem; font-size: .97rem; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; counter-reset: step; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding-top: 2.6rem; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; top: 0; left: 0;
  font-family: var(--font-mono); font-weight: 600; font-size: 1rem; color: var(--on-primary);
  background: var(--primary); width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
}
.step h3 { font-size: var(--step-1); }
.step p { color: var(--ink-muted); margin-top: .4rem; font-size: .96rem; }

/* ---------- Trust / privacy band ---------- */
.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trust-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (max-width: 820px) { .trust-grid { grid-template-columns: 1fr; } }
.trust-list { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; gap: 1rem; }
.trust-list li { display: grid; grid-template-columns: 26px 1fr; gap: .8rem; align-items: start; }
.trust-list svg { width: 22px; height: 22px; color: var(--primary); margin-top: .15rem; }
.trust-list b { display: block; }
.trust-list span { color: var(--ink-muted); font-size: .96rem; }
.pledge { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
.pledge .rupee-big { font-family: var(--font-mono); font-size: 3.2rem; color: var(--primary); line-height: 1; }
.pledge h3 { font-size: var(--step-2); margin-top: .7rem; }
.pledge p { color: var(--ink-muted); margin-top: .6rem; font-size: .97rem; }

/* ---------- CTA strip ---------- */
.cta-strip { background: var(--hero-grad); color: var(--on-hero); border-radius: 20px; padding: clamp(2rem, 5vw, 3.2rem); text-align: center; box-shadow: var(--shadow-lift); }
.cta-strip h2 { font-size: var(--step-4); color: var(--on-hero); }
.cta-strip p { margin: .8rem auto 0; max-width: 44ch; opacity: .9; }
.cta-strip .btn-primary { background: #fff; color: var(--hero-btn-ink); margin-top: 1.6rem; }
.cta-strip .btn-primary:hover { background: #fff; filter: brightness(.94); }

/* ---------- FAQ preview + accordion ---------- */
.faq-list { display: grid; 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: 1.15rem .3rem; display: flex; gap: 1rem; align-items: center;
  font-family: var(--font-display); font-weight: 600; font-size: var(--step-1);
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary .plus { margin-left: auto; flex: none; width: 22px; height: 22px; position: relative; transition: transform .2s ease; color: var(--primary); }
.faq-item[open] > summary .plus { transform: rotate(45deg); }
.faq-item .answer { padding: 0 .3rem 1.25rem; color: var(--ink-muted); max-width: var(--readw); }
.faq-item .answer p + p { margin-top: .7rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: clamp(2.4rem, 5vw, 3.6rem) 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2rem; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { font-family: var(--font-mono); font-weight: 600; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: .9rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.footer-grid a { color: var(--ink); text-decoration: none; font-size: .97rem; }
.footer-grid a:hover { color: var(--primary-strong); }
.footer-about p { color: var(--ink-muted); font-size: .95rem; margin-top: .8rem; max-width: 34ch; }
.studio-line { margin-top: 1rem; font-size: .9rem; }
.studio-line a { color: var(--ink-muted); font-weight: 600; text-decoration: none; }
.studio-line a:hover { color: var(--primary-strong); }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 2.4rem; padding-top: 1.4rem; display: flex; flex-wrap: wrap; gap: .8rem 1.5rem; justify-content: space-between; color: var(--ink-muted); font-size: .87rem; }

/* ---------- Legal / doc pages ---------- */
.doc { padding: clamp(2rem, 5vw, 3.4rem) 0 4rem; }
.doc-head { border-bottom: 1px solid var(--line); padding-bottom: 1.6rem; margin-bottom: 2.2rem; }
.doc-head h1 { font-size: var(--step-4); }
.doc-meta { margin-top: .7rem; color: var(--ink-muted); font-family: var(--font-mono); font-size: var(--step--1); }
.doc-note { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); color: var(--ink); border-radius: var(--radius-sm); padding: .9rem 1.1rem; margin: 1.4rem 0 0; font-size: .92rem; }
.doc-note b { color: var(--accent); }
.doc-layout { display: grid; grid-template-columns: 220px 1fr; gap: clamp(1.6rem, 4vw, 3.2rem); align-items: start; }
@media (max-width: 860px) { .doc-layout { grid-template-columns: 1fr; } .toc { display: none; } }
.toc { position: sticky; top: 86px; font-size: .9rem; }
.toc h4 { font-family: var(--font-mono); font-weight: 600; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: .8rem; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; counter-reset: toc; }
.toc a { color: var(--ink-muted); text-decoration: none; display: block; }
.toc a:hover { color: var(--primary-strong); }
.prose { max-width: var(--readw); }
.prose h2 { font-size: var(--step-2); margin: 2.4rem 0 .8rem; scroll-margin-top: 86px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: var(--step-1); margin: 1.6rem 0 .5rem; }
.prose p { margin-top: .85rem; color: var(--ink); }
.prose ul { margin: .85rem 0 0; padding-left: 1.2rem; color: var(--ink); }
.prose li { margin-top: .5rem; }
.prose li::marker { color: var(--primary); }
.prose strong { font-weight: 600; }
.prose .lead { font-size: var(--step-1); color: var(--ink-muted); }
.callout { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--primary); border-radius: var(--radius-sm); padding: 1rem 1.2rem; margin-top: 1rem; }
.contact-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1.1rem 1.2rem; margin-top: 1rem; font-family: var(--font-mono); font-size: .92rem; line-height: 1.9; }

.skip-link { position: absolute; left: -999px; top: .5rem; background: var(--primary); color: var(--on-primary); padding: .6rem 1rem; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: .8rem; }
