:root {
  --bg: #090B19;
  --ink: #F4F6FF;
  --head: #E6EEFF;
  --sub: #8FA6E6;
  --muted: #6F7FB8;
  --accent: #5EE1FF;
  --logo-blue: #5D7FE0;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Archivo', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }

.page {
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg);
  position: relative;
  overflow-x: clip;
}

/* Nav */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(16px, 3vw, 22px) clamp(20px, 5vw, 64px);
  padding-top: max(clamp(16px, 3vw, 22px), env(safe-area-inset-top));
}

.logo {
  font-weight: 900;
  font-style: italic;
  font-size: 22px;
  letter-spacing: -.03em;
  text-transform: uppercase;
  color: var(--ink);
}
.logo span { color: var(--logo-blue); }
.logo:hover { color: var(--ink); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  color: var(--bg);
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .15s ease;
}
.btn:hover { background: #E3ECFF; color: var(--bg); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Hero (pinned scroll) */
.hero {
  position: relative;
  height: 230vh;
  height: 230svh;
}

.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.glow {
  position: absolute;
  left: 50%; top: 50%;
  width: min(1000px, 110vw);
  height: min(1000px, 110vw);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(46,140,255,.26) 0%, rgba(46,140,255,.07) 40%, transparent 68%);
  pointer-events: none;
}

.tile {
  position: absolute;
  width: var(--size);
  height: var(--size);
  margin-left: calc(var(--size) / -2);
  margin-top: calc(var(--size) / -2);
  z-index: var(--z);
  will-change: transform, opacity, filter;
  pointer-events: none;
}
.tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 24px 40px rgba(0,0,0,.55));
  animation: tileFloat var(--dur) ease-in-out var(--delay) infinite;
}

@keyframes tileFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(1.5deg); }
}

.copy {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 20px;
  width: 100%;
  max-width: 900px;
}

h1 {
  margin: 0;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  font-size: clamp(40px, 7vw, 96px);
  line-height: .95;
  letter-spacing: -.035em;
  color: var(--head);
  text-wrap: balance;
  text-shadow: 0 10px 40px rgba(9,11,25,.8);
}

.sub {
  margin: clamp(14px, 2vw, 22px) 0 0;
  font-size: clamp(17px, 2.4vw, 32px);
  line-height: 1.3;
  color: var(--sub);
  text-shadow: 0 4px 20px rgba(9,11,25,.9);
}

/* Signup */
.signup {
  margin-top: clamp(28px, 4vw, 44px);
  width: min(100%, 480px);
  scroll-margin-top: 40vh;
}

.signup-form {
  position: relative;
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 12px;
  /* Frosted glass: translucent fill + blur of the glow and tiles behind it */
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(140,190,255,.14) 0%, rgba(140,190,255,0) 55%),
    linear-gradient(180deg, rgba(255,255,255,.08) 0%, rgba(255,255,255,.03) 100%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow:
    0 24px 60px -24px rgba(46,140,255,.55),
    0 2px 6px rgba(0,0,0,.25),
    inset 0 1px 0 rgba(255,255,255,.14),
    inset 0 -1px 0 rgba(255,255,255,.03);
  transition: box-shadow .25s ease;
}
/* Hairline gradient border: bright along the top, fading toward the bottom */
.signup-form::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg, rgba(255,255,255,.32), rgba(160,190,255,.10) 45%, rgba(160,190,255,.06));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
  transition: background .25s ease;
}
.signup-form:focus-within:not(.is-error) {
  box-shadow:
    0 24px 60px -20px rgba(46,140,255,.7),
    0 0 0 4px rgba(94,225,255,.10),
    0 2px 6px rgba(0,0,0,.25),
    inset 0 1px 0 rgba(255,255,255,.16),
    inset 0 -1px 0 rgba(255,255,255,.03);
}
.signup-form:focus-within:not(.is-error)::before {
  background: linear-gradient(180deg, rgba(150,230,255,.6), rgba(94,225,255,.18) 50%, rgba(94,225,255,.10));
}
.signup-form.is-error::before { background: rgba(255,92,92,.75); }

.signup-form input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--ink);
  font-family: inherit;
  font-size: 16px; /* 16px stops iOS zoom-on-focus */
  padding: 12px 14px;
}
.signup-form input::placeholder { color: #8090C4; }

.signup-form .btn {
  flex: none;
  padding: 12px 18px;
  font-size: 15px;
  border-radius: 8px;
  background: linear-gradient(180deg, #FFFFFF 0%, #E4ECFF 100%);
  box-shadow: 0 6px 18px -6px rgba(120,170,255,.6), inset 0 -1px 0 rgba(20,40,120,.12);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.signup-form .btn:hover {
  background: linear-gradient(180deg, #FFFFFF 0%, #E4ECFF 100%);
  filter: brightness(1.04);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -8px rgba(120,170,255,.75), inset 0 -1px 0 rgba(20,40,120,.12);
}
.signup-form .btn:active { transform: translateY(0); }

.signup-error { margin: 12px 0 0; font-size: 13px; color: #FF8A8A; }

/* Honeypot field: off-screen for people, still visible to naive bots */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }

.signup-form.is-loading .btn { opacity: .7; cursor: progress; }

.signup-done {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.08) 0%, rgba(255,255,255,.03) 100%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid rgba(94,225,255,.35);
  box-shadow: 0 24px 60px -24px rgba(46,140,255,.55), inset 0 1px 0 rgba(255,255,255,.14);
  font-size: 15px;
  color: var(--head);
  text-align: left;
}
.signup-done strong { overflow-wrap: anywhere; }
.check {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 14px;
}

[hidden] { display: none !important; }

.cue {
  position: absolute;
  bottom: max(28px, calc(env(safe-area-inset-bottom) + 16px));
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Phones: bigger headline relative to width, slightly smaller tiles */
@media (max-width: 719px) {
  h1 { font-size: clamp(34px, 10.5vw, 64px); }
  .tile { --size-m: calc(var(--size) * .85); width: var(--size-m); height: var(--size-m); margin-left: calc(var(--size-m) / -2); margin-top: calc(var(--size-m) / -2); }
}

/* Small phones: stack the email field and button */
@media (max-width: 360px) {
  .signup-form { flex-direction: column; }
  .signup-form input { text-align: center; }
  .signup-form .btn { width: 100%; padding: 14px 18px; }
}

/* Short landscape phones: tighten vertical rhythm */
@media (max-height: 480px) and (orientation: landscape) {
  h1 { font-size: clamp(32px, 9vh, 56px); }
  .sub { font-size: 16px; margin-top: 8px; }
  .signup { margin-top: 16px; }
  .cue { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .tile img { animation: none; }
}
