/* DashaHQ — layout on top of tokens.css. Semantic markup, token-driven
   styles only: restyle by editing tokens.css, not this file. */

* { box-sizing: border-box; }

:root { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--paper-pool);
  /* lamplight pool: fully faded to transparent well above its box edge, so
     short pages (sign-in) never show a seam where the gradient ends */
  background-image: radial-gradient(1100px 720px at 68% -160px, var(--paper-glow), transparent 78%);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading);
  -webkit-font-smoothing: antialiased;
}

main { flex: 1 0 auto; }

/* Inside the body flex column, auto margins would disable cross-axis
   stretch and shrink-wrap the wrappers — give direct children an explicit
   width so max-width + auto margins center at full width again. */
body > .container-wide, body > .container { width: 100%; }

::selection { background: var(--accent); color: var(--paper); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; }

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

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-3); }
.container-wide { max-width: var(--max-wide); margin: 0 auto; padding: 0 var(--space-3); }

/* --- chrome ------------------------------------------------------------------ */

.site-header {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: var(--space-4) 0;
}
.wordmark {
  font-family: var(--font-display); font-size: var(--text-lg);
  color: var(--ink); letter-spacing: 0.08em; text-transform: uppercase;
}
.wordmark .sigil { width: 1.7em; height: 1.7em; vertical-align: -0.45em; margin-right: 0.5em; }
.site-nav { display: flex; gap: var(--space-3); font-size: var(--text-sm); }
.site-nav a { color: var(--ink-soft); }

/* --- landing ----------------------------------------------------------------- */

.hero { padding: var(--space-6) 0 var(--space-5); }
.hero h1 { font-size: var(--text-hero); margin: 0 0 var(--space-3); max-width: 20ch; }
.hero .lede { font-size: var(--text-lg); color: var(--ink-soft); max-width: 34rem; margin: 0 0 var(--space-4); }
.hero .hero-meta { font-family: var(--font-data); font-size: var(--text-sm); color: var(--ink-faint); margin: 0 0 var(--space-4); }

/* friction microcopy + repeated CTA (T18) */
.micro { font-family: var(--font-body); font-size: 0.8125rem; color: var(--ink-faint); margin: 0 0 var(--space-1); }
.micro .check { color: var(--accent); margin-right: 0.35rem; }
.hero-cta { margin: 0 0 var(--space-2); }
.section-cta { margin: var(--space-4) 0 0; }
.section-cta .micro { display: block; margin-top: var(--space-2); }

/* quote banner (T19): the Mahabharata epigraph, bilingual-legend pattern */
.quote-banner { text-align: center; padding-top: var(--space-4); }
.quote-banner .epigraph {
  font-family: var(--font-deva); font-size: 1.75rem;
  color: var(--cream); margin: 0;
}
.quote-banner .quote-attr {
  font-family: var(--font-body); font-size: var(--text-sm);
  color: var(--ink-faint); margin: var(--space-1) 0 0; letter-spacing: 0.06em;
}

/* FAQ (T18) */
.faq { max-width: 46rem; margin: 0 auto; }
.faq-item { border-top: var(--border); padding: var(--space-3) 0; }
.faq-item:first-child { border-top: 0; padding-top: var(--space-2); }
.faq-item h3 { font-size: 1.125rem; color: var(--accent); margin: 0 0 var(--space-1); }
.faq-item p { margin: 0; color: var(--ink-soft); font-size: 1rem; }

/* --- landing: centered almanac setting (T13) ------------------------------------- */

.landing { text-align: center; }
.landing .hero h1 { margin-left: auto; margin-right: auto; }
.landing .hero .lede { margin-left: auto; margin-right: auto; }
.landing .steps li { padding-left: 0; }
.landing .steps li::before { position: static; display: block; margin-bottom: var(--space-1); }
.landing .legend { border-left: 0; padding-left: 0; }

/* prose voice (T16): the landing's long-form sets in the display serif;
   Inter keeps buttons, labels, legends, and data lines */
.landing .lede { font-family: var(--font-display); font-weight: 400; }
.landing .section > p:not(.legend):not(.access-note):not(.eyebrow):not(.section-cta):not(.hero-cta):not(.micro),
.landing .titan p:not(.titan-meta),
.landing .faq-item p,
.landing .steps li {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.0625rem;
}

/* --- landing: a page from the almanac (T16) ---------------------------------------- */
/* the artifact, facsimile-style: left-set inside the centered page */

.sample-sheet {
  background: var(--paper-raised);
  border: var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  max-width: 34rem;
  margin: 0 auto;
  text-align: left;
}
.sample-sheet h3 { font-size: 1.125rem; color: var(--accent); margin: var(--space-3) 0 var(--space-2); }
.sample-sheet h3:first-child { margin-top: 0; }
.sample-sheet p { margin: 0 0 var(--space-2); font-size: 0.9375rem; }
.sample-sheet ul { margin: 0 0 var(--space-2); padding-left: 1.25rem; }
.sample-sheet li { margin-bottom: var(--space-1); font-size: 0.9375rem; }
.sample-colophon {
  border-top: 1px solid var(--accent-deep);
  padding-top: var(--space-2);
  margin: var(--space-3) 0 0;
  color: var(--ink-faint);
  font-style: italic;
  font-size: var(--text-sm);
}

/* --- landing: the closing call (T16) ------------------------------------------------ */

.final-cta h2 { font-size: clamp(2rem, 4vw, 3rem); }

.eyebrow {
  font-family: var(--font-body); font-size: 0.6875rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
  margin: 0 0 var(--space-2);
}

.section { padding: var(--space-5) 0; border-top: var(--border); }
.section h2 { font-size: var(--text-xl); margin: 0 0 var(--space-3); }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step; margin: 0 0 var(--space-4);
  padding-left: var(--space-5); position: relative;
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0.1em;
  font-family: var(--font-display); font-size: var(--text-lg); color: var(--accent);
}

/* --- landing: the second book -------------------------------------------------- */

.band-wheel { text-align: center; }
.band-wheel figcaption { font-size: var(--text-sm); color: var(--ink-soft); max-width: 34rem; margin: 0 auto; }

/* the layered instrument: rings turn once every 120 seconds, core holds */
.wheel-stack { position: relative; width: min(100%, 26rem); aspect-ratio: 1; margin: 0 auto var(--space-3); }
.wheel-stack img { position: absolute; inset: 0; width: 100%; height: 100%; }

.legend { margin: var(--space-3) 0; padding-left: var(--space-5); border-left: 1px solid var(--accent-deep); }
.legend .deva { font-family: var(--font-deva); font-size: 1.75rem; color: var(--ink); margin-right: 0.6rem; }
.legend .tr { font-family: var(--font-body); font-weight: 600; font-size: var(--text-sm); color: var(--accent); margin-right: 0.5rem; }
.legend .gloss { color: var(--ink-soft); }

.quiet-link { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent-deep); text-underline-offset: 3px; }
.quiet-link:hover { text-decoration-color: var(--accent); }

.access-note { font-size: var(--text-sm); color: var(--ink-faint); margin: 0 0 var(--space-3); }

/* --- landing: on the record (trust markers, T14) ---------------------------------- */

.record {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--space-5) var(--space-5);
  max-width: 56rem; margin: 0 auto;
}
.record h3 { font-size: var(--text-lg); margin: 0 0 var(--space-2); }
.record p { margin: 0; color: var(--ink-soft); font-size: 0.9375rem; }
.record a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent-deep); text-underline-offset: 3px; }
.record a:hover { text-decoration-color: var(--accent); }
@media (max-width: 640px) { .record { grid-template-columns: 1fr; gap: var(--space-4); } }
/* the record's blurbs join the serif prose voice; the intro note stays sans */
.landing .record p:not(.access-note) {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1rem;
}

/* --- landing: motion (T14) ----------------------------------------------------------- */
/* One orchestration: the hero rises once on load; sections reveal once on
   scroll (landing.js geometry sweep); the wheel's rings turn over
   two minutes. All of it is switched off for reduced motion, and none of it
   runs without JavaScript (landing.js adds the reveal state). */

@media (prefers-reduced-motion: no-preference) {
  .landing .hero .eyebrow,
  .landing .hero h1,
  .landing .hero .lede,
  .landing .hero .hero-meta,
  .landing .hero .hero-cta,
  .landing .hero .micro {
    opacity: 0;
    transform: translateY(14px);
    animation: hero-rise 0.9s cubic-bezier(0.2, 0.6, 0.2, 1) forwards;
  }
  .landing .hero .lede { animation-delay: 0.15s; }
  .landing .hero .hero-meta { animation-delay: 0.25s; }
  .landing .hero .hero-cta { animation-delay: 0.35s; }
  .landing .hero .micro { animation-delay: 0.45s; }
  .landing .hero .micro.eph { animation-delay: 0.55s; }

  .landing [data-reveal] {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.6, 0.2, 1);
  }
  .landing [data-reveal].revealed { opacity: 1; transform: none; }

  .wheel-stack .rings { animation: wheel-turn 120s linear infinite; }
}

@keyframes hero-rise { to { opacity: 1; transform: none; } }
@keyframes wheel-turn { to { transform: rotate(360deg); } }

.plans { display: grid; gap: var(--space-3); grid-template-columns: 1fr; }
@media (min-width: 640px) { .plans { grid-template-columns: 1fr 1fr; } }
.plan {
  background: var(--paper-raised); border: var(--border); border-radius: var(--radius);
  padding: var(--space-4);
}
.plan h3 { margin: 0 0 var(--space-1); font-size: var(--text-lg); }
.plan .price { font-family: var(--font-display); font-size: var(--text-xl); margin: 0 0 var(--space-1); }
.plan .price small { font-size: var(--text-sm); color: var(--ink-faint); font-family: var(--font-body); }
.plan p { margin: 0; color: var(--ink-soft); font-size: var(--text-sm); }

/* --- buttons ------------------------------------------------------------------ */

.button {
  display: inline-block; border: 1px solid var(--accent); border-radius: var(--radius);
  background: var(--accent); color: var(--paper); font-family: var(--font-body);
  font-size: var(--text-sm); padding: 0.7em 1.4em; cursor: pointer; text-align: center;
}
.button:hover { text-decoration: none; background: var(--accent-bright); border-color: var(--accent-bright); }
.button.ghost { background: transparent; color: var(--accent); }
.button.ghost:hover { background: var(--paper-raised-2); border-color: var(--accent); color: var(--accent-bright); text-decoration: none; }

/* --- dashboard ------------------------------------------------------------------ */

.dash-header { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: var(--space-2); }
.dash-header h1 { font-size: var(--text-xl); margin: 0; }
.status { font-size: var(--text-sm); color: var(--ink-soft); }
.status strong { color: var(--ink); font-weight: 600; }

.reading { background: var(--paper-raised); border: var(--border); border-radius: var(--radius); padding: var(--space-4); margin: var(--space-3) 0; }
.reading h2 { font-size: var(--text-lg); margin: var(--space-3) 0 var(--space-1); }
.reading h2:first-child { margin-top: 0; }
.reading ul { margin: 0 0 var(--space-3); padding-left: 1.25rem; }
.reading li { margin-bottom: var(--space-1); }
.reading p { margin: 0 0 var(--space-3); }

.empty { color: var(--ink-soft); font-style: italic; }

.chart-figure { margin: var(--space-3) 0 0; }
.chart-figure svg { display: block; width: 100%; max-width: 26rem; height: auto; margin: 0 auto; }
.chart-figure figcaption { text-align: center; font-size: var(--text-sm); color: var(--ink-faint); margin-top: var(--space-2); }

.actions { display: flex; gap: var(--space-2); flex-wrap: wrap; margin: var(--space-4) 0; }

/* --- forms (onboarding) ---------------------------------------------------------- */

.step { display: none; }
.step.active { display: block; }
.field { margin-bottom: var(--space-3); }
label { display: block; font-size: var(--text-sm); color: var(--ink-soft); margin-bottom: var(--space-1); }
input[type="text"], input[type="email"], input[type="date"], input[type="time"] {
  width: 100%; max-width: 22rem; padding: 0.6em 0.8em;
  border: var(--border); border-radius: var(--radius); background: var(--paper-raised);
  color: var(--ink); font-family: var(--font-body); font-size: var(--text-base);
}
input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.checkbox-line { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--ink-soft); }
.checkbox-line input { width: auto; }
.suggestions { list-style: none; margin: var(--space-1) 0 0; padding: 0; max-width: 22rem; }
.suggestions li {
  background: var(--paper-raised); border: var(--border); border-top: none;
  padding: 0.5em 0.8em; cursor: pointer; font-size: var(--text-sm);
}
.suggestions li:hover { background: var(--accent-soft); }
.hint { font-size: var(--text-sm); color: var(--ink-faint); }
.error { color: var(--danger-bright); font-size: var(--text-sm); min-height: 1.2em; margin: var(--space-2) 0; }

/* --- footer ---------------------------------------------------------------------- */

.site-footer {
  margin-top: var(--space-6); border-top: var(--border);
  padding: var(--space-4) 0 var(--space-5);
  font-size: var(--text-sm); color: var(--ink-soft);
}
.site-footer .colophon {
  display: flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-display); color: var(--ink);
  margin: 0 0 var(--space-2); letter-spacing: 0.02em;
}
.site-footer .colophon img { width: 26px; height: 26px; }
.site-footer .disclaimer { color: var(--ink-faint); margin: 0 0 var(--space-2); }
.site-footer nav { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.site-footer nav a { color: var(--ink-soft); }

/* --- engagement (T8) ---------------------------------------------------------- */

.feedback { margin-top: var(--space-3); border-top: var(--border); padding-top: var(--space-3); }
.feedback textarea {
  width: 100%; margin: var(--space-2) 0; padding: 0.6em 0.8em;
  border: var(--border); border-radius: var(--radius); background: var(--paper-raised);
  color: var(--ink); font-family: var(--font-body); font-size: var(--text-sm);
  resize: vertical;
}
.status .streak-chip { font-family: var(--font-display); }
