/* SportyReserve website. The app's look (DESIGN.md): black canvas, white
   type, Inter, the app's one blue used sparingly.
   One story, one evening: five moments (A–E) with their times on a thread
   down the left, like a match report. The player at the top is cut out of
   his photo so he bursts through the giant words. */

@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/Inter-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/Inter-Medium.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Inter Display';
  src: url('/assets/fonts/InterDisplay-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}

/* ── Tokens (the app's theme.js) ── */
:root {
  --canvas: #000000;
  --surface: #0b0e14;
  --raised: #161b24;
  --heading: #ffffff;
  --body: #f0f0f0;
  --muted: #a1a4a5;
  --iron: #6e727a;
  --hairline: #292d30;
  --accent: #0a6cff;
  --success: #3ad389;

  --gutter: 20px;
  --page: 1320px;
  --rail: 0px; /* the time column; only on wide screens */

  --display: 'Inter Display', 'Inter', system-ui, -apple-system, sans-serif;
  --text: 'Inter', system-ui, -apple-system, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}
@media (min-width: 1000px) {
  :root { --gutter: 40px; --rail: 180px; }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--body);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, p, figure, ul { margin: 0; }
ul { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--heading); outline-offset: 3px; border-radius: 8px; }
.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* The one width everything lines up to */
.page {
  width: min(var(--page), calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}

/* ── Store buttons ── */
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 8px 20px 8px 16px;
  border-radius: 14px;
  background: var(--heading);
  color: var(--canvas);
  transition: transform 120ms ease-out;
}
.store:active { transform: scale(0.97); }
.store svg { width: 22px; height: 24px; flex-shrink: 0; }
.store span {
  display: flex;
  flex-direction: column;
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.1;
  white-space: nowrap;
}
.store small { font-family: var(--text); font-weight: 400; font-size: 11px; opacity: 0.7; }

/* ── Phone frame around a real app screenshot ── */
.phone {
  position: relative;
  width: 260px;
  aspect-ratio: 1206 / 2622;
  padding: 9px;
  border-radius: 46px;
  background: #050505;
  box-shadow:
    inset 0 0 0 1.5px #2c2f33,
    0 40px 90px rgba(0, 0, 0, 0.7);
}
.phone::before {
  /* the island */
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  width: 30%;
  height: 22px;
  translate: -50% 0;
  border-radius: 999px;
  background: #000;
  z-index: 2;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 37px; }

/* ═══ The top ═══ */
.hero {
  position: relative;
  min-height: max(100svh, 720px);
  display: flex;
  flex-direction: column;
  isolation: isolate;
}
.hero-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: -1;
}
/* The photo and the cut-out must sit exactly on top of each other */
.hero-photo,
.hero-cut {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 66% 40%;
}
.hero-cut { z-index: 2; }
.hero-stage::after {
  /* fades into the page; sits above everything */
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    linear-gradient(0deg, var(--canvas) 0%, rgba(0, 0, 0, 0.55) 22%, rgba(0, 0, 0, 0) 45%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0) 18%);
}
.hero-giant {
  position: absolute;
  z-index: 1; /* between the photo and the player */
  left: var(--gutter);
  top: 14%;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(88px, 16.5vw, 260px);
  line-height: 0.82;
  letter-spacing: -0.06em;
  text-transform: uppercase;
  color: #ffffff;
}

.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding-block: 24px;
  font-size: 15px;
  font-weight: 500;
}
.brand img { width: 104px; height: auto; }
.nav-links { display: flex; gap: 40px; color: rgba(255, 255, 255, 0.85); }
.nav-links a:hover { color: var(--heading); }
.nav-cta {
  justify-self: end;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--heading);
  color: var(--canvas);
  font-size: 14px;
}

.hero-foot {
  margin-top: auto;
  padding-bottom: 48px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}
.hero-foot h1 {
  max-width: 470px;
  margin-bottom: 28px;
  font-family: var(--text);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.45;
  color: var(--heading);
}
.hero-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; max-width: 420px; }
.hero-tags li {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* ═══ The story ═══ */
.story-intro {
  padding: 96px 0 72px;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--heading);
}
.story-intro span { color: var(--iron); }

.chapter {
  position: relative;
  display: grid;
  grid-template-columns: var(--rail) 1fr;
  padding-bottom: 140px;
}
/* The thread: one line down the whole story */
.story { position: relative; }
.thread {
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 140px;
  width: 1px;
  background: var(--hairline);
}
/* Fills as you scroll through the evening (main.js sets the scale) */
.thread-fill {
  position: absolute;
  inset: 0;
  background: var(--heading);
  transform-origin: top;
  transform: scaleY(var(--fill, 0));
}
.rail {
  position: sticky;
  top: 32px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  border: 1px solid var(--muted);
  background: var(--canvas);
  font-size: 13px;
  font-weight: 500;
  color: var(--heading);
}
.rail time {
  font-family: var(--display);
  font-weight: 600;
  font-size: 56px;
  line-height: 0.9;
  letter-spacing: -0.045em;
  color: var(--heading);
}
.rail time { background: var(--canvas); padding-block: 8px; }
.rail small { display: block; margin-top: 6px; font-family: var(--text); font-size: 13px; font-weight: 500; letter-spacing: 0.06em; color: var(--muted); }

.kicker {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.chapter h2 {
  margin-top: 14px;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(40px, 5.2vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  color: var(--heading);
}
.chapter-body p:not(.kicker) {
  max-width: 440px;
  margin-top: 22px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--muted);
  text-wrap: pretty;
}

/* A · Find: words left, two phones leaning on each other */
.find { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; }
.phones { position: relative; height: 620px; }
.phones .phone { position: absolute; top: 40px; width: 268px; }
.tilt-left { left: 2%; rotate: -7deg; }
.tilt-right { right: 6%; top: 0 !important; rotate: 5deg; z-index: 1; }

/* B · Join: one giant word, the phone standing in the middle of it */
.join { position: relative; text-align: center; overflow-x: clip; overflow-y: visible; }
.join .kicker { text-align: left; }
.giant-word {
  display: flex;
  justify-content: space-between;
  margin-top: 8px !important;
  font-size: clamp(110px, 19vw, 300px) !important;
  line-height: 0.8 !important;
  letter-spacing: -0.07em !important;
  text-transform: uppercase;
}
.giant-word { padding-right: 0.1em; } /* room for the outlined full stop */
.giant-word span:last-child { color: transparent; -webkit-text-stroke: 2px var(--heading); }
.join-phone {
  margin: -0.62em auto 0;
  font-size: clamp(110px, 19vw, 300px); /* so the overlap follows the word size */
  width: 280px;
  rotate: -2deg;
}
.join-notes {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
  text-align: left;
}
.join-notes p { margin-top: 0 !important; max-width: none !important; color: var(--heading) !important; font-size: 17px !important; }

/* C · Show up: a big photo with a cut corner, facts on it, the chat phone
   overlapping its edge */
.show { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; } /* words in the middle of the photo (owner, 13 Oct) */
.show-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 28px;
  /* the top-right corner is cut away on a slant */
  clip-path: polygon(0 0, 78% 0, 100% 14%, 100% 100%, 0 100%);
}
.show-photo img { width: 100%; height: 100%; object-fit: cover; }
.facts {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.facts li {
  padding: 14px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  font-size: 13px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.78);
}
.facts strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
  color: var(--heading);
}
.show-copy { position: relative; }
.show-copy .stores { margin-top: 32px; }

/* D · Crew: one wide photo, a dashed note pinned to it, words below left */
.crew { position: relative; }
.crew-photo {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  border-radius: 28px;
}
.crew-note {
  position: absolute;
  top: 28px;
  right: 28px;
  padding: 18px 22px;
  border: 1.5px dashed rgba(255, 255, 255, 0.75);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  rotate: 2deg;
}
.crew-note p { margin: 0 !important; color: var(--heading) !important; font-family: var(--display); font-weight: 600; font-size: 20px !important; }
.crew-note span { font-size: 13px; color: rgba(255, 255, 255, 0.75); }
.crew-copy { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end; margin-top: 40px; }
.crew-copy .kicker { grid-column: 1 / -1; margin-bottom: -40px; }
.crew-copy h2 { margin-top: 0; }

/* E · Home: words left, an iPhone lock screen right */
.home { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.home h2 { font-size: clamp(48px, 6.4vw, 96px); }
.lock {
  justify-self: end;
  width: min(100%, 420px);
  padding: 56px 18px; /* the same above and below (owner, 13 Oct) */
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 40px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(10, 108, 255, 0.35) 0%, rgba(0, 0, 0, 0) 60%),
    linear-gradient(180deg, #0b1a33 0%, #050a14 100%);
  text-align: center;
  box-shadow: inset 0 0 0 1px var(--hairline);
}
.chapter-body p.lock-time { margin: 0; max-width: none; font-family: var(--display); font-weight: 600; font-size: 92px; line-height: 0.82; letter-spacing: -0.04em; color: var(--heading); }
.lock-date { margin-top: 8px !important; font-size: 17px !important; color: rgba(255, 255, 255, 0.8) !important; max-width: none !important; }
.note {
  margin-top: 48px;
  padding: 14px 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  text-align: left;
}
.note-head { display: flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(255, 255, 255, 0.75); }
.note-head img { width: 22px; height: 22px; border-radius: 6px; background: #000; padding: 3px; }
.note-head time { margin-left: auto; }
.note-title { margin-top: 8px !important; color: var(--heading) !important; font-weight: 500; font-size: 16px !important; }
.note p:not(.note-title) { margin-top: 2px !important; font-size: 15px !important; color: rgba(255, 255, 255, 0.85) !important; line-height: 1.4 !important; }
.note-btn {
  display: block;
  margin-top: 12px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  text-align: center;
  font-weight: 500;
  color: var(--heading);
}

/* ═══ The end ═══ */
.final { padding: 40px 0 120px; }
.final h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(56px, 9vw, 150px);
  line-height: 0.9;
  letter-spacing: -0.055em;
  color: var(--heading);
}
.final-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
}
.final-row p { font-size: 18px; color: var(--muted); }

/* The wordmark, huge and whole, closing the page (owner, 13 Oct: show it complete) */
.footer { overflow: hidden; }
.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 32px;
  font-size: 14px;
  color: var(--muted);
}
.footer-row nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-row a:hover { color: var(--heading); }
.footer-mark {
  width: min(1320px, calc(100vw - 32px));
  margin: 0 auto;
  padding-bottom: clamp(24px, 4vw, 56px);
  opacity: 0.12;
}

/* ── Fade up as you scroll (not with Reduce Motion) ── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }

/* ── Narrower screens: the time sits above each moment ── */
@media (max-width: 999px) {
  .chapter { grid-template-columns: 1fr; padding-bottom: 96px; }
  .thread { display: none; }
  .rail { position: static; flex-direction: row; align-items: center; gap: 14px; margin-bottom: 20px; }
  .rail time { font-size: 32px; }
  .rail small { display: inline; margin-left: 4px; }
  .find, .show, .home { grid-template-columns: 1fr; }
  .phones { height: 520px; max-width: 520px; }
  .phones .phone { width: 220px; }
  .crew-copy { grid-template-columns: 1fr; gap: 0; }
  .crew-copy .kicker { margin-bottom: 0; }
  .crew-copy h2 { margin-top: 14px; }
  .lock { justify-self: start; }
}

/* ── Phones ── */
@media (max-width: 699px) {
  .nav { grid-template-columns: auto 1fr auto; padding-block: 16px; }
  .nav-links { display: none; }
  .nav-cta { grid-column: 3; }
  /* Phone: the player up top, the giant words lower down where only his
     legs and the ball pass in front of them */
  .hero { min-height: 900px; }
  .hero-photo, .hero-cut {
    height: 62%;
    object-position: 70% 50%;
    -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
  }
  .hero-giant { top: auto; bottom: 47%; font-size: 23vw; }
  .hero-stage::after {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0) 14%);
  }
  .hero-foot { flex-direction: column; align-items: stretch; padding-bottom: 32px; }
  .hero-foot h1 { font-size: 18px; }
  .hero-tags { justify-content: flex-start; }
  .stores { flex-direction: column; }
  .store { justify-content: center; }
  .final-row .stores { width: 100%; } /* full width like the others (owner, 13 Oct) */

  .story-intro { padding: 64px 0 48px; }
  .phones { height: 440px; }
  .phones .phone { width: 175px; padding: 6px; border-radius: 32px; }
  .phones .phone img { border-radius: 27px; }
  .phone::before { top: 12px; height: 15px; }
  .giant-word { flex-direction: column; align-items: flex-start; font-size: 30vw !important; }
  .giant-word span:last-child { align-self: flex-end; }
  .join-phone { width: 200px; font-size: 30vw; margin-top: -0.3em; }
  .join-notes { flex-direction: column; gap: 10px; }
  .facts { grid-template-columns: 1fr; }
  .facts li { padding: 10px 12px; }
  .crew-photo { aspect-ratio: 4 / 5; }
  .crew-note { top: 16px; right: 16px; left: 16px; rotate: 0deg; }
  .chapter-body p.lock-time { font-size: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ═══ Motion (main.js). Only transforms and opacity, so it stays smooth.
   With Reduce Motion everything simply sits in its place. ═══ */

/* The moment you're in lights up on the thread; the others wait in grey */
.rail time, .mark { transition: color 400ms var(--ease-out), background-color 400ms var(--ease-out), border-color 400ms var(--ease-out); }
.motion .chapter:not(.is-now) .rail time { color: #3a3e43; }
.motion .chapter:not(.is-now) .rail small { color: #3a3e43; }
.motion .chapter.is-now .mark { background: var(--heading); border-color: var(--heading); color: var(--canvas); }

/* The top: layers move at different speeds (main.js) */
.hero-giant, .hero-cut, .hero-photo { will-change: transform; }

/* A: the two phones fan out as they arrive */
.motion .find .tilt-left { transition: translate 900ms var(--ease-out), rotate 900ms var(--ease-out); }
.motion .find .tilt-right { transition: translate 900ms var(--ease-out), rotate 900ms var(--ease-out); }
.motion .find:not(.is-in) .tilt-left { translate: 40% 10%; rotate: 0deg; }
.motion .find:not(.is-in) .tilt-right { translate: -40% 10%; rotate: 0deg; }

/* Phones that lean toward the pointer (main.js sets --rx / --ry) */
.tilt { transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.tilt img { pointer-events: none; }

/* B: the Join button you can press */
.join-phone .screen { position: relative; width: 100%; height: 100%; }
/* Measured from the screenshot itself (1206 × 2622): the app's own button
   is painted out of the image and this one sits exactly in its place. */
.join-btn {
  position: absolute;
  left: 3.98%;
  right: 3.98%;
  top: 89.24%;
  height: 6.87%;
  border: 0;
  border-radius: 999px;
  background: var(--heading);
  color: var(--canvas);
  font-family: var(--text);
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  z-index: 3;
  transition: transform 120ms ease-out, background-color 300ms var(--ease-out), color 300ms;
}
.join-btn:active { transform: scale(0.96); }
.join-btn.done { background: #10241a; color: var(--success); }
.join-btn:not(.done) { animation: nudge 2.4s var(--ease-out) 1.2s infinite; }
@keyframes nudge {
  0%, 70%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5); }
  35% { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); }
}

/* C: the facts rise one after another */
.motion .show .facts li { transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
.motion .show:not(.is-in) .facts li { opacity: 0; transform: translateY(16px); }
.motion .show .facts li:nth-child(2) { transition-delay: 120ms; }
.motion .show .facts li:nth-child(3) { transition-delay: 240ms; }
.show-photo img { will-change: transform; }

/* D: the note gets pinned on */
.motion .crew-note { transition: opacity 600ms var(--ease-out) 300ms, transform 700ms var(--ease-out) 300ms; }
.motion .crew:not(.is-in) .crew-note { opacity: 0; transform: translateY(-20px) rotate(-6deg) scale(1.05); }

/* E: the notification drops in like a real one; I'm OK answers */
.motion .home .note { transition: opacity 600ms var(--ease-out) 350ms, transform 700ms var(--ease-out) 350ms; }
.motion .home:not(.is-in) .note { opacity: 0; transform: translateY(-36px) scale(0.96); }
.note-btn {
  width: 100%;
  border: 0;
  font-family: var(--text);
  font-size: 16px;
  cursor: pointer;
  transition: transform 120ms ease-out, background-color 200ms;
}
.note-btn:hover { background: rgba(255, 255, 255, 0.24); }
.note-btn:active { transform: scale(0.97); }
.note.answered .note-btn { display: none; }
.note-done { margin: 0 !important; height: 0; overflow: hidden; color: var(--success) !important; font-weight: 500; }
.note.answered .note-done { height: auto; margin-top: 12px !important; }


@media (prefers-reduced-motion: reduce) {
  .tilt { transform: none; }
  .join-btn:not(.done) { animation: none; }
  .motion .find:not(.is-in) .tilt-left,
  .motion .find:not(.is-in) .tilt-right,
  .motion .show:not(.is-in) .facts li,
  .motion .crew:not(.is-in) .crew-note,
  .motion .home:not(.is-in) .note { opacity: 1; transform: none; translate: none; }
}
