/* ============================================================
   Tryvex — Intelligence Designed To Evolve (video landing)
   ============================================================ */

@font-face {
  font-family: "Geist Pixel Circle";
  src: url("fonts/GeistPixel-Circle.woff2") format("woff2");
  font-weight: 400;
  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;

  --trust-size: clamp(36px, 4.5vw, 42px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

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;
}

img {
  max-width: 100%;
  display: block;
}

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

/* ---------------- 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,
.hero,
.stats {
  position: relative;
  z-index: 1;
  width: 100%;
}

.header {
  flex-shrink: 0;
}

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

.stats {
  flex-shrink: 0;
}

/* ---------------- Shared entrance animation ---------------- */

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

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

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

@keyframes revealPulse {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.98);
    filter: blur(6px);
  }
  70% {
    opacity: 1;
    transform: translateY(0) scale(1.03);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.header[data-slidedown] {
  will-change: opacity, transform;
  animation-name: slideDown;
  animation-duration: 0.7s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  animation-fill-mode: both;
}

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

@media (prefers-reduced-motion: reduce) {
  .anim,
  .header[data-slidedown],
  .headline .line {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    will-change: auto !important;
  }
}

/* ================= HEADER ================= */

.header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 2.8vw, 28px);
  max-width: 720px;
  margin: 0 auto;
}

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

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

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

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

.nav-link {
  position: relative;
  flex: 1;
  text-align: center;
  text-decoration: none;
  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: 8px 6px;
  border-radius: 999px;
  white-space: nowrap;
  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: inline-flex;
  align-items: center;
  height: clamp(44px, 5.2vw, 48px);
  padding: 0 clamp(16px, 2vw, 20px);
  background: var(--pill-dark);
  color: var(--sign-in-text);
  text-decoration: none;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(13px, 1.4vw, 15px);
  border-radius: 999px;
  box-shadow: var(--nav-shadow);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.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);
  border: none;
  cursor: pointer;
  position: relative;
  box-shadow: var(--nav-shadow);
  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.25s ease, opacity 0.25s ease, background 0.25s ease;
}

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

.burger span:nth-child(2) {
  transform: translate(-50%, -50%);
}

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

body.menu-open .burger {
  background: #fff;
}

body.menu-open .burger span {
  background: #111;
}

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

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

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

/* ================= HERO ================= */

/* --- Trust row --- */

.trust {
  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;
  position: relative;
  transition: transform 0.35s ease;
}

.avatar-inner {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #fff;
  color: #111;
  font-size: calc(var(--trust-size) * 0.34);
}

.a1 {
  z-index: 1;
}

.a2 {
  z-index: 2;
  margin-left: calc(var(--trust-size) * -0.42);
}

.a3 {
  z-index: 4;
  margin-left: calc(var(--trust-size) * -0.42);
}

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

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

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

.trust-pill {
  height: var(--trust-size);
  display: inline-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: clamp(14px, 1.8vw, 18px);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(12px, 1.4vw, 13.5px);
  color: var(--trust-text);
  white-space: nowrap;
  z-index: 3;
}

/* --- Headline --- */

.headline {
  font-family: var(--font-display);
  font-weight: 400;
  color: #ffffff;
  font-size: clamp(28px, 6.2vw, 80px);
  letter-spacing: -0.04em;
  line-height: 1.12;
  margin: 0;
}

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

.headline .line {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px);
  will-change: opacity, transform;
  animation: headlineFade 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

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

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

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

/* --- Subhead --- */

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

/* --- CTA --- */

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: clamp(20px, 3vh, 32px);
  background: #fff;
  color: #000;
  text-decoration: none;
  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;
}

.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.42),
    0 0 60px rgba(255, 255, 255, 0.18);
}

/* ================= STATS FOOTER ================= */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(12px, 2vw, 24px);
  max-width: 920px;
  margin: 0 auto;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  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;
  font-weight: 500;
}

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

/* ================= MOBILE MENU ================= */

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

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10;
  animation: overlayIn 0.28s ease forwards;
}

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

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

@keyframes menuIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

.menu-link {
  position: relative;
  text-align: center;
  text-decoration: none;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 15px;
  color: var(--nav-text);
  opacity: 0;
  padding: 12px 10px;
  border-radius: 14px;
  animation: linkIn 0.35s ease forwards;
}

.menu-link:nth-child(1) {
  animation-delay: 0.05s;
}
.menu-link:nth-child(2) {
  animation-delay: 0.1s;
}
.menu-link:nth-child(3) {
  animation-delay: 0.15s;
}
.menu-link:nth-child(4) {
  animation-delay: 0.2s;
}

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

.menu-link.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;
}

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

.menu-signin {
  margin-top: 8px;
  text-align: center;
  text-decoration: none;
  background: var(--pill-dark);
  color: var(--sign-in-text);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 15px;
  padding: 13px 10px;
  border-radius: 999px;
  opacity: 0;
  animation: linkIn 0.35s ease forwards;
  animation-delay: 0.25s;
}

/* ================= RESPONSIVE ================= */

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

  .header {
    justify-content: space-between;
    max-width: none;
  }

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

  .burger {
    display: block;
  }

  .headline {
    letter-spacing: -0.08em;
    line-height: 1.05;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
    row-gap: clamp(18px, 3vh, 28px);
  }
}

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

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

  .headline {
    letter-spacing: -0.09em;
    line-height: 1.04;
  }
}

@media (max-height: 700px) {
  .hero {
    gap: 0;
  }

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

  .subhead {
    margin-top: clamp(10px, 1.4vh, 16px);
  }

  .cta {
    margin-top: clamp(14px, 2vh, 22px);
  }
}
