/* i2match.com: the onboarding's «Véro» look (docs/ONBOARDING_STYLE.md) on the web.
   No cards, no brand fonts: the system font, one ink colour with grey steps, a hairline
   layout grid behind everything, the content centred. Dark by default; the switch in the
   top bar (/theme.js) sets html[data-theme="light"] and remembers it. */

:root {
  /* Vero tokens (App/Sources/Features/Onboarding/OnboardingVero.swift) */
  --canvas: #0B0B0C;
  --ink: #FAFAFA;
  --secondary: #9A9A9A;
  --tertiary: #5E5E60;
  --grid: rgba(255, 255, 255, .06);
  --stroke: rgba(255, 255, 255, .10);
  --field: #1C1C1E;
  --button: #fff;
  --on-ink: #000;
  /* the phone's screen follows the theme too, like the app */
  --app-bg: #000;
  --app-ink: #fff;
  --app-dim: rgba(255, 255, 255, .5);
  --app-dock: rgba(30, 30, 32, .84);

  --row: 96px;
  --frame: min(1080px, 100vw);
  --gutter: max(24px, env(safe-area-inset-left));
  --ease-in: cubic-bezier(.16, 1, .3, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --canvas: #F5F5F4;
  --ink: #0A0A0A;
  --secondary: #6B6B6B;
  --tertiary: #A3A3A3;
  --grid: rgba(0, 0, 0, .06);
  --stroke: rgba(0, 0, 0, .08);
  --field: #F0F0F0;
  --button: #000;
  --on-ink: #fff;
  --app-bg: #fff;
  --app-ink: #0A0A0A;
  --app-dim: rgba(10, 10, 10, .5);
  --app-dock: rgba(242, 242, 244, .86);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  position: relative;
  transition: background-color .3s, color .3s;
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  font: 400 17px/1.47 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter); text-align: center; }

/* ---------- the layout sheet ---------- */
.grid { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.grid::before {             /* edges and thirds of the frame */
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%;
  width: var(--frame); transform: translateX(-50%);
  border-left: 1px solid var(--grid); border-right: 1px solid var(--grid);
  background:
    linear-gradient(var(--grid), var(--grid)) calc(100% / 3) 0 / 1px 100% no-repeat,
    linear-gradient(var(--grid), var(--grid)) calc(200% / 3) 0 / 1px 100% no-repeat;
}
.grid::after {              /* a row every 96 px, from under the top bar */
  content: ""; position: absolute; inset: 64px 0 0;
  background: repeating-linear-gradient(to bottom, var(--grid) 0 1px, transparent 1px var(--row));
}
main, .bar, .foot { position: relative; z-index: 1; }

/* ---------- top bar: the bold lowercase «i2», centred ---------- */
.bar {
  position: sticky; top: 0; z-index: 10;
  height: 64px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--canvas) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(18px); backdrop-filter: saturate(1.4) blur(18px);
}
.mark {
  grid-column: 2;
  font: 700 22px/1 var(--font-display); letter-spacing: -.5px;
  text-decoration: none;
}
.tools { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 10px; }
.lang { display: flex; gap: 2px; }
.lang button {
  appearance: none; border: 0; background: none; cursor: pointer;
  font: 600 13px/1 var(--font); color: var(--tertiary);
  padding: 10px 8px; border-radius: 999px;
  transition: color .2s;
}
.lang button:hover, .lang button[aria-pressed="true"] { color: var(--ink); }
.lang button:focus-visible, .pill:focus-visible, .link:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- type: short title one bold line, long title light + bold ---------- */
.title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.6vw, 56px);
  line-height: 1.1; letter-spacing: -.02em;
}
.title span { display: block; }
.title .light { font-weight: 400; }
.title .bold { font-weight: 700; }
.body {
  max-width: 34em; margin: 16px auto 0;
  font-size: clamp(15px, 1.4vw, 19px); line-height: 1.5;
  color: var(--secondary);
}
h3 { font: 700 19px/1.25 var(--font-display); letter-spacing: -.01em; }

/* ---------- capsule button (FlowPrimaryButton) ---------- */
.actions { margin-top: 32px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  height: 56px; padding: 0 32px; border-radius: 999px;
  background: var(--button); color: var(--on-ink);
  font: 600 17px/1 var(--font); text-decoration: none;
  transition: transform .2s var(--ease-in), opacity .2s;
}
a.pill:hover { opacity: .86; }
a.pill:active { transform: scale(.97); }
span.pill { cursor: default; }
.link { color: var(--secondary); font-size: 15px; text-decoration: none; }
.link:hover { color: var(--ink); text-decoration: underline; }

/* ---------- 1. welcome ---------- */
.hero { padding: clamp(56px, 12vh, 128px) 0 0; }
.wordmark {
  font: 700 clamp(64px, 13vw, 168px)/1 var(--font-display);
  letter-spacing: -.045em;
  margin-bottom: clamp(28px, 5vh, 48px);
}
.stage { margin-top: clamp(56px, 10vh, 96px); display: flex; justify-content: center; }

/* iPhone 18 Pro, Apple's product bezel (Apple Design Resources). The screen sits in the frame's
   cut-out: 72/1350 from the left, 69/2760 from the top, 1206 x 2622. */
.phone {
  --ph: min(78svh, 680px, 150vw);
  position: relative;
  width: calc(var(--ph) * 1350 / 2760);
  height: var(--ph);
  container-type: inline-size;
  text-align: left;
}
.bezel {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; user-select: none;
  filter: drop-shadow(0 30px 50px rgba(0, 0, 0, .18));
}
.screen {
  --pt: calc(89.333cqw / 402);
  position: absolute;
  left: 5.333%; top: 2.5%; width: 89.333%; height: 95%;
  overflow: hidden;
  border-radius: calc(62 * var(--pt));
  background: var(--app-bg); color: var(--app-ink);
  font-size: calc(15 * var(--pt));
  line-height: 1.3;
}
.status {
  height: calc(62 * var(--pt));
  padding: 0 calc(42 * var(--pt));
  display: flex; align-items: center;
  font-weight: 600; font-size: calc(17 * var(--pt)); letter-spacing: -.01em;
}
.status span { width: calc(80 * var(--pt)); text-align: center; }
.home-top { display: flex; align-items: center; justify-content: center; position: relative; height: calc(40 * var(--pt)); }
.home-logo { font-weight: 800; font-size: calc(24 * var(--pt)); letter-spacing: -.03em; }
.home-top svg {
  position: absolute; right: calc(18 * var(--pt));
  width: calc(24 * var(--pt)); height: calc(24 * var(--pt));
  fill: none; stroke: var(--app-ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.home-tabs {
  display: grid; grid-template-columns: 1fr 1fr; text-align: center;
  margin-top: calc(20 * var(--pt));
  font-size: calc(15 * var(--pt)); font-weight: 600; color: var(--app-dim);
}
.home-tabs span { padding-bottom: calc(10 * var(--pt)); }
.home-tabs .on {
  color: var(--app-ink);
  background: linear-gradient(var(--app-ink), var(--app-ink)) center bottom / calc(56 * var(--pt)) calc(3 * var(--pt)) no-repeat;
}
.home-feed { padding: calc(6 * var(--pt)) 0; }
.post { display: flex; gap: calc(10 * var(--pt)); padding: calc(12 * var(--pt)) calc(16 * var(--pt)); }
.post-av { flex: none; width: calc(40 * var(--pt)); height: calc(40 * var(--pt)); border-radius: 50%; object-fit: cover; }
.post-body { flex: 1; min-width: 0; }
.post-name { font-weight: 700; }
.post-name span { font-weight: 400; color: var(--app-dim); }
.post-text { margin-top: calc(2 * var(--pt)) !important; }
.post-photo {
  margin-top: calc(10 * var(--pt));
  aspect-ratio: 4 / 5;
  border-radius: calc(16 * var(--pt));
  overflow: hidden;
  background: var(--field);
}
.post-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.post-act { display: flex; justify-content: space-between; margin-top: calc(10 * var(--pt)); padding-right: calc(10 * var(--pt)); }
.post-act svg {
  width: calc(19 * var(--pt)); height: calc(19 * var(--pt));
  fill: none; stroke: var(--app-dim); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.dock {
  position: absolute; left: 50%; bottom: calc(26 * var(--pt));
  transform: translateX(-50%);
  display: flex; gap: calc(30 * var(--pt));
  padding: calc(17 * var(--pt)) calc(28 * var(--pt));
  border-radius: 999px;
  background: var(--app-dock);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: inset 0 0 0 1px var(--stroke);
}
.dock svg { width: calc(26 * var(--pt)); height: calc(26 * var(--pt)); fill: var(--app-dim); }
.dock svg.on { fill: var(--app-ink); }

/* ---------- sections ---------- */
.sec { padding: clamp(112px, 18vh, 192px) 0 0; }
.sec .title { margin-bottom: clamp(40px, 7vh, 72px); }

/* One column per third: the column edges are the grid's own lines. The wrap's gutter is
   cancelled so the thirds line up with the sheet behind them. */
.thirds { display: grid; gap: 48px; }
.thirds article { padding: 0 8px; }
.num { font: 600 13px/1 var(--font); letter-spacing: .04em; color: var(--tertiary); margin-bottom: 14px; }
.thirds h3 { margin-bottom: 8px; }
.thirds article > p:last-child { color: var(--secondary); font-size: 15px; line-height: 1.5; max-width: 26em; margin: 0 auto; }
@media (min-width: 760px) {
  .thirds { grid-template-columns: repeat(3, 1fr); gap: 0; margin: 0 calc(-1 * var(--gutter)); }
  .thirds article { padding: 0 clamp(20px, 3vw, 40px); }
}

/* Mia, as in her profile photo: ink head, canvas eyes */
.mia { width: clamp(120px, 18vw, 176px); margin: 0 auto 28px; }
.mia svg { width: 100%; height: auto; overflow: visible; }
.mia .head { fill: var(--ink); }
.mia .eye { fill: var(--canvas); transform-box: fill-box; transform-origin: center; animation: blink 6s infinite; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }

.end .icon { width: 88px; height: 88px; border-radius: 22.5%; margin: 0 auto 32px; box-shadow: 0 0 0 1px var(--stroke); }
.end .title { margin-bottom: 0; }

/* ---------- footer ---------- */
.foot { margin-top: clamp(120px, 20vh, 200px); padding: 48px 0 calc(40px + env(safe-area-inset-bottom)); font-size: 14px; color: var(--secondary); }
.foot .cols { display: grid; gap: 28px; }
.foot h4 { font: 600 13px/1 var(--font); color: var(--ink); margin-bottom: 12px; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { padding: 4px 0; }
.foot .copy { margin-top: 40px; font-size: 13px; color: var(--tertiary); }
@media (min-width: 760px) { .foot .cols { grid-template-columns: repeat(3, 1fr); } }

/* ---------- motion: content rises 28 pt with a little blur (Motion, .smooth) ---------- */
.js .rise, .js .reveal {
  opacity: 0; transform: translateY(28px) scale(.985); filter: blur(6px);
  transition: opacity .9s var(--ease-in), transform .9s var(--ease-in), filter .9s var(--ease-in);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js .rise.in, .js .reveal.in { opacity: 1; transform: none; filter: none; }
@media (prefers-reduced-motion: reduce) {
  .js .rise, .js .reveal { transform: none; filter: none; transition: opacity .4s linear; }
  .mia .eye { animation: none; }
}

/* ---------- theme switch (/theme.js): moon on dark, sun on light ---------- */
.theme-switch {
  appearance: none; border: 0; padding: 0; cursor: pointer;
  position: relative; flex: none;
  width: 48px; height: 28px; border-radius: 999px;
  background: var(--field);
  box-shadow: inset 0 0 0 1px var(--stroke);
}
.theme-switch .knob {
  position: absolute; top: 3px; left: 3px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--ink); color: var(--canvas);
  display: grid; place-items: center;
  transition: transform .35s var(--ease-in);
}
.theme-switch svg { width: 13px; height: 13px; fill: currentColor; }
.theme-switch .sun { display: none; }
[data-theme="light"] .theme-switch .knob { transform: translateX(20px); }
[data-theme="light"] .theme-switch .sun { display: block; }
[data-theme="light"] .theme-switch .moon { display: none; }
.theme-switch:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
