/* ==========================================================================
   Vibe Games — landing page
   No frameworks, no build step. Dark by default, follows the system setting.
   ========================================================================== */

:root {
  --canvas:        #0b0a17;
  --canvas-soft:   #12111f;
  --ink:           #ffffff;
  --ink-soft:      rgba(255, 255, 255, 0.68);
  --ink-faint:     rgba(255, 255, 255, 0.42);
  --surface:       rgba(255, 255, 255, 0.05);
  --surface-2:     rgba(255, 255, 255, 0.09);
  --hairline:      rgba(255, 255, 255, 0.13);

  --five-a:   #ff4757;  --five-b:   #ff8c33;
  --words-a:  #21b8a8;  --words-b:  #4585f5;
  --sudoku-a: #8549f0;  --sudoku-b: #db54c2;
  --trio-a:   #f7b929;  --trio-b:   #85d647;
  --blurt-a:  #f54d6b;  --blurt-b:  #fd8c3d;
  --ten-a:    #2a8cf2;  --ten-b:    #4dd9e6;

  --radius: 26px;
  --wrap: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: light) {
  :root {
    --canvas:      #f7f7fb;
    --canvas-soft: #ffffff;
    --ink:         #14121f;
    --ink-soft:    rgba(20, 18, 31, 0.66);
    --ink-faint:   rgba(20, 18, 31, 0.45);
    --surface:     rgba(20, 18, 31, 0.045);
    --surface-2:   rgba(20, 18, 31, 0.075);
    --hairline:    rgba(20, 18, 31, 0.12);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 17px/1.6 ui-rounded, "SF Pro Rounded", -apple-system,
        BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

h1, h2, h3 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
}

h2 { font-size: clamp(2.4rem, 6vw, 4.4rem); }
h3 { font-size: 1.4rem; }

p { margin: 0 0 1rem; }

em { font-style: normal; color: var(--ink); font-weight: 600; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86em;
  background: var(--surface-2);
  padding: 0.15em 0.45em;
  border-radius: 6px;
}

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: var(--canvas);
  padding: 0.7rem 1.1rem; border-radius: 10px; z-index: 99;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ── hero ─────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: 5rem 0 4rem;
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  inset: -30% -10% auto -10%;
  height: 130%;
  background:
    radial-gradient(46% 42% at 22% 24%, rgba(255, 71, 87, 0.34), transparent 62%),
    radial-gradient(42% 40% at 78% 18%, rgba(69, 133, 245, 0.32), transparent 64%),
    radial-gradient(48% 46% at 60% 76%, rgba(133, 73, 240, 0.30), transparent 66%);
  filter: blur(28px);
  animation: drift 22s var(--ease) infinite alternate;
  pointer-events: none;
}

@keyframes drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to   { transform: translate3d(2%, 2%, 0) scale(1.08); }
}

.hero__inner {
  position: relative;
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-faint);
  margin-bottom: 1.1rem;
}

.hero h1 {
  font-size: clamp(3.4rem, 10vw, 7rem);
  background: linear-gradient(100deg, var(--five-a), var(--five-b) 30%, var(--words-b) 55%, var(--sudoku-a) 78%, var(--trio-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 1rem;
}

.hero a.game__play {
    background: var(--five-a);
}

.lede {
  font-size: clamp(1.05rem, 2.1vw, 1.3rem);
  color: var(--ink-soft);
  max-width: 900px;
}

/* ── store / QR ───────────────────────────────────────────────────────── */

.store {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0 0.9rem;
}

.store__item {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  padding: 0.85rem 1.15rem 0.85rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 18px;
}

/* The one that works now, rather than on its way. A card in a row of cards is
   a place to click, so it is an anchor and says so. */
a.store__item {
  color: inherit;
  text-decoration: none;
  transition: border-color 0.16s ease, transform 0.16s ease;
}

a.store__item:hover {
  border-color: color-mix(in srgb, var(--accent, #4585f5) 45%, var(--hairline));
  transform: translateY(-1px);
}

.store__item--live {
  border-color: color-mix(in srgb, #4585f5 40%, var(--hairline));
}

.store__item img {
  width: 84px; height: 84px;
  border-radius: 10px;
  background: #fff;
  padding: 6px;
}

.store__item strong { display: block; font-size: 1rem; }

.pill--live {
  color: #1b1b1b;
  border-color: transparent;
  background: linear-gradient(135deg, #4585f5, #21b8a8);
}

.pill {
  display: inline-block;
  margin-top: 0.3rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
}

.fine { font-size: 0.85rem; color: var(--ink-faint); margin: 0; }
.fine--center { text-align: center; margin-top: 1.5rem; }

/* ── the phone frame ──────────────────────────────────────────────────── */

.phone {
  width: min(260px, 62vw);
  aspect-ratio: 402 / 874;
  padding: 9px;
  border-radius: 40px;
  background: linear-gradient(160deg, rgba(255,255,255,0.22), rgba(255,255,255,0.05));
  box-shadow:
    0 2px 0 rgba(255,255,255,0.16) inset,
    0 40px 80px -30px rgba(0,0,0,0.75);
}

.phone picture { display: block; width: 100%; height: 100%; }

.phone img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 32px;
}

.phone--float { animation: bob 7s ease-in-out infinite; }

@keyframes bob {
  0%, 100% { transform: translateY(-8px) rotate(-2deg); }
  50%      { transform: translateY(10px) rotate(2deg); }
}

.hero__device { display: flex; justify-content: center; }

/* ── modes ────────────────────────────────────────────────────────────── */

.modes { padding: 6rem 0 4rem; }
.modes h2 { margin-bottom: 0.7rem; }
.sub { font-size: 1.15rem; color: var(--ink-soft); margin-bottom: 2.6rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 1.9rem;
}

.card__icon {
  width: 54px; height: 54px;
  border-radius: 16px;
  display: grid; place-items: center;
  margin-bottom: 1.1rem;
  color: #fff;
}
.card__icon svg { width: 27px; height: 27px; }
.card__icon--solo    { background: linear-gradient(135deg, var(--words-a), var(--words-b)); }
.card__icon--friends { background: linear-gradient(135deg, var(--five-a), var(--five-b)); }

.card p { color: var(--ink-soft); }

.ticks { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.ticks li {
  position: relative;
  padding-left: 1.7rem;
  margin-bottom: 0.5rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.ticks li::before {
  content: "";
  position: absolute; left: 0; top: 0.52em;
  width: 0.95rem; height: 0.95rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--words-a), var(--words-b));
}

/* ── game sections ────────────────────────────────────────────────────── */

.game {
  position: relative;
  padding: 7rem 0;
  overflow: hidden;
  isolation: isolate;
}

.game__backdrop {
  position: absolute;
  inset: -20% -20%;
  z-index: -1;
  opacity: calc(0.28 + var(--p, 0) * 0.55);
  transform: scale(calc(0.75 + var(--p, 0) * 0.45));
  transition: opacity 0.35s linear;
  pointer-events: none;
}

.game--five   .game__backdrop { background: radial-gradient(50% 50% at 50% 50%, var(--five-a),   transparent 70%); }
.game--words  .game__backdrop { background: radial-gradient(50% 50% at 50% 50%, var(--words-b),  transparent 70%); }
.game--sudoku .game__backdrop { background: radial-gradient(50% 50% at 50% 50%, var(--sudoku-a), transparent 70%); }
.game--trio   .game__backdrop { background: radial-gradient(50% 50% at 50% 50%, var(--trio-a),   transparent 70%); }
.game--ten    .game__backdrop { background: radial-gradient(50% 50% at 50% 50%, var(--ten-a),    transparent 70%); }

.game__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.game__inner--flip .game__copy { order: 2; }
.game__inner--flip .game__shots { order: 1; }

.game__index {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-faint);
  margin-bottom: 0.7rem;
}

.game h2 {
  background: linear-gradient(120deg, var(--a), var(--b));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
}

.game--five   { --a: var(--five-a);   --b: var(--five-b); }
.game--words  { --a: var(--words-a);  --b: var(--words-b); }
.game--sudoku { --a: var(--sudoku-a); --b: var(--sudoku-b); }
.game--trio   { --a: var(--trio-a);   --b: var(--trio-b); }
.game--blurt  { --a: var(--blurt-a);  --b: var(--blurt-b); }
.game--ten    { --a: var(--ten-a);    --b: var(--ten-b); }

.game__tag {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1.1rem;
}

.game__copy p { color: var(--ink-soft); }

.steps { list-style: none; counter-reset: s; padding: 0; margin: 1.6rem 0 1.4rem; }
.steps li {
  counter-increment: s;
  position: relative;
  padding-left: 2.6rem;
  margin-bottom: 0.75rem;
  color: var(--ink-soft);
}
.steps li::before {
  content: counter(s);
  position: absolute; left: 0; top: 0.05em;
  width: 1.75rem; height: 1.75rem;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 0.8rem; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--a), var(--b));
}

.game__meta {
  font-size: 0.92rem;
  color: var(--ink-faint);
  border-left: 3px solid var(--a);
  padding-left: 0.9rem;
}

/* The way into the browser version, under each game's copy. Wears the game's
   own accent so it reads as part of that section rather than as a general call
   to action bolted on. */
.game__play {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.5rem;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  background: var(--a);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 18px rgb(0 0 0 / 0.28);
  transition: transform 0.18s ease, filter 0.18s ease;
}

.game__play:hover,
.game__play:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.game__play span {
  font-size: 1.05em;
  line-height: 1;
}

.game__shots {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  min-height: 460px;
}

.game__shots .phone { position: absolute; }
.game__shots .phone:first-child { position: relative; z-index: 3; }

.phone--peek { width: min(200px, 46vw); z-index: 1; }
.phone--peek:nth-child(3) { z-index: 0; }
/* The peek phones have to carry their own transform once they are revealed.
   `.reveal-up.is-visible { transform: none }` is a two-class rule, so it beat the
   one-class positioning below and stacked every extra screenshot exactly behind
   the main phone — where nobody could see it. Matching that specificity, and
   beating it, is what makes them fan out. */
.phone--peek.reveal-up { opacity: 0; }
.phone.phone--peek.reveal-up.is-visible { opacity: 0.55; }
.phone.phone--peek:nth-child(2).is-visible { transform: translateX(58%) scale(0.9) rotate(6deg); }
.phone.phone--peek:nth-child(3).is-visible { transform: translateX(-58%) scale(0.9) rotate(-6deg); }

/* ── people ───────────────────────────────────────────────────────────── */

.people { padding: 6rem 0 5rem; }
.people__strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 2.4rem;
}
.people__strip img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
}

/* ── footer ───────────────────────────────────────────────────────────── */

.foot {
  border-top: 1px solid var(--hairline);
  padding: 2.6rem 0 3.4rem;
}
.foot__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  justify-content: space-between;
  align-items: center;
}
.foot__mark { font-weight: 800; font-size: 1.15rem; margin: 0 0 0.2rem; }

/* ── ways to help ─────────────────────────────────────────────────────────
   Its own page because the app cannot point at a way to pay: the app opens
   this, and the browser version says the same words in a panel.

   One column, one card per way to help, one shape of button. The order is the
   only thing that should draw the eye, so the step number is the only accent
   and every control is the same pill — including the one that leaves for
   Venmo, which has to sit in the list as the third thing rather than shout
   over the two free ones. */

.help { padding: 1.5rem 0 4rem; }
.help__top { padding-top: 2rem; }
.help__wrap { width: min(100% - 2.5rem, 40rem); margin-inline: auto; }

.help__back {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-decoration: none;
}
.help__back:hover, .help__back:focus-visible { color: var(--ink); }

.help h1 {
  font-size: clamp(2.2rem, 6vw, 3rem);
  margin: 0 0 1.1rem;
}

/* The site's `h2` is a landing-page headline; this one introduces a list. */
.help h2 {
  font-size: clamp(1.4rem, 3.4vw, 1.75rem);
  margin: 3.2rem 0 0.7rem;
}

.help__intro { color: var(--ink-soft); margin-bottom: 1.6rem; }

.help__way {
  padding: 1.4rem 1.5rem 1.5rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--surface);
}
.help__way + .help__way { margin-top: 0.9rem; }

.help__way h3 {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.12rem;
}

.help__step {
  display: grid;
  place-items: center;
  flex: none;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0;
}

.help__way p { margin: 0.7rem 0 0; color: var(--ink-soft); }

.help__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.1rem;
}

.help__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.18s ease, transform 0.18s ease;
}
.help__button:hover, .help__button:focus-visible {
  filter: brightness(1.18);
  transform: translateY(-1px);
}
.help__button:disabled {
  cursor: default;
  opacity: 0.45;
  filter: none;
  transform: none;
}

.help__arrow { color: var(--ink-faint); font-size: 1.05em; line-height: 1; }

/* ── the feedback box ────────────────────────────────────────────────────
   The browser version's form, in plain HTML: one box, one button, and a line
   saying where it goes. The copy is the same on purpose — the two have to read
   as one thing, because they are the same inbox. */

.feedback { margin-top: 1.1rem; }

.feedback label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
}

.feedback textarea {
  display: block;
  width: 100%;
  min-height: 7rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  background: var(--canvas-soft);
  color: var(--ink);
  font: inherit;
  /* A whole rem, not less: iOS Safari zooms the page in when a field it can type
     into is under 16px, and this page is opened on a phone by the app. */
  font-size: 1rem;
  line-height: 1.5;
  resize: vertical;
}
.feedback textarea::placeholder { color: var(--ink-faint); }
.feedback textarea:focus-visible {
  outline: 2px solid var(--five-a);
  outline-offset: 1px;
}

.feedback__send {
  width: 100%;
  margin-top: 0.7rem;
  padding-block: 0.8rem;
}

.feedback__problem {
  margin: 0.7rem 0 0;
  color: #ff9a9a;
  font-size: 0.85rem;
}

.feedback .feedback__note {
  margin-top: 0.7rem;
  color: var(--ink-faint);
  font-size: 0.78rem;
  text-align: center;
}

.feedback__sent strong {
  display: block;
  color: var(--ink);
  font-size: 1.02rem;
}.feedback__sent span { display: block; margin-top: 0.2rem; font-size: 0.9rem; }
.help .help__way p.feedback__sent { margin-top: 1.1rem; color: var(--ink-soft); }

.help__link { color: var(--ink); font-weight: 700; text-decoration: none; }
.help__link:hover, .help__link:focus-visible { text-decoration: underline; }

/* ── prose pages ─────────────────────────────────────────────────────────
   Privacy and support: the two pages Apple wants a URL for, and the only
   pages here that are read rather than looked at. A narrower column than the
   landing page, because they are text, and a heading scale that keeps a
   question and its answer distinguishable at a glance. */

.doc { padding: 1.5rem 0 4rem; }
.doc__top { padding-top: 2rem; }
.doc__wrap { width: min(100% - 2.5rem, 38rem); margin-inline: auto; }

.doc h1 {
  font-size: clamp(2rem, 5.5vw, 2.7rem);
  margin: 0 0 1rem;
}
.doc h2 {
  font-size: clamp(1.2rem, 2.8vw, 1.4rem);
  margin: 2.6rem 0 0.6rem;
}
.doc h3 {
  font-size: 1rem;
  margin: 1.8rem 0 0.4rem;
}

.doc p, .doc li { color: var(--ink-soft); }
.doc p { margin: 0 0 0.9rem; }
.doc ul { margin: 0 0 1rem; padding-left: 1.15rem; }
.doc li { margin-bottom: 0.45rem; }
.doc li::marker { color: var(--ink-faint); }

.doc strong { color: var(--ink); }

.doc a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }

.doc__lede {
  font-size: clamp(1.02rem, 2vw, 1.15rem);
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}

.doc__updated {
  margin-top: 2.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--hairline);
  color: var(--ink-faint);
  font-size: 0.82rem;
}

/* ── scroll reveals ───────────────────────────────────────────────────── */

.reveal, .reveal-up {
  opacity: 0;
  transform: translateY(38px);
  transition:
    opacity 0.9s var(--ease),
    transform 1.05s var(--ease);
}
.reveal-up { transform: translateY(70px) scale(0.94); }

.reveal.is-visible, .reveal-up.is-visible {
  opacity: 1;
  transform: none;
}

.reveal-up[data-delay="1"] { transition-delay: 0.12s; }
.reveal-up[data-delay="2"] { transition-delay: 0.24s; }

/* ── responsive ───────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .hero__inner,
  .game__inner { grid-template-columns: 1fr; }

  .game__inner--flip .game__copy,
  .game__inner--flip .game__shots { order: 0; }

  .hero { padding-top: 4rem; }
  .hero__device { margin-top: 1rem; }
  .game { padding: 4.5rem 0; }
  .game__shots { min-height: 400px; }
  .phone--peek { display: none; }

  .help__top { padding-top: 1.5rem; }
  .help { padding-bottom: 3rem; }
}

/* ── reduced motion ───────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .game__play {
    transition: none;
  }

  .game__play:hover,
  .game__play:focus-visible {
    transform: none;
  }

  .help__button { transition: none; }
  .help__button:hover, .help__button:focus-visible { transform: none; }

  html { scroll-behavior: auto; }
  .hero__glow, .phone--float { animation: none; }
  .reveal, .reveal-up {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .game__backdrop { transition: none; }
}
