@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap");

@font-face {
  font-family: "BubbledotICG-FinePos";
  src: url("fonts/BubbledotICG-FinePos.woff2") format("woff2"),
       url("fonts/BubbledotICG-FinePos.woff") format("woff"),
       url("fonts/BubbledotICG-FinePos.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #000000;
  --text: #ffffff;
  --muted: #8e8e8e;
  --nav-text: #2e2e2e;
  --pill-dark: #28282a;
  --sign-in-text: #c8c8c8;
  --nav-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  --trust-bg: #28282a;
  --trust-border: rgba(255, 255, 255, 0.4);
  --trust-text: #c4c2c3;
  --font-sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-display: "BubbledotICG-FinePos", monospace;
  --trust-size: clamp(32px, 3.4vw, 38px);
}

* { box-sizing: border-box; }

html { background: #000; scroll-behavior: smooth; }

body {
  margin: 0;
  background: #000;
  color: var(--text);
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input { font: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

a { color: inherit; text-decoration: none; }

/* ── Page shell ─────────────────────────────────────────── */

.page {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  padding: clamp(12px, 1.8vh, 22px) clamp(14px, 3vw, 32px);
  overflow: hidden;
}

/* ── Background video ───────────────────────────────────── */

.bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #000;
  z-index: 0;
}

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: 0;
}

.video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.28);
  z-index: 1;
  pointer-events: none;
}

/* ── Z-index layers ─────────────────────────────────────── */

.header, .hero, .stats { position: relative; z-index: 2; }
.mobile-overlay, .mobile-menu { display: none; }

/* ── Header ─────────────────────────────────────────────── */

.header {
  flex: 0 0 auto;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(16px, 2.4vw, 26px);
  margin-bottom: clamp(14px, 2.4vh, 28px);
  animation: slideDown .7s cubic-bezier(.22,1,.36,1) both;
}

.logo {
  width: clamp(40px, 4.4vw, 46px);
  height: clamp(40px, 4.4vw, 46px);
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: #fff;
  border-radius: 50%;
  box-shadow: var(--nav-shadow);
  transition: transform .25s ease;
}

.logo:hover { transform: scale(1.04); }

.logo img {
  width: 72%;
  height: 72%;
  object-fit: contain;
  display: block;
}

/* ── Nav pill ───────────────────────────────────────────── */

.nav-pill {
  height: clamp(44px, 5.2vw, 48px);
  max-width: 430px;
  flex: 1;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 2px;
  background: #fff;
  border-radius: 999px;
  box-shadow: var(--nav-shadow);
}

.nav-link {
  position: relative;
  height: 100%;
  min-width: 0;
  padding: 0 clamp(8px, 1.3vw, 13px);
  display: grid;
  place-items: center;
  color: var(--nav-text);
  font-size: clamp(13px, 1.4vw, 15px);
  font-weight: 500;
  letter-spacing: -.01em;
  opacity: .5;
  transition: opacity .2s ease;
}

.nav-link:hover { opacity: .75; }
.nav-link.active { opacity: 1; }

.nav-link.active::after,
.mobile-link.active::after {
  content: "";
  position: absolute;
  width: 3px;
  height: 3px;
  bottom: 5px;
  left: 50%;
  border-radius: 50%;
  background: #000;
  box-shadow: -5px 0 #000, 5px 0 #000;
}

/* ── Sign-in / Join button ──────────────────────────────── */

.sign-in {
  height: clamp(44px, 5.2vw, 48px);
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 0 clamp(16px, 2vw, 21px);
  background: var(--pill-dark);
  color: var(--sign-in-text);
  border-radius: 999px;
  box-shadow: var(--nav-shadow);
  font-size: clamp(13px, 1.4vw, 14px);
  font-weight: 500;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.sign-in:hover {
  background: #323234;
  color: #fff;
  transform: translateY(-1px);
}

.burger { display: none; }

/* ── Hero ───────────────────────────────────────────────── */

.hero {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0;
}

/* ── Trust row ──────────────────────────────────────────── */

.trust-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: clamp(14px, 2vh, 22px);
}

.avatars { display: flex; align-items: center; }

.avatar {
  position: relative;
  width: var(--trust-size);
  height: var(--trust-size);
  padding: 3.5px;
  display: grid;
  place-items: center;
  background: var(--trust-bg);
  border: 1px solid var(--trust-border);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: transform .25s ease;
}

.avatar + .avatar { margin-left: calc(var(--trust-size) * -.34); }
.avatar.a1 { z-index: 4; }
.avatar.a2 { z-index: 3; }
.avatar.a3 { z-index: 2; }

.avatar-inner {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: #111;
}

.avatar-inner i { font-size: calc(var(--trust-size) * .42); }

.a1:hover { transform: translateY(-2px); }
.a2:hover { transform: translateY(-3px); }
.a3:hover { transform: translateY(-2px); }

.trust-pill {
  position: relative;
  z-index: 1;
  height: var(--trust-size);
  margin-left: calc(var(--trust-size) * -.38);
  padding-left: calc(var(--trust-size) * .6);
  padding-right: calc(var(--trust-size) * .55);
  display: flex;
  align-items: center;
  background: var(--trust-bg);
  border: 1px solid var(--trust-border);
  border-radius: 999px;
  color: var(--trust-text);
  font-size: clamp(12px, 1.25vw, 13.5px);
  font-weight: 500;
  white-space: nowrap;
}

/* ── Headline ───────────────────────────────────────────── */

.headline {
  margin: 0;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(30px, 4.4vw, 56px);
  font-weight: 400;
  letter-spacing: -.025em;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
}

.headline span {
  display: block;
  opacity: 0;
  transform: translateY(14px);
  animation: headlineFade .85s cubic-bezier(.22,1,.36,1) forwards;
}

.headline span:nth-child(1) { animation-delay: .12s; }
.headline span:nth-child(2) { animation-delay: .30s; margin-top: clamp(4px, 0.8vh, 8px); }

/* ── Reveal animation ───────────────────────────────────── */

.anim {
  opacity: 0;
  transform: translateY(22px) scale(.98);
  filter: blur(6px);
  animation: reveal .85s cubic-bezier(.22,1,.36,1) var(--d,0s) forwards;
}

/* ── Subhead ────────────────────────────────────────────── */

.subhead {
  max-width: min(620px, 92%);
  margin: clamp(12px, 1.8vh, 18px) auto 0;
  color: #d4d4d6;
  opacity: .88;
  font-size: clamp(13.5px, 1.35vw, 16px);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: -.01em;
}

/* ── Waitlist form ──────────────────────────────────────── */

.waitlist-form {
  width: min(540px, 94%);
  margin: clamp(18px, 2.8vh, 28px) auto 0;
}

.email-wrap {
  width: 100%;
  display: flex;
  gap: 7px;
  padding: 5px;
  background: rgba(22,22,22,.78);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.05),
    0 0 28px rgba(0,0,0,.35);
  backdrop-filter: blur(12px);
}

.email-wrap input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  padding: 10px 16px;
  font-size: 14px;
}

.email-wrap input::placeholder { color: #a5a5a5; }

.email-wrap button {
  flex: 0 0 auto;
  border: 0;
  padding: 11px clamp(17px, 2.5vw, 25px);
  border-radius: 999px;
  background: #fff;
  color: #000;
  cursor: pointer;
  font-size: clamp(13.5px, 1.5vw, 14.5px);
  font-weight: 600;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.15),
    0 0 22px rgba(255,255,255,.32),
    0 0 44px rgba(255,255,255,.12);
  transition: transform .2s ease, box-shadow .2s ease;
}

.email-wrap button:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.2),
    0 0 28px rgba(255,255,255,.4),
    0 0 52px rgba(255,255,255,.16);
}

.email-wrap button:disabled { opacity: .65; cursor: wait; }

.form-message {
  min-height: 20px;
  margin: 9px 0 0;
  color: #fff;
  font-size: 12px;
  text-align: center;
}

/* ── Success state ──────────────────────────────────────── */

.success-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: clamp(18px, 2.8vh, 28px);
  animation: reveal .6s cubic-bezier(.22,1,.36,1) forwards;
}

.success-state[hidden] { display: none; }

.success-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  border: 1.5px solid rgba(255,255,255,.3);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
}

.success-text {
  margin: 0;
  color: #d4d4d6;
  font-size: clamp(13.5px, 1.35vw, 15px);
  line-height: 1.5;
  text-align: center;
  max-width: 380px;
}

/* ── Stats footer ───────────────────────────────────────── */

.stats {
  flex: 0 0 auto;
  width: min(880px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(14px, 3.2vw, 40px);
  padding-top: clamp(10px, 1.5vh, 18px);
}

.stat {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 3px;
}

.stat-icon {
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1;
}

.stat-num {
  color: #fff;
  font-size: clamp(24px, 3.2vw, 36px);
  line-height: 1.08;
  letter-spacing: -.025em;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.stat-label {
  color: #8e8e8e;
  font-size: clamp(11.5px, 1.25vw, 13px);
  line-height: 1.25;
  white-space: nowrap;
}

/* ── Mobile menu (hidden on desktop) ────────────────────── */

.mobile-overlay,
.mobile-menu { display: none; }

/* ── Screen-reader only ─────────────────────────────────── */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Keyframes ──────────────────────────────────────────── */

@keyframes reveal {
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@keyframes headlineFade {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes menuIn {
  from { opacity: 0; transform: translateY(-12px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes linkIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Mobile ≤ 720px ─────────────────────────────────────── */

@media (max-width: 720px) {
  body {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .page {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    padding: clamp(14px, 2.5vh, 20px) 16px clamp(16px, 3vh, 24px);
    justify-content: space-between;
    gap: 16px;
  }

  .header {
    justify-content: space-between;
    gap: 0;
    position: relative;
    z-index: 100;
  }

  .logo {
    width: 44px;
    height: 44px;
  }

  .nav-pill, .sign-in { display: none; }

  .burger {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0;
    border-radius: 50%;
    display: grid;
    place-content: center;
    gap: 4.5px;
    background: #28282a;
    cursor: pointer;
    box-shadow: var(--nav-shadow);
    position: relative;
    z-index: 101;
    transition: background .2s ease, border-color .2s ease;
  }

  .burger span {
    width: 17px;
    height: 1.5px;
    border-radius: 2px;
    background: #fff;
    transition: transform .25s ease, opacity .2s ease, background .25s ease;
  }

  body.menu-open .burger {
    background: #fff;
    border-color: #fff;
  }
  body.menu-open .burger span { background: #000; }
  body.menu-open .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  body.menu-open .burger span:nth-child(2) { opacity: 0; }
  body.menu-open .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  .mobile-overlay,
  .mobile-menu {
    display: none !important;
  }

  body.menu-open .mobile-overlay {
    display: block !important;
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: overlayIn .25s ease both;
  }

  body.menu-open .mobile-menu {
    display: flex !important;
    position: fixed;
    z-index: 95;
    top: 72px;
    left: 14px;
    right: 14px;
    flex-direction: column;
    padding: 20px 16px 18px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    color: #111;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: menuIn .32s cubic-bezier(.16, 1, .3, 1) both;
  }

  .mobile-link {
    position: relative;
    padding: 13px 10px;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    color: #1a1a1a;
    transition: color .15s ease, opacity .15s ease;
  }

  .mobile-link:hover { color: #000; }

  .mobile-link.active::after {
    bottom: 6px;
  }

  .mobile-sign-in {
    margin-top: 6px;
    padding: 12px;
    border-radius: 999px;
    background: #1a1a1c;
    color: #fff;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    transition: background .2s ease, transform .2s ease;
  }

  .mobile-sign-in:active {
    transform: scale(0.98);
    background: #000;
  }

  .mobile-link { animation: linkIn .25s ease both; }
  .mobile-link:nth-child(1) { animation-delay: .03s; }
  .mobile-link:nth-child(2) { animation-delay: .06s; }
  .mobile-link:nth-child(3) { animation-delay: .09s; }
  .mobile-link:nth-child(4) { animation-delay: .12s; }
  .mobile-sign-in { animation: linkIn .25s ease .15s both; }

  .hero {
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .headline {
    font-size: clamp(28px, 9.7vw, 65px);
    letter-spacing: -.08em;
    line-height: 1.05;
  }

  .subhead {
    max-width: 94%;
    font-size: 14px;
    line-height: 1.45;
    margin-top: 10px;
  }

  .waitlist-form {
    width: min(560px, 96%);
    margin-top: 16px;
  }

  .email-wrap {
    padding: 4px;
  }

  .email-wrap input {
    padding: 10px 12px;
    font-size: 13px;
  }

  .email-wrap button {
    padding: 11px 15px;
    font-size: 13px;
  }

  .stats {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px 12px;
    padding-bottom: 2px;
    width: 100%;
  }

  .stat {
    align-items: center;
    text-align: center;
  }
}

/* ── Small phones ≤ 540px ───────────────────────────────── */

@media (max-width: 540px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 16px;
  }
}

/* ── Tiny phones ≤ 420px ────────────────────────────────── */

@media (max-width: 420px) {
  :root { --trust-size: 34px; }

  .headline {
    font-size: clamp(27px, 10.5vw, 47px);
    letter-spacing: -.05em;
    line-height: 1.08;
  }

  .trust-pill {
    padding-right: 13px;
    font-size: 12px;
  }

  .subhead {
    font-size: 14px;
  }

  .email-wrap {
    border-radius: 22px;
  }

  .email-wrap input {
    width: 100%;
  }

  .email-wrap button {
    padding-left: 13px;
    padding-right: 13px;
  }

  .stat-icon {
    font-size: 20px;
  }

  .stat-num {
    font-size: 22px;
  }

  .stat-label {
    font-size: 11px;
  }
}

/* ── Short screens on mobile ────────────────────────────── */

@media (max-height: 700px) and (max-width: 720px) {
  .hero { padding-top: 2px; padding-bottom: 2px; }
  .trust-row { margin-bottom: 11px; }
  .subhead { margin-top: 8px; }
  .waitlist-form { margin-top: 12px; }
}

/* ── Reduced motion ─────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .anim,
  .headline span {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}
