/* Hero layout + unified Video / Interactive preview stage */

.home-hero {
  padding-top: clamp(24px, 3.4vw, 44px);
}

.hero-top {
  max-width: calc(1120px + var(--gutter) * 2);
  display: grid;
  gap: 20px;
  align-items: end;
  margin-bottom: clamp(22px, 2.8vw, 32px);
}

.hero-top h1 {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(2.5rem, 1.55rem + 3.4vw, 4.35rem);
  line-height: 0.96;
  letter-spacing: -0.035em;
}

.hero-actions {
  display: flex;
  align-items: center;
}

.hero-actions .btn-row {
  margin: 0;
}

@media (min-width: 900px) {
  .hero-top {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 32px;
    align-items: end;
  }

  .hero-actions {
    justify-content: flex-end;
    padding-bottom: 4px;
  }
}

@media (max-width: 519px) {
  .hero-actions,
  .hero-actions .btn-row {
    width: 100%;
  }

  .hero-actions .btn-row .btn {
    flex: 1 1 auto;
  }
}

/* Switcher bar above the 1120px stage */
.hero-stage-bar {
  max-width: 1120px;
  margin: 0 auto 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}

.hero-stage-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(24, 25, 30, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hero-stage-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--fog);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.hero-stage-tab:hover {
  color: var(--paper);
  background: rgba(255, 255, 255, 0.04);
}

.hero-stage-tab[aria-selected="true"] {
  color: var(--paper);
  background: rgba(41, 176, 234, 0.14);
  border-color: rgba(41, 176, 234, 0.36);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.hero-stage-tab svg {
  width: 14px;
  height: 14px;
  flex: none;
  opacity: 0.8;
}

.hero-stage-tab[aria-selected="true"] svg {
  color: var(--cyan);
  opacity: 1;
}

.hero-stage-tab > span {
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
}

.hero-stage-duration {
  color: var(--dim);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

@supports not (text-box-trim: trim-both) {
  .hero-stage-tab > span {
    position: relative;
    top: 0.05em;
  }

  .hero-stage-tab > .hero-stage-duration {
    top: 0.1em;
  }
}

.hero-stage-tab[aria-selected="true"] .hero-stage-duration {
  color: var(--fog);
}

.hero-stage-note {
  margin: 0;
  color: var(--dim);
  font-size: 0.875rem;
  line-height: 1.3;
}

/* Unified stage panels */
.hero-stage-panel {
  max-width: 1120px;
  margin-inline: auto;
}

.hero-stage-panel.is-entering {
  animation: stage-swap-in 240ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.stage-video-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: #08090d;
  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.56),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.stage-video-progress {
  position: absolute;
  inset-inline: 0;
  top: 0;
  z-index: 2;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.stage-video-progress > span {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--cyan);
  transition: width 120ms linear;
}

.stage-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #08090d;
}

.stage-unmute-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 6px 13px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(14, 15, 20, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--paper);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.42);
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    transform 180ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.stage-unmute-btn:hover {
  border-color: rgba(41, 176, 234, 0.55);
  background: rgba(14, 15, 20, 0.9);
  transform: translateY(-1px);
}

.stage-unmute-btn svg {
  width: 15px;
  height: 15px;
  color: var(--cyan);
  flex: none;
}

@media (max-width: 639px) {
  .hero-stage-bar {
    gap: 8px;
  }

  .hero-stage-tabs {
    width: 100%;
  }

  .hero-stage-tab {
    flex: 1 1 0;
    justify-content: center;
    padding-inline: 10px;
    font-size: 0.85rem;
  }

  .hero-stage-note {
    display: none;
  }

  .stage-unmute-btn {
    top: 10px;
    right: 10px;
    min-height: 32px;
    padding: 5px 11px;
    font-size: 0.8rem;
  }
}

@keyframes stage-swap-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-stage-panel.is-entering,
  .stage-video-progress > span,
  .stage-unmute-btn,
  .hero-stage-tab {
    animation: none;
    transition: none;
  }
}
