@font-face {
  font-family: "Geist Pixel Circle";
  src: url("fonts/GeistPixel-Circle.woff2") format("woff2");
  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", "Geist Pixel Circle", monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

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

html,
body {
  margin: 0;
  height: 100vh;
  height: 100dvh;
}

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

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

/* ---------- Background: Fosfor orb peeking over the horizon ---------- */
@property --spin {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #04050a;
  /* orb geometry, shared with main.js */
  --orb: min(max(112vw, 620px), 1180px);
  --cap: clamp(210px, 31vh, 320px);
  --face: min(var(--cap), 300px);
}

.bg-haze {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 55% at 50% 100%, rgba(70, 100, 255, 0.26), transparent 70%),
    radial-gradient(55% 45% at 22% 8%, rgba(60, 80, 220, 0.16), transparent 70%),
    radial-gradient(40% 40% at 6% 92%, rgba(200, 107, 255, 0.1), transparent 70%),
    radial-gradient(40% 40% at 96% 88%, rgba(63, 224, 208, 0.06), transparent 70%);
}

.bg-dust {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.orb {
  position: absolute;
  left: 50%;
  top: calc(100% - var(--cap));
  width: var(--orb);
  height: var(--orb);
  margin-left: calc(var(--orb) / -2);
  animation: orbRise 1.6s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

.orb::before {
  /* outer glow */
  content: "";
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(80, 110, 255, 0.3) 0%, rgba(120, 80, 255, 0.1) 38%, transparent 64%);
  transition: opacity 0.6s ease;
}

.orb-sphere {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 8%, #1a2046 0%, #0b0e22 34%, #05060f 70%);
  box-shadow:
    inset 0 0 calc(var(--face) * 0.3) rgba(110, 130, 255, 0.5),
    inset 0 0 0 1.5px rgba(160, 180, 255, 0.45),
    0 0 calc(var(--face) * 0.6) rgba(70, 100, 255, 0.35);
}

.orb-core {
  position: absolute;
  left: 50%;
  top: calc(var(--cap) * 0.34);
  width: calc(var(--face) * 2.1);
  height: calc(var(--face) * 0.7);
  border-radius: calc(var(--face) * 0.4);
  transform: translate(-50%, -50%);
  background: conic-gradient(from var(--spin) at 45% 55%, #3fa9ff, #6a5cff, #c86bff, #ff6fa8, #ff9a4d, #3fe0d0, #3fa9ff);
  filter: blur(calc(var(--face) * 0.09)) saturate(1.1);
  opacity: 0.78;
  animation: spin 14s linear infinite, breathe 6s ease-in-out infinite;
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1), height 0.7s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease;
}

.orb-warm {
  position: absolute;
  left: 50%;
  top: calc(var(--cap) * 0.34);
  width: calc(var(--face) * 2.4);
  height: calc(var(--face) * 1.2);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 40% 55%, rgba(255, 140, 90, 0.35) 0%, transparent 45%);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.orb-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, transparent 42%, rgba(5, 6, 15, 0.72) 56%);
  background-size: 7px 7px;
  transition: opacity 0.6s ease;
}

/* shade the lower part of the cap so the stats stay readable */
.orb-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent calc(var(--cap) * 0.42),
    rgba(4, 5, 12, 0.82) calc(var(--cap) * 0.78)
  );
}

.orb-eyes {
  position: absolute;
  left: 50%;
  top: calc(var(--cap) * 0.27);
  display: flex;
  gap: calc(var(--face) * 0.17);
  transform: translate(calc(-50% + var(--look-x, 0px)), calc(-50% + var(--look-y, 0px)));
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.orb-eye {
  width: calc(var(--face) * 0.075);
  height: calc(var(--face) * 0.2);
  border-radius: 999px;
  background: #fff;
  box-shadow:
    0 0 calc(var(--face) * 0.05) rgba(255, 255, 255, 0.9),
    0 0 calc(var(--face) * 0.13) rgba(150, 190, 255, 0.7);
  transform-origin: 50% 50%;
  transition: transform 0.09s ease;
}

.orb.blink .orb-eye {
  transform: scaleY(0.12);
}

.orb-spec {
  position: absolute;
  left: 22%;
  top: 1.5%;
  width: 40%;
  height: 12%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.14) 0%, transparent 70%);
  transform: rotate(-8deg);
}

/* "Answering" state while the CTA is hovered */
.orb.answering .orb-core {
  width: calc(var(--face) * 3.2);
  height: calc(var(--face) * 1.5);
  opacity: 1;
}
.orb.answering .orb-warm { opacity: 1; }
.orb.answering .orb-grid { opacity: 0.35; }

@media (max-width: 720px) {
  .bg {
    --cap: clamp(200px, 30vh, 280px);
    --face: min(var(--cap), 210px);
  }
  .orb-eyes { top: calc(var(--cap) * 0.2); }
  .orb-core { top: calc(var(--cap) * 0.24); }
  .orb-warm { top: calc(var(--cap) * 0.24); }
  .orb-shade {
    background: linear-gradient(
      to bottom,
      transparent calc(var(--cap) * 0.3),
      rgba(4, 5, 12, 0.85) calc(var(--cap) * 0.62)
    );
  }
}

@keyframes spin {
  to { --spin: 360deg; }
}

@keyframes breathe {
  0%, 100% { scale: 1; }
  50% { scale: 1.04; }
}

@keyframes orbRise {
  from {
    opacity: 0;
    transform: translateY(18%);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Keep footer stats readable over the glowing core */
.stats::before {
  content: "";
  position: absolute;
  inset: -18px -40px -40px;
  z-index: -1;
  background: radial-gradient(60% 70% at 50% 60%, rgba(4, 5, 10, 0.55), transparent 75%);
  pointer-events: none;
}

/* ---------- Page ---------- */
.page {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  padding: clamp(16px, 2.4vh, 28px) clamp(14px, 3vw, 32px);
  padding-left: max(clamp(14px, 3vw, 32px), env(safe-area-inset-left, 0px));
  padding-right: max(clamp(14px, 3vw, 32px), env(safe-area-inset-right, 0px));
}

.header,
.hero,
.stats,
.mobile-menu,
.menu-overlay {
  z-index: 1;
}

/* ---------- 1) Header ---------- */
.header {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 720px;
  gap: clamp(18px, 2.8vw, 28px);
  animation: slideDown 0.7s var(--ease) both;
}

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

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

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

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

.nav a {
  position: relative;
  padding: 6px 10px;
  font-weight: 500;
  font-size: clamp(13px, 1.4vw, 15px);
  letter-spacing: -0.01em;
  color: var(--nav-text);
  opacity: 0.5;
  white-space: nowrap;
  transition: opacity 0.25s ease;
}

.nav a:hover {
  opacity: 0.75;
}

.nav a.active {
  opacity: 1;
}

.nav a.active::after,
.mobile-menu a.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 3px;
  height: 3px;
  margin-left: -1.5px;
  border-radius: 50%;
  background: #000;
  box-shadow: -5px 0 0 #000, 5px 0 0 #000;
  transform: translateY(100%);
}

.sign-in {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  height: clamp(44px, 5.2vw, 48px);
  padding: 0 clamp(18px, 2.2vw, 24px);
  border-radius: 999px;
  background: var(--pill-dark);
  color: var(--sign-in-text);
  font-weight: 500;
  font-size: clamp(13px, 1.4vw, 15px);
  letter-spacing: -0.01em;
  box-shadow: var(--nav-shadow);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s var(--ease);
}

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

.burger {
  display: none;
}

/* ---------- 2) Hero ---------- */
.hero {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: 900px;
  min-height: 0;
}

.trust {
  --trust-size: clamp(36px, 4.5vw, 42px);
  display: inline-flex;
  align-items: center;
  margin-bottom: clamp(16px, 2.5vh, 26px);
}

.trust-avatar {
  position: relative;
  width: var(--trust-size);
  height: var(--trust-size);
  flex-shrink: 0;
  padding: 5px;
  border-radius: 50%;
  background: var(--trust-bg);
  border: 1px solid var(--trust-border);
  transition: transform 0.35s var(--ease);
}

.trust-avatar + .trust-avatar {
  margin-left: calc(var(--trust-size) * -0.42);
}

.trust-avatar.a1 { z-index: 1; }
.trust-avatar.a2 { z-index: 2; }
.trust-avatar.a3 { z-index: 4; }

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

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

.trust-inner svg {
  width: calc(var(--trust-size) * 0.34);
  height: calc(var(--trust-size) * 0.34);
  fill: currentColor;
}

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


.headline {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 6.2vw, 80px);
  line-height: 1.12;
  letter-spacing: -0.04em;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  max-width: 100%;
}

.headline.anim {
  opacity: 1;
  transform: none;
  filter: none;
  animation: none;
}

.headline span {
  display: block;
  opacity: 0;
  transform: translateY(14px);
  animation: headlineFade 0.85s var(--ease) forwards;
}

.headline span:nth-child(1) { animation-delay: 0.12s; }
.headline span:nth-child(2) { animation-delay: 0.3s; }

.subhead {
  max-width: min(500px, 92%);
  margin: clamp(14px, 2.4vh, 22px) 0 0;
  font-size: clamp(calc(13.5px + 2pt), calc(1.55vw + 2pt), calc(16.5px + 2pt));
  font-weight: 400;
  line-height: 1.55;
  color: #d0d0d0;
  text-wrap: balance;
}

.subhead.anim {
  --final-opacity: 0.8;
}

.cta {
  display: inline-flex;
  align-items: center;
  margin-top: clamp(20px, 3.4vh, 32px);
  padding: clamp(11px, 1.6vh, 13px) clamp(22px, 3vw, 28px);
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-weight: 600;
  font-size: clamp(13.5px, 1.5vw, 14.5px);
  letter-spacing: -0.01em;
  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.3s var(--ease), box-shadow 0.3s ease;
}

.cta:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.25),
    0 0 30px rgba(255, 255, 255, 0.45),
    0 0 64px rgba(255, 255, 255, 0.2);
}

.cta.anim {
  animation-name: revealPulse;
  animation-duration: 1.4s;
}

/* ---------- 3) Stats ---------- */
.stats {
  position: relative;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(12px, 2vw, 24px);
  width: 100%;
  max-width: 920px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

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

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

.stat-value {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(18px, 2.2vw, 26px);
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.stat-label {
  font-size: clamp(11px, 1.2vw, 12.5px);
  color: var(--muted);
}

/* ---------- Shared entrance ---------- */
.anim {
  opacity: 0;
  transform: translateY(22px) scale(0.98);
  filter: blur(6px);
  animation: reveal 0.85s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}

@keyframes reveal {
  to {
    opacity: var(--final-opacity, 1);
    transform: none;
    filter: blur(0);
  }
}

@keyframes revealPulse {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.98);
    filter: blur(6px);
  }
  55% {
    opacity: 1;
    transform: translateY(0) scale(1.03);
    filter: blur(0);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.3),
      0 0 34px rgba(255, 255, 255, 0.55),
      0 0 80px rgba(255, 255, 255, 0.22);
  }
  100% {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}

@keyframes headlineFade {
  to {
    opacity: 1;
    transform: none;
  }
}

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

@keyframes overlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes menuIn {
  from {
    opacity: 0;
    transform: translate(-50%, -10px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

@keyframes linkIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Mobile menu ---------- */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: overlayIn 0.28s ease both;
}

.mobile-menu {
  position: fixed;
  z-index: 2;
  top: calc(clamp(16px, 2.4vh, 28px) + 48px + 12px + env(safe-area-inset-top, 0px));
  left: 50%;
  width: min(calc(100% - 28px), 420px);
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 22px 18px 20px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  transform: translateX(-50%);
  animation: menuIn 0.38s var(--ease) both;
}

.mobile-menu a {
  position: relative;
  padding: 14px 12px 18px;
  text-align: center;
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--nav-text);
  opacity: 0;
  animation: linkIn 0.4s var(--ease) forwards;
  animation-delay: calc(0.08s + var(--i, 0) * 0.05s);
}

.mobile-menu a:not(.active):not(.menu-sign-in) {
  color: rgba(46, 46, 46, 0.55);
}

.mobile-menu a.active::after {
  bottom: 8px;
}

.mobile-menu .menu-sign-in {
  margin-top: 10px;
  padding: 15px 12px;
  border-radius: 999px;
  background: var(--pill-dark);
  color: #fff;
}

/* ---------- ≤720px ---------- */
@media (max-width: 720px) {
  .nav,
  .sign-in {
    display: none;
  }

  .header {
    justify-content: space-between;
  }

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

  .burger {
    position: relative;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--pill-dark);
    box-shadow: var(--nav-shadow);
    cursor: pointer;
    transition: background 0.25s ease;
  }

  .burger span {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 18px;
    height: 1.5px;
    margin: -0.75px 0 0 -9px;
    border-radius: 2px;
    background: #fff;
    transition: transform 0.3s var(--ease), opacity 0.2s ease, background 0.25s ease;
  }

  .burger span:nth-child(1) { transform: translateY(-6.5px); }
  .burger span:nth-child(3) { transform: translateY(6.5px); }

  .burger[aria-expanded="true"] {
    background: #fff;
  }

  .burger[aria-expanded="true"] span {
    background: #000;
  }

  .burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(0) rotate(45deg); }
  .burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(0) rotate(-45deg); }

  body.menu-open .header {
    z-index: 3;
  }

  .headline {
    letter-spacing: -0.08em;
    line-height: 1.05;
    font-size: clamp(28px, 8.4vw, 60px);
  }

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

  .stats {
    grid-template-columns: repeat(2, 1fr);
    row-gap: clamp(14px, 2.4vh, 22px);
  }
}

/* ---------- ≤420px ---------- */
@media (max-width: 420px) {
  .trust {
    --trust-size: 34px;
  }

  .headline {
    letter-spacing: -0.09em;
    line-height: 1.04;
    font-size: clamp(26px, 8.6vw, 40px);
  }
}

/* ---------- short viewports ---------- */
@media (max-height: 700px) {
  .trust {
    margin-bottom: 12px;
  }

  .subhead {
    margin-top: 10px;
    line-height: 1.45;
  }

  .cta {
    margin-top: 16px;
  }

  .stat {
    gap: 3px;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .orb {
    opacity: 1;
    transform: none;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .anim,
  .headline span,
  .mobile-menu a {
    opacity: 1;
    transform: none;
    filter: none;
  }

  .subhead.anim {
    opacity: 0.8;
  }

  .header {
    opacity: 1;
    transform: none;
  }

  .headline {
    color: #fff;
  }
}
