/* ===========================================================
   saraswati landing page — "lavender, kept calm"
   Editorial bones in the Lavender room: pale lavender ground,
   deep plum ink, ONE refined violet for every action.
   Newsreader (display) · Inter (body) · JetBrains Mono (labels)
   =========================================================== */

:root {
  /* Grounds — the lavender family */
  --ground: #F5F3FC;   /* hero + closing band (pale lavender) */
  --ground-2: #FBFAFE; /* page base: plate + features bands */
  --canvas: #FFFFFF;   /* screenshot-plate ground behind the frames */
  --surface: #ECE8F8;  /* trust strip, footer, row rules */

  /* Ink (deep plum, not pure black) */
  --ink: #241C3A;      /* headlines, body (~14:1 on ground) */
  --muted: #5A5273;    /* meaningful secondary (~6.6:1, AA) */
  --faint: #6E6788;    /* quieter metadata (~4.8:1 on ground, still AA) */

  /* Violet — the ONE action color */
  --accent: #5B48D6;
  --accent-hover: #4A38C2;
  --accent-ink: #FFFFFF;
  --accent-soft: #B7A8EC; /* dimlines, long structural hairlines */

  /* Ghost button (masthead, while a page CTA is in view) */
  --ghost-border: #C9BEE8;
  --ghost-wash: rgba(91, 72, 214, .06);

  /* Selection whisper */
  --sel-bg: #DFD8F6;

  /* Ground-family hairlines (derived from the lavender scale) */
  --line: #D9D2EE;
  --card-border: #E3DCF5;

  --font-display: "Newsreader", Georgia, serif; /* the ONE swap point */
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --wrap: 1080px;
  --pad: clamp(1.25rem, 5vw, 3rem);

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; margin: 0; }
p { margin: 0; }
ol, ul { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--sel-bg); color: var(--ink); }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }

.num, .pill, .eyebrow, .folio, .cta__sub, .cta__updater,
.figcap, .dimline__cap, .feature__idx, .close__release,
.soon, .colophon, .trust__item b { font-variant-numeric: tabular-nums; }

/* ---------- skip link ---------- */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--accent-ink);
  padding: .6rem 1rem; z-index: 100; border-radius: 0 0 8px 0;
  font: 500 .875rem/1 var(--font-body); text-decoration: none;
}
.skip:focus { left: 0; }

/* ---------- buttons (Inter pills, deliberately NOT the display serif) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-body); font-weight: 500;
  font-size: 1rem; letter-spacing: 0;
  padding: .85rem 1.6rem; border-radius: 999px;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: background-color .16s var(--ease), color .16s var(--ease),
              border-color .16s var(--ease), transform .18s var(--ease);
}
.btn--sm { font-size: .875rem; padding: .5rem 1.05rem; }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { background: var(--accent-hover); }
.btn--accent:active { transform: scale(0.985); }
/* ghost state (header, while a page CTA is in view) */
.btn--accent.is-ghost {
  background: transparent; color: var(--ink); border-color: var(--ghost-border);
}
.btn--accent.is-ghost:hover { background: var(--ghost-wash); border-color: var(--accent); color: var(--accent); }

/* focus rings */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.btn--accent:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- text link: violet text, soft violet underline ---------- */
.link {
  color: var(--accent); text-decoration: none;
  border-bottom: 1px solid rgba(91, 72, 214, .35); padding-bottom: 1px;
  transition: border-color .15s var(--ease), color .15s var(--ease);
}
.link:hover { border-bottom-color: var(--accent); color: var(--accent-hover); }

/* ---------- shared labels ---------- */
.eyebrow, .folio {
  font-family: var(--font-mono); font-size: .75rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--accent);
}
.pill {
  font-family: var(--font-mono); font-size: .8125rem; color: var(--muted);
  border: 1px solid #D6CDF0; border-radius: 999px;
  padding: .15rem .55rem; line-height: 1.4;
}

/* ============ MASTHEAD ============ */
.masthead {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ground-2) 92%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.masthead::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(91, 72, 214, .28) 20%, rgba(91, 72, 214, .5) 50%, rgba(91, 72, 214, .28) 80%, transparent);
  opacity: 0; transition: opacity .25s var(--ease);
}
.masthead.is-scrolled::after { opacity: .9; }
.masthead__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand__mark { width: 48px; height: 48px; flex: none; }
.brand__word {
  font-family: var(--font-display); font-weight: 550; font-size: 1.375rem;
  font-variation-settings: "opsz" 13;
  letter-spacing: -0.005em; color: var(--ink); line-height: 1;
  transform: translateY(1px); /* optical: sit the flat lowercase word on the mark's waterline */
}
.masthead__right { display: inline-flex; align-items: center; gap: .75rem; }
@media (max-width: 460px) { .pill { display: none; } }

/* ============ HERO ============ */
.hero { background: var(--ground); padding: clamp(3rem, 8vw, 6rem) 0 clamp(3.5rem, 9vw, 6.5rem); }
.hero__grid { display: grid; grid-template-columns: 1fr 1.11fr; gap: clamp(1.25rem, 2vw, 1.5rem); align-items: center; }
.hero__title {
  font-size: clamp(2.75rem, 5vw, 4.4rem);
  font-weight: 500; font-variation-settings: "opsz" 72;
  line-height: 1.05; letter-spacing: -0.018em; color: var(--ink);
  margin: .5rem 0 1.1rem;
}
.kept { font-style: italic; font-weight: 500; color: var(--accent); }
.nowrap { white-space: nowrap; }
.eyebrow { margin: 0; }
.hero__sub { font-size: 1.1875rem; line-height: 1.7; color: var(--muted); max-width: 62ch; }

/* dictionary-style pronunciation cue, sat above the eyebrow */
.pronounce { font-family: var(--font-mono); font-size: .8125rem; letter-spacing: .01em; color: var(--muted); margin: 0 0 .55rem; }
.pronounce__word { color: var(--ink); }
.pronounce__say { color: var(--accent); margin-left: .55rem; }

.cta { margin-top: 1.75rem; }
.cta__sub { font-family: var(--font-mono); font-size: .8125rem; color: var(--muted); margin-top: .75rem; }
.cta__updater { font-size: .9375rem; color: var(--muted); margin-top: .5rem; }
.cta__links { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; margin-top: 1rem; }
.soon {
  font-family: var(--font-mono); font-size: .8125rem; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px;
  padding: .2rem .6rem; cursor: default;
}

/* --- the app, in a frame --- editorial screenshot framing:
   the elevation shadow is cast in deep violet (#3A2C6E) so the
   plates sit in the Lavender room. */
.hero__figure { display: flex; justify-content: center; }
.shot-figure { margin: 0; display: flex; flex-direction: column; align-items: center; width: 100%; }
.shot {
  position: relative; width: 100%;
  border-radius: 12px; overflow: hidden;
  background: var(--canvas);
  border: 1px solid var(--card-border);
  box-shadow: 0 1px 0 rgba(255,255,255,.65) inset,
              0 30px 70px -30px rgba(58, 44, 110, 0.28),
              0 2px 10px rgba(58, 44, 110, 0.06);
}
.shot img { width: 100%; height: auto; display: block; }
.shot--hero { animation: shot-float 7s ease-in-out infinite; transform-origin: center bottom; }
@keyframes shot-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* soft-violet dimension line + fig caption */
.dimline { display: flex; align-items: center; gap: .6rem; width: min(100%, 300px); margin-top: 1.25rem; }
.dimline__seg { flex: 1; height: 1px; background: var(--accent-soft); position: relative; }
.dimline__seg::before, .dimline__seg::after {
  content: ""; position: absolute; top: -3px; width: 1px; height: 7px; background: var(--accent-soft);
}
.dimline__seg:first-child::before { left: 0; }
.dimline__seg:first-child::after { display: none; }
.dimline__seg:last-child::after { right: 0; }
.dimline__seg:last-child::before { display: none; }
.dimline__cap { font-family: var(--font-mono); font-size: .75rem; color: var(--muted); white-space: nowrap; }

/* ============ SECTION HEADS (lavender rule + violet lotus-petal glyph + folio) ============ */
.band { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.band--light { background: var(--ground-2); }
.section-head { display: flex; flex-direction: column; gap: .9rem; margin-bottom: 2.5rem; }
.rule { display: flex; align-items: center; gap: .5rem; width: 100%; }
.rule__line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), var(--accent-soft)); opacity: .8; }
.rule__petal { flex: none; }
.folio { margin: 0; }

/* ============ SCREENSHOT PLATES ============ */
/* .plate wraps a single framed shot + its caption (section 01);
   constraining the plate (not the shot) keeps the caption aligned
   with the frame's left edge. */
.plate { max-width: 920px; margin-inline: auto; }

/* two-up showcase (section 03) */
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 2.75rem); align-items: start; }
.showcase { margin: 0; }

.figcap { font-family: var(--font-mono); font-size: .75rem; color: var(--muted); margin-top: 1rem; }
.figcap code, .feature__b code {
  font-family: var(--font-mono); color: var(--accent-hover);
  background: #EFEAFB; border: 1px solid var(--line);
  border-radius: 4px; padding: .02rem .3rem;
}

/* ============ FEATURES ============ */
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(2rem, 5vw, 4rem); }
.feature {
  display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; row-gap: .35rem;
  padding: 1.5rem 0; border-top: 1px solid var(--surface);
}
.feature:first-child, .features > .feature:nth-child(2) { border-top: 0; }
.feature__idx {
  font-family: var(--font-mono); font-size: .8125rem; color: var(--faint);
  grid-row: 1 / span 2; padding-top: .3rem;
}
.feature__h { font-family: var(--font-display); font-weight: 500; font-size: 1.375rem; letter-spacing: -0.008em; }
.feature__b { grid-column: 2; color: var(--muted); font-size: .9375rem; }
.feature__b code { font-size: .8125rem; padding: .04rem .35rem; border-radius: 5px; }
.features__more {
  margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--surface);
  color: var(--muted); font-size: .9375rem; max-width: 72ch;
}

/* ============ TRUST STRIP ============ */
.trust { background: var(--surface); border-top: 1px solid; border-bottom: 1px solid; border-image: linear-gradient(90deg, transparent, var(--accent-soft), transparent) 1; }
.trust__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .75rem 1rem; padding: 1.4rem 0; text-align: center; }
.trust__item { font-size: .9375rem; color: var(--muted); }
.trust__item b { font-family: var(--font-mono); font-weight: 500; font-size: .8125rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.trust .dot { color: var(--faint); }

/* ============ ON THE NAME ============ */
.onname {
  display: grid; grid-template-columns: auto 1fr; align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem); max-width: 760px;
}
.onname__lotus { width: clamp(84px, 12vw, 124px); height: auto; flex: none; }
.onname__entry {
  font-family: var(--font-mono); font-size: .8125rem; letter-spacing: .01em;
  color: var(--muted); display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem .75rem;
}
.onname__word { color: var(--ink); }
.onname__say { color: var(--accent); }
.onname__etym { color: var(--faint); }
.onname__etym i { font-family: var(--font-display); font-style: italic; }
.onname__gloss {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.25rem, 1.05rem + 1vw, 1.6rem); line-height: 1.42;
  letter-spacing: -0.006em; color: var(--ink); text-wrap: pretty;
  margin-top: .9rem; max-width: 34ch;
}
@media (max-width: 620px) {
  .onname { grid-template-columns: 1fr; gap: 1.1rem; }
  .onname__lotus { width: 72px; }
}

/* ============ CLOSING SPREAD ============ */
.close { position: relative; background: var(--ground); padding: clamp(4rem, 10vw, 7rem) 0; overflow: hidden; }
.close__watermark {
  position: absolute; right: -8%; top: 50%; transform: translateY(-50%);
  height: 128%; width: auto; opacity: .07; pointer-events: none; z-index: 0;
}
.close__inner { position: relative; z-index: 1; text-align: center; max-width: 640px; }
.close__title { font-size: clamp(2.1rem, 1.5rem + 3vw, 3.3rem); line-height: 1.1; font-variation-settings: "opsz" 60; letter-spacing: -0.015em; text-wrap: balance; }
.close__line { color: var(--muted); font-size: 1.0625rem; margin-top: .9rem; }
.close__release { font-family: var(--font-mono); font-size: .8125rem; color: var(--muted); margin-top: .4rem; }
.cta--center { display: flex; flex-direction: column; align-items: center; margin-top: 1.75rem; }
.cta--center .cta__links { justify-content: center; }

/* ============ COLOPHON ============ */
.colophon { background: var(--surface); border-top: 1px solid var(--accent-soft); }
.colophon__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .35rem .75rem;
  padding: 1.5rem 0; font-family: var(--font-mono); font-size: .75rem; color: var(--muted);
}
.colophon__brand { display: inline-flex; align-items: center; gap: .5rem; color: var(--ink); }
.colophon__mark { width: 17px; height: 17px; flex: none; }
.colophon__meta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.colophon .sep { color: var(--faint); }
.colophon__note { flex-basis: 100%; margin: .35rem 0 0; color: var(--muted); }

/* ============ SCROLL REVEAL ============ */
.reveal.reveal--pending { opacity: 0; transform: translateY(12px); }
.reveal.reveal--in { opacity: 1; transform: none; transition: opacity .5s var(--ease), transform .5s var(--ease); }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; gap: clamp(2rem, 6vw, 2.75rem); }
  .hero__figure { margin-top: .25rem; }
  .shot-figure { max-width: 620px; }
  .shot--hero { animation: none; }
  .dimline { margin-inline: auto; }
  .shots { grid-template-columns: 1fr; gap: 2rem; }
  .showcase { max-width: 620px; margin-inline: auto; }
}
@media (max-width: 680px) {
  .features { grid-template-columns: 1fr; }
  .feature, .features > .feature:nth-child(2) { border-top: 1px solid var(--surface); }
  .feature:first-child { border-top: 0; }
  .trust .dot { display: none; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .hero__sub { font-size: 1.0625rem; }
  .brand__mark { width: 44px; height: 44px; }
  .masthead__inner { height: 60px; }
  .cta__links { flex-direction: column; align-items: flex-start; }
  .cta--center .cta__links { align-items: center; }
  .cta .btn:not(.btn--sm) { width: 100%; }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .shot--hero { animation: none; }
  .btn { transition: background-color .16s ease, color .16s ease, border-color .16s ease; }
  .btn--accent:active { transform: none; }
  .reveal.reveal--pending { opacity: 1; transform: none; }
  .reveal.reveal--in { transition: none; }
}
