/* Manifestation — the landing page.
 *
 * Every colour here is one of the app's own tokens (lib/theme/tokens.dart,
 * through the P4 engine's transcription of them), including the a11y
 * overrides the app ships for text: the page reads as the app because it is
 * painted out of the same jar, not because it was matched by eye.
 *
 * The page commits to the app's own daylight world rather than following the
 * visitor's OS theme, and hands the switch to the reader instead: the sky
 * picker in "Make it yours" repaints the hero band the way the app repaints
 * every screen. Every surface therefore paints its own ground explicitly.
 */

:root {
  color-scheme: light;

  /* Grounds and inks (tokens.dart) */
  --paper: #f6f0e4;
  --cream: #fbf7ee;
  --ink: #3a3050;
  --ink-2: #574c73;
  --sub: #645c75;          /* mutedInk: the a11y override, not the board hue */
  --sand: #685f52;         /* sandInk */
  --gold: #c8a45c;
  --gold-light: #e5b96f;
  --gold-text: #755c2c;    /* goldTextInk */
  --night: #221c35;
  --night-raised: #2e2647;
  --night-lilac: #3d3458;
  --night-text: #f2ecdc;
  --night-2: rgba(242, 236, 220, .8);
  --night-sub: rgba(242, 236, 220, .72);
  --powder: #dfe7f3;
  --lilac: #e8def2;
  --blush: #f6dcd4;

  /* Whatever a band sets: everything inside reads these, never a literal. */
  --fg: var(--ink);
  --fg-sub: var(--sub);
  --fg-eyebrow: var(--sand);
  --surface: var(--cream);
  --hair: rgba(58, 48, 80, .22);
  --plate-fill: var(--ink);
  --plate-ink: var(--paper);

  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 56px);
  --band-y: clamp(72px, 9vw, 132px);
  --radius: 20px;

  --star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 0l1.6 6.4L16 8l-6.4 1.6L8 16 6.4 9.6 0 8l6.4-1.6Z' fill='%23e5b96f'/%3E%3C/svg%3E");
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-app);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* The app draws no CJK sans below 600 — its own "regular" for those scripts
   IS SemiBold — so the page does not ask for a weight the app never ships and
   the browser would have to synthesise or fall back for. */
html[data-track="cjk"] body { font-weight: 600; }

img { max-width: 100%; }
a { color: inherit; }

/* Read by assistive technology, never painted. */
.sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Clipped, not parked off-screen: an element at `inset-inline-start: -9999px`
   is real layout, and under some scripts it lands on the scrollable side and
   widens the page by its own width. */
.skip {
  position: absolute; inset-inline-start: 0; top: 0; z-index: 100;
  width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 0 0 12px 0;
  font-weight: 700; text-decoration: none;
}
.skip:focus {
  width: auto; height: auto; clip-path: none; overflow: visible;
}

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2.5px solid var(--gold); outline-offset: 3px; border-radius: 6px;
}

/* ── the fixed bar ─────────────────────────────────────────────────────── */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 60;
  display: flex; align-items: center; gap: 14px; max-width: 100%;
  padding: 12px var(--gutter);
  background: transparent;
  transition: background .2s ease, box-shadow .2s ease;
}
.nav.scrolled {
  background: rgba(246, 240, 228, .94);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(58, 48, 80, .12);
}
/* The bar is `position: fixed`, so it is NOT clipped by the body's
   `overflow-x: hidden`: a row that overflows it by two pixels is two pixels
   the whole page can be scrolled sideways. The name yields first. */
.nav__brand {
  display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0;
  font-family: var(--font-title); font-size: 19px; letter-spacing: .01em; color: var(--ink);
}
.nav__brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav__brand img { border-radius: 7px; display: block; flex: none; }
.nav__links { display: none; margin-inline-start: auto; gap: 26px; }
.nav__links a { text-decoration: none; font-size: 14.5px; font-weight: 600; color: var(--ink-2); }
.nav__links a:hover { color: var(--ink); }
.nav__cta {
  margin-inline-start: auto; text-decoration: none; flex: none;
  background: var(--ink); color: var(--paper);
  padding: 10px 18px; border-radius: 999px; font-size: 14.5px; font-weight: 700;
  box-shadow: 0 3px 0 rgba(58, 48, 80, .35);
}
.nav--plain .nav__cta { background: transparent; color: var(--ink); box-shadow: none; border: 1px solid var(--hair); }
@media (min-width: 900px) {
  .nav__links { display: flex; }
  .nav__links + .nav__cta { margin-inline-start: 0; }
}
/* Over a night hero the unscrolled bar reads on the night's own inks. Past
   50px it is opaque parchment again, over whatever is passing under it. */
html[data-sky="midnight"] .nav:not(.scrolled) .nav__brand,
html[data-sky="midnight"] .nav:not(.scrolled) .nav__links a { color: var(--night-text); }
html[data-sky="midnight"] .nav:not(.scrolled) .nav__cta { background: var(--gold-light); color: var(--night); box-shadow: 0 3px 0 rgba(0, 0, 0, .35); }

/* ── bands ─────────────────────────────────────────────────────────────── */
.band { padding: var(--band-y) var(--gutter); background: var(--paper); }
.band--tight { padding-block: clamp(56px, 7vw, 96px); }
.band--paper { background: var(--paper); }
#about { border-top: 1px solid var(--hair); }
.band--powder { background: linear-gradient(180deg, #dfe7f3 0%, #eef2f8 70%, #f3f0ea 100%); }
.band--blush { background: linear-gradient(180deg, #f6dcd4 0%, #f2d4cf 55%, #f4e3cd 100%); }
.band--gold { background: linear-gradient(180deg, #f3e0b8 0%, #ecc98f 48%, #e0ae62 100%); }
.band--night {
  background: linear-gradient(180deg, #221c35 0%, #2e2647 62%, #3d3458 100%);
  --fg: var(--night-text);
  --fg-sub: var(--night-sub);
  --fg-eyebrow: var(--night-2);
  --surface: var(--night-raised);
  --hair: rgba(242, 236, 220, .2);
  --plate-fill: var(--gold-light);
  --plate-ink: var(--night);
  color: var(--night-text);
}
.band--gold { --fg: var(--night); --fg-sub: #4a3d1f; --fg-eyebrow: #6b551f; --hair: rgba(58, 48, 80, .3); }

.wrap { max-width: var(--wrap); margin-inline: auto; }
.wrap--narrow { max-width: 720px; }
.wrap--wide { max-width: 1200px; }
.wrap--split { display: grid; gap: clamp(36px, 5vw, 64px); align-items: center; }
@media (min-width: 940px) { .wrap--split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.wrap--split--top { align-items: start; }

.col { min-width: 0; }
.col--stage { display: flex; flex-direction: column; align-items: center; gap: 16px; min-width: 0; }

.head { max-width: 760px; }
.head--center { margin-inline: auto; text-align: center; }

/* ── type ──────────────────────────────────────────────────────────────── */
.eyebrow {
  margin: 0 0 14px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
  color: var(--fg-eyebrow);
}
[data-track="cjk"] .eyebrow { letter-spacing: 0; }

.hl-block {
  margin: 0;
  font-family: var(--font-title); font-weight: 400;
  font-size: clamp(38px, 6.2vw, 66px);
  line-height: 1.08; letter-spacing: -.005em;
  color: var(--fg);
}
.hl-block--hero { font-size: clamp(44px, 7.4vw, 82px); }
[data-track="cjk"] .hl-block { line-height: 1.32; letter-spacing: 0; }
.hl { display: block; white-space: nowrap; }

.acc {
  position: relative; display: inline-block;
  background: var(--plate-fill); color: var(--plate-ink);
  border-radius: .17em; padding: 0 .13em; margin: 0 .02em;
}
.acc::after {
  content: ""; position: absolute; top: -.14em; inset-inline-end: -.13em;
  width: .26em; height: .26em; background: var(--star) center / contain no-repeat;
}

.lede { margin: 20px 0 0; max-width: 46ch; font-size: clamp(16.5px, 1.5vw, 18.5px); color: var(--fg-sub); }
.head--center .lede { margin-inline: auto; }

/* ── the hero ──────────────────────────────────────────────────────────── */
/* The hero wears the sky the reader picks, so it is full bleed: a background
   on a centred box would paint the sky as a stripe with parchment margins. */
.hero { padding: calc(var(--band-y) + 52px) var(--gutter) var(--band-y); background: var(--paper); }
.hero__in {
  display: grid; gap: clamp(28px, 4vw, 56px); align-items: center;
  max-width: var(--wrap); margin-inline: auto;
}
/* A band the reader can re-sky: its ground is set from the script and its
   inks follow, so every word on it stays legible in all four. */
.hero[data-dark="true"], #make[data-dark="true"] {
  --fg: var(--night-text); --fg-sub: var(--night-sub); --fg-eyebrow: var(--night-2);
  --plate-fill: var(--gold-light); --plate-ink: var(--night); --hair: rgba(242, 236, 220, .2);
  --surface: var(--night-raised);
  color: var(--night-text);
}
.hero__words { min-width: 0; }
.hero__stage { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.hero__get { margin-top: 30px; }
@media (min-width: 940px) {
  .hero__in { grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); }
}
@media (max-width: 939px) {
  /* Promise, then proof, then the badges: the live deck lands in the first
     screen and the fixed bar keeps the download one tap away. */
  .hero__words { display: contents; }
  .hero__in { grid-template-columns: minmax(0, 1fr); }
  .hero .eyebrow { order: 1; margin-bottom: 10px; }
  .hero .hl-block--hero { order: 2; }
  .hero .lede { order: 3; }
  .hero__stage { order: 4; }
  .hero__get { order: 5; margin-top: 4px; }
}

/* ── badges ────────────────────────────────────────────────────────────── */
.badges { display: flex; flex-wrap: wrap; gap: 12px; }
/* Both store buttons keep the SAME height, and shrink together on a narrow
   screen so they stay on one line instead of stacking. */
.badge img { height: clamp(40px, 11vw, 48px) !important; }
.badges--lg .badge img { height: clamp(42px, 11.5vw, 56px) !important; }
.head--center .badges, .wrap--narrow .badges { justify-content: center; margin-top: 30px; }
.badge { display: inline-flex; border-radius: 9px; }
.badge img { display: block; }
.badge:hover { opacity: .86; }

/* ── live slots ────────────────────────────────────────────────────────── */
/* A live slot's box is absolutely pinned, so the slot has no intrinsic
   width: every one of them states its width, or it collapses to zero and the
   unscaled box pushes the page sideways. */


/* The app's own toast, over the surface that raised it. */

/* ── the strike controls ───────────────────────────────────────────────── */

/* ── the category wall ─────────────────────────────────────────────────── */

/* ── make it yours ─────────────────────────────────────────────────────── */
.make { display: grid; gap: clamp(30px, 4vw, 56px); align-items: start; margin-top: 44px; }
/* A grid item with `margin-inline: auto` and no definite width shrinks to
   fit its content, and this one's content is an absolutely-pinned live box:
   without the explicit width it collapses to zero and the box overflows the
   page. */

/* ── the three rooms ───────────────────────────────────────────────────── */
.rooms { display: grid; gap: 22px; margin-top: 44px; }

/* The share cut is a tall object; given a third of a row it leaves the two
   cards beside it half empty. It takes the full width underneath instead,
   with its words alongside. */
/* The three ratios the share sheet cuts, side by side and bottom aligned, so
   the row shows what the copy says. On a phone one cut has the room to be
   read, so the other two step out. */
@media (max-width: 699px) { .room__cut .cut:not(.cut--story) { display: none; } .room__cut { width: 100%; max-width: 260px; margin-inline: auto; } }

/* ── FAQ ───────────────────────────────────────────────────────────────── */
.faq__title { margin: 0 0 28px; font-family: var(--font-title); font-weight: 400; font-size: clamp(30px, 4vw, 42px); color: var(--ink); }
.faq { display: grid; gap: 2px; border-top: 1px solid var(--hair); }
.faq__item { border-bottom: 1px solid var(--hair); }
.faq__q {
  list-style: none; cursor: pointer; padding: 20px 34px 20px 0; position: relative;
  font-size: 17px; font-weight: 700; color: var(--ink);
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {
  content: ""; position: absolute; inset-inline-end: 4px; top: 50%; width: 12px; height: 2px;
  background: var(--ink); transform: translateY(-50%);
}
.faq__q::before {
  content: ""; position: absolute; inset-inline-end: 9px; top: 50%; width: 2px; height: 12px;
  background: var(--ink); transform: translateY(-50%); transition: opacity .15s ease;
}
.faq__item[open] .faq__q::before { opacity: 0; }
.faq__a { margin: 0 0 22px; max-width: 62ch; font-size: 15.5px; color: var(--sub); }

/* ── contact ───────────────────────────────────────────────────────────── */
.contact__label { margin: 42px 0 12px; font-size: 13px; font-weight: 700; color: var(--fg-sub); }
.contact {
  appearance: none; cursor: pointer; font: inherit;
  display: inline-flex; flex-direction: column; align-items: center; gap: 3px;
  background: var(--night); color: var(--night-text); border: 0;
  border-radius: 14px; padding: 14px 26px;
  box-shadow: 0 4px 0 rgba(34, 28, 53, .35);
}
.contact:hover { background: var(--night-raised); }
.contact__addr { font-size: 15.5px; font-weight: 700; }
.contact__do { font-size: 12px; font-weight: 600; color: rgba(242, 236, 220, .72); }

/* ── the footer ────────────────────────────────────────────────────────── */
.foot { background: var(--night); color: var(--night-text); padding: 56px var(--gutter) 44px; }
.foot__in { display: grid; gap: 26px; }
@media (min-width: 860px) { .foot__in { grid-template-columns: 1fr auto; align-items: start; } }
.foot__brand { display: flex; align-items: center; gap: 12px; }
.foot__brand img { border-radius: 8px; display: block; }
.foot__name { margin: 0; font-family: var(--font-title); font-size: 19px; }
.foot__made { margin: 2px 0 0; font-size: 13px; color: var(--night-sub); }
.foot__links { list-style: none; display: flex; flex-wrap: wrap; gap: 20px; margin: 0; padding: 0; }
.foot__links a { font-size: 14px; font-weight: 600; color: var(--night-2); text-decoration: none; }
.foot__links a:hover { color: var(--night-text); text-decoration: underline; }
.foot__links--page a { color: var(--ink-2); }
.foot__copy { margin: 0; font-size: 12.5px; color: rgba(242, 236, 220, .55); grid-column: 1 / -1; }
.foot--slim { padding-block: 30px; }

.langs { grid-column: 1 / -1; border-top: 1px solid rgba(242, 236, 220, .16); padding-top: 22px; }
.langs__label { display: block; font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: rgba(242, 236, 220, .55); margin-bottom: 10px; }
.langs__list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 0; }
.langs__list a { font-size: 14px; color: var(--night-2); text-decoration: none; }
.langs__list a[aria-current] { color: var(--gold-light); font-weight: 700; }
.langs__list a:hover { text-decoration: underline; }
.band--paper .langs { border-top-color: var(--hair); }
.band--paper .langs__label { color: var(--sand); }
.band--paper .langs__list a { color: var(--ink-2); }
.band--paper .langs__list a[aria-current] { color: var(--gold-text); }

/* ── the snackbar ──────────────────────────────────────────────────────── */
.snackbar {
  position: fixed; left: 50%; bottom: 26px; z-index: 90;
  transform: translate(-50%, 14px); opacity: 0; pointer-events: none;
  background: var(--night); color: var(--night-text);
  border-radius: 999px; padding: 12px 22px; font-size: 14px; font-weight: 700;
  box-shadow: 0 12px 34px rgba(20, 14, 40, .35);
  transition: opacity .18s ease, transform .18s ease;
}
.snackbar--show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { .snackbar { transition: none; } }

/* ── the support page ──────────────────────────────────────────────────── */
.page--support { background: var(--paper); }
.page--support .nav { position: static; background: var(--paper); }
.page--support main { padding-top: 40px; }
.page--support .hl-block { font-size: clamp(34px, 5vw, 50px); }
.page--support .foot__links--page { margin: 40px 0 0; }
.page--support .contact { margin-top: 4px; }
.page--support .faq { margin-top: 4px; }


/* ── the pictures ──────────────────────────────────────────────────────────
   Every section carries one composed device, the way the store slides do. The
   slot states its aspect so the page reserves the space before the drawing
   lands, and nothing clips: a stage is sized to hold its own shadows. */
.live { position: relative; width: 100%; min-width: 0; }
.shot { margin: clamp(34px, 4vw, 56px) auto 0; width: 100%; max-width: 560px; }
.shot--wide { max-width: 900px; }
#strikes .shot { max-width: 460px; }
#categories .shot { max-width: 560px; }
#widgets .shot { max-width: 520px; }
#make .shot { max-width: 620px; }
@media (min-width: 900px) {
  #strikes .shot { max-width: 520px; }
  #categories .shot { max-width: 640px; }
  #widgets .shot { max-width: 600px; }
  #make .shot { max-width: 720px; }
  .shot--wide { max-width: 1000px; }
}

.shot__label {
  margin: clamp(40px, 5vw, 64px) 0 0; text-align: center;
  font-family: var(--font-title); font-weight: 400; font-size: clamp(21px, 2.4vw, 27px); color: var(--fg);
}
.shot__label--gap { margin-top: clamp(56px, 7vw, 92px); }

.rooms { display: grid; gap: clamp(30px, 4vw, 44px); margin-top: clamp(34px, 4vw, 56px); }
@media (min-width: 760px) { .rooms { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; } }
.room { margin: 0; min-width: 0; }
.room__cap {
  margin: 20px 0 0; text-align: center;
  font-size: 11.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--fg-eyebrow);
}
[data-track="cjk"] .room__cap { letter-spacing: 0; }
