/* 1996 Studio — hero con secuencia de entrada.
   JS agrega .is-playing a [data-hero] y la repite cada 7 s mientras el hero se ve. */

.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 0;
  text-align: center;
  background:
    radial-gradient(60% 50% at 50% 0%, #ffffff 0%, transparent 70%),
    var(--bg);
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.86rem;
  color: var(--muted);
  box-shadow: 0 1px 2px rgba(10, 10, 10, 0.04);
}

.badge b {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 500;
  font-size: 0.76rem;
}

/* Titular */
.hero-title {
  margin-top: 28px;
  font-size: clamp(2.9rem, 9.6vw, 6.6rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.045em;
}

.hero-title .line {
  display: block;
}

.hero-title .w {
  display: inline-block;
  position: relative;
}

.hero-title .hl {
  color: var(--accent);
}

.underline {
  position: absolute;
  left: -2%;
  bottom: -0.12em;
  width: 104%;
  height: 0.22em;
  overflow: visible;
}

.underline path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.hero-copy {
  margin-top: 28px;
  max-width: 34em;
  font-size: clamp(1.05rem, 2.2vw, 1.22rem);
  color: var(--muted);
}

.hero .cta-row {
  justify-content: center;
  margin-top: 32px;
}

.btn-shine {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn-shine::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.38) 50%, transparent 70%);
  transform: translateX(-120%);
}

/* Escenario del panel */
.hero-stage {
  position: relative;
  z-index: 1;
  margin: 64px auto 0;
  max-width: 980px;
  padding: 0 var(--gutter);
  height: 340px;
  perspective: 1400px;
}

.dash {
  height: 440px;
  border-radius: 24px 24px 0 0;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: var(--surface);
  box-shadow: 0 -2px 0 rgba(255, 255, 255, 0.8) inset, 0 30px 80px rgba(10, 10, 10, 0.1);
  transform-origin: 50% 100%;
  overflow: hidden;
  text-align: left;
}

.dash-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.dash-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
}

.dash-url {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--muted);
}

/* Logo de canal, como en la tele */
.ch-bug {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.ch-bug::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: rec 1.6s steps(2, jump-none) infinite;
}

@keyframes rec {
  50% {
    opacity: 0.25;
  }
}

.dash-body {
  display: grid;
  grid-template-columns: 180px 1fr;
  height: calc(100% - 46px);
}

.dash-side {
  padding: 18px 14px;
  border-right: 1px solid var(--line);
  display: grid;
  align-content: start;
  gap: 4px;
  font-size: 0.86rem;
  color: var(--muted);
}

.dash-side span {
  padding: 8px 10px;
  border-radius: 10px;
}

.dash-side .on {
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 500;
}

.dash-main {
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: min-content;
  gap: 12px;
}

.kpi {
  padding: 14px 16px;
  border-radius: 16px;
}

.kpi small {
  display: block;
  font-size: 0.76rem;
  color: var(--muted);
}

.kpi strong {
  display: block;
  margin-top: 6px;
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.kpi em {
  font-style: normal;
  font-size: 0.76rem;
  color: #2b6a50;
}

.kpi-a {
  background: var(--mint);
}

.kpi-b {
  background: var(--lilac);
}

.kpi-c {
  background: var(--butter);
}

.chart {
  grid-column: span 2;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.chart small,
.feed small {
  font-size: 0.76rem;
  color: var(--muted);
}

.chart svg {
  width: 100%;
  height: 110px;
  margin-top: 8px;
}

.feed {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  align-content: start;
  gap: 8px;
  font-size: 0.8rem;
}

.feed p {
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--surface-2);
}

/* Stickers flotantes: guiño a las caricaturas de los 90 */
.sticker {
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.st-star {
  top: 120px;
  left: 9%;
  width: 54px;
  color: var(--accent);
  opacity: 0.85;
}

.st-blob {
  top: 210px;
  right: 8%;
  width: 92px;
  color: var(--lilac);
}

.st-squiggle {
  top: 400px;
  left: 6%;
  width: 110px;
  color: #b9d9c7;
}

.st-checker {
  top: 90px;
  right: 16%;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: conic-gradient(var(--ink) 25%, transparent 0 50%, var(--ink) 0 75%, transparent 0) 0 0 / 10px 10px;
  opacity: 0.12;
  transform: rotate(12deg);
}

@media (max-width: 760px) {
  .hero {
    padding-top: 64px;
  }
  .hero-stage {
    height: 260px;
    margin-top: 48px;
  }
  .dash-body {
    grid-template-columns: 1fr;
  }
  .dash-side,
  .dash-url {
    display: none;
  }
  .dash-main {
    grid-template-columns: 1fr 1fr;
  }
  .chart {
    grid-column: span 2;
  }
  .feed,
  .kpi-c {
    display: none;
  }
  .st-squiggle,
  .st-checker {
    display: none;
  }
  .st-star {
    top: 40px;
    left: 4%;
    width: 34px;
  }
  .st-blob {
    top: 70px;
    right: -10px;
    width: 64px;
  }
}

/* ---------- Secuencia ---------- */

.is-playing .badge {
  animation: badge-in 0.6s var(--ease-out-cubic) both;
}

.is-playing .hero-title .w {
  animation: word-in 0.8s var(--ease-out-cubic) both;
  animation-delay: calc(0.2s + var(--i) * 90ms);
}

.is-playing .underline path {
  animation: draw 0.7s var(--ease-out-cubic) 0.95s both;
}

.is-playing .hero-copy {
  animation: fade-up 0.6s var(--ease-out-cubic) 1.05s both;
}

.is-playing .cta-row .btn {
  animation: spring-in 0.6s var(--spring) both;
}

.is-playing .cta-row .btn:nth-child(1) {
  animation-delay: 1.3s;
}

.is-playing .cta-row .btn:nth-child(2) {
  animation-delay: 1.38s;
}

.is-playing .btn-shine::after {
  animation: shine 0.9s ease-in-out 2.3s both;
}

.is-playing .dash {
  animation: tilt-in 1.2s var(--ease-out-cubic) 1.15s both;
}

.is-playing .sticker {
  animation: pop 0.7s var(--spring) both, float 6s ease-in-out 1s infinite;
}

.is-playing .st-star {
  animation-delay: 1.5s, 2.2s;
}

.is-playing .st-blob {
  animation-delay: 1.6s, 2.3s;
}

.is-playing .st-squiggle {
  animation-delay: 1.7s, 2.4s;
}

.is-playing .st-checker {
  animation: pop 0.7s var(--spring) 1.65s both;
}

@keyframes badge-in {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
}

@keyframes word-in {
  from {
    opacity: 0;
    transform: translateY(28px);
    filter: blur(14px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}

@keyframes draw {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@keyframes spring-in {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
}

@keyframes shine {
  from {
    transform: translateX(-120%);
  }
  to {
    transform: translateX(120%);
  }
}

@keyframes tilt-in {
  from {
    opacity: 0;
    transform: translateY(260px) rotateX(30deg);
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.4) rotate(-20deg);
  }
}

@keyframes float {
  50% {
    transform: translateY(-8px) rotate(4deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero *,
  .hero *::before,
  .hero *::after {
    animation: none !important;
  }
}
