/* 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-Variable.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("/fonts/Geist-Variable.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);
  --edge: max(var(--gutter), calc((100% - 1240px) / 2 + var(--gutter)));
  --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);
  --phone-r: 13.5% / 6.2%;
}

*, *::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; }
.bar-cta:focus-visible, .invite:focus-visible { border-radius: 999px; }

.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); }

/* ── The reveal ─────────────────────────────────────────────────────────────────────────────────────────────
   One light front, a circle growing from a lamp above the phone, crosses the headline and the screen together.
   landing.js sets --r (the front's radius), --cx/--cy (the lamp, in each element's own box) and the cone. */
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  /* The phone's column is definite (Safari mis-sizes an auto track beside a size-contained 1fr column). */
  --phone-h: min(68vh, 720px);
  grid-template-columns: minmax(0, 1fr) calc(var(--phone-h) * 402 / 874);
  grid-template-rows: auto 1fr;
  column-gap: clamp(40px, 6vw, 112px);
  min-height: min(100vh, 900px);
  min-height: min(100svh, 900px);
  padding: 0 var(--edge) clamp(24px, 4vh, 48px);
  --soft: 120px;
}
.bar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 24px;
  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; }
.bar-cta {
  text-decoration: none;
  font-size: 0.9375rem;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  color: var(--ink);
}
@media (hover: hover) { .bar-cta:hover { border-color: color-mix(in srgb, var(--ink) 55%, transparent); } }

.hero-copy {
  align-self: center;
  container-type: inline-size;
  position: relative;
  z-index: 1;
  padding-block: 24px;
}
.swap { display: grid; }
.swap > * { grid-area: 1 / 1; }
.js-ready .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));
}
.js-ready .swap > .off {
  -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));
}
/* The resting state is plain HTML and CSS: the unlit Negroni paints on the first frame with or without script. The
   lit layer and the masks exist only once landing.js has run and both stills have decoded (.js-ready). */
.swap > .on { visibility: hidden; }
html:not(.js) .uv, html:not(.js) .loop { visibility: hidden; }
/* Promote the masked layers only while the light is moving; landing.js adds and removes .sweeping. */
.js-ready .hero.sweeping .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; }

/* The phone and its caption are one masked group: the caption changes with the light, as the screen does. */
.stage { align-self: center; position: relative; z-index: 1; }
.caption { margin-top: 22px; }
.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 min(14px, 3.3vw)/1.4 "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.01em; white-space: nowrap; color: var(--second); }

.uv {
  margin-top: 32px;
  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: #1c1815;
  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; }

.phone {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 402 / 874;
  border-radius: var(--phone-r);
  overflow: hidden;
  background: var(--ground);
  box-shadow: 0 0 0 1px var(--hair), 0 60px 120px -40px rgb(0 0 0 / 0.75);
}
.phone img { width: 100%; height: 100%; object-fit: cover; }

.cone {
  position: absolute;
  inset: 0;
  z-index: 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.2) var(--dl, 400px));
}
@supports (height: 1svh) { .hero { --phone-h: min(68svh, 720px); } }
html:not(.js-ready) .cone { display: none; }
.cone { opacity: 0; will-change: opacity; }

/* ── The pairs ──────────────────────────────────────────────────────────────────────────────────────────── */
.pairs { padding-block: clamp(72px, 10vh, 120px) clamp(56px, 8vh, 88px); }
.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 ─────────────────────────────────────────────────────────────────────────────────────── */
.own {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: clamp(40px, 6vw, 112px);
  align-items: center;
  padding-block: 0;
}
.own-copy p { margin-top: 20px; color: var(--second); max-width: 36ch; }
.crop {
  justify-self: center;
  width: min(380px, 100%);
  aspect-ratio: 402 / 440;
  overflow: hidden;
  border-radius: 13.5% 13.5% 0 0 / 12.3% 12.3% 0 0;
  border: 1px solid var(--hair);
  border-bottom: 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 98%);
  mask-image: linear-gradient(to bottom, #000 62%, transparent 98%);
}
.crop img { width: 100%; }

/* ── Close ──────────────────────────────────────────────────────────────────────────────────────────────── */
.close {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: clamp(40px, 6vw, 112px);
  align-items: center;
  padding-block: clamp(56px, 8vh, 96px);
  border-top: 1px solid var(--hair);
}
.proof { width: clamp(168px, 17vw, 220px); }
.proof-screen { border-radius: var(--phone-r); overflow: hidden; box-shadow: 0 0 0 1px var(--hair); background: var(--ground); }
.proof video { width: 100%; }
.proof figcaption { margin-top: 10px; display: grid; justify-items: start; font-size: 0.875rem; color: var(--second); }
.loop {
  min-height: 44px;
  min-width: 44px;
  padding: 0;
  text-align: left;
  border: 0;
  background: none;
  color: var(--ink);
  font: 500 0.875rem/1 var(--text);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent);
  text-underline-offset: 0.22em;
  cursor: pointer;
}
@media (hover: hover) { .loop:hover { text-decoration-color: var(--ink); } }
.status { margin-top: 20px; color: var(--second); }
.invite {
  display: inline-block;
  margin-top: 28px;
  padding: 15px 26px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--ground);
  font-weight: 500;
  text-decoration: none;
}
@media (hover: hover) { .invite:hover { background: #fff; } }

.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;
}

.footer a { display: inline-block; padding-block: 13px; }

/* ── Phone width ────────────────────────────────────────────────────────────────────────────────────────── */
@media (max-width: 820px) {
  /* Split viewport: the copy on top, the phone below it, the light switch floating at the foot of the screen
     for as long as the hero is in view. */
  .hero {
    --m-phone-h: max(62vh, 380px);
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto auto 1fr auto;
    min-height: 100vh;
    min-height: 100svh;
    overflow-x: clip;
    padding-bottom: 0;
  }
  .bar { padding-block: 14px; }
  .hero-copy { display: contents; }
  .hero-copy > *, .stage, .hero .uv { grid-column: 1; }
  .eyebrow { grid-row: 2; margin: 6px 0 14px; }
  .hero h1 { grid-row: 3; font-size: clamp(2rem, 9.4vw, 3rem); }
  .lede { grid-row: 4; margin-top: 14px; font-size: 1.0625rem; }
  .stage { grid-row: 5; justify-self: center; align-self: start; width: calc(var(--m-phone-h) * 402 / 874); margin-top: 22px; padding-bottom: 104px; }
  .caption { margin-top: 16px; }
  /* Sticky inside a grid item is bounded by its grid area, so the control spans the phone's rows and rests at
     their foot, under the caption, once the hero scrolls past. */
  .uv {
    grid-row: 5 / 7;
    align-self: end;
    justify-self: center;
    position: sticky;
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 3;
    margin: 0 0 max(20px, env(safe-area-inset-bottom));
    padding: 6px 22px 6px 6px;
    background: var(--ground);
    border: 1px solid var(--hair);
    box-shadow: 0 14px 32px -14px rgb(0 0 0 / 0.9);
  }
  /* One shared first column, so every arrow and every reason starts at the same x (each row was sized alone). */
  .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; }
  .pair-list .b { grid-template-columns: minmax(0, 1fr); row-gap: 4px; }
  .pair-list .why { font-size: 0.9375rem; }
  .own { grid-template-columns: minmax(0, 1fr); row-gap: 40px; }
  .close { grid-template-columns: minmax(0, 1fr); row-gap: 40px; }
  .proof { justify-self: start; }
}
@supports (height: 1svh) { @media (max-width: 820px) { .hero { --m-phone-h: max(62svh, 380px); } } }

/* ── Phone on its side ──────────────────────────────────────────────────────────────────────────────────────
   Too short for the stack: the floating switch would sit on the phone. Copy left, phone right, the switch back in
   the copy, as at desktop width, so the whole reveal fits one screen. */
@media (max-width: 820px) and (orientation: landscape) and (max-height: 520px) {
  .hero {
    --l-phone-h: max(220px, calc(100vh - 80px));
    grid-template-columns: minmax(0, 1fr) calc(var(--l-phone-h) * 402 / 874);
    grid-template-rows: auto 1fr;
    column-gap: clamp(28px, 5vw, 56px);
    padding-bottom: 24px;
  }
  .bar { padding-block: 8px; }
  .hero-copy { display: block; grid-row: 2; align-self: start; padding-block: 0; }
  .eyebrow { margin: 0 0 10px; }
  .hero h1 { font-size: min(2.5rem, 9.6cqi); }
  .lede { margin-top: 12px; font-size: 1rem; }
  .stage { grid-row: 2; grid-column: 2; width: auto; justify-self: stretch; align-self: start; margin-top: 0; padding-bottom: 0; }
  .uv { position: static; margin: 16px 0 0; padding: 0; background: none; border: 0; box-shadow: none; }
}
@supports (height: 1svh) { @media (max-width: 820px) and (orientation: landscape) and (max-height: 520px) { .hero { --l-phone-h: max(220px, calc(100svh - 80px)); } } }
