/* ──────────────────────────────────────────────────────────────
   EndoRevolution — homepage
   Shares the visual language of the email/coming-soon page:
   black canvas, blurred bg video, thin type, low-opacity grays.
   ────────────────────────────────────────────────────────────── */

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

:root {
  --bg: #000;
  --fg: #fff;
  --muted: rgba(255, 255, 255, 0.45);
  --faint: rgba(255, 255, 255, 0.2);
  --line: rgba(255, 255, 255, 0.12);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Lock scroll while the mobile menu is open */
body.menu-open {
  overflow: hidden;
}

/* ── Background video (same treatment as the email page) ── */
.video-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse at center, #15233a 0%, #060a14 70%, #000 100%);
}

.video-bg video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  min-width: 112%;
  min-height: 112%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  filter: blur(18px) brightness(0.4);
}

.video-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

/* ── Shell ── */
.shell {
  position: relative;
  z-index: 1;
}

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.wordmark {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--fg);
  text-decoration: none;
  white-space: nowrap;
}

/* ── Top navigation ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.5rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid var(--line);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav__links a {
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.nav__links a:hover {
  color: var(--fg);
}

.nav__cta {
  padding: 0.5rem 1rem;
  border: 1px solid var(--faint);
  border-radius: 999px;
  color: var(--fg) !important;
  transition: border-color 0.2s, background 0.2s;
}

.nav__cta:hover {
  border-color: var(--fg);
  background: rgba(255, 255, 255, 0.06);
}

/* ── Hamburger button (morphs into an X) ── */
.burger {
  display: none;
  position: relative;
  width: 30px;
  height: 22px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 60;
}

.burger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform 0.4s var(--ease), opacity 0.25s ease;
}

.burger span:nth-child(1) { top: 2px; }
.burger span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.burger span:nth-child(3) { bottom: 2px; }

.burger.is-open span:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}
.burger.is-open span:nth-child(2) {
  opacity: 0;
  transform: translateY(-50%) scaleX(0.2);
}
.burger.is-open span:nth-child(3) {
  bottom: auto;
  top: 50%;
  transform: translateY(-50%) rotate(-45deg);
}

/* ── Full-screen overlay menu (mobile) ── */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  background: rgba(4, 8, 16, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transform: scale(1.04);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease), visibility 0.45s;
}

.overlay.is-open {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.overlay a {
  font-size: 1.6rem;
  font-weight: 200;
  letter-spacing: 0.01em;
  color: var(--fg);
  text-decoration: none;
  opacity: 0;
  transform: translateY(14px);
}

.overlay.is-open a {
  animation: menuItem 0.5s var(--ease) forwards;
}

/* Stagger each link in */
.overlay.is-open a:nth-child(1) { animation-delay: 0.10s; }
.overlay.is-open a:nth-child(2) { animation-delay: 0.16s; }
.overlay.is-open a:nth-child(3) { animation-delay: 0.22s; }
.overlay.is-open a:nth-child(4) { animation-delay: 0.28s; }

.overlay__cta {
  margin-top: 0.5rem;
  padding: 0.7rem 1.6rem;
  border: 1px solid var(--faint);
  border-radius: 999px;
  font-size: 1.05rem !important;
}

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

/* ── Hero ── */
.hero {
  min-height: calc(100dvh - 60px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 0 5rem;
  animation: appear 1.4s var(--ease) both;
}

.eyebrow {
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 6.5vw, 5rem);
  font-weight: 200;
  letter-spacing: -0.02em;
  line-height: 1.08;
  max-width: 14ch;
}

.hero p {
  margin-top: 1.5rem;
  font-size: clamp(0.9rem, 1.6vw, 1.05rem);
  font-weight: 300;
  line-height: 1.7;
  color: var(--muted);
  max-width: 44ch;
}

.btn {
  display: inline-block;
  margin-top: 2.25rem;
  padding: 0.85rem 1.9rem;
  border: 1px solid var(--faint);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg);
  text-decoration: none;
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
}

.btn:hover {
  border-color: var(--fg);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}

/* ── Generic content sections ── */
.section {
  padding: 5.5rem 0;
  border-top: 1px solid var(--line);
}

.section__label {
  font-size: 0.66rem;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.section h2 {
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  font-weight: 200;
  letter-spacing: -0.01em;
  line-height: 1.15;
  max-width: 18ch;
}

.section p {
  margin-top: 1.25rem;
  font-size: clamp(0.92rem, 1.5vw, 1.05rem);
  font-weight: 300;
  line-height: 1.75;
  color: var(--muted);
  max-width: 56ch;
}

/* ── Two-column feature grid ── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.card__n {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: var(--faint);
}

.card h3 {
  margin-top: 0.85rem;
  font-size: 1.15rem;
  font-weight: 300;
  letter-spacing: 0;
}

.card p {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--muted);
  max-width: none;
}

/* ── Stats strip ── */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
  text-align: center;
}

.stat__num {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 200;
  letter-spacing: -0.03em;
}

.stat__label {
  margin-top: 0.6rem;
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* ── Closing CTA ── */
.cta {
  text-align: center;
  padding: 6rem 0;
}

.cta h2 {
  margin: 0 auto;
}

/* ── Footer ── */
.footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--faint);
}

/* ── Animations ── */
@keyframes appear {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ── Mobile: swap inline links for the hamburger ── */
@media (max-width: 760px) {
  .nav__links { display: none; }
  .burger { display: block; }
  .stats { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* ── Respect reduced-motion preferences ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
