@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);
  --font-sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-display: "BubbledotICG-FinePos", "Geist Pixel Circle", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
}

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

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

button {
  font-family: inherit;
  border: none;
  cursor: pointer;
  background: none;
  color: inherit;
}

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

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

.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
}

/* softens the hazy top band of the source video into an intentional-looking vignette */
.bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.28) 18%,
    rgba(0, 0, 0, 0) 40%
  );
  pointer-events: none;
}

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

/* ---------- HEADER ---------- */
.header {
  flex-shrink: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 2.8vw, 28px);
  max-width: 720px;
}

.logo {
  flex-shrink: 0;
  width: clamp(40px, 4.4vw, 46px);
  height: clamp(40px, 4.4vw, 46px);
  border-radius: 50%;
  /* dark disc: the logo mark is white/violet and is drawn for dark grounds */
  background: #0a0a0c;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--nav-shadow);
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.logo:hover {
  border-color: rgba(255, 255, 255, 0.4);
}

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

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

.nav-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.8vw, 22px);
  background: #fff;
  height: clamp(44px, 5.2vw, 48px);
  max-width: 430px;
  /* hug the links rather than stretching to max-width, so the spacing stays
     correct no matter how many nav items there are */
  flex: 0 1 auto;
  padding: 4px clamp(14px, 1.8vw, 20px);
  border-radius: 999px;
  box-shadow: var(--nav-shadow);
}

.nav-link {
  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);
  opacity: 0.5;
  padding: 6px 8px;
  transition: opacity 0.2s ease;
}

.nav-link:hover {
  opacity: 0.75;
}

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

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

.signin-pill {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(44px, 5.2vw, 48px);
  padding: 0 clamp(16px, 2vw, 22px);
  background: var(--pill-dark);
  color: var(--sign-in-text);
  border-radius: 999px;
  box-shadow: var(--nav-shadow);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(13px, 1.4vw, 15px);
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

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

.burger {
  display: none;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--pill-dark);
  box-shadow: var(--nav-shadow);
  position: relative;
  transition: background 0.25s ease;
}

.burger span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 1.5px;
  background: #fff;
  transform: translate(-50%, -50%);
  transition: transform 0.3s ease, background 0.3s ease, opacity 0.3s ease;
}

.burger span:nth-child(1) {
  transform: translate(-50%, calc(-50% - 6.5px));
}

.burger span:nth-child(3) {
  transform: translate(-50%, calc(-50% + 6.5px));
}

.burger.open {
  background: #fff;
}

.burger.open span {
  background: #000;
}

.burger.open span:nth-child(1) {
  transform: translate(-50%, -50%) rotate(45deg);
}

.burger.open span:nth-child(2) {
  opacity: 0;
}

.burger.open span:nth-child(3) {
  transform: translate(-50%, -50%) rotate(-45deg);
}

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

.mobile-menu {
  position: fixed;
  top: calc(clamp(16px, 2.4vh, 28px) + clamp(40px, 4.4vw, 46px) + 14px);
  left: 50%;
  transform: translateX(-50%);
  width: min(320px, calc(100vw - 32px));
  background: #fff;
  border-radius: 28px;
  padding: 22px 18px 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  z-index: 6;
  display: flex;
  flex-direction: column;
  animation: menuIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.mlink {
  position: relative;
  text-align: center;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 16px;
  color: var(--nav-text);
  padding: 12px 0;
  opacity: 0;
  animation: linkIn 0.4s ease forwards;
  animation-delay: calc(var(--i) * 0.06s);
}

.mlink.active {
  font-weight: 600;
}

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

.msignin {
  margin-top: 8px;
  text-align: center;
  background: var(--pill-dark);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  padding: 14px 0;
  border-radius: 999px;
  opacity: 0;
  animation: linkIn 0.4s ease forwards;
  animation-delay: calc(var(--i) * 0.06s);
}

body.menu-open {
  overflow: hidden;
}

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

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

.headline {
  font-family: var(--font-display);
  font-weight: 400;
  color: #fff;
  letter-spacing: -0.04em;
  line-height: 1.12;
  margin: 0 0 clamp(14px, 2.2vh, 22px);
}

.headline .line {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  font-size: clamp(48px, 15vw, 80px);
  opacity: 0;
  transform: translateY(14px);
  animation: headlineFade 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.headline .l1 {
  animation-delay: 0.12s;
}

.headline .l2 {
  animation-delay: 0.3s;
}

.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: 0 0 clamp(20px, 3vh, 30px);
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #000;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(13.5px, 1.5vw, 14.5px);
  padding: clamp(11px, 1.6vh, 13px) clamp(22px, 3vw, 28px);
  border-radius: 999px;
  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 ease, box-shadow 0.25s ease;
}

/* hero button row: primary white pill + secondary outline pill */
.cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.6vw, 14px);
  flex-wrap: wrap;
}

.cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* 1px less vertical padding than .cta so the border keeps both the same height */
  padding: calc(clamp(11px, 1.6vh, 13px) - 1px) clamp(22px, 3vw, 28px);
  background: rgba(20, 20, 22, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  color: #fff;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(13.5px, 1.5vw, 14.5px);
  white-space: nowrap;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.cta-secondary:hover {
  background: rgba(40, 40, 44, 0.8);
  border-color: #fff;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.45);
}

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

/* ---------- STATS FOOTER ---------- */
.stats {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 3vw, 32px);
  max-width: 920px;
  width: 100%;
  margin: 0 auto;
}

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

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

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

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

/* ---------- SHARED ENTRANCE ANIMATION ---------- */
.anim {
  opacity: 0;
  transform: translateY(22px) scale(0.98);
  filter: blur(6px);
  animation: reveal 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--d, 0s);
}

.header.anim {
  filter: none;
  animation: slideDown 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

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

.cta.revealPulse {
  animation-name: revealPulse;
}

@keyframes revealPulse {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.94);
    filter: blur(6px);
    box-shadow: none;
  }
  70% {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15), 0 0 34px rgba(255, 255, 255, 0.5),
      0 0 60px rgba(255, 255, 255, 0.2);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
    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);
  }
}

@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.97);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

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

@media (prefers-reduced-motion: reduce) {
  .anim,
  .header.anim,
  .headline .line,
  .cta.revealPulse,
  .mlink,
  .msignin,
  .overlay,
  .mobile-menu {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}

/* ---------- MOBILE (<=720px) ---------- */
@media (max-width: 720px) {
  .nav-pill,
  .signin-pill {
    display: none;
  }

  .header {
    /* logo removed: keep the burger pinned to the right edge */
    justify-content: flex-end;
    max-width: none;
  }

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

  .burger {
    display: block;
  }

  .headline .line {
    /* was -0.08em to cram the old long headline onto one line; the short
       "Everline / AI" wordmark only looked crushed at that tracking */
    letter-spacing: -0.04em;
    line-height: 1.05;
  }

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

@media (max-width: 420px) {
  .headline .line {
    letter-spacing: -0.045em;
    line-height: 1.04;
  }
}

@media (max-height: 700px) {
  .hero {
    justify-content: center;
  }

  .headline {
    margin-bottom: clamp(10px, 1.6vh, 16px);
  }

  .subhead {
    margin-bottom: clamp(14px, 2.2vh, 22px);
  }
}

/* very slow drift so the looping background never feels like a frozen still */
@keyframes slowZoomHome {
  from { transform: scale(1.02); }
  to   { transform: scale(1.12); }
}

.bg-video {
  animation: slowZoomHome 28s ease-in-out infinite alternate;
}

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