/* croze.app landing page. The share pages use styles.css; nothing here is shared with them. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/BricolageGrotesque-Latin.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/GeistMono-Latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("/fonts/Geist-Latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ground: #15120f;
  --ink: #e6eaf4;
  --second: #9a9ca8;
  --hair: #2c2723;
  --violet: #6f5fc4;
  --violet-ink: #8f82d6;
  --uv: #211b2b;
  --gutter: clamp(20px, 5vw, 72px);
  /* The left edge of every section, in vw so a half-width column (the hero's copy) resolves it as the full-width
     header, pairs, sections and footer do: content 1240 px at most, centred, else the gutter. */
  --edge: max(var(--gutter), calc((100vw - 1240px) / 2));
  --display: "Bricolage Grotesque", "Geist", system-ui, sans-serif;
  --text: "Geist", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--hair) var(--ground); }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
::selection { background: var(--violet); color: var(--ink); }
img, video { display: block; max-width: 100%; height: auto; }
h1, h2, p, figure, ul { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 500; font-stretch: 85%; text-wrap: balance; letter-spacing: -0.02em; }
p { text-wrap: pretty; }

a { color: inherit; text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: 0.22em; text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent); transition: text-decoration-color 200ms var(--ease), color 200ms var(--ease), background-color 200ms var(--ease), border-color 200ms var(--ease); }
@media (hover: hover) { a:hover { text-decoration-color: var(--ink); } }
:focus-visible { outline: 2px solid var(--violet-ink); outline-offset: 4px; border-radius: 6px; }

.skip { position: absolute; left: var(--gutter); top: -100px; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; background: var(--ink); color: var(--ground); text-decoration: none; border-radius: 6px; z-index: 5; }
.skip:focus { top: 12px; }

.wrap { padding-inline: var(--edge); }
/* ── One ground ─────────────────────────────────────────────────────────────────────────────────────────────
   Everything stands on the app's dark ground (ColorTheme.dark), phones included (owner, 2026-11-26): the black
   bezel's metal edge and the lit screen separate a phone from it. From 768 px the hero, "Pair your own." and the
   closing are splits, copy and phone side by side (the closing's phone on the left); under 768 px each stacks,
   the copy and then its phone. The accent is the beam: the hero, "Pair your own." and the closing each have
   one on the copy's side, never over a bezel. Violet #8F82D6 marks the pair arrows; #2C2723 hairlines rule the
   sections. */

/* ── The reveal ─────────────────────────────────────────────────────────────────────────────────────────────
   The recorded clip plays inside the bezel's screen. The page's own light, a front growing from a lamp at the
   edge of the dark side, crosses the copy only: landing.js sizes .cone to the dark side and sets --r (the front's
   radius) and --cx/--cy (the lamp, in each element's own box). Nothing here reaches the device or its field. */
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  --dev-h: clamp(420px, calc(100vh - 232px), 760px);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: min(calc(100vh - 92px), 808px);
  --soft: 120px;
}
@supports (height: 1svh) { .hero { --dev-h: clamp(420px, calc(100svh - 232px), 760px); min-height: min(calc(100svh - 92px), 808px); } }
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px var(--edge);
  position: relative;
  z-index: 2;
}
.wordmark { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; font: 600 1.25rem/1 var(--display); font-stretch: 85%; letter-spacing: -0.01em; }
.wordmark img { border-radius: 7px; }

.hero-copy {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  container-type: inline-size;
  position: relative;
  z-index: 1;
  padding: 24px clamp(24px, 4vw, 64px) 48px var(--edge);
}
.swap { display: grid; }
.swap > * { grid-area: 1 / 1; }
/* The resting page is lit: the payoff, for no script, print and reduced motion. With script and motion the page
   starts unlit (head.js sets html.unlit before first paint; landing.js sets data-light on each section). */
.swap > .off, .still.off { visibility: hidden; }
:is(html.unlit .reveal, .reveal[data-light="off"]) :is(.swap, .screen) > .on { visibility: hidden; }
:is(html.unlit .reveal, .reveal[data-light="off"]) :is(.swap > .off, .still.off) { visibility: visible; }
/* While the light moves, both layers of a caption are there and the front's mask decides which shows. */
/* The fallback crossfade (no clip): both stills show and landing.js fades the lit one over the unlit one. */
html .reveal.fading .screen > picture.still { visibility: visible; }
.reveal.armed .caption .swap > .on {
  visibility: visible;
  -webkit-mask-image: radial-gradient(circle at var(--cx, 0) var(--cy, 0), #000 calc(var(--r, 0px) - var(--soft)), transparent calc(var(--r, 0px) - var(--soft) / 2));
  mask-image: radial-gradient(circle at var(--cx, 0) var(--cy, 0), #000 calc(var(--r, 0px) - var(--soft)), transparent calc(var(--r, 0px) - var(--soft) / 2));
}
.reveal.armed .caption .swap > .off {
  visibility: visible;
  -webkit-mask-image: radial-gradient(circle at var(--cx, 0) var(--cy, 0), transparent calc(var(--r, 0px) - var(--soft) / 2), #000 var(--r, 0px));
  mask-image: radial-gradient(circle at var(--cx, 0) var(--cy, 0), transparent calc(var(--r, 0px) - var(--soft) / 2), #000 var(--r, 0px));
}
html:not(.js) .uv, html:not(.js) .clips { display: none; }
/* Promote the masked layers only while the light is moving; landing.js adds and removes .sweeping. */
.reveal.armed.sweeping .caption .swap > * { will-change: transform; transform: translateZ(0); }

.hero h1 {
  font: 600 min(6rem, 9.6cqi)/0.98 var(--display);
  font-stretch: 78%;
  letter-spacing: -0.022em;
  text-wrap: wrap;
}
.lede { margin-top: 24px; color: var(--second); font-size: clamp(1.0625rem, 1.4vw, 1.25rem); max-width: 34ch; }
/* Apple's badge, as Apple ships it: 48 px high, clear space a quarter of its height on every side. */
.badge { display: block; width: fit-content; margin: 28px 0 12px; text-decoration: none; border-radius: 8px; }
.badge img { height: 48px; width: auto; }

.caption { margin-top: 28px; }
.caption .name { font: 600 clamp(1.25rem, 1.7vw, 1.5rem)/1.15 var(--display); font-stretch: 85%; letter-spacing: -0.01em; }
.caption .reason { margin-top: 6px; font-size: 1rem; line-height: 1.45; }
.reason .off { color: var(--second); }
.reason .on { color: var(--violet-ink); }
.eyebrow { margin: 0 0 18px; font: 500 clamp(12px, 3.6vw, 14px)/1.4 "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.01em; white-space: nowrap; color: var(--second); }

.uv {
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: 500 1rem/1 var(--text);
  cursor: pointer;
  border-radius: 999px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.uv[aria-disabled="true"] { cursor: default; }
.uv-knob {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--hair);
  background: var(--uv);
  transition: background-color 360ms var(--ease), border-color 360ms var(--ease);
}
.uv-knob svg { fill: none; stroke: var(--violet-ink); stroke-width: 1.7; stroke-linecap: round; transition: stroke 360ms var(--ease); }
.uv-slash { transition: opacity 360ms var(--ease); }
@media (hover: hover) { .uv:not([data-on]):hover .uv-knob { border-color: var(--violet-ink); } }
.uv[data-on] .uv-knob { background: var(--violet); border-color: var(--violet); }
.uv[data-on] .uv-knob svg { stroke: var(--ink); }
.uv[data-on] .uv-slash { opacity: 0; }
.uv:focus-visible { outline: none; }
.uv:focus-visible .uv-knob { outline: 2px solid var(--violet-ink); outline-offset: 4px; }

/* The beam, on the dark side only: landing.js sets left/top/width/height to that side and the polygon in it. */
.cone {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  clip-path: polygon(0 0, 0 0, 0 0);
  background: radial-gradient(circle at var(--cx, 0) var(--cy, 0), rgb(111 95 196 / 0) 0, rgb(111 95 196 / 0.05) calc(var(--dl, 400px) * 0.5), rgb(111 95 196 / 0.16) var(--dl, 400px));
  /* The beam thins out before the foot of its side instead of ending on a hard edge. */
  -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 96%);
  mask-image: linear-gradient(to bottom, #000 45%, transparent 96%);
}
/* The beam stays on the dark side while the light is on; unlit, and before landing.js has sized it, it is not there. */
.reveal[data-light="off"]:not(.armed) .cone, html.unlit .reveal:not(.armed) .cone { display: none; }
.cone { opacity: 0; will-change: opacity; }

/* ── The device: Apple's iPhone 18 Pro bezel, black, unaltered ──────────────────────────────────────────────
   The bezel image sizes the device and nothing is laid over it. The screen sits in the bezel's transparent
   opening (left 5.3333 %, top 2.5 %, 89.3333 % by 95 %, corner radius 15.755 % / 7.246 %, measured from the
   bezel as kiokura-site did) and holds the still and, over it, the clip. */
.bezel { position: relative; width: var(--w, 280px); max-width: 100%; margin: 0 auto; }
.bezel .frame { position: relative; display: block; width: 100%; height: auto; pointer-events: none; }
.screen { position: absolute; left: 5.3333%; top: 2.5%; width: 89.3333%; height: 95%; border-radius: 15.755% / 7.246%; overflow: clip; background: var(--ground); }
.screen picture, .screen img, .screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.screen video { visibility: hidden; }
.screen video.ready { visibility: visible; }
.screen video[hidden] { display: none; }

/* The device's half: the phone centred on the page's own ground. */
.stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 40px var(--gutter);
}
.hero .stage { grid-column: 2; grid-row: 1; --w: calc(var(--dev-h) * 704 / 1439); }
.clips {
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: none;
  color: var(--ink);
  font: 500 0.9375rem/1 var(--text);
  cursor: pointer;
  touch-action: manipulation;
}
@media (hover: hover) { .clips:hover { border-color: color-mix(in srgb, var(--ink) 55%, transparent); } }
.clips:focus-visible { outline: 2px solid var(--violet-ink); outline-offset: 3px; }

/* ── The pairs ──────────────────────────────────────────────────────────────────────────────────────────── */
.pairs { padding-block: clamp(72px, 10vh, 120px) clamp(56px, 8vh, 88px); border-top: 1px solid var(--hair); }
.pair-list .arr { color: var(--violet-ink); }
.pairs h2, .own h2, .close h2 { font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.04; max-width: 16ch; }
.pair-list { list-style: none; padding: 0; margin-top: clamp(40px, 6vh, 64px); border-top: 1px solid var(--hair); }
.pair-list li {
  position: relative;
  display: grid;
  grid-template-columns: minmax(8rem, 13rem) minmax(0, 1fr);
  align-items: baseline;
  column-gap: 0.4em;
  padding-block: 18px;
  border-bottom: 1px solid var(--hair);
  overflow: hidden;
}
.pair-list .a, .pair-list .to { font: 500 clamp(1.25rem, 2vw, 1.625rem)/1.2 var(--display); font-stretch: 85%; letter-spacing: -0.01em; }
.pair-list .b { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); column-gap: 32px; align-items: baseline; }
.pair-list .why { color: var(--second); }
.families { margin-top: 28px; color: var(--second); font-size: 0.9375rem; }

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .pair-list .b {
      -webkit-mask-image: linear-gradient(100deg, #000 40%, rgb(0 0 0 / 0.08) 60%);
      mask-image: linear-gradient(100deg, #000 40%, rgb(0 0 0 / 0.08) 60%);
      -webkit-mask-size: 260% 100%;
      mask-size: 260% 100%;
      -webkit-mask-repeat: no-repeat;
      mask-repeat: no-repeat;
      animation: lit linear both;
      animation-timeline: view();
      animation-range: entry 40% cover 50%;
    }
    .pair-list li::after {
      content: "";
      position: absolute;
      top: 0;
      bottom: 0;
      left: 0;
      width: 14%;
      background: linear-gradient(90deg, rgb(111 95 196 / 0), rgb(111 95 196 / 0.16), rgb(111 95 196 / 0));
      pointer-events: none;
      animation: sweep linear both;
      animation-timeline: view();
      animation-range: entry 40% cover 50%;
    }
  }
}
@keyframes lit { from { -webkit-mask-position: 100% 0; mask-position: 100% 0; } to { -webkit-mask-position: 0 0; mask-position: 0 0; } }
@keyframes sweep {
  0% { transform: translateX(80%) skewX(-24deg); opacity: 0; }
  15% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateX(720%) skewX(-24deg); opacity: 0; }
}

/* ── Your own pairs: the copy and its beam on the left, the free loop on the right ──────────────────────── */
.own {
  position: relative;
  isolation: isolate;
  border-top: 1px solid var(--hair);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  --w: calc(clamp(420px, 70vh, 700px) * 704 / 1439);
}
/* This beam is plain CSS, so it shows with no script and under reduced motion. It sits in the copy's own box (the
   left half, or the copy's band when stacked) and behind its text, so it stops at the device's edge by construction.
   Same violet and opacity as the lit hero's. */
.own .cone {
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 1;
  will-change: auto;
  clip-path: polygon(85% 0, 99% 0, 80% 100%, 20% 100%);
  background: radial-gradient(ellipse 100% 100% at 92% -4%, rgb(111 95 196 / 0) 0, rgb(111 95 196 / 0.05) 45%, rgb(111 95 196 / 0.16) 90%);
}
.own-copy { position: relative; z-index: 1; grid-column: 1; grid-row: 1; align-self: stretch; display: flex; flex-direction: column; justify-content: center; padding: clamp(56px, 9vh, 104px) clamp(32px, 4vw, 64px) clamp(56px, 9vh, 104px) var(--edge); }
.own-copy p { margin-top: 20px; color: var(--second); max-width: 36ch; }
.own .stage { grid-column: 2; grid-row: 1; padding-block: clamp(56px, 9vh, 104px); }

/* ── Close: the list under the light on the left, the invite on the right ───────────────────────────────── */
.close {
  position: relative;
  isolation: isolate;
  border-top: 1px solid var(--hair);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  --w: calc(clamp(420px, 70vh, 700px) * 704 / 1439);
}
.close .stage { grid-column: 1; grid-row: 1; padding-block: clamp(56px, 9vh, 104px); }
.close-copy { grid-column: 2; grid-row: 1; align-self: center; position: relative; z-index: 1; padding: clamp(56px, 9vh, 104px) var(--edge) clamp(56px, 9vh, 104px) clamp(32px, 6vw, 112px); }
.close h2 { font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.04; max-width: 16ch; }
.close .uv { display: flex; width: fit-content; margin-top: 32px; }
.status { margin-top: 20px; color: var(--second); }
/* The closing's store call is plain text in the page's link style: Apple's badge in the hero is the one store button. */
.invite {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 8px;
  color: var(--violet-ink);
  text-decoration-color: color-mix(in srgb, var(--violet-ink) 55%, transparent);
}
@media (hover: hover) { .invite:hover { text-decoration-color: var(--violet-ink); } }

.footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding-block: 16px 28px;
  border-top: 1px solid var(--hair);
  color: var(--second);
  font-size: 0.875rem;
}

/* 44 px targets: the links are 38 to 80 px wide, so the padding is what reaches 44 (margin takes it back, the text stays in line). */
.footer a { display: inline-block; padding: 13px 8px; margin-inline: -8px; }

/* ── Phone width ────────────────────────────────────────────────────────────────────────────────────────────
   The pairs list gets one shared first column (each row was sized alone) up to 820 px. */
@media (max-width: 820px) {
  .pair-list { display: grid; grid-template-columns: auto minmax(0, 1fr); }
  .pair-list li { grid-column: 1 / -1; grid-template-columns: auto minmax(0, 1fr); grid-template-columns: subgrid; column-gap: 14px; }
  .pair-list .b { grid-template-columns: minmax(0, 1fr); row-gap: 4px; }
  .pair-list .why { font-size: 0.9375rem; }
}
/* Under 768 px each split stacks: the copy, then the device. */
@media (max-width: 767px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; --dev-h: clamp(380px, 62svh, 560px); }
  .bar { padding-block: 14px; }
  .hero-copy { padding: 6px var(--edge) 40px; }
  .hero h1 { font-size: clamp(2rem, 9.4vw, 3rem); }
  .lede { margin-top: 14px; font-size: 1.0625rem; }
  .hero .stage { grid-column: 1; grid-row: 2; padding-block: 40px 32px; }
  .eyebrow { margin: 6px 0 14px; }
  .own, .close { grid-template-columns: minmax(0, 1fr); --w: calc(clamp(380px, 62svh, 560px) * 704 / 1439); }
  .own-copy { grid-column: 1; padding: 16px var(--edge) 48px; }
  .own .stage { grid-column: 1; grid-row: 2; padding-block: 40px; }
  .close-copy { grid-column: 1; grid-row: 1; padding: 64px var(--edge) 48px; }
  .close .stage { grid-column: 1; grid-row: 2; padding-block: 40px; }
}

/* Print: the lit page, the payoff; no clips. */
@media print {
  .screen video, .cone, .uv, .clips { display: none !important; }
  .swap > .on, .still.on { visibility: visible !important; mask-image: none !important; -webkit-mask-image: none !important; }
  .swap > .off, .still.off { visibility: hidden !important; }
}
@media (prefers-reduced-motion: reduce) { .screen video { display: none; } }
