/* ============================================================
   Eta Visor — Apple-style marketing site
   ============================================================ */

:root {
  --ease-apple: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.hero-title {
  font-size: clamp(4rem, 14vw, 11rem);
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, #ffffff 0%, #a8a8ad 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0;
  animation: heroFadeUp 1.2s var(--ease-apple) 0.2s forwards;
}

.hero-kicker {
  opacity: 0;
  animation: heroFadeUp 1s var(--ease-apple) 0.1s forwards;
}

.hero-tagline {
  opacity: 0;
  animation: heroFadeUp 1s var(--ease-apple) 0.6s forwards;
}

.hero-sub {
  opacity: 0;
  animation: heroFadeUp 1s var(--ease-apple) 0.8s forwards;
}

.hero-cta {
  opacity: 0;
  animation: heroFadeUp 1s var(--ease-apple) 1.0s forwards;
}

.scroll-indicator {
  opacity: 0;
  animation: heroFadeUp 1s var(--ease-apple) 1.4s forwards;
}

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

/* Accent button glow on hover */
a[href="#reserve"].bg-accent::before,
button.bg-accent::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: radial-gradient(circle at center, rgba(0,255,136,0.5), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s var(--ease-smooth);
  z-index: -1;
  filter: blur(8px);
}

a[href="#reserve"].bg-accent:hover::before,
button.bg-accent:hover::before {
  opacity: 1;
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */

.reveal,
.reveal-delay {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease-apple), transform 0.9s var(--ease-apple);
}

.reveal.is-visible,
.reveal-delay.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay {
  transition-delay: 0.15s;
}

/* ============================================================
   DRONE LOST BLINK
   ============================================================ */

.drone-blink {
  animation: blink 1.2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.drone-lost {
  animation: drift 6s ease-in-out infinite;
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-8px, -6px); }
  50% { transform: translate(6px, 4px); }
  75% { transform: translate(-4px, 8px); }
}

/* ============================================================
   STAT CARDS
   ============================================================ */

.stat-card {
  padding: 1.5rem;
  border-radius: 1.25rem;
  background: linear-gradient(145deg, #0a0a0a, #141414);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: transform 0.4s var(--ease-apple), border-color 0.4s var(--ease-apple);
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 255, 136, 0.2);
}

/* ============================================================
   DEVICE / VISOR
   ============================================================ */

.visor-container {
  transition: transform 0.6s var(--ease-apple);
}

.visor-svg {
  filter: drop-shadow(0 20px 60px rgba(0, 255, 136, 0.15));
  animation: visorFloat 6s ease-in-out infinite;
}

@keyframes visorFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-8px) rotate(1deg); }
}

.status-led {
  animation: ledPulse 2s ease-in-out infinite;
}

.imu-pulse {
  animation: imuPulse 1.4s ease-in-out infinite;
}

.nir-leds circle {
  animation: nirFlicker 3s ease-in-out infinite;
}

.nir-leds circle:nth-child(odd) {
  animation-delay: 1.5s;
}

@keyframes ledPulse {
  0%, 100% { opacity: 0.4; r: 2; }
  50% { opacity: 1; r: 3; }
}

@keyframes imuPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes nirFlicker {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.callout {
  position: relative;
}

.callout::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40px;
  height: 1px;
  background: linear-gradient(to right, rgba(255,255,255,0.2), transparent);
}

.callout.text-right::after {
  right: -50px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.2));
}

.callout:not(.text-right)::after {
  left: -50px;
}

/* ============================================================
   STORYBOARD (Horizontal scroll)
   ============================================================ */

.storyboard-scroller {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem 0 1rem;
  scrollbar-width: none;
}

.storyboard-scroller::-webkit-scrollbar {
  display: none;
}

.storyboard-track {
  display: flex;
  gap: 1.5rem;
  padding: 0 calc(50vw - 180px);
}

.story-card {
  flex: 0 0 340px;
  min-height: 380px;
  padding: 2rem;
  border-radius: 1.5rem;
  background: linear-gradient(145deg, #0f0f11, #1a1a1c);
  border: 1px solid rgba(255, 255, 255, 0.05);
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  transition: transform 0.5s var(--ease-apple), border-color 0.5s var(--ease-apple);
}

.story-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 255, 136, 0.3);
}

.story-num {
  font-size: 3rem;
  font-weight: 300;
  color: #00ff88;
  letter-spacing: -0.05em;
  line-height: 1;
  opacity: 0.9;
}

.story-title {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 1rem;
  margin-bottom: 0.75rem;
}

.story-body {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(245, 245, 247, 0.65);
  flex-grow: 1;
}

.story-vis {
  margin-top: 1.25rem;
  height: 4.5rem;
  display: flex;
  align-items: flex-end;
}

.story-bar {
  height: var(--h);
  transition: height 0.8s var(--ease-apple);
  animation: barGrow 3s ease-in-out infinite;
}

.story-bar:nth-child(even) {
  animation-delay: 0.5s;
}

@keyframes barGrow {
  0%, 100% { transform: scaleY(1); transform-origin: bottom; }
  50% { transform: scaleY(0.5); transform-origin: bottom; }
}

.dwell-ring {
  animation: dwell 2s var(--ease-apple) infinite;
  clip-path: inset(0 100% 0 0);
}

@keyframes dwell {
  0% { clip-path: inset(0 100% 0 0); }
  80% { clip-path: inset(0 0 0 0); }
  100% { clip-path: inset(0 0 0 0); opacity: 0; }
}

.storyboard-hint {
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.6;
  animation: hintPulse 2s ease-in-out infinite;
}

@keyframes hintPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.9; }
}

@media (min-width: 1280px) {
  .storyboard-track {
    padding: 0 calc(50vw - 600px);
  }
}

/* ============================================================
   METRICS TILES
   ============================================================ */

.metric-tile {
  padding: 1.25rem;
  border-radius: 1rem;
  background: linear-gradient(145deg, #0a0a0a, #141414);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: border-color 0.3s var(--ease-smooth);
}

.metric-tile:hover {
  border-color: rgba(0, 255, 136, 0.2);
}

.metric-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #86868b;
  margin-bottom: 0.5rem;
}

.metric-value {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  color: #f5f5f7;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.metric-unit {
  font-size: 0.4em;
  color: #86868b;
  margin-left: 0.25em;
  font-weight: 400;
}

.metric-spark {
  margin-top: 0.75rem;
  height: 28px;
  position: relative;
  overflow: hidden;
}

.metric-spark canvas {
  width: 100%;
  height: 100%;
}

/* ============================================================
   USE CASES
   ============================================================ */

.use-card {
  padding: 2rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.5s var(--ease-apple), border-color 0.5s var(--ease-apple);
}

.use-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 255, 136, 0.2);
}

.use-icon {
  margin-bottom: 1rem;
  opacity: 0.9;
}

.use-title {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.use-body {
  font-size: 0.95rem;
  line-height: 1.65;
  color: rgba(245, 245, 247, 0.65);
}

/* ============================================================
   SPEC SHEET
   ============================================================ */

.spec-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2.5rem;
  padding: 1.25rem 1rem;
  align-items: start;
}

.spec-group {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #f5f5f7;
}

.spec-detail {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 0.95rem;
}

.spec-item:last-child {
  border-bottom: none;
}

.spec-item > span:first-child {
  color: #86868b;
}

.spec-item > span:last-child {
  color: #f5f5f7;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 768px) {
  .spec-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 1rem 0.5rem;
  }
  .spec-group {
    font-size: 1.25rem;
  }
  .spec-item {
    font-size: 0.875rem;
  }
}

/* ============================================================
   SCIENCE CARDS
   ============================================================ */

.science-card {
  display: block;
  padding: 2rem;
  border-radius: 1.5rem;
  background: linear-gradient(145deg, #0f0f11, #1a1a1c);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.4s var(--ease-apple), border-color 0.4s var(--ease-apple);
  text-decoration: none;
  color: inherit;
}

.science-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 255, 136, 0.25);
}

/* ============================================================
   PLATFORM STACK DIAGRAM
   ============================================================ */

.platform-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  max-width: 540px;
  margin: 0 auto;
}

.stack-layer {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
}

.stack-arrow {
  display: flex;
  justify-content: center;
  padding: 0.25rem 0;
}

.stack-chip {
  padding: 0.65rem 1.25rem;
  border-radius: 0.75rem;
  background: linear-gradient(145deg, #0f0f11, #1a1a1c);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(245, 245, 247, 0.8);
  text-align: center;
  letter-spacing: 0.01em;
  flex: 1;
  max-width: 200px;
}

.stack-chip-core {
  background: linear-gradient(145deg, #0a1a10, #0d2518);
  border-color: rgba(0, 255, 136, 0.2);
  color: #00ff88;
  font-weight: 600;
  max-width: 320px;
  box-shadow: 0 0 24px rgba(0, 255, 136, 0.08);
}

.stack-chip-output {
  background: linear-gradient(145deg, #0a0a14, #10101c);
  border-color: rgba(68, 136, 255, 0.18);
  color: rgba(245, 245, 247, 0.85);
}

/* ============================================================
   PLATFORM CARDS
   ============================================================ */

.platform-card {
  padding: 2rem;
  border-radius: 1.5rem;
  background: linear-gradient(145deg, #0a0a0a, #141414);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.5s var(--ease-apple), border-color 0.5s var(--ease-apple);
}

.platform-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 255, 136, 0.2);
}

.platform-card-icon {
  margin-bottom: 1rem;
  opacity: 0.9;
}

/* ============================================================
   COMPETITOR PILLS
   ============================================================ */

.competitor-grid {
  display: grid;
  gap: 0.75rem;
  max-width: 720px;
  margin: 0 auto;
}

.competitor-pill {
  display: grid;
  grid-template-columns: 160px 1fr;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 1.5rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.3s var(--ease-smooth);
}

.competitor-pill:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.competitor-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #f5f5f7;
  white-space: nowrap;
}

.competitor-gap {
  font-size: 0.85rem;
  color: rgba(134, 134, 139, 0.9);
  line-height: 1.5;
}

.competitor-pill-eta {
  background: linear-gradient(145deg, rgba(0, 255, 136, 0.06), rgba(0, 255, 136, 0.02));
  border-color: rgba(0, 255, 136, 0.2);
}

.competitor-pill-eta .competitor-name {
  color: #00ff88;
}

.competitor-edge {
  font-size: 0.85rem;
  color: rgba(245, 245, 247, 0.75);
  line-height: 1.5;
  font-weight: 500;
}

@media (max-width: 640px) {
  .competitor-pill {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .stack-chip {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
  }

  .stack-layer {
    gap: 0.5rem;
  }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal, .reveal-delay {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   MOBILE REFINEMENTS
   ============================================================ */

@media (max-width: 640px) {
  .story-card {
    flex: 0 0 85vw;
    min-height: 340px;
    padding: 1.5rem;
  }

  .storyboard-track {
    padding: 0 7.5vw;
    gap: 1rem;
  }

  .hero-tagline {
    font-size: 1.25rem;
  }
}

/* ============================================================
   TEXT SELECTION
   ============================================================ */

::selection {
  background: rgba(0, 255, 136, 0.3);
  color: #ffffff;
}
