/* 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";
  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;
  --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; }

.skip { position: absolute; left: var(--gutter); top: -100px; padding: 8px 12px; 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(78vh, 800px);
  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; 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;
  padding: 8px 16px;
  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); }

.name {
  font: 600 min(6rem, 13.6cqi)/0.95 var(--display);
  font-stretch: 78%;
  letter-spacing: -0.022em;
  white-space: nowrap;
}
.reason {
  margin-top: 0.9em;
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  line-height: 1.4;
  max-width: 32ch;
}
.reason .off { color: var(--second); }
.reason .on { color: var(--violet-ink); }

.hero h1 {
  margin-top: clamp(40px, 8vh, 80px);
  padding-top: 24px;
  border-top: 1px solid var(--hair);
  font-size: clamp(1.5rem, 2.3vw, 2.125rem);
  line-height: 1.15;
  max-width: 22ch;
}
.lede { margin-top: 12px; color: var(--second); max-width: 40ch; }

.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([aria-pressed="true"]):hover .uv-knob { border-color: var(--violet-ink); } }
.uv[aria-pressed="true"] .uv-knob { background: var(--violet); border-color: var(--violet); }
.uv[aria-pressed="true"] .uv-knob svg { stroke: var(--ink); }
.uv[aria-pressed="true"] .uv-slash { opacity: 0; }
.uv:focus-visible { outline: none; }
.uv:focus-visible .uv-knob { outline: 2px solid var(--violet-ink); outline-offset: 4px; }

.phone {
  align-self: center;
  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(78svh, 800px); } }
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: 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 0.875rem; color: var(--second); }
.loop {
  padding: 0;
  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: 28px 40px;
  border-top: 1px solid var(--hair);
  color: var(--second);
  font-size: 0.875rem;
}

/* ── Phone width ────────────────────────────────────────────────────────────────────────────────────────── */
@media (max-width: 820px) {
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; min-height: 0; }
  .hero-copy { padding-block: 16px 40px; }
  .phone { width: min(76vw, 340px); justify-self: center; }
  .hero h1 { margin-top: 28px; padding-top: 20px; }
  .uv { margin-top: 24px; }
  .reason { margin-top: 0.6em; }
  .pair-list li { grid-template-columns: auto minmax(0, 1fr); }
  .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; }
}
