/* Access-code homepage: one navy screen, spinning headline at the upper third,
   code box beneath it, purchase link at the foot; purchase section below the fold. */
:root {
  --navy: #1c2a45;
  --navy-deep: #16223a;
  --cyan: #2eb1df;
  --cyan-soft: #8fd3f0;
  --white: #ffffff;
  --muted: #a9b8d1;
  --line: rgba(255, 255, 255, 0.16);
  --err: #ffb3b8;
  --ok: #8fe3b0;
  --f-sans: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; background: var(--navy); }
body { margin: 0; background: var(--navy); color: var(--white); font-family: var(--f-sans); font-size: 17px; line-height: 1.55; }
a { color: var(--cyan); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Gate screen ---------- */
.gate { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; padding: 28px 20px 32px; text-align: center; }
.gate-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; font-weight: 700; font-size: 15px; letter-spacing: .02em; }
.gate-brand svg { width: 38px; height: auto; display: block; }
.gate-spacer-top { flex: 1 1 0; min-height: 40px; }
.gate-spacer-bottom { flex: 2 1 0; min-height: 56px; }

/* 3D spinning headline */
.spin-stage { perspective: 1100px; perspective-origin: 50% 40%; width: 100%; display: flex; justify-content: center; }
.spin { position: relative; display: grid; transform-style: preserve-3d; animation: spin 9s cubic-bezier(.65, 0, .35, 1) infinite; will-change: transform; }
.side { grid-area: 1 / 1; display: grid; transform-style: preserve-3d; width: min(92vw, 980px); }
.side.back { transform: rotateY(180deg); }
.layer {
  grid-area: 1 / 1;
  font-weight: 700;
  font-size: clamp(38px, 10vw, 82px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-wrap: balance;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(calc(var(--z) * 1px));
  color: var(--c);
  user-select: none;
}
.layer.face { color: var(--white); text-shadow: 0 0 1px rgba(255, 255, 255, .35); }
@keyframes spin {
  0%, 22%   { transform: rotateY(0deg); }
  50%, 72%  { transform: rotateY(180deg); }
  100%      { transform: rotateY(360deg); }
}

/* Code box */
.code-form { margin-top: clamp(36px, 6vh, 56px); display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.code-label { font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--cyan-soft); }
.code-box { display: flex; align-items: center; width: min(100%, 320px); height: 54px; border: 1.5px solid var(--line); background: rgba(255, 255, 255, .05); border-radius: 12px; padding: 4px 4px 4px 16px; transition: border-color .2s, background .2s; }
.code-box:focus-within { border-color: var(--cyan); background: rgba(255, 255, 255, .08); }
.code-box.bad { border-color: var(--err); animation: shake .35s ease; }
.code-box.ok { border-color: var(--ok); }
.code-box input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--white); font: 600 17px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; outline: none; }
.code-box input::placeholder { color: var(--muted); font-family: var(--f-sans); font-weight: 500; letter-spacing: .04em; text-transform: none; }
.code-box button { flex: none; width: 44px; height: 44px; border: 0; border-radius: 9px; background: var(--cyan); color: var(--navy); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.code-box button:hover { background: #57c3ea; }
.code-box button svg { width: 20px; height: 20px; }
.code-msg { min-height: 1.4em; font-size: 14.5px; margin: 2px 0 0; color: var(--muted); }
.code-msg.err { color: var(--err); }
.code-msg.ok { color: var(--ok); }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }

/* Purchase prompt */
.buy-prompt { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.buy-prompt p { margin: 0; color: var(--muted); font-size: 16px; }
.buy-prompt p a { color: var(--cyan); font-weight: 700; text-decoration: none; }
.buy-prompt p a:hover { text-decoration: underline; text-underline-offset: 3px; }
.buy-icon { width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid rgba(46, 177, 223, .55); color: var(--cyan); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; animation: bob 2.4s ease-in-out infinite; }
.buy-icon:hover { background: rgba(46, 177, 223, .12); border-color: var(--cyan); }
.buy-icon svg { width: 22px; height: 22px; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* ---------- Purchase section ---------- */
.purchase { background: var(--navy-deep); border-top: 1px solid rgba(255, 255, 255, .08); padding: 88px 20px 72px; }
.purchase-inner { max-width: 760px; margin: 0 auto; text-align: center; }
.eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--cyan); margin: 0 0 12px; }
.purchase h2 { font-size: clamp(30px, 4.5vw, 44px); line-height: 1.1; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
.purchase .lede { color: var(--muted); margin: 14px auto 0; max-width: 34em; }
.plan { margin: 40px auto 0; max-width: 460px; text-align: left; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .04); border-radius: 16px; padding: 30px; }
.plan-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.plan h3 { margin: 0; font-size: 22px; }
.plan .price { font-size: 15px; color: var(--cyan-soft); font-weight: 600; }
.plan ul { list-style: none; padding: 0; margin: 20px 0 26px; display: grid; gap: 12px; }
.plan li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; color: #d6deec; }
.plan li svg { width: 20px; height: 20px; color: var(--cyan); margin-top: 2px; }
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 12px 22px; border-radius: 10px; font-weight: 700; font-size: 16px; text-decoration: none; background: var(--cyan); color: var(--navy); }
.btn:hover { background: #57c3ea; color: var(--navy); }
.plan .small { margin: 14px 0 0; font-size: 14px; color: var(--muted); text-align: center; }
.plan .small a { color: var(--cyan-soft); }
.back-up { display: inline-block; margin-top: 28px; color: var(--cyan-soft); font-weight: 600; text-decoration: none; }
.back-up:hover { text-decoration: underline; text-underline-offset: 3px; }

.gate-footer { background: var(--navy-deep); padding: 0 20px 36px; }
.gate-footer p { max-width: 760px; margin: 0 auto; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 13px; color: #8e9cb6; text-align: center; line-height: 1.6; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .spin { animation: none; transform: rotateY(-14deg); }
  .buy-icon, .code-box.bad { animation: none; }
}
