/* Face Off — shared styles.
   Palette is the app's own: violet #5B2A9E, magenta #C6339E, orange #F2793E,
   cream cards, coin gold #FFC94A. Deep navy #0A0E27 stands in for the match
   register. Keeping them identical matters: a site that looks like a different
   product than the app it advertises reads as a fan page. */

:root {
  --violet: #5b2a9e;
  --magenta: #c6339e;
  --orange: #f2793e;
  --gold: #ffc94a;
  --navy: #0a0e27;
  --indigo: #1b1f4b;
  --cream: #fdf8f0;
  --ink: #17132a;
  --radius: 22px;
  --max: 1080px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: #fff;
  background: var(--navy);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display { font-family: Fredoka, "Plus Jakarta Sans", sans-serif; font-weight: 600; line-height: 1.1; }
h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); margin: 0 0 .6rem; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin: 0 0 1rem; }
h3 { font-size: 1.15rem; margin: 0 0 .4rem; }
p { margin: 0 0 1rem; }
a { color: var(--gold); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 22px; }

/* The aurora behind the hero. One fixed layer of blurred radial gradients
   rather than an animation — it reads as depth while costing one paint, and a
   moving background behind body text is a readability problem, not a feature. */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  /* Flat colour only. The coloured light lives on the two pseudo-elements
     below, which move. */
  background: var(--navy);
}

/* ---------- header ---------- */
header.site {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(10, 14, 39, .6);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
header.site .wrap { display: flex; align-items: center; gap: 18px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: Fredoka, sans-serif; font-size: 1.2rem; color: #fff; text-decoration: none; }
.brand .dot {
  width: 30px; height: 30px; border-radius: 10px;
  background: linear-gradient(135deg, var(--violet), var(--magenta) 55%, var(--orange));
}
header.site nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
header.site nav a {
  color: rgba(255, 255, 255, .82); text-decoration: none; font-size: .95rem; font-weight: 600;
  padding: 8px 14px; border-radius: 999px;
}
header.site nav a:hover, header.site nav a[aria-current="page"] { background: rgba(255, 255, 255, .12); color: #fff; }

/* ---------- hero ---------- */
/* `padding-block`, never the `padding` shorthand. `.hero` also carries `.wrap`,
   whose horizontal padding is the page's only side gutter — a shorthand here
   resets it to zero and the text runs to the screen edge on a phone. */
.hero { padding-block: clamp(56px, 11vw, 120px) clamp(40px, 7vw, 80px); }
.hero p.lede { font-size: clamp(1.05rem, 2.1vw, 1.3rem); color: rgba(255, 255, 255, .82); max-width: 40rem; }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold); background: rgba(255, 201, 74, .12); border: 1px solid rgba(255, 201, 74, .3);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 20px;
}
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.btn {
  display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 700;
  padding: 14px 26px; border-radius: 999px; border: 1px solid transparent; font-size: 1rem;
  transition: transform .12s ease, filter .12s ease;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: linear-gradient(135deg, var(--magenta), var(--orange)); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .22); }
.btn-ghost:hover { background: rgba(255, 255, 255, .17); }

/* ---------- cards ---------- */
section { padding-block: clamp(44px, 8vw, 86px); }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(265px, 1fr)); }
.card {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius);
  padding: 26px;
}
.card .glyph {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  font-size: 1.4rem; margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(91, 42, 158, .9), rgba(198, 51, 158, .85));
  border: 1px solid rgba(255, 255, 255, .18);
}
.card p { color: rgba(255, 255, 255, .78); margin: 0; }

/* ---------- prose (legal pages) ---------- */
.prose { max-width: 46rem; }
.prose h2 { margin-top: 2.4rem; }
.prose h3 { margin-top: 1.6rem; color: var(--gold); }
.prose ul { padding-left: 1.2rem; color: rgba(255, 255, 255, .82); }
.prose li { margin-bottom: .5rem; }
.prose .updated { font-size: .9rem; color: rgba(255, 255, 255, .6); }
.callout {
  border-left: 3px solid var(--gold);
  background: rgba(255, 201, 74, .08);
  padding: 14px 18px; border-radius: 0 14px 14px 0; margin: 1.6rem 0;
  color: rgba(255, 255, 255, .88);
}

/* ---------- forms ---------- */
form.panel { max-width: 40rem; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 7px; }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; font-size: 1rem; color: #fff;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 14px; padding: 13px 15px;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--gold); background: rgba(255, 255, 255, .1);
}
.field .hint { font-size: .85rem; color: rgba(255, 255, 255, .6); margin-top: 6px; }
/* Honeypot: hidden from people, present for bots — which is why it is not
   `display:none`, a state many of them check for and skip.
   Clipped in place rather than the usual `left:-9999px`, because a 1px box that
   never leaves the layout cannot affect it. (Worth noting I first changed this
   believing it had caused a horizontal scroll on mobile; measuring showed it had
   not — headless Chrome clamps its viewport to 500px, so a 390px screenshot was
   showing the left part of a wider page. The pattern is still the better one.) */
.hp {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
form.panel { position: relative; }
.status { margin-top: 16px; padding: 14px 16px; border-radius: 14px; font-weight: 600; display: none; }
.status.show { display: block; }
.status.ok { background: rgba(76, 217, 232, .14); border: 1px solid rgba(76, 217, 232, .4); }
.status.bad { background: rgba(255, 77, 109, .14); border: 1px solid rgba(255, 77, 109, .45); }

/* ---------- footer ---------- */
footer.site {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding: 34px 0 46px; margin-top: 40px;
  color: rgba(255, 255, 255, .62); font-size: .92rem;
}
footer.site .wrap { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
footer.site nav { margin-left: auto; display: flex; gap: 16px; flex-wrap: wrap; }
footer.site a { color: rgba(255, 255, 255, .75); text-decoration: none; }
footer.site a:hover { color: #fff; }

@media (max-width: 620px) {
  header.site .wrap { height: auto; padding: 12px 18px; flex-wrap: wrap; }
  header.site nav { width: 100%; margin-left: 0; }
  footer.site nav { margin-left: 0; width: 100%; }
}

/* Respect a reduced-motion preference for the only transitions we have. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* ==========================================================================
   Motion
   ==========================================================================
   Everything below animates only `transform`, `opacity` and `filter` — the
   three properties a browser can hand to the compositor without re-running
   layout. Animating `top`, `width` or `background-position` instead is what
   makes a marketing page stutter on a phone, and this page is mostly read on
   phones.

   Every rule here is switched off wholesale by the reduced-motion block at the
   very bottom of this file. That is not politeness: for some people this much
   movement is genuinely unpleasant, and a decorative animation is never worth
   more than someone being able to read the page.
   ========================================================================== */

/* ---------- scroll reveal ---------- */
/* Driven by scroll position, not by a script: a view-progress timeline has no
   callback to miss, so an element on screen is settled by definition, and
   `@supports` means a browser without the feature simply shows the content.
   No JavaScript is involved in whether this page can be read.
*
* **It fades from 0.2, not from 0, and that is the point of the whole comment.**
* I removed this effect three separate times during the build because every
* headless capture of the games section came back a blank navy rectangle. It
* turned out the blankness was the `#games` fragment navigation combined with
* the headless renderer — a full-page capture with no fragment showed
* everything, including with the reveal in place. So the effect was never the
* problem, and I had been deleting a working feature on the strength of a
* broken measurement, twice over.
* The margin stays because of what that episode actually demonstrated: I cannot
* watch this animation run here, so the sensible thing is to make its worst
* case survivable. Starting at 0.2 means an element that somehow never
* progresses is faint and slightly low, which someone can still read and report
* — where starting at 0 means an invisible page and a bug nobody can describe. */
.reveal { opacity: 1; }

@supports (animation-timeline: view()) {
  .reveal {
    animation: rise-in linear both;
    animation-timeline: view();
    /* Finishes before the element is centred, so it has settled by the time it
       is properly in view rather than still moving under the eye. */
    animation-range: entry 2% cover 24%;
  }
}
@keyframes rise-in {
  from { opacity: .2; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}

/* ---------- the aurora, now drifting ---------- */
/* Two layers crossing at different speeds. One layer scaled and rotated reads
   as a loop; two at different periods never visibly repeat. */
.aurora::before, .aurora::after {
  content: ""; position: absolute; inset: -30%;
  will-change: transform;
}
/* **Not `background: inherit`.** That was the first version and it erased the
   effect completely: the shorthand it copies includes the parent's
   `background-color`, so each layer painted opaque navy over the gradients
   underneath and the result was a flat dark page. Each layer carries its own
   gradients and no colour, so the base shows through. */
.aurora::before {
  background:
    radial-gradient(45rem 32rem at 18% 6%, rgba(91, 42, 158, .95), transparent 62%),
    radial-gradient(40rem 28rem at 82% 14%, rgba(198, 51, 158, .78), transparent 64%);
  animation: drift-a 34s ease-in-out infinite;
}
.aurora::after {
  background:
    radial-gradient(38rem 26rem at 62% 78%, rgba(242, 121, 62, .5), transparent 62%),
    radial-gradient(34rem 24rem at 28% 60%, rgba(120, 60, 190, .45), transparent 66%);
  animation: drift-b 47s ease-in-out infinite;
}
@keyframes drift-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-4%, 3%, 0) scale(1.12); }
}
@keyframes drift-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1.08) rotate(0deg); }
  50% { transform: translate3d(5%, -4%, 0) scale(1) rotate(6deg); }
}

/* ---------- hero ---------- */
.hero-grid { display: grid; gap: 40px; grid-template-columns: 1.05fr .95fr; align-items: center; }
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; } }

/* Each line of the headline rises on its own. Staggering by line rather than by
   word: word-by-word reads as a gimmick at this size, line-by-line reads as
   the sentence arriving. */
.headline span {
  display: block;
  opacity: 0; transform: translateY(26px);
  animation: line-in .9s cubic-bezier(.2, .7, .3, 1) forwards;
}
.headline span:nth-child(1) { animation-delay: .05s; }
.headline span:nth-child(2) { animation-delay: .18s; }
.headline span:nth-child(3) { animation-delay: .31s; }
@keyframes line-in { to { opacity: 1; transform: none; } }

.headline .hot {
  background: linear-gradient(96deg, var(--gold), var(--orange) 42%, var(--magenta));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.hero-fade { opacity: 0; animation: line-in .9s ease forwards .46s; }

/* ---------- the phone, and what plays inside it ---------- */
.phone {
  position: relative; width: min(330px, 84vw); margin: 0 auto;
  aspect-ratio: 9 / 19; border-radius: 42px;
  background: linear-gradient(160deg, #241a45, #0d1030);
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 40px 90px rgba(0, 0, 0, .55), inset 0 0 0 7px rgba(0, 0, 0, .5);
  overflow: hidden;
  animation: hover-phone 7s ease-in-out infinite;
}
@keyframes hover-phone {
  0%, 100% { transform: translateY(0) rotate(-1.2deg); }
  50% { transform: translateY(-14px) rotate(1.2deg); }
}
.phone .screen { position: absolute; inset: 9px; border-radius: 34px; overflow: hidden; }
.phone .notch {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  width: 84px; height: 6px; border-radius: 99px; background: rgba(0, 0, 0, .6); z-index: 5;
}

/* Three scenes crossfading in the phone. Keeping them all mounted and fading
   between them costs three static subtrees and no JS; swapping the DOM would
   need a timer and would jank on the swap. */
.scene { position: absolute; inset: 0; opacity: 0; animation: scene-cycle 18s linear infinite; }
.scene:nth-of-type(1) { animation-delay: 0s; }
.scene:nth-of-type(2) { animation-delay: 6s; }
.scene:nth-of-type(3) { animation-delay: 12s; }
@keyframes scene-cycle {
  0%, 2% { opacity: 0; }
  6%, 30% { opacity: 1; }
  34%, 100% { opacity: 0; }
}

/* archery */
.sc-sky { position: absolute; inset: 0; background: linear-gradient(#3b1e6e, #a8327f 52%, #f2793e); }
.sc-sand { position: absolute; left: 0; right: 0; bottom: 0; height: 34%; background: linear-gradient(#d8b26a, #b9914f); }
.balloon {
  position: absolute; width: 15%; aspect-ratio: 1 / 1.32;
  border-radius: 50% 50% 50% 50% / 42% 42% 58% 58%;
  box-shadow: inset -5px -7px 12px rgba(0, 0, 0, .22), inset 5px 5px 10px rgba(255, 255, 255, .3);
  animation: bob 5.5s ease-in-out infinite, pop 9s ease-in-out infinite;
}
.balloon::after {
  content: ""; position: absolute; inset: 32% 33%;
  border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .9);
  box-shadow: inset 0 0 0 2.5px rgba(200, 30, 40, .9);
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-11px); } }
/* The pop: a quick punch outward, then gone, then back. Deliberately brief —
   it should register as the game's own feedback, not as a loading state. */
@keyframes pop {
  0%, 62% { opacity: 1; }
  66% { transform: scale(1.3); opacity: .85; }
  69%, 88% { transform: scale(.2); opacity: 0; }
  94%, 100% { transform: scale(1); opacity: 1; }
}
.crosshair {
  position: absolute; left: 50%; top: 46%; width: 30px; height: 30px; margin: -15px 0 0 -15px;
  animation: aim 6s ease-in-out infinite;
}
.crosshair i {
  position: absolute; background: rgba(255, 255, 255, .92); border-radius: 2px;
}
.crosshair i:nth-child(1) { left: 50%; top: 0; width: 2px; height: 9px; margin-left: -1px; }
.crosshair i:nth-child(2) { left: 50%; bottom: 0; width: 2px; height: 9px; margin-left: -1px; }
.crosshair i:nth-child(3) { top: 50%; left: 0; height: 2px; width: 9px; margin-top: -1px; }
.crosshair i:nth-child(4) { top: 50%; right: 0; height: 2px; width: 9px; margin-top: -1px; }
@keyframes aim {
  0%, 100% { transform: translate(0, 0); }
  30% { transform: translate(-26px, -16px); }
  62% { transform: translate(22px, 8px); }
}

/* putt */
.sc-green { position: absolute; inset: 0; background: linear-gradient(#2a7d47, #17532e 60%, #0f3d22); }
.sc-green::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .05) 0 16px, transparent 16px 32px);
}
.cup {
  position: absolute; left: 50%; top: 22%; width: 26px; height: 10px; margin-left: -13px;
  border-radius: 50%; background: #07160d; box-shadow: 0 0 0 2px rgba(255, 255, 255, .14);
}
.flag { position: absolute; left: 50%; top: 22%; width: 2px; height: 62px; margin: -62px 0 0 -1px; background: #f5f2ea; }
.flag::after {
  content: ""; position: absolute; top: 0; left: 2px; width: 26px; height: 17px;
  background: #e0192b; animation: flutter 2.6s ease-in-out infinite; transform-origin: left center;
}
@keyframes flutter { 0%, 100% { transform: skewY(0deg) scaleX(1); } 50% { transform: skewY(-7deg) scaleX(.86); } }
.golfball {
  position: absolute; left: 50%; bottom: 16%; width: 15px; height: 15px; margin-left: -7.5px;
  border-radius: 50%; background: radial-gradient(circle at 34% 30%, #fff, #c8c8c2);
  animation: putt 7s cubic-bezier(.3, .1, .5, 1) infinite;
}
/* Curves as it travels, because a straight line would contradict the one thing
   the page says about this game: that the green breaks. */
@keyframes putt {
  0%, 10% { transform: translate(0, 0) scale(1); opacity: 1; }
  55% { transform: translate(16px, -118px) scale(.82); }
  76% { transform: translate(0, -196px) scale(.62); opacity: 1; }
  82%, 88% { transform: translate(0, -190px) scale(.3); opacity: 0; }
  96%, 100% { transform: translate(0, 0) scale(1); opacity: 1; }
}

/* glider */
.sc-dusk { position: absolute; inset: 0; background: linear-gradient(#101a4d, #3c2a6b 55%, #7b3d74); }
.squirrel {
  position: absolute; left: 26%; top: 44%; font-size: 30px; line-height: 1;
  animation: glide 4.4s ease-in-out infinite;
}
@keyframes glide {
  0%, 100% { transform: translateY(0) rotate(-7deg); }
  50% { transform: translateY(-40px) rotate(9deg); }
}
.acorn {
  position: absolute; font-size: 15px; right: -12%;
  animation: sweep 4.6s linear infinite;
}
@keyframes sweep { from { transform: translateX(0); } to { transform: translateX(-340px); } }
.treeline {
  position: absolute; left: -10%; right: -10%; bottom: 0; height: 26%;
  background:
    radial-gradient(22px 30px at 12% 100%, #10371f 98%, transparent),
    radial-gradient(26px 36px at 34% 100%, #0d2c19 98%, transparent),
    radial-gradient(20px 26px at 56% 100%, #10371f 98%, transparent),
    radial-gradient(28px 40px at 78% 100%, #0d2c19 98%, transparent),
    radial-gradient(22px 30px at 96% 100%, #10371f 98%, transparent);
  animation: sweep-slow 9s linear infinite;
}
@keyframes sweep-slow { from { transform: translateX(0); } to { transform: translateX(-22%); } }

/* ---------- game showcase ---------- */
.showcase { display: grid; gap: 34px; grid-template-columns: 1fr 1fr; align-items: center; margin-bottom: 22px; }
.showcase.flip > .art { order: -1; }
@media (max-width: 820px) { .showcase, .showcase.flip > .art { grid-template-columns: 1fr; order: 0; } }
.showcase .art {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 26px 60px rgba(0, 0, 0, .4);
}
.showcase h2 { margin-bottom: .4rem; }
.showcase .tag {
  display: inline-block; font-size: .74rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255, 255, 255, .62); margin-bottom: 12px;
}

/* ---------- numbers ---------- */
.numbers { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.numbers .n { text-align: center; }
.numbers .n b {
  display: block; font-family: Fredoka, sans-serif; font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1;
  background: linear-gradient(135deg, #fff, var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.numbers .n span { font-size: .9rem; color: rgba(255, 255, 255, .68); }

/* ---------- card lift ---------- */
.card { transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 201, 74, .45);
  box-shadow: 0 22px 44px rgba(0, 0, 0, .38);
}
.card .glyph { transition: transform .25s ease; }
.card:hover .glyph { transform: scale(1.12) rotate(-6deg); }

/* ---------- kill switch ---------- */
/* One block, deliberately last, so nothing above can outlive it. `!important`
   because several of these are set on elements that also carry inline or
   staggered delays. */
@media (prefers-reduced-motion: reduce) {
  .aurora::before, .aurora::after, .phone, .balloon, .crosshair, .golfball,
  .flag::after, .squirrel, .acorn, .treeline, .scene, .headline span, .hero-fade {
    animation: none !important;
  }
  .card, .card .glyph { transition: none !important; }
  .reveal { animation: none !important; opacity: 1 !important; transform: none !important; }
  .headline span, .hero-fade { opacity: 1 !important; transform: none !important; }
  /* With the crossfade off, one scene has to stay visible rather than all
     three stacking at full opacity. */
  .scene { opacity: 0 !important; }
  .scene:nth-of-type(1) { opacity: 1 !important; }
}
