/* ==================================================================
   Sangini, a product by RoamSaathi.
   Standalone marketing site. Vanilla CSS, no build step, no framework.

   Tokens below are copied from the product design system
   (app/src/app/globals.css, extracted from Figma `Roam-Saathi-Final`)
   so the site and the app read as one brand. Do not invent values.
   ================================================================== */

:root {
  color-scheme: light;

  --ink: #2c1b28;
  --ink-2: #6b5868;
  --ink-3: #9d8898;

  --surface: #ffffff;
  --surface-2: #fafafa;

  --brand: #fa97be;
  --brand-strong: #fc7ca1;
  --brand-tint: rgb(252 124 161 / 0.1);

  --cta: #252525;

  --line: #eadee5;
  --line-2: #e5e5e5;

  --shadow-sm: 0 4px 12px rgb(44 27 40 / 0.04);
  --shadow-md: 0 6px 16px rgb(44 27 40 / 0.05);
  --shadow-lg: 0 8px 20px rgb(44 27 40 / 0.07);

  --radius: 20px;
  --radius-lg: 28px;
  --pill: 100px;

  --page: 1080px;
  --gutter: 24px;

  /* The founder note is a reading column, not a layout column. */
  --measure: 34rem;
}

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

* {
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  background: var(--surface);
  font-family: Gabarito, ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ------------------------------------------------------------------
   Aurora background.

   The app draws this in Figma as two blurred gradient blobs. Reproducing
   that literally means compositing a ~130px blur over a full-screen layer
   on every paint. These radial gradients are visually equivalent and cost
   nothing: no filter, no extra layer, no repaint on scroll.

   These are the same fitted numbers as `.rs-aurora` in `app/src/app/globals.css`
   — the marketing page and the product must not drift apart on the one surface
   a visitor sees in both. If you change one, change the other. The derivation
   and the reason the blue stop is a faint edge tint rather than a corner blob
   are documented there; do not re-tune either copy in isolation.
   ------------------------------------------------------------------ */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(130% 49% at 2% 3%, rgb(250 151 190 / 0.34) 0%, transparent 64%),
    radial-gradient(102% 37% at 55% 11%, rgb(255 200 0 / 0.52) 0%, transparent 61%),
    radial-gradient(92% 16% at 107% 20%, rgb(144 212 252 / 0.12) 0%, transparent 100%),
    #ffffff;
}

/* Dimmer variant for the legal documents. The aurora is fixed, so on a long
   page it sits behind body copy for the whole scroll; at full strength that
   costs readability. Same geometry at 0.6x alpha — the ratio `.rs-aurora--soft`
   uses. The white wash that used to force the clear-out is gone: the blobs now
   fade on their own stops by ~35% of the viewport, and the wash was cutting the
   sweep short of where Figma ends it. */
.aurora--soft {
  background:
    radial-gradient(130% 49% at 2% 3%, rgb(250 151 190 / 0.2) 0%, transparent 64%),
    radial-gradient(102% 37% at 55% 11%, rgb(255 200 0 / 0.31) 0%, transparent 61%),
    radial-gradient(92% 16% at 107% 20%, rgb(144 212 252 / 0.07) 0%, transparent 100%),
    #ffffff;
}

/* ------------------------------------------------------------------
   Layout
   ------------------------------------------------------------------ */
.wrap {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

section {
  padding-block: 64px;
}

/* ------------------------------------------------------------------
   Type
   ------------------------------------------------------------------ */
h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h1 {
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.5rem, 3.4vw, 2.125rem);
}

h3 {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--brand-strong);
}

.muted {
  color: var(--ink-2);
}

.small {
  font-size: 0.9375rem;
}

a {
  color: inherit;
}

.stack {
  display: grid;
  gap: 16px;
}

/* ------------------------------------------------------------------
   Header
   ------------------------------------------------------------------ */
.site-header {
  padding-block: 24px;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
}

/*
 * The wordmark, sized by height so it sits on the same optical line as the
 * "a product by RoamSaathi" text beside it. `width: auto` against an explicit
 * `height`, with the intrinsic dimensions on the tag, reserves the aspect ratio
 * before the image loads — this is the site header, and a reflow here pushes the
 * whole page down on first paint.
 */
.brand-mark {
  display: block;
  height: 34px;
  width: auto;
}

/* The footer lockup, where the mark sits above the company line rather than
   beside it and can afford to be quieter. */
.brand-mark-sm {
  height: 28px;
}

.brand-by {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.9375rem;
  font-weight: 500;
}

.nav a {
  color: var(--ink-2);
  text-decoration: none;
}

.nav a:hover {
  color: var(--ink);
}

/* ------------------------------------------------------------------
   Welcome
   ------------------------------------------------------------------ */
.hero {
  padding-block: 40px 56px;
}

.hero .stack {
  gap: 20px;
  max-width: 22ch;
}

.hero-figure {
  margin: 44px 0 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgb(255 255 255 / 0.7);
}

.hero-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 7;
  object-fit: cover;
}

.tagline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: start;
  padding: 7px 16px;
  border-radius: var(--pill);
  background: var(--brand-tint);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-strong);
}

/* ------------------------------------------------------------------
   The founder note.

   The whole page is one piece of writing, so it is set as a reading
   column rather than a grid of cards: one measure, generous leading,
   and three kinds of line — body, cue, and the thing that is said.
   ------------------------------------------------------------------ */
.note {
  padding-block: 8px 72px;
}

/* The note is centred in the page while the hero and the coda run full
   width, so the page reads as a magazine spread: banner, article, plate. */
.note-head,
.note-body {
  max-width: var(--measure);
  margin-inline: auto;
}

.note-head {
  margin-bottom: 26px;
}

.note-body {
  font-size: clamp(1.0625rem, 2vw, 1.1875rem);
  line-height: 1.72;
  color: var(--ink-2);
}

.note-body > * + * {
  margin-top: 26px;
}

/* A cue is the half-sentence that hands off to a spoken line. It belongs
   to the line below it, so it sits closer to it than to its own paragraph. */
.note-body > .cue + .said,
.note-body > .cue + .turn {
  margin-top: 12px;
}

.said {
  font-size: clamp(1.625rem, 5.2vw, 2.5rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: var(--ink);
  /* Hang the opening quotation mark into the gutter so the glyph edge,
     not the punctuation, aligns with the column. */
  text-indent: -0.42em;
}

.turn {
  font-size: clamp(1.1875rem, 3.2vw, 1.5rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.note-body > .said + *,
.note-body > .turn + * {
  margin-top: 32px;
}

.sign {
  margin-top: 44px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  display: grid;
  justify-items: start;
  gap: 2px;
}

/* The signature is a transparent WebP tinted to --ink, so it composites
   over the aurora instead of sitting on a white plate. The negative inline
   start optically aligns the loop of the S with the text column. */
.signature {
  display: block;
  width: min(300px, 80%);
  height: auto;
  margin: 8px 0 4px -8px;
}

.sign-role {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ------------------------------------------------------------------
   Coda: the three words, in pictures
   ------------------------------------------------------------------ */
.coda {
  padding-block: 8px 76px;
}

.coda-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.coda-tile {
  position: relative;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 0.7);
  box-shadow: var(--shadow-md);
}

.coda-tile img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 4;
  object-fit: cover;
}

.coda-tile figcaption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 52px 20px 18px;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 10px rgb(20 10 18 / 0.35);
  background: linear-gradient(to top, rgb(28 16 25 / 0.62) 0%, rgb(28 16 25 / 0) 100%);
}

/* ------------------------------------------------------------------
   Coming soon.

   The whole page is one sentence and a form, so it is laid out as a
   reading column rather than a grid — same `--measure` the founder note
   uses, so the two pages set type identically.
   ------------------------------------------------------------------ */
.soon {
  padding-block: 32px 8px;
}

.soon-copy {
  display: grid;
  gap: 20px;
  max-width: var(--measure);
}

/* `.said` hangs its opening quote into the gutter, which is right inside the
   note's reading column and wrong for a page heading that has to align with
   the pill above it and the paragraphs below. */
.soon-line {
  text-indent: 0;
  margin-block: 4px;
}

.lede {
  font-size: clamp(1.0625rem, 2.2vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-2);
}

/* ------------------------------------------------------------------
   Bento.

   Four tiles, three arrangements, and the arrangement is the only thing
   that changes between them — every tile keeps `object-fit: cover`, so a
   photograph is re-cropped rather than squashed at any width.

   **The grid carries an `aspect-ratio` and the tiles do not** (above the
   narrow breakpoint). That is what makes the cells square without a fixed
   pixel height anywhere: at four columns and two rows, a 2:1 box gives
   each cell a width of W/4 and a height of W/4. The feature tile spans
   2x2 and stays square; the wide tile spans two columns of one row and
   lands at 2:1, which is close to the intrinsic ratio of the photograph
   in it, so `cover` has almost nothing to crop.

   Below that, the grid stops constraining its own height and each tile
   declares its own ratio instead — rows then size to content, which is
   what a stacked layout wants.
   ------------------------------------------------------------------ */
.bento {
  margin-top: 40px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
}

.bento-tile {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid rgb(255 255 255 / 0.7);
}

.bento-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Narrowest: the feature and the wide tile go full width, the two squares
   share a row. Two 160px squares read as people; four 80px ones do not. */
.bento-a {
  grid-column: span 2;
  aspect-ratio: 16 / 10;
}

.bento-b {
  grid-column: span 2;
  aspect-ratio: 16 / 8;
}

.bento-c,
.bento-d {
  aspect-ratio: 1;
}

/* Tablet: three across, full width under the copy. Four tiles do not divide
   into a 3x2 block, so the fourth waits for the desktop layout rather than
   leaving a hole. */
@media (min-width: 620px) {
  .bento {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    aspect-ratio: 3 / 2;
  }
  .bento-tile {
    aspect-ratio: auto;
  }
  .bento-a {
    grid-area: 1 / 1 / 3 / 3;
  }
  .bento-b {
    grid-area: 1 / 3 / 2 / 4;
  }
  .bento-c {
    grid-area: 2 / 3 / 3 / 4;
  }
  .bento-d {
    display: none;
  }
}

/*
 * Desktop: the copy and the bento sit side by side.
 *
 * Stacked, this page put a 34rem reading column against a 1080px page and
 * left the whole right half of the first screen empty — the measure is right
 * for reading and wrong as a full-width layout. Beside the pictures it reads
 * as a composition rather than as a narrow strip.
 *
 * The bento becomes a 2x3 pinwheel: two portrait tiles on one diagonal, two
 * landscape on the other. All four photographs are in play, and the square
 * outer ratio lets it stand the same height as the copy without either being
 * pinned to a pixel height.
 */
@media (min-width: 1000px) {
  .soon .wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
    gap: 56px;
    align-items: center;
  }
  .soon-copy {
    max-width: none;
  }
  .bento {
    margin-top: 0;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
    aspect-ratio: 1 / 1;
    gap: 14px;
  }
  .bento-a {
    grid-area: 1 / 1 / 3 / 2;
  }
  .bento-b {
    grid-area: 1 / 2 / 2 / 3;
  }
  .bento-c {
    grid-area: 2 / 2 / 4 / 3;
  }
  .bento-d {
    display: block;
    grid-area: 3 / 1 / 4 / 2;
  }
}

/* ------------------------------------------------------------------
   Waitlist
   ------------------------------------------------------------------ */
.waitlist {
  padding-block: 44px 8px;
}

.waitlist-card {
  max-width: var(--measure);
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}

.waitlist-sub {
  margin-top: 10px;
}

.waitlist-form {
  margin-top: 22px;
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  font-size: 0.9375rem;
  font-weight: 600;
}

.field input {
  width: 100%;
  padding: 13px 15px;
  border-radius: var(--pill);
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  /* 16px floor: iOS Safari zooms the whole page when a focused input is
     smaller than this, and the page never zooms back out. */
  font-size: max(1rem, 16px);
  transition: box-shadow 140ms ease-out, border-color 140ms ease-out;
}

.field input::placeholder {
  color: var(--ink-3);
}

/*
 * Focus is the resting border drawn thicker, in the same grey — not a colour.
 * A coloured ring is how every other control in the product says "this is
 * wrong", so a pink focus makes tapping a field look like failing validation
 * before anything has been typed. Same rule as `.rs-focus-ring` in the app.
 *
 * Drawn as an inset shadow rather than a wider border: growing the border
 * reflows the input's own text by 2px on every focus, which under a caret is
 * a visible twitch.
 */
.field input:focus,
.field input:focus-visible {
  outline: none;
  border-color: var(--line-2);
  box-shadow: inset 0 0 0 3px var(--line-2);
}

.btn {
  appearance: none;
  border: 0;
  width: 100%;
  padding: 15px 22px;
  border-radius: var(--pill);
  background: var(--cta);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 140ms cubic-bezier(0.16, 1, 0.3, 1), opacity 140ms ease-out;
}

.btn:hover {
  opacity: 0.92;
}

/* scale() only — never padding or width, which would relayout the card. */
.btn:active {
  transform: scale(0.985);
}

.btn:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none;
}

/*
 * The honeypot.
 *
 * Positioned off-screen rather than `display:none`: a good bot skips
 * undisplayed inputs, and one that is merely moved away still looks fillable.
 * `aria-hidden` and `tabindex="-1"` keep it away from anyone real.
 */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.waitlist-status {
  margin-top: 14px;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink-2);
}

.waitlist-status:empty {
  display: none;
}

.waitlist-status[data-tone="ok"] {
  color: var(--ink);
  font-weight: 600;
}

.waitlist-status:focus {
  outline: none;
}

.waitlist-legal {
  margin-top: 16px;
}

.waitlist-legal a {
  color: var(--ink-2);
  text-underline-offset: 3px;
}

.follow {
  margin-top: 26px;
  max-width: var(--measure);
  font-size: 1.0625rem;
  color: var(--ink-2);
}

.follow a {
  font-weight: 600;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

/* ------------------------------------------------------------------
   Reveal on scroll.

   Scroll-driven, so it runs on the compositor with no JavaScript, no
   IntersectionObserver and no main-thread work: opacity and transform
   only. Everything is visible by default — the animation only exists
   inside the @supports block, so a browser without view() timelines
   (or a reader who asked for less motion) simply gets the static page.
   ------------------------------------------------------------------ */
@keyframes rs-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: rs-rise linear both;
      animation-timeline: view();
      animation-range: entry 8% entry 52%;
    }
  }
}

/* ------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding-block: 40px 48px;
  margin-top: 24px;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  font-size: 0.9375rem;
  font-weight: 500;
}

.footer-links a {
  color: var(--ink-2);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-note {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 0.875rem;
}

/* ------------------------------------------------------------------
   Legal documents (privacy.html, terms.html)
   ------------------------------------------------------------------ */
.doc {
  max-width: 760px;
  padding-block: 48px 24px;
}

.doc-header {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 36px;
  display: grid;
  gap: 12px;
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  color: var(--ink-3);
  font-size: 0.875rem;
}

.doc h2 {
  font-size: 1.375rem;
  margin-top: 44px;
  scroll-margin-top: 24px;
}

.doc h3 {
  margin-top: 28px;
}

.doc p,
.doc li {
  color: var(--ink-2);
  font-size: 1rem;
}

.doc p + p {
  margin-top: 14px;
}

.doc h2 + p,
.doc h3 + p {
  margin-top: 12px;
}

.doc ul,
.doc ol {
  margin: 14px 0 0;
  padding-left: 22px;
  display: grid;
  gap: 10px;
}

.doc strong {
  color: var(--ink);
  font-weight: 600;
}

.doc a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--brand);
}

.toc {
  padding: 22px 24px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.toc h3 {
  margin: 0 0 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.toc ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  font-size: 0.9375rem;
}

.toc a {
  color: var(--ink-2);
  text-decoration: none;
}

.toc a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.callout {
  margin-top: 18px;
  padding: 20px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--brand-tint);
}

.callout p {
  color: var(--ink);
}

.contact-block {
  margin-top: 18px;
  padding: 20px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.back-link {
  display: inline-block;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
}

.back-link:hover {
  color: var(--ink);
}

/* ------------------------------------------------------------------
   Accessibility
   ------------------------------------------------------------------ */
:focus-visible {
  outline: 2px solid var(--brand-strong);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  padding: 10px 16px;
  border-radius: var(--pill);
  background: var(--cta);
  color: #fff;
  font-size: 0.875rem;
  text-decoration: none;
  z-index: 10;
}

.skip-link:focus {
  left: 16px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
  section {
    padding-block: 48px;
  }
  /* The "a product by RoamSaathi" line is part of the brand lock-up and is
     never dropped; on narrow screens it stacks under the name instead. */
  .brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
  .brand-mark {
    height: 30px;
  }
  .note-body > * + * {
    margin-top: 22px;
  }
  .waitlist-card {
    padding: 22px 18px;
  }
  .bento {
    margin-top: 30px;
    gap: 10px;
  }
}
