:root {
  --bg: #050a1c;
  --bg-2: #0a1330;
  --line: rgba(140, 170, 255, 0.14);
  --text: #e8edff;
  --muted: #8d9bc4;
  --blue: #4c8dff;
  --blue-2: #8ab4ff;
  --gold: #ffd23f;
  --grad: linear-gradient(100deg, #4c8dff 0%, #8ab4ff 55%, #c9d8ff 100%);
  --grad-eu: linear-gradient(100deg, #4c8dff 0%, #8ab4ff 45%, #ffd23f 100%);
  --radius: 20px;
  --max: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(16px, 4vw, 40px);
  background: linear-gradient(var(--bg), rgba(5, 10, 28, 0));
}
.brand { font-family: "Inter Tight", Inter, sans-serif; font-weight: 600; letter-spacing: -0.02em; font-size: 18px; }
.nav-links { display: flex; gap: 28px; align-items: center; font-size: 14px; color: var(--muted); }
.nav-links a:hover { color: var(--text); }
@media (max-width: 640px) { .nav-links a:not(.btn) { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 46px; padding: 0 22px; border-radius: 999px; border: 0;
  background: var(--blue); color: #fff; font: 500 15px Inter, sans-serif;
  cursor: pointer; transition: background .2s, transform .2s;
}
.btn:hover { background: #6a9fff; }
.btn-small { height: 36px; padding: 0 16px; font-size: 14px; color: #fff !important; }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { background: rgba(140, 170, 255, 0.08); }

/* ---------- Scroll sequence ---------- */
.scrolly { position: relative; height: 230vh; }
.stage {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  overflow: hidden; display: grid; place-items: center;
}
.glow { position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none; }
.glow-a { width: 60vmax; height: 60vmax; left: 50%; top: 55%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(60, 110, 255, 0.28), transparent 65%); }
.glow-b { width: min(700px, 110vw); height: 170%; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255, 210, 63, 0.09), transparent);
  opacity: var(--gold-glow, 0); }

/* separator between hero and logos */
.divider { position: relative; height: clamp(240px, 38vh, 380px); }
.stars { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.star {
  position: absolute; left: 0; top: 0; will-change: transform, opacity;
}
.star i {
  display: block; width: 100%; height: 100%;
  background: var(--text);
  clip-path: polygon(50% 0%, 61.8% 35.4%, 97.6% 34.5%, 68.6% 57.3%, 79.4% 91.5%, 50% 70.5%, 20.6% 91.5%, 31.4% 57.3%, 2.4% 34.5%, 38.2% 35.4%);
  filter: drop-shadow(0 0 6px rgba(255, 210, 63, 0.6));
}
/* .stars.formed .star i { animation: twinkle 3.2s ease-in-out infinite; animation-delay: var(--tw, 0s); }
 @keyframes twinkle { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .55; transform: scale(.85); } }
*/
.hero { position: relative; z-index: 2; text-align: center; padding: 0 16px; max-width: 980px; }
.eyebrow { color: var(--blue-2); font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 20px; }
.headline {
  font-family: "Inter Tight", Inter, sans-serif; font-weight: 600;
  font-size: clamp(40px, 10vw, 136px); line-height: 1.02; letter-spacing: -0.045em;
}
.dash { color: var(--text); }

/* rotating block */
.flip {
  position: relative; display: inline-block; vertical-align: top;
  height: 1.02em; perspective: 4em;
}
.flip-size { display: none; }
.cube {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transform-origin: 50% 50% -0.51em;
  transform: rotateX(var(--rot, 0deg));
}
.face {
  position: absolute; inset: 0; text-align: center; white-space: nowrap;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.face-bottom {
  background-image: var(--grad-eu);
  transform-origin: 50% 0;
  transform: translateY(1.02em) rotateX(-90deg);
}

.sub { color: var(--muted); font-size: clamp(16px, 1.6vw, 19px); line-height: 1.6; max-width: 640px; margin: 28px auto 36px; text-wrap: balance; }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.scroll-hint {
  position: absolute; bottom: 32px; left: 50%; translate: -50% 0;
  width: 24px; height: 38px; border: 1.5px solid var(--line); border-radius: 12px;
  opacity: var(--hint, 1);
}
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--blue-2); animation: hint 1.8s ease-in-out infinite; }
@keyframes hint { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- Content sections ---------- */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(72px, 12vw, 140px) clamp(16px, 4vw, 40px); }
h2 { font-family: "Inter Tight", Inter, sans-serif; font-weight: 600; font-size: clamp(32px, 4.4vw, 52px); line-height: 1.1; letter-spacing: -0.03em; max-width: 720px; }
h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.lead { color: var(--muted); font-size: 18px; line-height: 1.6; max-width: 600px; margin-top: 18px; }
.muted { color: var(--muted); }
.small { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }

.logos { text-align: center; padding-top: 24px; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.logo-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: clamp(40px, 8vw, 96px); margin-top: 28px; }
/* partner logos are single-colour SVGs (fill = currentColor) */
.logo { color: #7583ad; display: block; transition: color .2s; }
.logo:hover { color: var(--text); }
.logo svg { display: block; height: 100%; width: auto; }
.logo-wide { height: 24px; }
.logo-square { height: 78px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 56px; }
.card {
  padding: 32px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(20, 34, 80, 0.55), rgba(10, 19, 48, 0.35));
  border: 1px solid var(--line);
}
.card p { color: var(--muted); line-height: 1.6; font-size: 15px; }
.icon { width: 40px; height: 40px; border-radius: 12px; margin-bottom: 24px; background: var(--grad); opacity: .85; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.checks { list-style: none; margin-top: 28px; display: grid; gap: 14px; }
.checks li { padding-left: 30px; position: relative; color: var(--text); }
.checks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 12px rgba(76, 141, 255, .6); }
.visual {
  aspect-ratio: 4 / 3; border-radius: var(--radius); border: 1px dashed var(--line);
  display: grid; place-items: center; color: #4d5a82;
  background: radial-gradient(circle at 50% 40%, rgba(76, 141, 255, .18), transparent 70%);
}

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; text-align: center; padding-top: 40px; }
@media (max-width: 640px) { .stats { grid-template-columns: 1fr; } }
.stats strong { display: block; font-family: "Inter Tight", Inter, sans-serif; font-size: clamp(40px, 6vw, 64px); font-weight: 600; letter-spacing: -0.03em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats span { color: var(--muted); font-size: 15px; }

.access { text-align: center; }
.access h2, .access .lead { margin-left: auto; margin-right: auto; }
.signup { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 36px; }
.signup input {
  height: 46px; width: min(340px, 100%); padding: 0 20px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(20, 34, 80, .4); color: var(--text); font: 15px Inter, sans-serif; outline: none;
}
.signup input:focus { border-color: var(--blue); }
.signup .thanks { display: none; width: 100%; color: var(--blue-2); margin-top: 8px; }
.signup.done input, .signup.done button { display: none; }
.signup.done .thanks { display: block; }

.footer {
  max-width: var(--max); margin: 0 auto; padding: 32px clamp(16px, 4vw, 40px) 48px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 14px;
}
.footer nav { display: flex; gap: 24px; }
.footer a:hover { color: var(--text); }

/* ---------- "Regulations" trigger ---------- */
.reg-link {
  position: relative; font: inherit; color: var(--text); background: none; border: 0; padding: 0; cursor: pointer;
  background-image: linear-gradient(var(--blue-2), var(--blue-2));
  background-size: 100% 1px; background-position: 0 100%; background-repeat: no-repeat;
  transition: color .2s, background-size .2s;
}
.reg-link:hover, .reg-link:focus-visible {
  color: transparent; outline: none;
  background-image: var(--grad), var(--grad);
  background-size: 100% 100%, 100% 2px;
  -webkit-background-clip: text, border-box; background-clip: text, border-box;
}
.reg-link::after { /* small tooltip */
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 10px); translate: -50% 4px;
  white-space: nowrap; font-size: 12px; letter-spacing: .02em; color: var(--text);
  background: #13204a; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px;
  opacity: 0; pointer-events: none; transition: opacity .2s, translate .2s;
  -webkit-text-fill-color: var(--text);
}
.reg-link:hover::after, .reg-link:focus-visible::after { opacity: 1; translate: -50% 0; }

/* ---------- Regulations scroll (dialog) ---------- */
body:has(.scroll[open]) { overflow: hidden; }
.scroll {
  margin: auto; padding: 0; border: 0; background: none; color: var(--text);
  width: min(760px, calc(100vw - 32px)); max-height: none; overflow: visible;
}
.scroll::backdrop { background: rgba(3, 6, 18, 0.7); backdrop-filter: blur(6px); opacity: 0; transition: opacity .4s; }
.scroll.open::backdrop { opacity: 1; }

.rod { /* the wooden rollers, in the site's blue */
  position: relative; height: 22px; margin: 0 -14px; border-radius: 11px; z-index: 1;
  background: linear-gradient(180deg, #8ab4ff 0%, #4c8dff 45%, #2a56c4 100%);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45), 0 0 24px rgba(76, 141, 255, .35);
}
.rod::before, .rod::after { /* end knobs */
  content: ""; position: absolute; top: -5px; width: 18px; height: 32px; border-radius: 9px;
  background: linear-gradient(180deg, #c9d8ff, #4c8dff 60%, #2a56c4);
}
.rod::before { left: -12px; } .rod::after { right: -12px; }

.paper-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .9s cubic-bezier(.65, 0, .25, 1); }
.scroll.open .paper-wrap { grid-template-rows: 1fr; }
.paper {
  overflow: hidden; min-height: 0;
  background: linear-gradient(180deg, #0f1c45 0%, #0a1330 50%, #0f1c45 100%);
  border-left: 1px solid var(--line); border-right: 1px solid var(--line);
  box-shadow: inset 0 14px 18px -12px rgba(0, 0, 0, .6), inset 0 -14px 18px -12px rgba(0, 0, 0, .6);
}
.paper-inner {
  position: relative; max-height: calc(100svh - 140px); overflow-y: auto; overscroll-behavior: contain;
  padding: 36px clamp(20px, 5vw, 48px) 32px;
  scrollbar-width: thin; scrollbar-color: #2a56c4 transparent;
}
.paper-inner h2 { font-size: clamp(26px, 3.4vw, 36px); max-width: none; }
.scroll-close {
  position: sticky; top: 0; float: right; margin: -12px -16px 0 0;
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line);
  background: #13204a; color: var(--text); font-size: 22px; line-height: 1; cursor: pointer;
}
.scroll-close:hover { background: #1b2c63; }
.reg-intro { color: var(--muted); line-height: 1.6; margin: 14px 0 8px; }
.reg-group {
  margin: 34px 0 14px; font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--blue-2);
  display: flex; align-items: center; gap: 12px;
}
.reg-group::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.reg { padding: 18px 0; border-bottom: 1px solid var(--line); }
.reg:last-of-type { border-bottom: 0; }
.reg header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 8px; }
.reg h4 { font-size: 17px; font-weight: 600; }
.reg .ref { font-size: 13px; color: var(--muted); }
.reg p { color: #b4c0e4; font-size: 15px; line-height: 1.6; }
.dates { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.dates li { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(76, 141, 255, .12); border: 1px solid rgba(76, 141, 255, .25); color: var(--blue-2); }
.reg-note { margin-top: 28px; font-size: 12px; line-height: 1.6; color: var(--muted); }

/* content fades in once unrolled */
.paper-inner > * { opacity: 0; transition: opacity .4s; }
.scroll.open .paper-inner > * { opacity: 1; transition-delay: .45s; }

@media (prefers-reduced-motion: reduce) {
  .paper-wrap, .paper-inner > *, .scroll::backdrop { transition: none; }
}

/* ---------- Platform demo ---------- */
.demo-frame { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.demo-frame iframe { display: block; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.demo-fallback { padding: 48px 24px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }
.demo-fallback a { color: var(--blue-2); }
