/* ============ Reset ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }

: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", "Geist Pixel Circle", monospace;
}

/* Fallback display font (primary is BubbledotICG-FinePos from CDN) */
@font-face {
  font-family: "Geist Pixel Circle";
  src: url("fonts/GeistPixel-Circle.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ============ 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;
}

/* ============ Page shell ============ */
.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  padding: clamp(16px, 2.4vh, 28px) clamp(14px, 3vw, 32px);
}

/* ============ 1) Header ============ */
.header {
  width: 100%;
  max-width: 720px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 2.8vw, 28px);
  flex-shrink: 0;
  z-index: 1;
  animation: slideDown 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.logo {
  width: clamp(40px, 4.4vw, 46px);
  height: clamp(40px, 4.4vw, 46px);
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--nav-shadow);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.logo:hover { transform: scale(1.04); }
.logo img {
  width: 72%;
  height: 72%;
  object-fit: contain;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex: 1;
  max-width: 430px;
  height: clamp(44px, 5.2vw, 48px);
  background: #fff;
  border-radius: 999px;
  padding: 4px 8px;
  box-shadow: var(--nav-shadow);
}
.nav a {
  position: relative;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(13px, 1.4vw, 15px);
  letter-spacing: -0.01em;
  color: var(--nav-text);
  text-decoration: none;
  opacity: 0.5;
  padding: 6px 4px;
  transition: opacity 0.2s;
}
.nav a:hover { opacity: 0.75; }
.nav a.active { opacity: 1; }
.nav a.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #000;
  transform: translateX(-50%);
  box-shadow: -5px 0 0 #000, 5px 0 0 #000;
}

.signin {
  height: clamp(44px, 5.2vw, 48px);
  display: flex;
  align-items: center;
  background: var(--pill-dark);
  color: var(--sign-in-text);
  border-radius: 999px;
  box-shadow: var(--nav-shadow);
  padding: 0 clamp(16px, 1.9vw, 20px);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(13px, 1.4vw, 15px);
  text-decoration: none;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.signin:hover {
  background: #323234;
  color: #fff;
  transform: translateY(-1px);
}

/* Burger (mobile only) */
.burger {
  display: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--pill-dark);
  border: 0;
  cursor: pointer;
  position: relative;
  place-items: center;
  flex-shrink: 0;
}
.burger span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 1.5px;
  background: #fff;
  transform: translate(-50%, -50%);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s, opacity 0.2s;
}
.burger span:nth-child(1) { transform: translate(-50%, -50%) translateY(-6.5px); }
.burger span:nth-child(3) { transform: translate(-50%, -50%) translateY(6.5px); }
.burger[aria-expanded="true"] { background: #fff; }
.burger[aria-expanded="true"] span { background: #111; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translate(-50%, -50%) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translate(-50%, -50%) rotate(-45deg); }

/* ============ 2) Hero ============ */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 900px;
  width: 100%;
  z-index: 1;
}

/* Trust row */
.trust {
  --trust-size: clamp(36px, 4.5vw, 42px);
  display: inline-flex;
  align-items: center;
  margin-bottom: clamp(16px, 2.5vh, 26px);
}
.avatar {
  width: var(--trust-size);
  height: var(--trust-size);
  border-radius: 50%;
  background: var(--trust-bg);
  border: 1px solid var(--trust-border);
  padding: 5px;
  display: grid;
  place-items: center;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.avatar .inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
}
.avatar i {
  color: #111;
  font-size: calc(var(--trust-size) * 0.34);
}
.avatar.a1 { z-index: 1; }
.avatar.a2 { z-index: 2; margin-left: calc(var(--trust-size) * -0.42); }
.avatar.a3 { z-index: 4; margin-left: calc(var(--trust-size) * -0.42); }
.avatar.a1:hover { transform: translateY(-2px); }
.avatar.a2:hover { transform: translateY(-4px); }
.avatar.a3:hover { transform: translateY(-2px); }

.trust-pill {
  z-index: 3;
  height: var(--trust-size);
  display: flex;
  align-items: center;
  background: var(--trust-bg);
  border: 1px solid var(--trust-border);
  border-radius: 999px;
  margin-left: calc(var(--trust-size) * -0.42);
  padding-left: calc(var(--trust-size) * 0.58);
  padding-right: 16px;
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--trust-text);
  font-size: clamp(12px, 1.4vw, 13.5px);
  white-space: nowrap;
}

/* Headline */
.headline {
  font-family: var(--font-display);
  color: #fff;
  font-size: clamp(28px, 6.2vw, 80px);
  letter-spacing: -0.04em;
  line-height: 1.12;
  white-space: nowrap;
  overflow: hidden;
  margin-bottom: clamp(14px, 2vh, 20px);
}
.headline span { display: block; opacity: 0; transform: translateY(14px); }
.headline .l1 { animation: headlineFade 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.12s forwards; }
.headline .l2 { animation: headlineFade 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards; }

/* Subhead */
.subhead {
  max-width: min(500px, 92%);
  font-size: clamp(calc(13.5px + 2pt), calc(1.55vw + 2pt), calc(16.5px + 2pt));
  color: #d0d0d0;
  opacity: 0.8;
  line-height: 1.55;
  font-weight: 400;
  margin-bottom: clamp(20px, 3vh, 30px);
}

/* CTA */
.cta {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(13.5px, 1.5vw, 14.5px);
  color: #000;
  background: #fff;
  padding: clamp(11px, 1.6vh, 13px) clamp(22px, 3vw, 28px);
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.15),
    0 0 22px rgba(255, 255, 255, 0.32),
    0 0 44px rgba(255, 255, 255, 0.12);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s;
}
.cta:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.28),
    0 0 30px rgba(255, 255, 255, 0.5),
    0 0 62px rgba(255, 255, 255, 0.22);
}

/* ============ 3) Stats footer ============ */
.stats {
  width: 100%;
  max-width: 920px;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(12px, 2vw, 28px);
  z-index: 1;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
}
.stat .icon {
  font-family: var(--font-display);
  color: #fff;
  font-size: clamp(22px, 3vw, 33px);
  line-height: 1;
}
.stat .value {
  font-family: var(--font-sans);
  color: #fff;
  font-size: clamp(18px, 2.2vw, 26px);
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}
.stat .label {
  color: var(--muted);
  font-size: clamp(11px, 1.2vw, 12.5px);
}

/* ============ Shared entrance animation ============ */
.anim {
  opacity: 0;
  animation: reveal 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--d, 0s);
}
.headline.anim { animation: none; opacity: 1; } /* parent no reveal; lines animate individually */
.cta.anim { animation-name: revealPulse; }

@keyframes reveal {
  from { opacity: 0; transform: translateY(22px) scale(0.98); filter: blur(6px); }
  to   { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
@keyframes revealPulse {
  0%   { opacity: 0; transform: translateY(22px) scale(0.98); filter: blur(6px); }
  70%  { opacity: 1; transform: translateY(-2px) scale(1.02); filter: blur(0); }
  100% { 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: translateX(-50%) translateY(-10px) scale(0.98); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes linkIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============ Mobile menu (shared) ============ */
.m-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 30;
  animation: overlayIn 0.28s ease both;
}
.m-menu {
  position: fixed;
  top: clamp(78px, 12vh, 96px);
  left: 50%;
  transform: translateX(-50%);
  width: min(420px, calc(100% - 28px));
  background: #fff;
  border-radius: 28px;
  padding: 22px 18px 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: menuIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.m-menu a {
  position: relative;
  text-align: center;
  text-decoration: none;
  color: var(--nav-text);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 16px;
  padding: 14px 10px;
  border-radius: 14px;
  opacity: 0;
  animation: linkIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.m-menu a:nth-child(1) { animation-delay: 0.06s; }
.m-menu a:nth-child(2) { animation-delay: 0.12s; }
.m-menu a:nth-child(3) { animation-delay: 0.18s; }
.m-menu a:nth-child(4) { animation-delay: 0.24s; }
.m-menu a:nth-child(5) { animation-delay: 0.30s; }
.m-menu a.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #000;
  transform: translateX(-50%);
  box-shadow: -5px 0 0 #000, 5px 0 0 #000;
}
.m-menu a.signin {
  margin-top: 6px;
  background: var(--pill-dark);
  color: #fff;
  border-radius: 999px;
  box-shadow: none;
  height: auto;
  justify-content: center;
}
.m-menu a.signin::after { content: none; }

/* ============ Responsive ============ */
@media (max-width: 720px) {
  .header { justify-content: space-between; }
  .nav { display: none; }
  .signin.desktop { display: none; }
  .logo { width: 48px; height: 48px; }
  .burger { display: grid; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: clamp(14px, 4vw, 22px); }
  .headline { letter-spacing: -0.08em; line-height: 1.05; }
}

@media (max-width: 420px) {
  .trust { --trust-size: 34px; }
  .trust-pill { font-size: 12px; }
  .headline { letter-spacing: -0.09em; line-height: 1.04; }
}

@media (max-height: 700px) {
  .trust { margin-bottom: clamp(10px, 1.6vh, 16px); }
  .subhead { margin-bottom: clamp(14px, 2vh, 20px); }
  .headline { margin-bottom: clamp(10px, 1.4vh, 14px); }
}

body.menu-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .anim,
  .headline span,
  .stat { opacity: 1 !important; transform: none !important; filter: none !important; }
  .headline { color: #fff; }
}
