/* Grind landing — Ember palette (landing/colors.png, option A) */
:root {
  --bg: #0B0A0F;
  --surface: #17151C;
  --text: #F5F2EE;
  --muted: #A39E99;
  --accent: #FF2609;
  --second: #6B3FD6;
  --footer: #CDC2B1;

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(20px, 5vw, 72px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
/* Film grain over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: .07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; }
p, h1, h2, ol { margin: 0; }
ol { padding: 0; list-style: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Fixed photo behind the page ---------- */
.photo {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: var(--bg);
  background-size: cover;
  background-position: 70% 30%;
}
html[data-bg="v1"] .photo { background-image: url("img/hero-v1-2400.jpg"); }
html[data-bg="v2"] .photo { background-image: url("img/hero-v2-2400.jpg"); }
/* Orange → purple grade, then darkness for legibility (left column + bottom) */
.photo::before,
.photo::after { content: ""; position: absolute; inset: 0; }
.photo::before {
  background: linear-gradient(105deg, var(--accent) 0%, rgba(255, 90, 31, .35) 40%, var(--second) 100%);
  mix-blend-mode: soft-light;
  opacity: .85;
}
.photo::after {
  background:
    linear-gradient(90deg, rgba(11, 10, 15, .82) 0%, rgba(11, 10, 15, .45) 38%, rgba(11, 10, 15, 0) 62%),
    linear-gradient(0deg, var(--bg) 0%, rgba(11, 10, 15, .55) 22%, rgba(11, 10, 15, 0) 50%);
}

/* ---------- Header ---------- */
.top {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  padding-top: max(18px, env(safe-area-inset-top));
  background: linear-gradient(180deg, rgba(11, 10, 15, .6), rgba(11, 10, 15, 0));
  transition: opacity .3s, transform .3s var(--ease);
}
/* Footer has its own top row and form; get out of its way */
.top.is-hidden { opacity: 0; transform: translateY(-100%); pointer-events: none; }
.logo {
  font-weight: 900;
  font-size: 20px;
  letter-spacing: .04em;
  text-decoration: none;
}

/* ---------- Pills, fields, buttons ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(245, 242, 238, .22);
  background: rgba(23, 21, 28, .55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.pill--small {
  padding: 8px 16px;
  font-size: 14px;
  transition: background .2s, border-color .2s, color .2s;
}
.pill--small:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.pill--tag {
  gap: 8px;
  padding: 7px 14px 7px 12px;
  font-size: 13px;
  letter-spacing: .01em;
  color: var(--text);
}


.waitlist {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  max-width: 460px;
}
.field {
  flex: 1 1 220px;
  min-width: 0;
  height: 54px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid rgba(245, 242, 238, .2);
  background: rgba(23, 21, 28, .72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  font: inherit;
  font-size: 16px; /* no iOS zoom */
  transition: border-color .2s, background .2s;
}
.field::placeholder { color: var(--muted); }
.field:focus { outline: none; border-color: var(--accent); background: rgba(23, 21, 28, .9); }
.field[aria-invalid="true"] { border-color: #ff8a65; }
.btn {
  flex: 0 0 auto;
  height: 54px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s, filter .2s;
  box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .7);
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 12px 22px -12px rgba(0, 0, 0, .8); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { cursor: progress; filter: saturate(.6); }
.waitlist__msg {
  flex-basis: 100%;
  min-height: 1.5em;
  font-size: 14px;
  color: var(--muted);
}
.waitlist__msg[data-tone="ok"] { color: var(--text); }
.waitlist__msg[data-tone="err"] { color: #ff8a65; }
.waitlist.is-done .field,
.waitlist.is-done .btn { display: none; }
.waitlist.is-done .waitlist__msg {
  font-size: 17px;
  padding: 15px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 90, 31, .45);
  background: rgba(23, 21, 28, .72);
}

/* ---------- Screen 1: hero ---------- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: 120px var(--gutter) clamp(40px, 8vh, 88px);
}
.hero__col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  width: min(100%, 620px);
}
.hero__title {
  font-size: clamp(44px, 6.6vw, 96px);
  font-weight: 800;
  line-height: .98;
  letter-spacing: -.045em;
  display: flex;
  flex-direction: column;
}
.line { display: block; }
.line--accent { color: var(--accent); white-space: nowrap; }
.hero__sub {
  max-width: 34ch;
  font-size: clamp(16px, 1.35vw, 19px);
  color: rgba(245, 242, 238, .78);
}

/* ChatGPT ⇄ Claude. Both words share one grid cell, so the box keeps the longer word's width. */
.swap {
  display: inline-grid;
  vertical-align: baseline; /* inline-grid takes its first item's baseline */
  overflow: clip;
  overflow-clip-margin: .12em; /* keep descenders, still hide the word sliding in */
}
.swap__w {
  grid-area: 1 / 1;
  transform: translateY(105%);
  opacity: 0;
  transition: transform .6s var(--ease), opacity .45s;
}
.swap__w.is-on { transform: none; opacity: 1; }
.swap__w.is-out { transform: translateY(-105%); opacity: 0; }

/* Load-in stagger */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: rise .9s var(--ease) forwards;
  animation-delay: calc(var(--d) * 90ms + 120ms);
}
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Screen 2: pains ---------- */
.pains {
  position: relative;
  height: 400vh; /* 100vh pinned + ~3 viewports of scroll */
  background: linear-gradient(180deg, rgba(11, 10, 15, 0) 0, rgba(11, 10, 15, .9) 40vh, rgba(11, 10, 15, .94) 100%);
}
.pains__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  align-items: center;
  padding: 0 var(--gutter);
}
.pains__inner { width: min(100%, 1000px); }
.eyebrow {
  margin-bottom: clamp(28px, 6vh, 56px);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.steps { display: grid; gap: clamp(28px, 6vh, 56px); }
.step { --strike: 0; --fix: 0; }
.step__pain {
  font-size: clamp(30px, 5.2vw, 72px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.035em;
  /* struck text dims as the line crosses it */
  color: color-mix(in srgb, var(--text) calc(100% - var(--strike) * 100%), rgba(163, 158, 153, .55));
  /* text and its transparent copy share one cell, so the copy wraps identically */
  display: grid;
}
.step__pain > span { grid-area: 1 / 1; }
/* The strike lives on the copy, painted above the text at full opacity */
.pain__line { color: transparent; position: relative; z-index: 1; }
.strike {
  /* default slice decoration: one continuous strip, so wrapped lines strike left → right in reading order */
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 58%;
  background-size: calc(var(--strike) * 100%) .085em;
}
.step__fix {
  margin-top: 10px;
  font-size: clamp(17px, 1.8vw, 24px);
  font-weight: 500;
  color: var(--accent);
  opacity: var(--fix);
  transform: translateY(calc((1 - var(--fix)) * 10px));
}

.rail {
  position: absolute;
  right: var(--gutter);
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  gap: 54px;
  --rail: 0;
}
/* Track, then the accent fill that grows down it with scroll progress */
.rail::before,
.rail::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 7px;
  bottom: 7px;
  width: 1px;
  background: rgba(245, 242, 238, .18);
}
.rail::after {
  width: 2px;
  right: 5.5px;
  background: var(--accent);
  transform: scaleY(var(--rail));
  transform-origin: top;
}
.rail__dot {
  position: relative;
  z-index: 1; /* dots sit on top of the line */
  display: flex;
  justify-content: flex-end;
}
.rail__dot::after {
  content: "";
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1.5px solid rgba(245, 242, 238, .35);
  background: var(--bg);
  transition: background .25s, border-color .25s;
}
.rail__dot[data-state="done"]::after { background: var(--accent); border-color: var(--accent); }

/* ---------- Screen 3: footer ---------- */
.foot {
  position: relative;
  background: var(--bg);
  color: var(--footer);
  padding: 22px var(--gutter) 0;
  overflow: hidden;
}
.foot__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  letter-spacing: .02em;
}
.foot__row a { text-decoration: none; }
.foot__row a:hover { color: var(--accent); }
.foot__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  padding: clamp(56px, 10vh, 110px) 0 clamp(40px, 7vh, 72px);
  text-align: center;
}
/* Photo masked inside the G */
.gmark {
  font-size: clamp(200px, 30vw, 340px);
  font-weight: 900;
  line-height: .82;
  letter-spacing: -.04em;
  color: transparent;
  /* Same photo as the hero (portrait crop), zoomed so her face lands in the G's left stroke */
  /* size: smaller % = smaller photo; position X: lower % = photo moves right; Y: lower % = photo moves down */
  background-size: 180% auto;
  background-position: 76% 4%;
  -webkit-background-clip: text;
  background-clip: text;
  user-select: none;
}
html[data-bg="v1"] .gmark { background-image: linear-gradient(105deg, rgba(255, 90, 31, .25), rgba(107, 63, 214, .3)), url("img/hero-v1-portrait.jpg"); }
html[data-bg="v2"] .gmark { background-image: linear-gradient(105deg, rgba(255, 90, 31, .25), rgba(107, 63, 214, .3)), url("img/hero-v2-portrait.jpg"); }
.foot__tag {
  font-size: clamp(26px, 3.6vw, 48px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.035em;
  color: var(--text);
  max-width: 18ch;
}
.waitlist--center { justify-content: center; }
.waitlist--center .waitlist__msg { text-align: center; }
.waitlist--center.is-done .waitlist__msg { text-align: center; }
.wordmark {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: clamp(12px, 1.6vw, 24px);
}
.wordmark text {
  font-family: var(--font);
  font-weight: 900;
  font-size: 250px;
  fill: var(--footer);
}

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  html[data-bg="v1"] .photo { background-image: url("img/hero-v1-portrait.jpg"); }
  html[data-bg="v2"] .photo { background-image: url("img/hero-v2-portrait.jpg"); }
  .photo { background-position: 50% 0; }
  .photo::after {
    background: linear-gradient(0deg, var(--bg) 0%, rgba(11, 10, 15, .82) 34%, rgba(11, 10, 15, .1) 62%, rgba(11, 10, 15, .25) 100%);
  }
  .logo { font-size: 18px; }
  .hero { padding-bottom: max(28px, env(safe-area-inset-bottom)); }
  .hero__col { gap: 16px; }
  .hero__title { font-size: clamp(38px, 11.4vw, 56px); }
  .waitlist { flex-direction: column; flex-wrap: nowrap; max-width: none; }
  .field { flex: 0 0 auto; }
  .btn { width: 100%; }
  .waitlist.is-done .waitlist__msg { border-radius: 24px; }
  .rail { gap: 40px; right: 16px; }
  .pains__inner { padding-right: 36px; }
  .gmark { font-size: 62vw; }
}

/* ---------- Reduced motion: final state, no pinning ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { animation: none; opacity: 1; transform: none; }
  .swap__w { transition: none; }
  .pains { height: auto; }
  .pains__stage { position: relative; height: auto; padding-block: 18vh; }
  .step { --strike: 1; --fix: 1; }
  .rail { display: none; }
}
