@font-face {
  font-family: "Geist";
  src: url("./assets/fonts/Geist-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Geist";
  src: url("./assets/fonts/Geist-SemiBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  --bg: #000000;
  --bg-2: #0b0b0b;
  --text: #ffffff;
  --text-mid: rgba(255,255,255,0.72);
  --text-soft: rgba(255,255,255,0.48);
  --line: rgba(255,255,255,0.12);
  --line-mid: rgba(255,255,255,0.22);
  --white-glow: rgba(255,255,255,0.28);
  --radius-sm: 12px;
  --radius-lg: 24px;
  --radius-pill: 999px;
}

/* ─── RESET ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: "Geist", Inter, system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
  overflow-x: hidden;
}

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

.container {
  width: min(1120px, 90%);
  margin-inline: auto;
}

/* ─── NAV — floating pill ─────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  /* No full-width bar — just the pill itself */
  width: auto;
  pointer-events: none; /* let clicks pass through the invisible surround */
}

.nav-inner {
  pointer-events: all;
  display: inline-flex;
  align-items: center;
  gap: 24px;
  padding: 10px 24px 10px 10px;
  border-radius: 999px;
  background: rgba(18,18,18,0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.13);
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.nav-inner:hover {
  background: rgba(28,28,28,0.85);
  box-shadow: 0 10px 40px rgba(0,0,0,0.55);
  transform: translateY(-1px);
}

.nav-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  flex-shrink: 0;
  display: block;
}

.nav-brand {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.nav-divider {
  width: 1px;
  height: 22px;
  background: rgba(255,255,255,0.2);
  flex-shrink: 0;
}

.nav-badge {
  height: 32px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.nav-brand { display: none; }

/* Keep brand accessible for footer — separate selector */
.brand {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

/* ─── BUTTONS ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  border-radius: var(--radius-pill);
  font-weight: 650;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn:hover  { transform: translateY(-2px); }
.btn:active { transform: translateY(0); opacity: 0.88; }

.btn-primary {
  background: #ffffff;
  color: #000000;
  box-shadow:
    0 0 18px var(--white-glow),
    0 4px 16px rgba(0,0,0,0.35);
}

.btn-primary:hover {
  box-shadow:
    0 0 26px var(--white-glow),
    0 6px 22px rgba(0,0,0,0.40);
}

.btn-sm { height: 38px; padding: 0 18px; font-size: 0.88rem; }
.btn-lg { height: 56px; padding: 0 30px; font-size: 1.05rem; }

/* ─── HERO ───────────────────────────────────────────────────────────────── */
.hero {
  /* Extra top padding so content clears the floating nav pill */
  padding-top: 96px;
  padding-bottom: 80px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 64px;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-brand {
  margin: 0 0 16px;
  font-size: clamp(2.6rem, 6vw, 5.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-soft);
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.9rem, 3.8vw, 3.2rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

.hero-sub {
  margin: 14px 0 0;
  font-size: 1rem;
  color: var(--text-mid);
  line-height: 1.5;
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Right side: rotating photo */
.hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.hero-rotator {
  width: min(340px, 100%);
  /* Height locked by JS to tallest image — fallback until load */
  min-height: 400px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.hero-img {
  /* Natural dimensions — never stretched to fill container */
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  border-radius: 0;
  display: block;
  box-shadow: none;
  transform: rotate(2deg);
  transition:
    opacity 0.65s ease,
    transform 0.65s cubic-bezier(0.34,1.2,0.64,1);
}

.hero-img.fading {
  opacity: 0;
  transform: rotate(0deg) scale(0.97);
}

.hero-img {
  cursor: pointer;
}

.rotator-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
}

.rotator-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.28);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
  flex-shrink: 0;
}

.rotator-dot.active {
  background: #ffffff;
  transform: scale(1.25);
}

.rotator-dot:hover:not(.active) {
  background: rgba(255,255,255,0.55);
}

/* ─── STORY SECTIONS ─────────────────────────────────────────────────────── */
.stories {
  border-top: 1px solid var(--line);
}

.story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 72px;
  padding-top: 96px;
  padding-bottom: 96px;
  border-bottom: 1px solid var(--line);
}

.story-flip .story-video { order: 2; }
.story-flip .story-text  { order: 1; }

.story-video {
  display: flex;
  justify-content: center;
}

.story-video video {
  width: 100%;
  max-width: 300px;
  border-radius: 20px;
  display: block;
  /* No border or shadow — black bg makes it float naturally */
  opacity: 0;
  transition: opacity 0.5s ease;
}

.story-video video.visible {
  opacity: 1;
}

.story-label {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-soft);
}

.story-text h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.story-text p {
  margin: 16px 0 0;
  color: var(--text-mid);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 400px;
}

.story-cta .story-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* ─── DEVELOPMENT LAB ────────────────────────────────────────────────────── */
.devlab {
  padding: 100px 0;
  border-top: 1px solid var(--line);
}

.devlab-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 72px;
}

.devlab-text h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.devlab-text p {
  margin: 16px 0 0;
  color: var(--text-mid);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 400px;
}

.devlab-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.devlab-player {
  width: 100%;
  max-width: 300px;
  /* Grid stacks both videos in the same cell — both stay in flow,
     container height is always driven by whichever video is visible */
  display: grid;
}

.devlab-video {
  grid-area: 1 / 1;
  width: 100%;
  display: block;
  border-radius: 0;
  cursor: pointer;
  transition: opacity 0.35s ease;
}

.dv-a {
  opacity: 1;
  z-index: 1;
}

.dv-b {
  opacity: 0;
  z-index: 2;
}

.devlab-video.visible {
  opacity: 1;
}

.devlab-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
}

/* ─── FLOATING SHOWCASE ──────────────────────────────────────────────────── */
.showcase {
  overflow: visible;
  padding: 44px 0 80px;
}

.showcase-fan {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  padding: 0 18px;
  overflow: visible;
}

.fan-card {
  width: clamp(120px, 17vw, 220px);
  border-radius: 20px;
  box-shadow:
    0 18px 44px rgba(0,0,0,0.52),
    0 1px 0 rgba(255,255,255,0.06) inset;
  border: 1px solid rgba(255,255,255,0.07);
  cursor: pointer;
  transform-origin: center center;
  transition:
    transform 0.38s cubic-bezier(0.34,1.36,0.64,1),
    box-shadow 0.3s ease,
    filter 0.3s ease;
  position: relative;
  margin: 0 -14px;
  z-index: 1;
  filter: saturate(0.96);
  will-change: transform;
}

.fc1 { transform: rotate(-14deg) translateY(52px); z-index: 1; }
.fc2 { transform: rotate(-6deg)  translateY(22px); z-index: 2; }
.fc3 { transform: rotate(0deg)   translateY(0px);  z-index: 3; }
.fc4 { transform: rotate(6deg)   translateY(22px); z-index: 2; }
.fc5 { transform: rotate(14deg)  translateY(52px); z-index: 1; }

.fan-card:hover {
  transform: translateY(-20px) scale(1.16) !important;
  z-index: 20 !important;
  box-shadow:
    0 0 34px rgba(255,255,255,0.26),
    0 28px 70px rgba(0,0,0,0.55),
    0 0 0 1.5px rgba(255,255,255,0.35);
  filter: saturate(1.08);
}

/* ─── FOOTER ─────────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--line);
  padding: 20px 0 28px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 20px;
}

.footer .brand { font-size: 1.05rem; }

.footer-links {
  display: flex;
  gap: 18px;
}

.footer-links a {
  color: var(--text-mid);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--text); }

.footer p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.88rem;
}

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero-text { align-items: center; }

  .hero-visual { order: -1; }

  .hero-rotator {
    width: min(260px, 70vw);
  }

  .story {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-top: 64px;
    padding-bottom: 64px;
  }

  /* Text first, video second on mobile for all story sections */
  .story .story-text        { order: 1; }
  .story .story-video       { order: 2; }
  .story-flip .story-text   { order: 1; }
  .story-flip .story-video  { order: 2; }

  .story-video video {
    max-width: min(280px, 72vw);
  }

  .devlab-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .devlab-text  { order: 1; }
  .devlab-stage { order: 2; }

  .devlab-text p { max-width: 100%; }

  .devlab-player { max-width: min(280px, 72vw); }

  .story-cta .story-text {
    align-items: center;
    text-align: center;
  }

  .story-text p { max-width: 100%; }

  .showcase {
    padding-top: 30px;
    padding-bottom: 70px;
  }

  .showcase-fan { gap: 0; }

  .fan-card {
    width: clamp(105px, 17vw, 160px);
    margin: 0 -10px;
  }

  .fc1 { transform: rotate(-12deg) translateY(40px); }
  .fc5 { transform: rotate(12deg)  translateY(40px); }
  .fc2 { transform: rotate(-5deg)  translateY(18px); }
  .fc4 { transform: rotate(5deg)   translateY(18px); }

  .fan-card:hover {
    transform: translateY(-12px) scale(1.1) !important;
  }
}

@media (max-width: 540px) {
  .hero {
    padding-top: 88px;
    padding-bottom: 48px;
  }

  /* Nav pill — shrink badge so it stays inside the pill on small screens */
  .nav-badge {
    height: 22px;
  }

  .nav-icon {
    width: 34px;
    height: 34px;
  }

  .nav-inner {
    gap: 14px;
    padding: 8px 16px 8px 8px;
  }

  .story {
    padding-top: 48px;
    padding-bottom: 48px;
    gap: 28px;
  }

  .story-video video {
    max-width: min(240px, 80vw);
  }

  .showcase {
    padding-top: 24px;
    padding-bottom: 56px;
  }

  .showcase-fan {
    gap: 0;
    overflow: hidden;
    padding: 20px 0 10px;
  }

  /* All 5 cards — small and tightly overlapped to fit the phone width */
  .fan-card {
    width: min(82px, 21vw);
    margin: 0 -16px;
  }

  .fc1 { display: block; transform: rotate(-12deg) translateY(36px); }
  .fc2 { transform: rotate(-6deg) translateY(16px); }
  .fc3 { transform: rotate(0deg)  translateY(0); }
  .fc4 { transform: rotate(6deg)  translateY(16px); }
  .fc5 { display: block; transform: rotate(12deg) translateY(36px); }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* Touch devices: tap to bring card forward */
@media (hover: none) {
  .fan-card.fan-active {
    transform: translateY(-16px) scale(1.1) !important;
    z-index: 20 !important;
    box-shadow:
      0 0 28px rgba(255,255,255,0.22),
      0 20px 50px rgba(0,0,0,0.55),
      0 0 0 1.5px rgba(255,255,255,0.3) !important;
    filter: saturate(1.08) !important;
  }
}

/* Touch devices: disable hover-based fan interaction (avoids double-tap) */
@media (hover: none) {
  .fan-card:hover {
    transform: inherit !important;
    box-shadow:
      0 18px 44px rgba(0,0,0,0.52),
      0 1px 0 rgba(255,255,255,0.06) inset !important;
    filter: saturate(0.96) !important;
  }

  .fc1:hover { transform: rotate(-14deg) translateY(52px) !important; }
  .fc2:hover { transform: rotate(-6deg)  translateY(22px) !important; }
  .fc3:hover { transform: rotate(0deg)   translateY(0px)  !important; }
  .fc4:hover { transform: rotate(6deg)   translateY(22px) !important; }
  .fc5:hover { transform: rotate(14deg)  translateY(52px) !important; }
}
