/* AtoZWIN landing page.
   Colours are the theme tokens from atozwin.com (names in comments). */

:root {
  --void: #030c07;       /* --ui-bg */
  --felt: #071a11;       /* --ui-bg-elevated */
  --moss: #0c2419;       /* --ui-bg-accented */
  --line: #1a3d2d;       /* neutral-800 */
  --volt: #4bfb05;       /* --theme-gradient (Register button) */
  --volt-ink: #0b1e15;   /* --theme-primary-fg */
  --volt-deep: #238a00;  /* pressed volt */
  --mist: #cdddd4;       /* neutral-200: body text */
  --sage: #6b9d84;       /* neutral-400: secondary text */
  --white: #fff;

  --font-display: "Anton", Impact, "Arial Narrow", sans-serif;
  --font-body: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --gutter: clamp(16px, 5vw, 40px);
  --pad-l: max(var(--gutter), env(safe-area-inset-left, 0px));
  --pad-r: max(var(--gutter), env(safe-area-inset-right, 0px));
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --radius: 12px;        /* --ui-radius */
  --ease-out: cubic-bezier(.2, .8, .2, 1);
}

/* ---------- Base ---------- */

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

html {
  background: var(--void);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 280px;
  background: var(--void);
  color: var(--mist);
  font: 400 16px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
@supports (overflow: clip) { body { overflow-x: clip; } }

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--volt); outline-offset: 3px; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { flex: none; width: 1.1em; height: 1.1em; }
.volt { color: var(--volt); }

/* ---------- Type ---------- */

.display {
  margin: 14px 0 0;
  font: 400 clamp(38px, 11vw, 76px)/.92 var(--font-display);
  letter-spacing: .005em;
  text-transform: uppercase;
  color: var(--white);
  transform: skewX(-6deg);
}
.display .volt { display: block; }

.tag {
  display: inline-block;
  margin: 0;
  padding: 7px 11px 6px;
  border-radius: 8px;
  background: var(--volt);
  color: var(--volt-ink);
  font: 700 12px/1 var(--font-body);
  letter-spacing: .08em;
  text-transform: uppercase;
  transform: rotate(-3deg);
  box-shadow: 0 3px 0 var(--volt-deep);
}
.tag--dark {
  background: var(--moss);
  color: var(--volt);
  box-shadow: inset 0 0 0 1px var(--line), 0 3px 0 #010603;
}

.fineprint {
  margin: 12px 0 0;
  font: 500 11.5px/1.4 var(--font-mono);
  letter-spacing: .04em;
  color: var(--sage);
}

/* ---------- Buttons ---------- */

.btn {
  --depth: 5px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45em;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--radius);
  font: 700 16px/1 var(--font-body);
  letter-spacing: -.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform .12s ease, box-shadow .12s ease, filter .2s ease;
}
.btn--volt {
  color: var(--volt-ink);
  background: var(--volt);
  box-shadow: 0 var(--depth) 0 var(--volt-deep), 0 12px 28px -10px rgba(75, 251, 5, .5);
}
.btn--volt:hover { filter: brightness(1.07); }
.btn--volt:active {
  transform: translateY(calc(var(--depth) - 1px));
  box-shadow: 0 1px 0 var(--volt-deep), 0 6px 16px -10px rgba(75, 251, 5, .5);
}
.btn--sm { --depth: 3px; min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn--xl {
  --depth: 6px;
  width: 100%;
  min-height: 60px;
  padding: 0 24px;
  border-radius: 16px;
  font: 400 clamp(21px, 6.2vw, 25px)/1 var(--font-display);
  letter-spacing: .035em;
  text-transform: uppercase;
}
.btn--xl .i { width: .9em; height: .9em; }

/* ---------- Top bar ---------- */

.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(var(--safe-top) + 12px) var(--pad-r) 0 var(--pad-l);
}
.topbar__logo { display: block; width: clamp(112px, 34vw, 168px); }
.topbar__logo img { width: 100%; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--safe-top) + 70px) var(--pad-r) clamp(24px, 5svh, 48px) var(--pad-l);
  overflow: hidden;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 560px;
  margin: clamp(12px, 2.6svh, 28px) auto 0;
  text-align: center;
}
.hero__title { font-size: clamp(38px, min(11.5vw, 7svh), 76px); }
.hero__sub {
  max-width: 38ch;
  margin: 14px auto 0;
  font-size: clamp(15px, 4.1vw, 17px);
  line-height: 1.45;
  color: var(--mist);
  text-wrap: balance;
}
.hero__cta { width: 100%; max-width: 420px; margin-top: clamp(16px, 2.8svh, 28px); }

.proof {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  margin: clamp(14px, 2.4svh, 22px) 0 0;
  padding: 0;
  font: 600 12.5px/1 var(--font-body);
  color: var(--mist);
}
.proof li { display: inline-flex; align-items: center; gap: 7px; }
.proof .i { width: 15px; height: 15px; color: var(--volt); }
.proof__coins { display: inline-flex; }
.proof__coins svg { width: 17px; height: 17px; border-radius: 50%; box-shadow: 0 0 0 2px var(--void); }
.proof__coins svg + svg { margin-left: -5px; }

/* ---------- Game gallery: 3D ring ---------- */

.hero__gallery { width: 100%; }
.ring {
  --tile-w: clamp(128px, 38vw, 200px);
  position: relative;
  height: calc(var(--tile-w) * 1.72);
}
/* Fade the ring out toward the screen edges */
.ring::before,
.ring::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: 16%;
  pointer-events: none;
}
.ring::before { left: calc(var(--pad-l) * -1); background: linear-gradient(90deg, var(--void) 20%, transparent); }
.ring::after { right: calc(var(--pad-r) * -1); background: linear-gradient(270deg, var(--void) 20%, transparent); }
.ring__stage {
  position: absolute;
  inset: 0 calc(var(--pad-r) * -1) 0 calc(var(--pad-l) * -1);
  perspective: calc(var(--tile-w) * 5.2);
  perspective-origin: 50% 30%;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.ring__stage.is-dragging { cursor: grabbing; }
.ring__track {
  position: absolute;
  top: 47%;
  left: 50%;
  width: var(--tile-w);
  aspect-ratio: 3 / 4;
  margin-left: calc(var(--tile-w) / -2);
  transform-style: preserve-3d;
  transform: translate3d(0, -50%, calc(var(--r, 380px) * -1)) rotateX(-7deg);
}
.ring__item {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: 16px;
  overflow: hidden;
  background: var(--felt);
  box-shadow: 0 0 0 1px rgba(75, 251, 5, .22), 0 18px 36px -18px rgba(0, 0, 0, .9);
  transform: rotateY(calc(var(--i, 0) * var(--step, 30deg))) translateZ(var(--r, 380px));
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-drag: none;
}
.ring__item img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.ring__hint {
  margin: 4px 0 0;
  text-align: center;
  font: 500 11px/1 var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--sage);
}

/* ---------- Sections ---------- */

.section {
  position: relative;
  padding: clamp(64px, 14vw, 120px) var(--pad-r) clamp(64px, 14vw, 120px) var(--pad-l);
  /* 3D reveals project wider than the screen; without this, mobile browsers widen the
     layout viewport to fit them and the page wobbles sideways. */
  overflow: hidden;
}
@supports (overflow: clip) { .section { overflow: clip; } }
.section::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--pad-l);
  right: var(--pad-r);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}
.section__head { max-width: 680px; margin: 0 auto clamp(28px, 6vw, 48px); text-align: center; }
.section__sub { max-width: 38ch; margin: 14px auto 0; color: var(--sage); }

/* ---------- VIP ladder ---------- */

.ladder {
  position: relative;
  list-style: none;
  display: grid;
  gap: 10px;
  max-width: 560px;
  margin: 0 auto;
  padding: 0;
}
/* The rail the badges climb */
.ladder::before {
  content: "";
  position: absolute;
  top: 44px;
  bottom: 44px;
  left: 43px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(75, 251, 5, .12), var(--volt));
}
.rung {
  position: relative;
  display: grid;
  grid-template-columns: 88px 1fr;
  align-items: center;
  gap: 14px;
}
.rung__badge {
  width: 88px;
  height: 88px;
  object-fit: contain;
  filter: drop-shadow(0 12px 14px rgba(0, 0, 0, .6));
  animation: badge-float 5.5s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * -1.1s);
}
@keyframes badge-float {
  0%, 100% { transform: perspective(500px) rotateY(-22deg) translateY(0); }
  50% { transform: perspective(500px) rotateY(22deg) translateY(-5px); }
}
.rung__body {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--felt);
  box-shadow: inset 0 0 0 1px var(--line);
}
.rung__top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; }
.rung__name {
  margin: 0;
  font: 400 26px/1 var(--font-display);
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--tier, var(--white));
}
.rung__req {
  margin: 0;
  font: 600 11.5px/1 var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--sage);
}
.rung__perk { margin: 8px 0 0; font-size: 14px; line-height: 1.35; color: var(--mist); }
.rung__perk b { color: var(--white); }
.rung--bronze { --tier: #e3a582; }
.rung--silver { --tier: #dbe3ea; }
.rung--gold { --tier: #ffd45c; }
.rung--platinum { --tier: #a9eeff; }
.rung--diamond { --tier: #95b4ff; }
.rung--diamond .rung__body { box-shadow: inset 0 0 0 1px rgba(75, 251, 5, .5); }

/* ---------- Closing CTA ---------- */

.final__card {
  max-width: 560px;
  margin: 0 auto;
  padding: clamp(28px, 7vw, 44px) clamp(18px, 5vw, 40px) clamp(22px, 5vw, 32px);
  border-radius: 28px;
  text-align: center;
  background: var(--felt);
  box-shadow: inset 0 0 0 1px var(--line);
}
.final__card .display { margin-top: 12px; }
.final__sub { max-width: 34ch; margin: 12px auto 24px; color: var(--mist); text-wrap: balance; }

.coin { width: 84px; height: 84px; margin: 0 auto; perspective: 600px; }
.coin__spin {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: coin-spin 7s linear infinite;
}
.coin__spin img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.coin__spin img + img { transform: rotateY(180deg); }
@keyframes coin-spin { to { transform: rotateY(360deg); } }

/* ---------- Footer ---------- */

.footer {
  padding: 48px var(--pad-r) calc(112px + var(--safe-bottom)) var(--pad-l);
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 13.5px;
  color: var(--sage);
}
.footer__logo { width: 140px; margin: 0 auto 22px; }
.social { list-style: none; display: flex; justify-content: center; gap: 10px; margin: 0 0 24px; padding: 0; }
.social a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--moss);
  color: var(--mist);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: color .2s ease, background .2s ease;
}
.social a:hover { background: var(--volt); color: var(--volt-ink); }
.social svg { width: 20px; height: 20px; }
.footer__rg {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 44ch;
  margin: 0 auto 16px;
  text-align: left;
  color: var(--mist);
}
.age {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 2px solid var(--volt);
  border-radius: 50%;
  color: var(--volt);
  font: 700 12px/1 var(--font-body);
}
.footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin: 0 0 16px; }
.footer__links a { color: var(--mist); text-decoration: none; }
.footer__links a:hover { color: var(--volt); text-decoration: underline; }
.footer__copy { margin: 0; font: 500 11.5px/1.4 var(--font-mono); letter-spacing: .06em; }

/* ---------- Sticky bar ---------- */

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px var(--pad-r) calc(10px + var(--safe-bottom)) var(--pad-l);
  background: rgba(3, 12, 7, .9);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 -1px 0 var(--line);
  transform: translateY(110%);
  visibility: hidden;
  transition: transform .4s var(--ease-out), visibility 0s linear .4s;
}
.dock.is-on { transform: none; visibility: visible; transition: transform .4s var(--ease-out), visibility 0s; }
.dock__logo { flex: 0 1 auto; width: clamp(92px, 30vw, 132px); min-width: 0; }
.dock .btn { flex: none; }

/* ---------- Scroll reveal (enabled by main.js) ---------- */

[data-reveal] {
  transform-origin: 50% 0;
  transition: opacity .7s var(--ease-out), transform .9s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.reveal-ready [data-reveal]:not(.is-in) {
  opacity: 0;
  transform: perspective(1000px) translateY(32px) rotateX(14deg);
}

/* ---------- Responsive ---------- */

/* Short phones (iPhone SE, small Androids): smaller gallery so the button stays above the fold */
@media (max-height: 700px) and (orientation: portrait) {
  .hero { padding-top: calc(var(--safe-top) + 62px); }
  .ring { --tile-w: clamp(96px, 18svh, 140px); }
  .hero__copy { margin-top: 10px; }
  .hero__title { font-size: clamp(30px, min(10.5vw, 6svh), 48px); }
  .hero__sub { margin-top: 10px; font-size: 14.5px; }
}

@media (max-width: 340px) {
  .topbar .btn--sm { padding: 0 12px; font-size: 14px; }
  .proof { gap: 8px 12px; font-size: 11.5px; }
}

@media (min-width: 760px) {
  .dock {
    left: 50%;
    right: auto;
    bottom: calc(16px + var(--safe-bottom));
    width: min(520px, calc(100% - 32px));
    padding: 10px 10px 10px 20px;
    border-radius: 18px;
    box-shadow: inset 0 0 0 1px var(--line), 0 20px 50px -10px rgba(0, 0, 0, .8);
    transform: translate(-50%, calc(100% + 40px));
  }
  .dock.is-on { transform: translate(-50%, 0); }
}

/* Phones held sideways: gallery beside the copy */
@media (orientation: landscape) and (max-height: 540px) {
  .hero {
    flex-direction: row;
    align-items: center;
    gap: clamp(16px, 4vw, 48px);
    padding-top: calc(var(--safe-top) + 60px);
    padding-bottom: 16px;
  }
  .hero__gallery { flex: 1 1 52%; min-width: 0; }
  .hero__copy { flex: 1 1 48%; align-items: flex-start; margin: 0; text-align: left; }
  .ring { --tile-w: clamp(84px, 30svh, 140px); overflow: hidden; }
  .ring::before { left: 0; }
  .ring::after { right: 0; }
  .ring__stage { inset: 0; }
  .hero__title { font-size: clamp(28px, 9svh, 52px); }
  .hero__sub { margin: 10px 0 0; font-size: 14px; }
  .hero__cta { max-width: 340px; margin-top: 14px; }
  .btn--xl { min-height: 52px; }
  .proof { justify-content: flex-start; gap: 8px 12px; margin-top: 12px; font-size: 11.5px; }
}

@media (min-width: 960px) and (min-height: 541px) {
  .topbar { padding-top: calc(var(--safe-top) + 20px); }
  .hero { padding-top: calc(var(--safe-top) + 84px); }
  .ring { --tile-w: clamp(130px, min(14vw, 22svh), 210px); }
  .hero__copy { max-width: 720px; }
  .hero__title { font-size: clamp(44px, min(5.2vw, 8svh), 78px); }
  .hero__sub { max-width: 54ch; }

  .ladder { grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end; gap: 14px; max-width: 1120px; }
  .ladder::before { display: none; }
  /* Each tier stands a step higher than the last */
  .rung { grid-template-columns: 1fr; justify-items: center; gap: 8px; margin-bottom: calc(var(--i, 0) * 30px); text-align: center; }
  .rung__badge { width: 120px; height: 120px; }
  .rung__body { width: 100%; }
  .rung__top { flex-direction: column; align-items: center; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
  }
  .reveal-ready [data-reveal]:not(.is-in) { opacity: 1; transform: none; }
}
