/* ============================================================================
   EL GALLINERO — sistema de diseño
   ============================================================================ */
@layer base, layout, components, utilities;

@layer base {
  :root {
    --rojo: #d9231f;
    --amarillo: #ffd500;
    --azul: #0057a8;
    --negro: #111111;
    --crema: #f7f5f0;
    --blanco: #ffffff;
    --borde: #e2ded6;
    --texto-sec: #4d4c4b;
    --bg-dark: #0b0f19;
    --bg-mid: #101825;

    --space-1: 8px;
    --space-2: 16px;
    --space-3: 24px;
    --space-4: 32px;
    --space-5: 48px;
    --space-6: 64px;
    --space-7: 96px;

    --maxw: 1280px;
    --radius: 0;

    --fs-body: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
    --fs-small: 14px;
    --fs-eyebrow: 12px;
    --fs-h3: clamp(1.25rem, 1.1rem + 0.8vw, 1.75rem);
    --fs-h2: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem);
    --fs-h1: clamp(2.5rem, 1.9rem + 3vw, 4rem);

    --dur-fast: 150ms;
    --dur-base: 250ms;
    --dur-slow: 400ms;
    --ease: cubic-bezier(0.2, 0.7, 0.3, 1);

    --cube-scale: 0.82;
    --cube-footprint: calc(250px * var(--cube-scale) * 1.65);
  }

  @media (min-width: 480px) { :root { --cube-scale: 1; } }
  @media (min-width: 768px) { :root { --cube-scale: 1.15; } }
  @media (min-width: 1024px) { :root { --cube-scale: 1.25; } }
  @media (min-width: 1280px) { :root { --cube-scale: 1.4; } }

  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
  /* Prevent horizontal overflow and ensure full-bleed sections */
  html, body { overflow-x: hidden; }
  body {
    margin: 0;
    background: var(--crema);
    color: var(--negro);
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: var(--fs-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  img { display: block; max-width: 100%; }
  a { color: inherit; text-decoration: none; }
  ul { list-style: none; margin: 0; padding: 0; }
  h1, h2, h3, p, figure { margin: 0; }
  button, input { font: inherit; }

  :focus-visible {
    outline: 2px solid var(--amarillo);
    outline-offset: 2px;
  }

  .h-titular {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1.05;
    color: var(--negro);
  }

  .h-eyebrow {
    font-size: var(--fs-eyebrow);
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--rojo);
  }

  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  @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;
    }
  }
}

@layer layout {
  .container {
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: var(--space-3);
  }

  .grid {
    display: grid;
    gap: var(--space-3);
  }

  @media (min-width: 1024px) {
    .grid { gap: var(--space-4); }
  }

  .site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    background: rgba(8, 12, 20, 0.90);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22), inset 0 -1px 0 rgba(255, 255, 255, 0.04);
    transform: translateY(-100%);
    transition: transform var(--dur-base) var(--ease);
  }

  .site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
      linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0) 30%, rgba(255,255,255,0.03)),
      repeating-linear-gradient(90deg, rgba(90,188,255,0.04) 0, rgba(90,188,255,0.04) 1px, transparent 1px, transparent 18px);
    pointer-events: none;
  }

  .site-header.is-visible { transform: translateY(0); }
  @media (prefers-reduced-motion: reduce) { .site-header { transition: none; } }

  .header-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding-block: 0.9rem;
  }

  .nav-main { display: none; }
  @media (min-width: 1024px) {
    .nav-main {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      flex: 1;
    }
    .nav-main ul {
      display: flex;
      align-items: center;
      gap: 2rem;
      padding-inline: 1rem;
    }
  }

  .hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-block: clamp(6.5rem, 8vw, 9rem) clamp(4rem, 7vw, 7rem);
    background: #04030a; /* deep base to remove previous remnants */
    --grid-offset-x: 0px;
    --grid-offset-y: 0px;
    --horizon: 62%;
    /* allow headline glyphs to overflow slightly to avoid clipping of large display type */
    overflow: visible;
    isolation: isolate;
    color: var(--blanco);
    max-width: 100%;
    /* The main column is already full width; avoid 100vw scrollbar gutters. */
    width: 100%;
    left: auto;
    right: auto;
    margin-inline: 0;
  }

  #tv-noise {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    opacity: 1;
  }

  #tv-noise::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
    pointer-events: none;
  }

  #tv-noise canvas#tv-noise-canvas {
    position: relative;
    z-index: 0;
    display: block;
    width: 100%;
    height: 100%;
    opacity: 0.45;
    mix-blend-mode: normal;
    image-rendering: pixelated;
    filter: contrast(1.35) brightness(0.9);
  }

  #tv-noise::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: repeating-linear-gradient(
      to bottom,
      rgba(255,255,255,0.02) 0 1px,
      rgba(0,0,0,0) 1px 4px
    ), linear-gradient(180deg, rgba(255,20,120,0.02), rgba(0,120,255,0.02));
    mix-blend-mode: overlay;
    opacity: 0.6;
    animation: tv-scan 6s linear infinite;
    z-index: 2;
    will-change: background-position, opacity;
  }

  @keyframes scanline-slow {
    0% { background-position: 0 0, 0 0, 0 0; }
    50% { background-position: 0 3px, 0 0, 0 3px; }
    100% { background-position: 0 0, 0 0, 0 0; }
  }

  /* hero-grid: full-hero horizon/grid controlled by --horizon */
  .hero-grid {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    display: block;
    /* hint to the UA that we'll animate transform/position */
    will-change: transform, opacity;
  }


  /* gentle scanline overlay to add retro feel */
  .hero-grid::after {
    content: "";
    position: absolute;
    left: 0; right: 0;
    top: 0;
    bottom: 0;
    pointer-events: none;
    background-image: repeating-linear-gradient(0deg, rgba(255,255,255,0.018) 0px, rgba(255,255,255,0.018) 1px, transparent 1px, transparent 10px);
    /* softer on desktop for elegance */
    opacity: 0.045;
    /* slower animation reduces paint churn */
    animation: scanline-move 14s linear infinite;
    mix-blend-mode: overlay;
    will-change: background-position, opacity;
  }

  /* Mobile / small screens: reduce heavy gradients and disable moving scanlines for performance */
  @media (max-width: 600px) {
    .legado-grid { grid-template-columns: 1fr; }
    .legado-media { display: none; }
    .legado-mobile-img { display: block; max-width: 120px; height: auto; flex: 0 0 auto; }
    .legado-row { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-3); margin-top: var(--space-3); }
    .legado-cta-wrap { width: 100%; margin: 0; text-align: center; }
    .legado-cta { display: inline-flex; margin: 0; }
    .legado-cta .btn { display: inline-flex; justify-content: center; align-items: center; width: auto; }
    .hero-grid::after { animation: none; opacity: 0.02; }
  }

  @keyframes scanline-move {
    0% { background-position: 0 0; }
    100% { background-position: 0 256px; }
  }

  @keyframes tv-scan {
    from { background-position: 0 0, 0 0; }
    to   { background-position: 0 40px, 0 0; }
  }

  .hero-inner {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: clamp(1rem, 2.2vw, 2.5rem);
    width: min(100%, var(--maxw));
    padding-inline: clamp(1rem, 3vw, 2rem);
    box-sizing: border-box;
    margin-inline: auto;
  }

  .hero-cube-stage {
    position: relative;
    z-index: 3;
    width: min(100%, 440px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-inline: auto;
     /* Minimum cube footprint: ensure cube is at least 400px tall */
     min-height: 400px;
    padding-block: 0;
    padding-inline: clamp(0.5rem, 1.6vw, 1rem);
    box-sizing: border-box;
    overflow: visible;
  }

  @media (min-width: 1024px) {
    .hero-inner {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
      align-items: center;
      text-align: left;
      column-gap: clamp(1.5rem, 2.8vw, 3rem);
      justify-content: space-between;
      width: min(100%, var(--maxw));
      padding-inline: clamp(1rem, 2.4vw, 2.4rem);
    }

    .hero-copy {
      order: 1;
      min-width: 0;
      width: min(100%, 620px);
      max-width: 620px;
      padding-left: clamp(0.25rem, 1vw, 0.75rem);
      padding-right: clamp(0.5rem, 1.2vw, 1rem);
      justify-self: start;
      box-sizing: border-box;
    }

    .hero-cube-stage {
      order: 2;
      width: min(100%, 420px);
      max-width: 420px;
      justify-self: end;
      margin-inline: 0;
      min-height: 400px;
      padding-inline: 0.5rem;
    }
  }

  @media (max-width: 1023px) {
    .hero-cube-stage {
      order: -1;
      max-width: min(75vw, 400px);
      min-height: 400px;
    }
  }

  @media (max-width: 480px) {
    .hero-inner {
      padding-inline: 0.9rem;
    }

    .hero-copy {
      max-width: 100%;
      padding-inline: 0.2rem;
    }

    .hero-cube-stage {
      width: min(100%, 300px);
      max-width: 100%;
      padding-inline: 0;
    }
  }

  .hero-ribbon {
    position: absolute;
    top: 80px;
    right: -18px;
    background: var(--rojo);
    color: var(--blanco);
    padding: 8px 35px 9px 50px;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transform: rotate(35deg);
    transform-origin: top right;
    -webkit-transform: rotate(35deg);
    border-top: 2px solid var(--negro);
    border-bottom: 2px solid var(--negro);
    display: block;
    z-index: 22;
    box-shadow: 0 10px 24px rgba(0,0,0,0.18);
    white-space: nowrap;
    line-height: 1;
    will-change: transform;
  }

  @media (max-width: 767px) {
    .hero-inner {
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      gap: clamp(0.9rem, 2vw, 1.5rem);
    }
    /* Reduce vertical padding on small screens so the cube sits closer
       to the text and doesn't overlap with fixed header or other sections */
    .hero {
      padding-block: clamp(3rem, 6.5vw, 4.5rem);
      /* Add bottom spacer so buttons don't sit flush with viewport edge */
      padding-block-end: clamp(1.2rem, 6vw, 2rem) !important;
      min-height: 100vh !important;
    }
    .hero-copy {
      order: 2;
      width: 100%;
      max-width: 32rem;
      padding-inline: 0;
      margin-top: 0.1rem;
    }

    .hero-cube-stage {
      order: 1;
      width: min(72vw, 240px);
      max-width: 240px;
      min-height: 400px;
      margin: 0 auto 0.1rem;
      padding-inline: 0;
    }

    #hero-cube-root {
      width: 100%;
      height: auto;
      min-height: 400px;
      max-height: 500px;
    }

    .hero-cta-row {
      justify-content: center;
      margin-bottom: clamp(0.6rem, 2.4vw, 1.2rem);
    }
  }

  @media (max-width: 420px) {
    .hero-inner {
      gap: 0.9rem;
    }
    .hero {
      padding-block: clamp(2.5rem, 5.5vw, 3.5rem);
      /* larger bottom spacer on very small screens to show more TV noise */
      padding-block-end: clamp(1.5rem, 7.5vw, 2.5rem) !important;
      min-height: 100vh !important;
    }
    .hero-copy {
      margin-top: 0.25rem;
    }

    .hero-cube-stage {
      width: min(64vw, 190px);
      max-width: 190px;
      min-height: 400px;
      margin-bottom: 0.1rem;
    }

    .hero-cta-row { margin-bottom: clamp(0.9rem, 3.2vw, 1.6rem); }

    #hero-cube-root {
      width: 100%;
      height: auto;
      min-height: 400px;
      max-height: 500px;
    }
  }

  /* Emergency mobile fix: ensure the cube stage never grows excessively
     by removing forced aspect-ratio and capping width/height on small screens. */
  @media (max-width: 1023px) {
    .hero-cube-stage {
      aspect-ratio: unset !important;
      width: min(72vw, 300px) !important;
      max-width: 300px !important;
      height: auto !important;
      min-height: 400px !important;
      max-height: 500px !important;
      margin: 0.1rem auto !important;
      padding: 0 !important;
    }
    #hero-cube-root {
      width: 100% !important;
      height: auto !important;
      max-height: 500px !important;
      min-height: 400px !important;
    }
  }

  @media (max-width: 480px) {
    .hero-cube-stage {
      width: min(72vw, 240px) !important;
      max-width: 240px !important;
      max-height: 500px !important;
      min-height: 400px !important;
      margin-bottom: 0.05rem !important;
    }
    #hero-cube-root {
      max-height: 500px !important;
      min-height: 400px !important;
    }
  }

  /* Ensure a hard cap so the cube never exceeds 500px height */
  .hero-cube-stage,
  #hero-cube-root {
    max-height: 500px !important;
  }

  /* Final enforcement: hero should have a minimum of the viewport height */
  .hero {
    min-height: 100vh !important;
  }

  /* Pulse gallery (polaroid instant frame) */
  .pulse-gallery {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .pulse-frame {
    width: min(520px, 86vw);
    max-width: 520px;
    background: #fff;
    padding: 12px 12px 28px 12px; /* extra bottom for polaroid caption area */
    box-shadow: 0 18px 40px rgba(0,0,0,0.35), 0 6px 12px rgba(0,0,0,0.2);
    border-radius: 6px;
    transform: rotate(-1.8deg);
    transition: transform 220ms var(--ease), box-shadow 220ms var(--ease);
    display: grid;
    place-items: center;
    overflow: hidden;
  }
  .pulse-frame img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: cover;
    border: 6px solid #fff; /* polaroid white border */
    box-sizing: border-box;
    transition: opacity 420ms var(--ease), transform 420ms var(--ease);
  }
  .pulse-frame.is-hidden img { opacity: 0; transform: scale(0.98); }
  .pulse-frame.is-visible img { opacity: 1; transform: scale(1); }

  @media (max-width: 480px) {
    .pulse-frame { width: min(76vw, 360px); padding: 10px 10px 22px; transform: rotate(0deg); }
    .pulse-frame img { max-height: 320px; }
  }

  /* Layout for the Sala Pulse section's media + text */
  #sala-pulse .conduccion {
    display: flex;
    align-items: center;
    gap: var(--space-4);
  }
  #sala-pulse .conduccion-media { flex: 0 0 auto; }
  #sala-pulse .conduccion-body { flex: 1 1 60%; }

  @media (max-width: 768px) {
    #sala-pulse .conduccion { flex-direction: column-reverse; align-items: center; text-align: center; }
    #sala-pulse .conduccion-body { width: 100%; }
    #sala-pulse .conduccion-media { width: 86%; max-width: 420px; }
    .pulse-frame { transform: rotate(0deg); }
  }

  /* Conducción section branding: red background, white text and inverse buttons */
  #conduccion.conduccion-section {
    background-color: #d9231f !important; /* exact brand red */
    background-image: none !important;
    color: #fff;
  }

  /* Sala Pulse: solid blue background, white text, no overlays */
  #sala-pulse.accesos-section {
    background-color: #0057a8 !important;
    background-image: none !important;
    color: #fff;
    border-block: none !important;
    padding-block: var(--space-6);
    position: relative;
    isolation: isolate;
    overflow: hidden;
  }
  #sala-pulse.accesos-section > .container { position: relative; z-index: 2; }
  .pulse-festival-bg { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; border: 0; pointer-events: none; opacity: 0.72; mix-blend-mode: screen; }
  #sala-pulse.accesos-section::before { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(0,87,168,0.6); pointer-events: none; }
  #sala-pulse.accesos-section .h-eyebrow,
  #sala-pulse.accesos-section .h-titular,
  #sala-pulse.accesos-section p,
  #sala-pulse.accesos-section .conduccion-body p {
    color: #fff !important;
  }
  /* Inverse button style: white background, blue text */
  #sala-pulse.accesos-section .btn {
    background: #fff;
    color: #0057a8;
    border-color: transparent;
  }
  #sala-pulse.accesos-section .btn.btn-outline {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,0.18);
  }
  /* Remove any overlay pseudoelement */
  #sala-pulse.accesos-section::after { display: none !important; }
  #conduccion.conduccion-section .h-eyebrow,
  #conduccion.conduccion-section .h-titular,
  #conduccion.conduccion-section .conduccion-text,
  #conduccion.conduccion-section p {
    color: #fff !important;
  }

  /* Ensure any inline styles (var(--texto-sec)) are overridden inside the section */
  #conduccion.conduccion-section .conduccion-body p,
  #conduccion.conduccion-section .conduccion-body a,
  #conduccion.conduccion-section .conduccion-left p {
    color: #fff !important;
  }

  /* Inverse buttons: white bg with brand red text */
  #conduccion.conduccion-section .btn {
    background: #fff;
    color: var(--rojo);
    border-color: transparent;
  }
  #conduccion.conduccion-section .btn.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.12); }

  /* Social icon square buttons */
  .social-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #fff;
    color: var(--rojo);
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    transition: transform 160ms var(--ease), box-shadow 160ms var(--ease);
  }
  .social-icon-btn i { font-size: 18px; }
  .social-icon-btn:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(0,0,0,0.18); }

  .conduccion-follow { color: rgba(255,255,255,0.95); font-weight: 600; line-height: 1.15; }

  @media (max-width: 768px) {
    #conduccion.conduccion-section {
      padding-block-start: clamp(2rem, 4vw, 3rem);
      padding-block-end: calc(clamp(2rem, 4vw, 3rem) + var(--space-3));
    }
    .social-icon-btn { width: 44px; height: 44px; }
  }


/* Mobile scaling and alignment tweaks for the hero cube and copy
   - scale the cube smoothly on narrow viewports so it never overflows
   - center copy and CTAs and ensure spacing is consistent
   - keep cube min/max heights but allow visual scale down */
#hero-cube-root {
  transform-origin: center center;
  transition: transform 220ms var(--ease);
}

@media (max-width: 480px) {
  .hero-inner {
    gap: 0.8rem;
    align-items: center;
  }
  .hero-copy {
    width: 100%;
    max-width: 100%;
    padding-inline: 1rem;
    text-align: center;
    margin-top: 0.25rem;
  }
  .hero-cta-row { justify-content: center; }
  .hero-cube-stage { display: flex; align-items: center; justify-content: center; }

  /* gentle scale so the visual cube fits without changing its min-height rule */
  #hero-cube-root { transform: scale(0.86); }
}

@media (max-width: 360px) {
  /* smaller phones: reduce further if necessary */
  #hero-cube-root { transform: scale(0.75); }
  .hero { padding-block-start: calc(var(--site-header-height, 0px) + 8px) !important; }
}

@media (min-width: 481px) and (max-width: 767px) {
  /* tablets / small landscape phones */
  #hero-cube-root { transform: scale(0.92); }
  .hero-inner { align-items: center; }
  .hero-copy { text-align: center; }
}

/* Ensure the cube keeps its min/max height while letting transform scale visually */
.hero-cube-stage,
#hero-cube-root {
  min-height: 400px;
  max-height: 500px;
}

  @media (max-width: 639px) {
    .hero-ribbon {
      right: clamp(8px, 3vw, 16px);
      top: clamp(150px, 38vw, 190px);
      width: clamp(190px, 60vw, 280px);
      padding: 0.6em 1.1em 0.65em 1.5em;
      font-size: clamp(0.65rem, 2.4vw, 0.9rem);
      text-align: center;
      transform: rotate(35deg);
      clip-path: polygon(7% 0, 100% 0, 93% 100%, 0 100%);
      border: 0;
      box-shadow: none;
      z-index: 12;
    }
  }

  .hero-copy,
  .feature-card,
  .episode-card,
  .card-access,
  .legado-stat,
  .conduccion__avatar {
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  }

  .hero-ribbon.reveal,
  .hero-ribbon.reveal-left,
  .hero-ribbon.reveal-right,
  .hero-ribbon.is-visible {
    transform: rotate(35deg) !important;
    opacity: 1;
  }

  @media (max-width: 639px) {
    .hero-ribbon.reveal,
    .hero-ribbon.reveal-left,
    .hero-ribbon.reveal-right,
    .hero-ribbon.is-visible {
      transform: rotate(35deg) !important;
    }
  }

  .hero-copy {
    position: relative;
    z-index: 4; /* ensure headline/content sits above 3D cube and TV noise */
    text-shadow: none;
    width: 100%;
  }

  .hero-copy.reveal,
  .hero-copy.reveal-left,
  .hero-copy.reveal-right,
  .hero-cube-stage.reveal,
  .hero-cube-stage.reveal-left,
  .hero-cube-stage.reveal-right {
    opacity: 1;
    transform: none;
  }

  /* Desktop: reserve a fixed column for the hero cube without stretching the text block */
  @media (min-width: 1024px) {
    .hero-copy {
      padding-right: var(--space-3);
      max-width: 620px;
    }
  }

  .hero-copy h1 {
    margin: 0;
    font-size: clamp(2.7rem, 6vw, 6rem);
    line-height: 0.88;
    letter-spacing: -0.04em;
    text-transform: uppercase;
    font-weight: 900;
    color: var(--blanco);
    overflow: visible; /* ensure oversized glyphs aren't clipped */
    white-space: normal;
  }

  .hero-copy h1 .gradient {
    position: relative;
    display: inline-block;
    padding-right: 0.12em;
    margin-right: 0.05em;
    background-image: linear-gradient(
      90deg,
      var(--amarillo) 0%,
      var(--rojo) 30%,
      var(--rojo) 38%,
      var(--azul) 62%,
      var(--azul) 70%,
      var(--amarillo) 100%
    );
    background-size: 200% 100%;
    background-position: 0% 0;
    background-repeat: repeat-x;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    cursor: default;
    transition: background-position 0.85s var(--ease), filter 0.35s ease;
  }

  .hero-copy h1 .gradient.is-gradient-active,
  .hero-copy h1 .gradient:focus-visible {
    animation: hero-gradient-slide 1.6s linear infinite;
    filter: brightness(1.08);
  }

  @keyframes hero-gradient-slide {
    0% {
      background-position: 0% 0;
    }
    100% {
      background-position: 200% 0;
    }
  }

  .hero-kicker {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--amarillo);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
  }

  .hero-sub {
    color: rgba(232, 238, 249, 0.82);
    max-width: 36rem;
    font-size: 1.05rem;
    line-height: 1.7;
  }

  .schedule-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: var(--space-3);
  }

  .schedule-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #4a4a4a;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #d7d3c8;
    background: rgba(255,255,255,0.03);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 10px 30px rgba(0,0,0,0.18);
  }

  .schedule-chip b { color: var(--blanco); }

  .countdown {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    max-width: 420px;
    margin-top: 1.5rem;
  }

  .countdown__unit {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 0.7rem 0.6rem;
    text-align: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 10px 24px rgba(0,0,0,0.16);
  }

  .countdown__num {
    font-size: clamp(1.4rem, 2vw, 2rem);
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--blanco);
  }

  .countdown__label {
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
    margin-top: 0.3rem;
  }

  .hero-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 1.5rem;
  }

  .feature-showcase {
    position: relative;
    padding-block: clamp(4rem, 7vw, 7rem);
    background:
      linear-gradient(90deg, rgba(217, 35, 31, 0.04), rgba(255, 213, 0, 0.03) 35%, rgba(0, 87, 168, 0.04) 100%),
      var(--crema);
    border-top: 1px solid var(--borde);
    border-bottom: 1px solid var(--borde);
  }

  .feature-intro {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 2rem;
  }

  .feature-grid {
    display: grid;
    gap: 1.4rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .feature-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem 1.5rem 1.3rem;
    background: var(--blanco);
    border: 1px solid var(--borde);
    /* outer accent removed (kept ::before as the single accent line) */
    border-left: none;
    box-shadow: none;
    transform-style: preserve-3d;
  }

  .feature-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--card-accent, var(--rojo));
    opacity: 0.9;
  }

  .feature-card:hover {
    transform: translateY(-4px);
    box-shadow: none;
  }

  .feature-card::after {
    content: "";
    position: absolute;
    inset: auto 10% -26% 10%;
    height: 60%;
    background: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0));
    filter: blur(18px);
    opacity: 0.2;
    pointer-events: none;
  }

  .feature-card--cyan {
    --card-accent: var(--azul);
    background: #f9fbff;
  }
  .feature-card--magenta {
    --card-accent: var(--rojo);
    background: #fff9f8;
  }
  .feature-card--purple {
    --card-accent: var(--amarillo);
    background: #fffdf3;
    color: var(--negro);
  }

  @media (min-width: 768px) {
    .feature-card {
      display: grid;
      grid-template-columns: 72px 1fr;
      grid-template-rows: auto 1fr auto;
      grid-template-areas:
        "icon header"
        "body body"
        "metric metric";
      gap: 0.8rem 1rem;
      align-items: start;
      padding: 1.5rem;
    }
    .feature-card__icon { grid-area: icon; }
    .feature-card__content { grid-area: header; }
    .feature-card__body { grid-area: body; }
    .feature-card__metric { grid-area: metric; }
  }

  @media (max-width: 767px) {
    .feature-card {
      display: grid;
      grid-template-columns: 60px minmax(0, 1fr);
      grid-template-rows: auto 1fr auto;
      grid-template-areas:
        "icon header"
        "body body"
        "metric metric";
      gap: 0.8rem 0.9rem;
      align-items: start;
      padding: 1.25rem;
    }
    .feature-card .feature-card__icon { grid-area: icon; width: 60px; height: 60px; }
    .feature-card__content { grid-area: header; }
    .feature-card__body { grid-area: body; }
    .feature-card__metric { grid-area: metric; }
  }

  .feature-card__icon {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    background: var(--card-accent, var(--rojo));
    border: 1px solid rgba(17,17,17,0.08);
    box-shadow: none;
    color: var(--blanco);
  }

  .feature-card__icon svg {
    width: 30px;
    height: 30px;
    display: block;
  }

  .feature-card--cyan .feature-card__icon {
    background: var(--azul);
    color: var(--blanco);
  }

  .feature-card--magenta .feature-card__icon {
    background: var(--rojo);
    color: var(--blanco);
  }

  .feature-card--purple .feature-card__icon {
    background: var(--amarillo);
    color: var(--negro);
  }

  .feature-card__content {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
  }

  .feature-card__eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--card-accent, var(--rojo));
  }

  .feature-card__title {
    font-size: 1.05rem;
    line-height: 1.2;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--negro);
    font-weight: 700;
  }

  .feature-card--purple .feature-card__title,
  .feature-card--purple .feature-card__eyebrow,
  .feature-card--purple .feature-card__body,
  .feature-card--purple .feature-card__metric,
  .feature-card--purple .feature-card__metric strong {
    color: var(--negro);
  }

  .feature-card__body {
    color: rgba(17,17,17,0.72);
  }

  .feature-card__metric {
    /* completely remove the metric row as requested */
    display: none !important;
  }

  .feature-card__metric strong {
    font-size: 1.35rem;
    color: var(--negro);
    letter-spacing: 0;
  }

  .feature-card--purple .feature-card__metric {
    background: rgba(17,17,17,0.02);
    border-top-color: rgba(17,17,17,0.12);
  }

  .proximos-section {
    padding-block: var(--space-6);
    background: var(--blanco);
    border-block: 1px solid var(--borde);
  }

  .legado-room-section {
    --legado-room-shift-x: 0px;
    --legado-room-shift-y: 0px;
    --legado-room-vertex: calc((100% - min(var(--maxw), 100%)) / 2 + var(--space-3) + clamp(48px, 4vw, 64px) - 18px + var(--legado-room-shift-x));
    --legado-room-vertex-y: calc(58% + var(--legado-room-shift-y));
    position: relative;
    overflow: hidden;
    padding-block: var(--space-6);
    background: #ececea;
  }
  .legado-room-section > .container { position: relative; z-index: 2; }
  .legado-room-section > .legado-room__wall,
  .legado-room-section > .legado-room__floor { z-index: 0; }

  .section-head {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
  }

  .section-head > div {
    position: relative;
    padding-left: 1rem;
  }

  .historia-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding-block: clamp(8rem, 14vw, 12rem) clamp(4rem, 8vw, 7rem);
    color: var(--blanco);
    --particle-x: 0;
    --particle-y: 0;
    background:
      #04030a,
      repeating-linear-gradient(90deg, rgba(255,255,255,0.06) 0, rgba(255,255,255,0.06) 1px, transparent 1px, transparent 18px),
      repeating-linear-gradient(0deg, rgba(255,213,0,0.04) 0, rgba(255,213,0,0.04) 1px, transparent 1px, transparent 18px);
    background-size: auto, 180px 100%, 100% 180px;
    animation: historia-grid-drift 18s linear infinite;
  }
  .historia-hero::before,
  .historia-hero::after { content: ""; position: absolute; pointer-events: none; z-index: -1; }
  .historia-tv-noise { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; opacity: 0.3; mix-blend-mode: screen; image-rendering: pixelated; pointer-events: none; }
  .historia-hero-overlay { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: rgba(0,0,0,0.9); }
  .historia-particles { position: absolute; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; }
  .historia-particle { position: absolute; width: clamp(10px, 1.3vw, 22px); aspect-ratio: 1; border: 0; box-shadow: 8px 8px 0 rgba(0,0,0,0.2); will-change: left, top, transform; }
  .historia-particle--red { color: var(--rojo); background: rgba(217,35,31,0.78); }
  .historia-particle--yellow { color: var(--amarillo); background: rgba(255,213,0,0.82); }
  .historia-particle--blue { color: #55bfff; background: rgba(0,87,168,0.88); }
  .historia-particle:nth-child(1) { left: 8%; top: 25%; animation-delay: -1s; }
  .historia-particle:nth-child(2) { left: 22%; top: 68%; animation-delay: -4s; animation-duration: 12s; }
  .historia-particle:nth-child(3) { left: 37%; top: 18%; animation-delay: -6s; }
  .historia-particle:nth-child(4) { left: 48%; top: 74%; animation-delay: -2s; animation-duration: 11s; }
  .historia-particle:nth-child(5) { left: 61%; top: 30%; animation-delay: -7s; }
  .historia-particle:nth-child(6) { left: 73%; top: 65%; animation-delay: -3s; animation-duration: 13s; }
  .historia-particle:nth-child(7) { left: 84%; top: 20%; animation-delay: -5s; }
  .historia-particle:nth-child(8) { left: 91%; top: 78%; animation-delay: -8s; animation-duration: 10s; }
  .historia-particle:nth-child(9) { left: 14%; top: 84%; animation-delay: -4s; }
  .historia-particle:nth-child(10) { left: 31%; top: 45%; animation-delay: -2s; animation-duration: 14s; }
  .historia-particle:nth-child(11) { left: 56%; top: 12%; animation-delay: -6s; }
  .historia-particle:nth-child(12) { left: 68%; top: 83%; animation-delay: -1s; }
  .historia-particle:nth-child(13) { left: 77%; top: 46%; animation-delay: -5s; animation-duration: 12s; }
  .historia-particle:nth-child(14) { left: 4%; top: 58%; animation-delay: -7s; }
  .historia-particle:nth-child(15) { left: 44%; top: 34%; animation-delay: -3s; }
  .historia-hero::before {
    inset: 12% -8% auto;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--amarillo) 22%, var(--rojo) 52%, var(--azul) 78%, transparent);
    box-shadow: 0 22px 0 rgba(255,255,255,0.18), 0 44px 0 rgba(255,213,0,0.12);
    transform: rotate(-4deg);
    animation: historia-signal-sweep 7s ease-in-out infinite alternate;
  }
  .historia-hero::after {
    inset: auto -10% 9%;
    height: 28%;
    background: linear-gradient(135deg, transparent 0 28%, rgba(217,35,31,0.28) 28% 29%, transparent 29% 52%, rgba(255,213,0,0.22) 52% 53%, transparent 53% 76%, rgba(0,87,168,0.28) 76% 77%, transparent 77%);
    transform: skewY(-8deg);
    animation: historia-bars-drift 11s ease-in-out infinite alternate;
  }
  .historia-hero .h-eyebrow { color: var(--amarillo); }
  .historia-hero > .container { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; text-align: center; }
  .historia-hero .h-eyebrow,
  .historia-hero .h-titular,
  .historia-hero__lead { animation: historia-reveal 0.9s var(--ease) both; }
  .historia-hero .h-titular { color: var(--blanco); max-width: none; font-size: clamp(2.6rem, 6.3vw, 5.8rem); line-height: 0.94; animation-delay: 120ms; text-shadow: 5px 5px 0 rgba(217,35,31,0.35), -3px -2px 0 rgba(255,213,0,0.16); }
  .historia-hero .h-titular .historia-hero-title-line { display: inline-block; white-space: nowrap; color: var(--amarillo); }
  .historia-hero .h-titular .historia-hero-title-line--intro { font-size: 0.82em; color: var(--blanco); }
  .historia-hero__lead { max-width: 48ch; margin-top: var(--space-3); color: rgba(255,255,255,0.86); animation-delay: 240ms; }

  body:not(.home-page) .historia-hero > .container,
  body:not(.home-page) .sonar-hero__inner,
  body:not(.home-page) .ir-hero__inner { padding-inline: clamp(28px, calc(24px + 1.5vw), 44px); }

  .historia-content { position: relative; isolation: isolate; overflow: visible; padding-block: clamp(4rem, 8vw, 7rem); background: var(--crema); }
  .historia-content::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: repeating-linear-gradient(90deg, rgba(0,87,168,0.045) 0 1px, transparent 1px 24px), repeating-linear-gradient(0deg, rgba(217,35,31,0.035) 0 1px, transparent 1px 24px); background-size: 240px 100%, 100% 240px; animation: historia-grid-drift 24s linear infinite reverse; }
  .historia-layout { display: block; }
  .historia-prose { max-width: 72ch; }
  .historia-prose p { color: #4e4d49; font-size: clamp(1rem, 0.96rem + 0.2vw, 1.12rem); line-height: 1.85; animation: historia-reveal 0.8s var(--ease) both; }
  .historia-prose p + p { margin-top: 1.6rem; }
  .historia-prose p:nth-child(2) { animation-delay: 80ms; }
  .historia-prose p:nth-child(3) { animation-delay: 160ms; }
  .historia-prose p:nth-child(4) { animation-delay: 240ms; }
  .historia-prose p:nth-child(5) { animation-delay: 320ms; }
  .historia-prose p:nth-child(6) { animation-delay: 400ms; }
  .historia-prose p:nth-child(7) { animation-delay: 480ms; }
  .historia-prose p:nth-child(8) { animation-delay: 560ms; }
  .historia-prose__turn { padding-block: 1.5rem; padding-left: 1.5rem; border-left: 7px solid var(--amarillo); color: var(--negro) !important; font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.65rem) !important; line-height: 1.45 !important; background: linear-gradient(90deg, rgba(255,213,0,0.18), rgba(255,255,255,0)); box-shadow: 14px 0 0 rgba(217,35,31,0.12); }
  .historia-prose strong { color: var(--rojo); }
  .historia-capsules { display: grid; gap: clamp(1.25rem, 3vw, 2.5rem); }
  .historia-chapter-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; padding: 0.25rem 0 clamp(1rem, 3vw, 1.75rem); }
  .historia-chapter-tab { position: relative; min-height: 48px; border: 2px solid var(--negro); background: var(--blanco); color: var(--negro); padding: 0.65rem 0.8rem 0.65rem 2rem; font: inherit; font-size: 0.72rem; font-weight: 800; line-height: 1.1; text-align: left; text-transform: uppercase; letter-spacing: 0.05em; cursor: pointer; transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease); }
  .historia-chapter-tab::before { content: counter(chapter); counter-increment: chapter; position: absolute; left: 0.7rem; top: 50%; transform: translateY(-50%); font-size: 0.68rem; opacity: 0.55; }
  .historia-chapter-nav { counter-reset: chapter; }
  .historia-chapter-select-wrap { display: none; position: relative; z-index: 100; }
  .historia-chapter-select { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
  .historia-chapter-menu { position: relative; z-index: 20; }
  .historia-chapter-menu__summary { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0.75rem 4rem 0.75rem 0.9rem; border: 2px solid var(--negro); border-left: 8px solid var(--rojo); background: var(--blanco); color: var(--negro); font: inherit; font-size: 0.78rem; font-weight: 800; line-height: 1.2; text-transform: uppercase; letter-spacing: 0.04em; cursor: pointer; list-style: none; }
  .historia-chapter-menu__summary::-webkit-details-marker { display: none; }
  .historia-chapter-menu__summary::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 3.25rem; border-left: 2px solid var(--negro); background: var(--amarillo); }
  .historia-chapter-menu__arrow { position: absolute; z-index: 1; top: 50%; right: 1.2rem; width: 0; height: 0; border-left: 0.42rem solid transparent; border-right: 0.42rem solid transparent; border-top: 0.55rem solid var(--negro); transform: translateY(-25%); transition: transform var(--dur-fast) var(--ease); }
  .historia-chapter-menu[open] .historia-chapter-menu__arrow { transform: translateY(-75%) rotate(180deg); }
  .historia-chapter-menu__list { position: absolute; z-index: 30; top: calc(100% + 6px); right: 0; left: 0; display: grid; gap: 2px; padding: 6px; border: 2px solid var(--negro); background: var(--negro); box-shadow: 6px 6px 0 rgba(17,17,17,0.18); transform-origin: top center; }
  .historia-chapter-menu[open] .historia-chapter-menu__list { animation: historia-menu-open 180ms var(--ease) both; }
  .historia-chapter-menu.is-closing .historia-chapter-menu__list { animation: historia-menu-close 180ms var(--ease) both; }
  .historia-chapter-menu__list button { min-height: 42px; padding: 0.6rem 0.75rem; border: 1px solid var(--negro); background: var(--blanco); color: var(--negro); font: inherit; font-size: 0.7rem; font-weight: 800; line-height: 1.15; text-align: left; text-transform: uppercase; letter-spacing: 0.035em; cursor: pointer; }
  .historia-chapter-menu__list button:hover, .historia-chapter-menu__list button:focus-visible { background: var(--amarillo); }
  .historia-chapter-menu__list button[aria-selected="true"] { background: var(--rojo); color: var(--blanco); border-color: var(--rojo); }
  .historia-chapter-select:focus { border-color: var(--rojo); outline: 3px solid rgba(217,35,31,0.18); outline-offset: 0; }
  .historia-chapter-tab:hover,
  .historia-chapter-tab:focus-visible { transform: translateY(-3px); background: var(--amarillo); }
  .historia-chapter-tab.is-active { background: var(--rojo); color: var(--blanco); border-color: var(--rojo); }
  .historia-capsule-viewport { display: grid; position: relative; z-index: 1; overflow: hidden; transition: height 0.65s var(--ease); }
  .historia-chapter-controls { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: clamp(1rem, 2vw, 1.5rem); }
  .historia-chapter-control { display: inline-flex; align-items: center; gap: 0.65rem; border: 2px solid var(--negro); background: var(--blanco); color: var(--negro); padding: 0.55rem 0.75rem; font: inherit; font-size: 0.72rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease); }
  .historia-chapter-control:hover, .historia-chapter-control:focus-visible { background: var(--amarillo); transform: translateY(-3px); }
  .historia-chapter-status { font-size: 0.75rem; font-weight: 900; letter-spacing: 0.12em; }
  .historia-capsule { grid-area: 1 / 1; align-self: start; position: relative; isolation: isolate; overflow: hidden; padding: clamp(1.5rem, 4vw, 3rem); min-height: 0; color: var(--blanco); border: 2px solid currentColor; box-shadow: 12px 12px 0 rgba(17,17,17,0.12); opacity: 0; transform: translateX(24px) scale(0.96) rotate(-1deg); pointer-events: none; visibility: hidden; transition: opacity 0.55s var(--ease), transform 0.65s var(--ease), filter 0.65s var(--ease); }
  .historia-capsule:not(.is-active):not(.is-leaving) { display: none; }
  .historia-capsule.is-active { opacity: 1; transform: translateX(0) scale(1) rotate(0deg); pointer-events: auto; visibility: visible; filter: saturate(1); animation: historia-capsule-in 0.65s var(--ease) both; }
  .historia-capsule.is-leaving { display: block; position: absolute; inset: 0; opacity: 0; transform: translateX(-24px) scale(1.04) rotate(1deg); visibility: visible; filter: saturate(0.35) brightness(0.8); z-index: 1; animation: historia-capsule-out 0.65s var(--ease) both; }
  .historia-capsule__heading,
  .historia-capsule p { opacity: 0; transform: translateY(14px); }
  .historia-capsule.is-active .historia-capsule__heading { animation: historia-content-in 0.5s 0.12s var(--ease) both; }
  .historia-capsule.is-active p { animation: historia-content-in 0.55s 0.22s var(--ease) both; }
  .historia-capsule.is-leaving .historia-capsule__heading,
  .historia-capsule.is-leaving p { animation: historia-content-out 0.3s var(--ease) both; }
  .historia-capsule::before { content: ""; position: absolute; inset: 0; z-index: -1; background: repeating-linear-gradient(90deg, rgba(255,255,255,0.09) 0 1px, transparent 1px 20px), repeating-linear-gradient(0deg, rgba(0,0,0,0.08) 0 1px, transparent 1px 20px); background-size: 160px 100%, 100% 160px; animation: historia-grid-drift 15s linear infinite; }
  .historia-capsule::after { content: ""; position: absolute; right: -12%; bottom: -44%; width: 55%; aspect-ratio: 1; border: 2px solid rgba(255,255,255,0.3); transform: rotate(45deg); z-index: -1; }
  .historia-capsule--red { background: var(--rojo); }
  .historia-capsule--yellow { background: var(--amarillo); color: var(--negro); }
  .historia-capsule--blue { background: var(--azul); }
  .historia-capsule--black { background: var(--negro); }
  .historia-capsule__number { display: block; font-size: 0.75rem; font-weight: 900; letter-spacing: 0.16em; opacity: 0.8; }
  .historia-capsule__heading { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: clamp(0.7rem, 2vw, 1.4rem); width: 100%; }
  .historia-capsule h2 { display: block; width: 100%; max-width: none; margin: 0; font-size: clamp(1.45rem, 1.2rem + 1vw, 2.25rem); line-height: 1; text-transform: uppercase; letter-spacing: 0.04em; }
  .historia-capsule p { max-width: none; margin: 2rem 0 0; color: inherit; font-size: clamp(0.98rem, 0.92rem + 0.2vw, 1.1rem); line-height: 1.65; }
  .historia-capsule strong { color: inherit; text-decoration: underline; text-decoration-thickness: 3px; }
  .historia-capsule--reboot { min-height: 280px; display: flex; flex-direction: column; justify-content: center; }
  .historia-cube { position: relative; display: grid; place-items: center; width: 58px; height: 58px; margin: 0; color: currentColor; background: rgba(255,255,255,0.16); border: 2px solid currentColor; transform: rotate(-10deg) skewY(-8deg); box-shadow: 9px 9px 0 rgba(0,0,0,0.2); }
  .historia-cube::before,
  .historia-cube::after { content: ""; position: absolute; pointer-events: none; border: 2px solid currentColor; }
  .historia-cube::before { inset: -10px 8px 8px -10px; opacity: 0.5; }
  .historia-cube::after { inset: 8px -10px -10px 8px; opacity: 0.3; }
  .historia-cube i { position: relative; z-index: 1; font-size: 1.5rem; transform: skewY(8deg) rotate(10deg); }

  @keyframes historia-grid-drift { from { background-position: 0 0, 0 0, 0 0; } to { background-position: 180px 0, 0 180px, 0 0; } }
  @keyframes historia-signal-sweep { from { transform: translateX(-4%) rotate(-4deg); opacity: 0.55; } to { transform: translateX(4%) rotate(-4deg); opacity: 1; } }
  @keyframes historia-bars-drift { from { transform: translate3d(-2%, 0, 0) skewY(-8deg); } to { transform: translate3d(2%, -8px, 0) skewY(-8deg); } }
  @keyframes historia-reveal { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes historia-capsule-in { from { opacity: 0; transform: translateX(24px) scale(0.96) rotate(-1deg); } to { opacity: 1; transform: translateX(0) scale(1) rotate(0deg); } }
  @keyframes historia-capsule-out { from { opacity: 1; transform: translateX(0) scale(1) rotate(0deg); } to { opacity: 0; transform: translateX(-24px) scale(1.04) rotate(1deg); } }
  @keyframes historia-content-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes historia-content-out { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-8px); } }
  @keyframes historia-menu-open { from { opacity: 0; transform: translateY(-8px) scaleY(0.94); } to { opacity: 1; transform: translateY(0) scaleY(1); } }
  @keyframes historia-menu-close { from { opacity: 1; transform: translateY(0) scaleY(1); } to { opacity: 0; transform: translateY(-8px) scaleY(0.94); } }

  @media (prefers-reduced-motion: reduce) {
    .historia-hero,
    .historia-content,
    .historia-hero::before,
    .historia-hero::after,
    .historia-hero .h-eyebrow,
    .historia-hero .h-titular,
    .historia-hero__lead,
    .historia-prose p { animation: none; }
    .historia-particle,
    .historia-capsule,
    .historia-capsule::before { animation: none; }
    .historia-capsule { transform: none; transition: none; }
    .historia-capsule__heading,
    .historia-capsule p { opacity: 1; transform: none; animation: none; }
  }

  @media (max-width: 767px) {
    .historia-hero .h-titular { font-size: clamp(2.05rem, 9.5vw, 3.4rem); }
    .historia-layout { display: block; }
    .historia-chapter-nav { display: none; }
    .historia-chapter-select-wrap { display: block; padding-bottom: 0.85rem; }
    .historia-chapter-tab { min-height: 54px; padding: 0.65rem 0.55rem 0.65rem 1.75rem; font-size: 0.65rem; }
    .historia-capsule { padding: 1.4rem; box-shadow: 7px 7px 0 rgba(17,17,17,0.12); }
    .historia-capsule__heading { gap: 0.65rem; }
    .historia-capsule h2 { font-size: clamp(1.15rem, 4.8vw, 1.7rem); }
    .historia-cube { width: 48px; height: 48px; }
  }

  /* CTA replacement for legado-stats: image + text */
  .legado-cta-wrap { margin-top: 0; }
  .legado-cta { display: inline-flex; align-items: center; gap: 0.9rem; padding: 0.9rem 1.2rem; }
  .legado-cta__img { width: 48px; height: auto; display: block; flex: 0 0 48px; }

  /* Layout: image column left on desktop, stacked on mobile */
  .legado-grid { position: relative; display: grid; grid-template-columns: 220px 1fr; gap: var(--space-4); align-items: stretch; }
  .legado-grid > .legado-media,
  .legado-grid > .legado-content { position: relative; z-index: 2; }
  .legado-media { display: flex; align-items: center; justify-content: center; }
  .legado-tarro-canvas { position: relative; display: block; width: 100%; height: 100%; min-height: 360px; background: transparent; overflow: hidden; touch-action: none; isolation: isolate; }
  .legado-tarro-canvas canvas { position: relative; z-index: 2; }
  .legado-room__wall,
  .legado-room__floor { position: absolute; inset: 0; pointer-events: none; }
  .legado-room__wall,
  .legado-room__floor { transition: none; }
  .legado-room__wall,
  .legado-room__floor { z-index: 0; }
  .legado-room__wall--left {
    background: #e5e5e2;
    clip-path: polygon(0 0, var(--legado-room-vertex) 0, var(--legado-room-vertex) var(--legado-room-vertex-y), 0 100%);
  }
  .legado-room__wall--right {
    background: #ececea;
    clip-path: polygon(var(--legado-room-vertex) 0, 100% 0, 100% var(--legado-room-vertex-y), var(--legado-room-vertex) var(--legado-room-vertex-y));
  }
  .legado-room__floor {
    z-index: 1;
    background: #f1f1ef;
    clip-path: polygon(var(--legado-room-vertex) var(--legado-room-vertex-y), 100% var(--legado-room-vertex-y), 100% 100%, 0 100%);
  }
  .legado-room__floor::before {
    content: "";
    position: absolute;
    top: calc(var(--legado-room-vertex-y) - 1px);
    right: 0;
    left: var(--legado-room-vertex);
    height: 1px;
    background: rgba(17,17,17,0.12);
  }
  .legado-content { min-width: 0; display: flex; flex-direction: column; gap: var(--space-3); }
  .legado-content { gap: 0; }
  .legado-content .section-head { margin-bottom: var(--space-2); }
  .legado-content > p { margin-top: 0 !important; margin-bottom: var(--space-3) !important; }
  .legado-tarro-canvas--mobile { display: none; }

  @media (min-width: 769px) {
    .legado-content { justify-content: center; }
  }

  /* Row used only on mobile to stack the tarro and CTA */
  .legado-row { display: block; }

  @media (max-width: 768px) {
    .legado-room-section { --legado-room-vertex-y: calc(70% + var(--legado-room-shift-y)); }
    .legado-grid { grid-template-columns: 1fr; }
    .legado-media { display: none; }
    .legado-row { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-3); margin-top: 0; }
    .legado-tarro-canvas--mobile { display: block; width: min(72vw, 280px); height: 300px; min-height: 0; flex: 0 0 auto; margin-inline: auto; }
    .legado-tarro-canvas--mobile canvas { display: block; width: 100% !important; height: 100% !important; }
    .legado-cta-wrap { width: 100%; margin: 0; text-align: center; }
    .legado-cta { display: inline-flex; margin: 0; max-width: min(100%, 240px); text-align: center; }
    .legado-cta .btn { display: inline-flex; justify-content: center; align-items: center; }
  }

  /* Sala Pulse: mobile polaroid centering and spacing */
  @media (max-width: 768px) {
    #sala-pulse.accesos-section { padding-bottom: calc(var(--space-4) + 12px); }
    #sala-pulse .conduccion { flex-direction: column; align-items: center; text-align: center; gap: var(--space-4); }
    #sala-pulse .conduccion-media { width: 100%; display: flex; justify-content: center; }
    /* Polaroid style: white frame, larger bottom margin, subtle rotation and shadow */
    .pulse-frame {
      background: #fff;
      padding: 8px 8px 24px;
      display: inline-block;
      transform: rotate(-2deg);
      box-shadow: 0 10px 24px rgba(0,0,0,0.32);
      border-radius: 4px;
      max-width: 92vw;
    }
    .pulse-frame img {
      display: block;
      width: 100%;
      height: auto;
      border: none;
      margin: 0;
    }
    .pulse-festival-bg { opacity: 0.6; }
  }

  @media (prefers-reduced-motion: reduce) {
    .pulse-festival-bg { display: none; }
  }

  .section-head > div::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.2rem;
    bottom: 0.2rem;
    width: 4px;
    background: linear-gradient(180deg, var(--rojo), var(--amarillo), var(--azul));
  }

  @media (min-width: 768px) {
    .section-head {
      flex-direction: row;
      align-items: flex-end;
      justify-content: space-between;
    }
  }

  .episodios-grid {
    grid-template-columns: 1fr;
  }
  @media (min-width: 768px) { .episodios-grid { grid-template-columns: repeat(3, 1fr); } }

  .legado-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .legado-stat {
    background: rgba(17,17,17,0.03);
    border: 1px solid rgba(17,17,17,0.08);
    border-left: 6px solid var(--rojo);
    padding: 1.3rem 1.2rem;
  }

  .legado-stat__num {
    font-size: clamp(2rem, 2.8vw, 3rem);
    font-weight: 900;
    line-height: 1;
    color: var(--negro);
  }

  .legado-stat__label {
    color: var(--texto-sec);
    margin-top: 0.6rem;
  }

  .accesos-section {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding-block: var(--space-6);
    background: var(--crema);
    border-top: 1px solid var(--borde);
    border-bottom: 1px solid var(--borde);
  }
  .accesos-section > .container { position: relative; z-index: 2; }
  .accesos-tv-noise { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
  .accesos-tv-noise::after { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(255,255,255,0.9); pointer-events: none; }
  #accesos-tv-noise-canvas { position: absolute; inset: 0; z-index: 0; display: block; width: 100%; height: 100%; opacity: 0.45; image-rendering: pixelated; filter: contrast(1.35) brightness(0.9); }

  .accesos-intro {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: var(--space-4);
  }
  .accesos-intro .h-eyebrow { margin: 0; }
  .accesos-intro .h-titular { width: 100%; max-width: none; margin: 0; font-size: var(--fs-h2); }

  .conduccion-section {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    /* pattern applied directly to the section to avoid inset misalignment */
    background-image: url("data:image/svg+xml;utf8,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%20120%2090%27%20width=%27120%27%20height=%2790%27%20shape-rendering=%27geometricPrecision%27%3E%3Crect%20width=%27120%27%20height=%2790%27%20fill=%27transparent%27/%3E%3Cg%20fill-rule=%27evenodd%27%20stroke=%27none%27%3E%3Cpath%20d=%27M-30%2012%20L0%2033%20L0%2063%20L-30%2042%20Z%27%20fill=%27#de423e%27/%3E%3Cpath%20d=%27M0%2033%20L30%2012%20L30%2042%20L0%2063%20Z%27%20fill=%27#0a6abb%27/%3E%3Cpath%20d=%27M0%20-3%20L30%2012%20L0%2033%20L-30%2012%20Z%27%20fill=%27#f7d23a%27/%3E%3Cpath%20d=%27M30%2012%20L60%2033%20L60%2063%20L30%2042%20Z%27%20fill=%27#de423e%27/%3E%3Cpath%20d=%27M60%2033%20L90%2012%20L90%2042%20L60%2063%20Z%27%20fill=%27#0a6abb%27/%3E%3Cpath%20d=%27M60%20-3%20L90%2012%20L60%2033%20L30%2012%20Z%27%20fill=%27#f7d23a%27/%3E%3Cpath%20d=%27M90%2012%20L120%2033%20L120%2063%20L90%2042%20Z%27%20fill=%27#de423e%27/%3E%3Cpath%20d=%27M120%2033%20L150%2012%20L150%2042%20L120%2063%20Z%27%20fill=%27#0a6abb%27/%3E%3Cpath%20d=%27M120%20-3%20L150%2012%20L120%2033%20L90%2012%20Z%27%20fill=%27#f7d23a%27/%3E%3Cpath%20d=%27M-60%2057%20L-30%2078%20L-30%20108%20L-60%2087%20Z%27%20fill=%27#de423e%27/%3E%3Cpath%20d=%27M-30%2078%20L0%2057%20L0%2087%20L-30%20108%20Z%27%20fill=%27#0a6abb%27/%3E%3Cpath%20d=%27M-30%2042%20L0%2057%20L-30%2078%20L-60%2057%20Z%27%20fill=%27#f7d23a%27/%3E%3Cpath%20d=%27M0%2057%20L30%2078%20L30%20108%20L0%2087%20Z%27%20fill=%27#de423e%27/%3E%3Cpath%20d=%27M30%2078%20L60%2057%20L60%2087%20L30%20108%20Z%27%20fill=%27#0a6abb%27/%3E%3Cpath%20d=%27M30%2042%20L60%2057%20L30%2078%20L0%2057%20Z%27%20fill=%27#f7d23a%27/%3E%3Cpath%20d=%27M60%2057%20L90%2078%20L90%20108%20L60%2087%20Z%27%20fill=%27#de423e%27/%3E%3Cpath%20d=%27M90%2078%20L120%2057%20L120%2087%20L90%20108%20Z%27%20fill=%27#0a6abb%27/%3E%3Cpath%20d=%27M90%2042%20L120%2057%20L90%2078%20L60%2057%20Z%27%20fill=%27#f7d23a%27/%3E%3Cpath%20d=%27M120%2057%20L150%2078%20L150%20108%20L120%2087%20Z%27%20fill=%27#de423e%27/%3E%3Cpath%20d=%27M150%2078%20L180%2057%20L180%2087%20L150%20108%20Z%27%20fill=%27#0a6abb%27/%3E%3Cpath%20d=%27M150%2042%20L180%2057%20L150%2078%20L120%2057%20Z%27%20fill=%27#f7d23a%27/%3E%3C/g%3E%3C/svg%3E")
    background-repeat: repeat;
    background-position: 0 0; /* align to top-left */
    background-size: 120px 90px; /* tile size */
    background-origin: border-box;
    background-clip: border-box;
  }

  .conduccion-section::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: rgba(217,35,31,0.5);
    z-index: 0;
  }

  .conduccion-section::after {
    /* remove translucent overlay that lightens the brand color */
    display: none !important;
  }

  .conduccion-bg-cube {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: grid;
    place-items: center;
    pointer-events: none;
    perspective: 10000px;
    perspective-origin: center center;
    overflow: hidden;
    transform-style: preserve-3d;
  }

  .conduccion-bg-cube__shape {
    position: relative;
    --bg-cube-size: clamp(260px, 42vw, 560px);
    --bg-cube-half: clamp(130px, 21vw, 280px);
    width: var(--bg-cube-size);
    height: var(--bg-cube-size);
    aspect-ratio: 1;
    perspective: 10000px;
    perspective-origin: center center;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d !important;
    transform-origin: center center;
    overflow: visible;
    transform: rotateX(-24deg) rotateY(-38deg) rotateZ(8deg);
    animation: conduccion-bg-cube-spin 22s linear infinite;
  }

  .conduccion-bg-cube__shape::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 0;
    transform: translateZ(var(--bg-cube-half));
    pointer-events: none;
    z-index: 2;
  }

  .conduccion-bg-cube__face {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
    outline: none;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d !important;
    backface-visibility: hidden;
    opacity: 0.62;
  }

  .conduccion-bg-cube__face--front {
    background: linear-gradient(145deg, #f04a4d 0%, #c71926 55%, #8a0d18 100%);
    transform: translateZ(var(--bg-cube-half));
  }
  .conduccion-bg-cube__face--back {
    background: #5a0710;
    transform: rotateY(180deg) translateZ(var(--bg-cube-half));
  }
  .conduccion-bg-cube__face--right {
    background: linear-gradient(180deg, #9c101c 0%, #43050c 100%);
    transform: rotateY(90deg) translateZ(var(--bg-cube-half));
  }
  .conduccion-bg-cube__face--left {
    background: #b91a27;
    transform: rotateY(-90deg) translateZ(var(--bg-cube-half));
  }
  .conduccion-bg-cube__face--top {
    background: linear-gradient(135deg, #ff8b7f 0%, #e12c36 55%, #9b101b 100%);
    transform: rotateX(90deg) translateZ(var(--bg-cube-half));
  }
  .conduccion-bg-cube__face--bottom {
    background: #35050b;
    transform: rotateX(-90deg) translateZ(var(--bg-cube-half));
  }

  @keyframes conduccion-bg-cube-spin {
    from { transform: rotateX(-24deg) rotateY(-38deg) rotateZ(8deg); }
    to { transform: rotateX(-24deg) rotateY(322deg) rotateZ(8deg); }
  }

  @media (max-width: 767px) {
    .conduccion-bg-cube__shape {
      --bg-cube-size: 76vw;
      --bg-cube-half: calc(min(76vw, 360px) / 2);
      width: 76vw;
      height: 76vw;
      max-width: 360px;
      max-height: 360px;
      transform: rotateX(-28deg) rotateY(-38deg) rotateZ(0deg);
    }
      .conduccion-bg-cube__face { opacity: 0.5; }
  }

  .conduccion-section .container,
  .conduccion-section .conduccion-grid,
  .conduccion-section .conduccion-left,
  .conduccion-section .conduccion-right {
    position: relative;
    z-index: 1;
  }

  .accesos {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  @media (min-width: 768px) {
    .accesos { grid-template-columns: repeat(3, 1fr); }
  }

  .card-access {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    min-height: 290px;
    padding: 2rem 1.7rem 1.6rem;
    background: var(--blanco);
    border: 1px solid rgba(17,17,17,0.12);
    border-top: 12px solid var(--card-accent, var(--rojo));
    color: var(--negro);
    text-decoration: none;
    box-shadow: 8px 8px 0 rgba(17,17,17,0.08);
    transform: translateY(0);
    transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), border-color 220ms var(--ease);
  }

  .card-access::after {
    content: "";
    position: absolute;
    right: -3rem;
    bottom: -4rem;
    width: 10rem;
    height: 10rem;
    background: var(--card-accent, var(--rojo));
    opacity: 0.1;
    transform: rotate(45deg);
    transition: transform 220ms var(--ease), opacity 220ms var(--ease);
  }

  .card-access:hover,
  .card-access:focus-visible {
    transform: translateY(-6px);
    border-color: var(--card-accent, var(--rojo));
    box-shadow: 12px 14px 0 rgba(17,17,17,0.12);
  }
  .card-access:hover::after,
  .card-access:focus-visible::after { opacity: 0.2; transform: rotate(45deg) scale(1.2); }
  .card-access:focus-visible { outline: 3px solid var(--negro); outline-offset: 4px; }

  .card-access__title {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: none;
    font-size: clamp(1.25rem, 1.1rem + 0.45vw, 1.55rem);
    line-height: 1.05;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.02em;
  }

  .card-access__desc,
  .card-access__go {
    position: relative;
    z-index: 1;
    color: rgba(17,17,17,0.8);
  }

  .card-access__desc { max-width: 31ch; line-height: 1.45; }

  .card-access__go {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: auto;
    padding: 0.5rem 0.75rem;
    border: 2px solid currentColor;
    background: rgba(255,255,255,0.5);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--card-accent, var(--rojo));
    font-size: 0.78rem;
    transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
  }

  .card-access:hover .card-access__go,
  .card-access:focus-visible .card-access__go { background: var(--card-accent, var(--rojo)); color: var(--blanco); transform: translateX(3px); }
  .card-access--amarillo:hover .card-access__go,
  .card-access--amarillo:focus-visible .card-access__go { color: var(--negro); }

  .card-access--azul { --card-accent: var(--azul); background: #edf5ff; }
  .card-access--rojo { --card-accent: var(--rojo); background: #fff3f1; }
  .card-access--amarillo { --card-accent: var(--amarillo); background: #fffbe8; color: var(--negro); }
  .card-access--amarillo .card-access__desc,
  .card-access--amarillo .card-access__go { color: rgba(17,17,17,0.8); }

  @media (max-width: 767px) {
    .accesos-intro { gap: 0.5rem; margin-bottom: var(--space-3); }
    .accesos-intro .h-titular { width: 100%; max-width: none; }
    .card-access { min-height: 240px; padding: 1.6rem 1.25rem 1.35rem; }
  }

  /* new layout for the Conducción section: left content and right cube */
  .conduccion-grid {
    display: grid;
    gap: clamp(1rem, 2vw, 2rem);
    align-items: center;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 320px);
  }

  .conduccion-left {
    min-width: 0;
    max-width: 100%;
  }

  .conduccion-right {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
  }

  /* cube container */
  .conduccion__cube {
    --cube-size: clamp(160px, 22vw, 320px);
    --half: calc(var(--cube-size) / 2);
    width: min(100%, 320px);
    max-width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1100px;
    align-self: center;
    justify-self: center;
    margin-inline: auto;
    touch-action: none;
    cursor: grab;
  }

  .conduccion__cube:active { cursor: grabbing; }

  @media (max-width: 767px) {
    .conduccion-grid {
      grid-template-columns: 1fr;
      grid-auto-flow: dense;
    }
    .conduccion-right {
      order: -1;
      margin: 0 auto var(--space-3) auto;
      width: min(100%, 280px);
    }
    .conduccion__cube { width: min(100%, 280px); margin: 0 auto; }
  }

  .conduccion__cube .cube3d {
      position: relative;
      width: var(--cube-size);
      height: var(--cube-size);
      transform-style: preserve-3d;
      transform: rotateX(-18deg) rotateY(-28deg) scale(0.98);
      transition: transform 0.6s cubic-bezier(0.22,1,0.36,1);
      box-shadow: none; /* remove shadows */
    }

  .conduccion__cube .face {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    border: none;
    box-shadow: none;
    backface-visibility: hidden;
    overflow: hidden;
    box-sizing: border-box;
  }

  .conduccion__cube .face-front { transform: translateZ(var(--half)); }
  .conduccion__cube .face-right { transform: rotateY(90deg) translateZ(var(--half)); }
  .conduccion__cube .face-top { transform: rotateX(90deg) translateZ(var(--half)); }
  .conduccion__cube .face-bottom { transform: rotateX(-90deg) translateZ(var(--half)); }

  /* subtle outline using a pseudo-element on the cube container so it doesn't affect face dimensions */
  .conduccion__cube .cube3d::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: 1px;
    box-shadow: none; /* remove outline/decorative gradients */
    z-index: 10;
  }

  /* Make the cube container float subtly (animation on container, cube transform kept for pointer) */
  .conduccion__cube { animation: floatCube 8s ease-in-out infinite alternate; }

  /* inner image layer for smooth sliding transitions */
  .conduccion__cube .face .face-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transform: translateX(0);
    transition: transform 0.6s cubic-bezier(0.22,1,0.36,1), opacity 0.45s linear;
    will-change: transform, opacity;
  }
  .conduccion__cube .face .face-img.entering { transform: translateX(100%); }
  .conduccion__cube .face .face-img.entering.active { transform: translateX(0); }
  .conduccion__cube .face .face-img.exiting { transform: translateX(0); }
  .conduccion__cube .face .face-img.exiting.active { transform: translateX(-100%); opacity: 0.95; }
  .conduccion__cube .face .face-img.hidden { opacity: 0; }


  /* smaller screens: stack cube below text */
  @media (max-width: 767px) {
    .conduccion { grid-template-columns: 1fr; }
    .conduccion__cube { margin-top: var(--space-3); max-width: 320px; }
  }

  .episode-card {
    background: var(--blanco);
    border: 1px solid var(--borde);
    border-left: 8px solid var(--rojo);
    overflow: hidden;
    box-shadow: none;
  }

  .episode-card__media {
    min-height: 150px;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 1rem 1rem 0.9rem;
    color: var(--negro);
  }

  .episode-card__ghost-num {
    position: absolute;
    right: 1rem;
    bottom: -0.2rem;
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 900;
    line-height: 1;
    color: rgba(17,17,17,0.18);
    letter-spacing: -0.06em;
  }

  .episode-card__tag {
    position: relative;
    z-index: 1;
    background: rgba(17,17,17,0.12);
    border: 1px solid rgba(17,17,17,0.14);
    padding: 0.45rem 0.7rem;
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 800;
  }

  .episode-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.25rem 1rem 1.1rem;
    color: var(--negro);
  }

  .episode-card__num {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--rojo);
  }

  .episode-card__title {
    font-size: 1.15rem;
    line-height: 1.2;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .episode-card__artist {
    font-size: 0.88rem;
    color: var(--texto-sec);
  }

  .episode-card__chips {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.2rem;
  }

  .episode-card__chip {
    display: block;
    font-size: 0.75rem;
    color: rgba(17,17,17,0.8);
    line-height: 1.5;
  }

  .site-footer {
    background:
      linear-gradient(180deg, rgba(8,12,20,0.94), rgba(4,8,15,0.98)),
      repeating-linear-gradient(90deg, rgba(90,188,255,0.04) 0, rgba(90,188,255,0.04) 1px, transparent 1px, transparent 18px);
    border-top: 1px solid rgba(255,255,255,0.06);
    color: var(--crema);
    background-color: #05060a;
    padding-block: 72px 28px;
  }

  .site-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
      linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0) 30%, rgba(255,255,255,0.03)),
      repeating-linear-gradient(90deg, rgba(90,188,255,0.04) 0, rgba(90,188,255,0.04) 1px, transparent 1px, transparent 18px);
  }

  /* Lift footer above potential overlays */
  .site-footer { position: relative; z-index: 10; }

  .footer-inner {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    position: relative;
    z-index: 3;
  }

  .footer-cols {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
  }

  @media (min-width: 768px) {
    .footer-cols {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: var(--space-5);
    }
  }

  @media (min-width: 1024px) {
    .footer-cols {
      grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr));
    }
  }

  .footer-heading {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 800;
    color: rgba(255,255,255,0.7);
    margin-bottom: 0.8rem;
  }

  .footer-social {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
  }

  .footer-social a {
    color: rgba(255,255,255,0.9);
  }

  .footer-social a:hover,
  .footer-social a:focus-visible {
    color: #fff;
    text-shadow: 0 0 16px rgba(255,255,255,0.5);
  }

  .newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .newsletter-form input {
    width: 100%;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.02);
    color: var(--blanco);
    min-height: 42px;
    padding: 0.7rem 0.9rem;
  }

  /* Footer: center everything on single-column (mobile) view */
  @media (max-width: 767px) {
    .site-footer .footer-inner {
      align-items: center;
      text-align: center;
    }
    .site-footer .footer-cols {
      align-items: center;
      width: 100%;
    }
    .site-footer .footer-cols > div {
      width: 100%;
      max-width: 560px;
    }
    .site-footer .footer-cols > div:first-child {
      display: flex;
      flex-direction: column;
      align-items: center;
    }
    .site-footer .footer-cols > div:first-child .brand-bug {
      justify-content: center;
    }
    .site-footer .footer-desc {
      margin-inline: auto;
    }
    .site-footer .footer-heading { text-align: center; }
    .footer-social {
      flex-direction: row;
      flex-wrap: wrap;
      justify-content: center;
      gap: 0.5rem;
      align-items: center;
    }
    .footer-social a { display: inline-flex; }
    .newsletter-form {
      align-items: center;
      width: 100%;
    }
    .newsletter-form input { max-width: 88%; }
    .site-footer .site-branding,
    .site-footer .footer-credits {
      width: 100%;
      display: flex;
      justify-content: center;
      align-items: center;
      text-align: center;
    }
  }

  .newsletter-form input::placeholder { color: rgba(255,255,255,0.5); }

  .footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 1rem;
    color: rgba(255,255,255,0.64);
    font-size: 0.76rem;
    letter-spacing: 0.04em;
  }
}

@layer components {
  .brand-bug {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
  }

  .brand-bug__label {
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 0.88rem;
    line-height: 1;
    color: var(--blanco);
    text-shadow: 0 0 18px rgba(255,255,255,0.14);
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
  }

  .site-footer .brand-bug__label { color: var(--blanco); }

  .brand-bug__svg {
    width: 35px;
    height: auto;
    display: block;
    flex-shrink: 0;
    filter: none;
  }

  .nav-main a {
    position: relative;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    padding-block: 0.45rem;
    color: rgba(255,255,255,0.8);
    border-bottom: 2px solid transparent;
    transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
  }

  .nav-main a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    height: 2px;
    background: linear-gradient(90deg, var(--amarillo), var(--rojo), var(--azul));
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform var(--dur-fast) var(--ease);
  }

  .nav-main a:hover,
  .nav-main a:focus-visible { color: var(--blanco); transform: translateY(-1px); }
  .nav-main a:hover::after,
  .nav-main a:focus-visible::after { transform: scaleX(1); }

  .header-actions { display: flex; align-items: center; gap: 0.75rem; }

  .header-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 0.8rem;
    min-height: 36px;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    background: linear-gradient(135deg, #d9231f 0%, #ff4d5f 100%);
    border: 1px solid rgba(255,255,255,0.14);
    box-shadow: 0 0 0 rgba(255,77,95,0), 0 18px 34px rgba(217,35,31,0.28);
  }

  .header-cta:hover { box-shadow: 0 0 20px rgba(255,77,95,0.3), 0 18px 34px rgba(217,35,31,0.38); }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.12);
    color: var(--blanco);
    padding: 0.6rem 0.8rem;
    min-height: 36px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    cursor: pointer;
    width: var(--nav-toggle-menu-width, auto);
    transition: width var(--dur-base) var(--ease), background var(--dur-fast) var(--ease);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 8px 18px rgba(0,0,0,0.12);
  }
  .nav-toggle.is-menu-open { width: var(--nav-toggle-close-width, auto); }

  .nav-toggle__bars {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3px;
    width: 16px;
    height: 14px;
    flex: 0 0 16px;
    color: var(--blanco);
  }

  .nav-toggle__bars span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--blanco);
    opacity: 1;
    border-radius: 0;
    transform-origin: center;
    transition: transform var(--dur-base) var(--ease), opacity var(--dur-fast) var(--ease);
  }
  .nav-toggle.is-menu-open .nav-toggle__bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
  .nav-toggle.is-menu-open .nav-toggle__bars span:nth-child(2) { opacity: 0; }
  .nav-toggle.is-menu-open .nav-toggle__bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

  .nav-toggle__label {
    display: inline-block;
    line-height: 1;
  }

  /* Make sure the hamburger is visible on mobile and hidden on desktop where the nav is shown inline */
  .nav-toggle { display: inline-flex; }
  /* JS-controlled hidden state */
  .nav-toggle.is-hidden { display: none !important; }

  @media (min-width: 1024px) {
    .nav-toggle { display: none; }
  }

  /* Very small screens: show only the bars icon to save space */
  @media (max-width: 420px) {
    .nav-toggle { padding: 0.4rem 0.5rem; }
    .header-cta { padding: 0.45rem 0.6rem; font-size: 0.66rem; }
  }

  @media (max-width: 1023px) {
    .header-cta { display: none; }
  }

  .mobile-menu {
    position: fixed;
    top: var(--site-header-height, 72px);
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 49;
    background: rgba(0, 0, 0, 0.9);
    -webkit-backdrop-filter: blur(18px) saturate(125%);
    backdrop-filter: blur(18px) saturate(125%);
    color: var(--blanco);
    display: flex;
    flex-direction: column;
    padding: var(--space-3);
    pointer-events: none;
    transform: translateY(-110%);
    transition: transform var(--dur-base) var(--ease);
  }
  .mobile-menu.is-open { pointer-events: auto; transform: translateY(0); }

  .mobile-menu__close {
    display: none;
    align-self: flex-end;
    background: none;
    border: 1px solid var(--crema);
    color: var(--crema);
    padding: 8px 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
  }

  .mobile-menu ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-top: var(--space-5);
  }

  .mobile-menu a {
    font-size: var(--fs-h3);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    background: var(--rojo);
    border: 1px solid var(--rojo);
    box-shadow: 0 8px 20px rgba(217, 35, 31, 0.22);
    overflow: hidden;
    color: var(--blanco);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
    padding: 0.58rem 0.9rem;
    border-radius: 0;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  }

  .btn::before {
    content: "";
    position: absolute;
    inset: -35% -10%;
    background: radial-gradient(circle, rgba(255,255,255,0.24), transparent 40%);
    opacity: 0;
    transform: translateX(-30%) scale(0.7);
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  }

  .btn:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 10px 24px rgba(217, 35, 31, 0.3);
  }

  .btn:hover::before {
    opacity: 1;
    transform: translateX(12%) scale(1.1);
  }

  .btn-outline {
    background: transparent;
    border-color: var(--azul);
    color: var(--azul);
    box-shadow: 0 7px 16px rgba(0,87,168,0.12);
  }
  .btn-outline:hover {
    background: var(--azul);
    border-color: var(--azul);
    color: var(--blanco);
    box-shadow: 0 10px 22px rgba(0,87,168,0.24);
  }

  /* Branding button for "Ver el estreno" */
  .btn-epicentro {
    background: var(--amarillo);
    border-color: var(--amarillo);
    color: var(--negro);
    box-shadow: 0 8px 20px rgba(255,213,0,0.24);
  }
  .btn-epicentro:hover {
    background: var(--azul);
    border-color: var(--azul);
    color: var(--negro);
    color: var(--blanco);
  }

  #legado .btn-outline,
  #proximos .btn-outline { border-color: var(--azul) !important; color: var(--azul) !important; }
  #legado .btn-outline:hover,
  #proximos .btn-outline:hover { background: var(--azul); color: var(--blanco) !important; }
}

.preview-modal { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: clamp(1rem, 4vw, 3rem); background: rgba(4,3,10,0.86); opacity: 0; pointer-events: none; transition: opacity 220ms var(--ease); }
.preview-modal.is-visible { opacity: 1; pointer-events: auto; }
.preview-modal__panel { position: relative; width: min(100%, 980px); padding: clamp(0.6rem, 1.5vw, 1rem); border-top: 10px solid var(--amarillo); background: var(--negro); color: var(--blanco); box-shadow: 12px 12px 0 rgba(0,0,0,0.28); transform: translateY(18px) scale(0.98); transition: transform 300ms var(--ease); }
.preview-modal.is-visible .preview-modal__panel { transform: translateY(0) scale(1); }
.preview-modal__close { position: absolute; z-index: 3; top: 0.35rem; right: 0.35rem; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border: 2px solid var(--amarillo); background: rgba(17,17,17,0.86); color: var(--blanco); font-size: 1.7rem; line-height: 1; cursor: pointer; }
.preview-modal__close:hover, .preview-modal__close:focus-visible { background: var(--amarillo); color: var(--negro); }
.preview-modal__video { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.preview-modal__video iframe { display: block; width: 100%; height: 100%; border: 0; }
@media (max-width: 600px) {
}

@layer utilities {
  /* universal reveal animation helpers (lateral sliding entry/exit) */
  .reveal {
    opacity: 0;
    transform: translate3d(0, 0, 0);
    transition: opacity 0.72s var(--ease), transform 0.72s var(--ease);
    will-change: opacity, transform;
  }
  .reveal.is-visible { opacity: 1; transform: translate3d(0, 0, 0); }
  .reveal.is-exiting { opacity: 0; }

  /* slide from left/right; when exiting we move slightly further in the same direction */
  .reveal-left {
    opacity: 0;
    transform: translate3d(-18%, 0, 0);
  }
  .reveal-left.is-visible { opacity: 1; transform: translate3d(0, 0, 0); }
  .reveal-left.is-exiting { opacity: 0; transform: translate3d(-22%, 0, 0); }

  .reveal-right {
    opacity: 0;
    transform: translate3d(18%, 0, 0);
  }
  .reveal-right.is-visible { opacity: 1; transform: translate3d(0, 0, 0); }
  .reveal-right.is-exiting { opacity: 0; transform: translate3d(22%, 0, 0); }

  /* small fade variant still allowed but keep it lateral-friendly */
  .reveal-fade {
    opacity: 0;
    transform: translate3d(6%, 0, 0);
  }
  .reveal-fade.is-visible { opacity: 1; transform: translate3d(0, 0, 0); }

  /* hero reveal keeps a subtle lateral shift and scale for presence */
  .reveal-hero {
    opacity: 0;
    transform: translate3d(-6%, 0, 0) scale(0.985);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  }
  .reveal-hero.is-visible { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

/* force no rounded corners anywhere */
* { border-radius: 0 !important; }

.brand-bug {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.brand-bug__label {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* Footer tweaks: smaller description and social/icon row */
.footer-desc {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.82);
  line-height: 1.45;
}

.footer-social--icons {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}
.footer-social--icons li a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.9);
  font-size: 1.05rem;
}
/* ensure list items don't force vertical layout */
.footer-social--icons li { list-style: none; margin: 0; padding: 0; }
.footer-social--icons { flex-direction: row; }
.footer-links li { margin-bottom: 0.45rem; }
.footer-links a { color: rgba(255,255,255,0.8); }

  .footer-bottom span { color: rgba(255,255,255,0.72); }

  .site-footer a, .site-footer a * {
    color: rgba(255,255,255,0.95) !important;
    opacity: 1 !important;
    text-shadow: none !important;
    pointer-events: auto !important;
  }

  .site-footer { isolation: isolate; }

  @media (min-width: 1024px) {
    main {
      position: relative;
      z-index: 1;
      margin-bottom: 0;
    }
    .site-footer {
      position: relative;
      z-index: 10;
    }
  }

.conduccion-social { display: flex; gap: 0.6rem; align-items: center; }
.social-btn { display: inline-flex; align-items: center; gap: 0.6rem; }
.social-btn i { font-size: 1.05rem; }

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.8rem;
  min-height: 36px;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 0.6rem 0.8rem;
  min-height: 36px;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
}

@media (max-width: 1023px) {
  .header-cta { display: none; }
}

.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  width: 16px;
  height: 14px;
}

.nav-toggle__bars span {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
}

.nav-toggle__label {
  display: inline-block;
  line-height: 1;
}

/* Hero cube */
.hero-cube-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0;
  padding: 0; /* remove extra inline padding to avoid pushing layout */
  animation: floatCube 8s ease-in-out infinite alternate;
  align-self: center;
}

/* stronger rule to override any conflicting layout and guarantee centering in desktop grid */
.hero-inner > .hero-cube-stage { align-self: center !important; }

/* --- Styles imported/adapted from GalliLOGOresponsive.html (scoped to the hero cube) --- */
#hero-cube-root {
 --bg-top: #e3000f;
 --txt-top: #ffffff;
 --bg-front: #fcd100;
 --txt-front: #000000;
 --bg-right: #005aa9;
 --txt-right: #ffffff;
 --scale: 1;
 position: relative;
 z-index: 1;
 touch-action: none;
 cursor: grab;
 width: 250px;
 height: 250px;
 max-width: 100%;
 max-height: 100%;
 display: block;
 margin: 0 auto;
 user-select: none;
 -webkit-user-select: none;
 -webkit-touch-callout: none;
}

#hero-cube-root:active { cursor: grabbing; }

#hero-cube-root .logo-container {
 position: absolute;
 top: 50%;
 left: 50%;
 transform: translate(-50%, -50%) scale(var(--scale));
 transform-origin: center center;
 transition: transform 0.15s ease-out;
 will-change: transform;
}

#hero-cube-root .cube {
 position: relative;
 width: 250px;
 height: 250px;
 transform-style: preserve-3d;
 transform: rotateX(-35.264deg) rotateY(-45deg);
 will-change: transform;
}

#hero-cube-root .cube.playing {
 transform: rotateX(-15deg) rotateY(-45deg);
}

#hero-cube-root .face {
 position: absolute;
 width: 250px;
 height: 250px;
 display: flex;
 justify-content: center;
 align-items: center;
 overflow: hidden;
 outline: 1px solid transparent;
 transition: background-color 0.5s ease;
}

#hero-cube-root .face-top {
 background-color: var(--bg-top);
 transform: rotateX(90deg) translateZ(125px);
}

#hero-cube-root .face-front {
 background-color: var(--bg-front);
 transform: translateZ(125px);
}

#hero-cube-root .face-right {
 background-color: var(--bg-right);
 transform: rotateY(90deg) translateZ(125px);
}

#hero-cube-root .text {
 line-height: 0.8;
 margin: 0;
 text-transform: uppercase;
 font-weight: 900;
}

#hero-cube-root .text-el-top {
 color: var(--txt-top);
 font-size: 200px;
 transform: translateY(0) scaleX(0.8) scaleY(1.4);
 transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1), color 0.5s ease;
 will-change: transform;
 font-weight: 800;
}

/* 404 signal cube */
.error-page { background: var(--bg-dark); overflow-x: hidden; }
.error-hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100svh;
  height: 100svh;
  padding: 0;
  overflow: hidden;
  background: #04030a;
  isolation: isolate;
}
.error-hero #tv-noise { z-index: 0; }
.error-cube-stage { position: relative; z-index: 3; display: grid; place-items: center; gap: 1.5rem; width: min(78vw, 520px); height: min(78vw, 520px); }
.error-cube-root { flex: 0 0 auto; }
.error-cube-root:focus-visible { outline: 3px solid var(--amarillo); outline-offset: 8px; }
.error-back-link { position: relative; z-index: 4; }
#hero-cube-root.error-cube-root .text-el-top { font-size: 220px; transform: translateY(0) scaleX(1.15) scaleY(1.2); }
#hero-cube-root.error-cube-root .error-face-text { color: var(--txt-front); font-size: 220px; transform: scaleX(1.15) scaleY(1.2); }
#hero-cube-root.error-cube-root .face-right .error-face-text { color: var(--txt-right); }
#hero-cube-root.error-cube-root .marquee-text { font-size: 150px; letter-spacing: 0; }
#hero-cube-root.error-cube-root .word.error-code { display: block; min-width: 100%; text-align: center; }
#hero-cube-root.error-cube-root .marquee-text .phrase { flex-shrink: 0; margin-right: 96px; }
#hero-cube-root.error-cube-root .error-marquee { opacity: 0; transition: opacity 220ms ease; }
#hero-cube-root.error-cube-root .cube.playing .error-marquee { opacity: 1; }
#hero-cube-root.error-cube-root .cube.playing .error-face-text { opacity: 0; }

#hero-cube-root .text-el-top.hidden {
 transform: translateY(-200%) scaleX(0.8) scaleY(1.4);
}

#hero-cube-root .marquee-container {
 position: absolute;
 top: 0;
 left: 0;
 width: 100%;
 height: 100%;
 display: flex;
 align-items: center;
}

#hero-cube-root .marquee-text {
 position: absolute;
 left: 0;
 display: flex;
 line-height: 0.8;
 margin: 0;
 text-transform: uppercase;
 font-weight: 900;
 font-size: 135px;
 letter-spacing: -4px;
 white-space: nowrap;
 transform-origin: left center;
 will-change: transform;
 transition: color 0.5s ease;
}

#hero-cube-root .marquee-container.front .marquee-text { color: var(--txt-front); }
#hero-cube-root .marquee-container.right .marquee-text { color: var(--txt-right); }

#hero-cube-root .phrase {
 display: flex;
 align-items: center;
}

#hero-cube-root .word {
 display: block;
}

#hero-cube-root .word.el {
 font-weight: 900;
}

#hero-cube-root .gap {
 display: block;
 will-change: width;
}

.ggphrase {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.ggword {
  display: inline-block;
  transform: scaleX(0.55) scaleY(2.0);
  transform-origin: center;
  line-height: 1;
}

.gggap {
  display: inline-block;
  height: 1px;
}

.ticker {
  position: relative;
  z-index: 60;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 3.2rem;
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,0.12);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.92);
  color: var(--blanco);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
}

body.home-page .ticker { z-index: 6; }
body:not(.home-page) .ticker { display: none; }

.ticker__track {
  display: flex;
  align-items: center;
  height: auto;
  min-height: 2.5rem;
  gap: 2.4rem;
  width: max-content;
  min-width: max-content;
  padding: 0.6rem 0;
  white-space: nowrap;
  animation: ticker-scroll 26s linear infinite;
  will-change: transform;
}

.ticker__item {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.88);
}

.ticker__dot {
  width: 8px;
  height: 8px;
  background: var(--blanco);
  animation: ticker-blink 1.4s ease-in-out infinite;
  display: inline-block;
  margin-right: 8px;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes ticker-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

/* Musical submission form */
.sonar-page { width: 100%; background: var(--crema); overflow-x: hidden; }
.sonar-page .ticker { width: 100%; contain: layout paint; }
.bandas-page .sonar-layout { display: block; }
.bandas-page .sonar-form { width: 100%; max-width: none; }
.bandas-stage:not(.is-active) { display: none; }
.bandas-progress { position: relative; display: flex; align-items: center; justify-content: space-between; height: 8px; margin: 0 0 var(--space-4); background: #e8e4dc; }
.bandas-progress__bar { display: block; width: 20%; height: 100%; background: var(--rojo); transition: width 300ms var(--ease); }
.bandas-progress strong { position: absolute; right: 0; bottom: 0.8rem; color: var(--texto-sec); font-size: 0.7rem; letter-spacing: 0.12em; }
.bandas-stage__intro { margin: 0.75rem 0 0; color: var(--texto-sec); }
.bandas-appearance-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: var(--space-3); }
.bandas-choice { display: flex !important; align-items: flex-start; gap: 0.75rem !important; min-height: 150px; margin: 0 !important; padding: 1rem; border: 2px solid var(--borde); background: #fcfbf8; cursor: pointer; transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease); }
.bandas-choice:has(input:checked) { border-color: var(--rojo); background: #fff3f1; transform: translateY(-3px); }
.bandas-choice input { flex: 0 0 auto; width: 1.1rem; height: 1.1rem; margin-top: 0.15rem; accent-color: var(--rojo); }
.bandas-choice span { display: grid; gap: 0.45rem; }
.bandas-choice strong { font-size: 0.9rem; line-height: 1.15; }
.bandas-choice small { color: var(--texto-sec); font-size: 0.82rem; font-weight: 400; line-height: 1.35; }
.bandas-stage-actions { display: flex; justify-content: space-between; gap: 1rem; margin-top: var(--space-4); }
.bandas-stage-actions [hidden], .bandas-submit[hidden], .bandas-consent[hidden] { display: none !important; }
.bandas-prev { margin-top: var(--space-3); }
.bandas-submit { margin-top: var(--space-3); }

.ranking-page { width: 100%; min-height: 100vh; background: var(--negro); overflow-x: hidden; }
.ranking-hero { --ranking-pointer-x: 0; --ranking-pointer-y: 0; position: relative; display: grid; min-height: calc(100vh - var(--site-header-height, 0px)); min-height: calc(100svh - var(--site-header-height, 0px)); align-items: center; overflow: hidden; isolation: isolate; padding-block: clamp(8rem, 14vw, 11rem) clamp(4rem, 8vw, 7rem); background: linear-gradient(125deg, #111 0 28%, #d9231f 28% 54%, #0057a8 54% 76%, #ffd500 76%); color: var(--blanco); }
.ranking-hero::before { content: "RANKING"; position: absolute; right: -0.08em; bottom: -0.16em; z-index: -1; color: rgba(17,17,17,0.5); font-size: clamp(7rem, 23vw, 22rem); font-weight: 900; line-height: 0.72; letter-spacing: -0.08em; transform: translate3d(calc(var(--ranking-pointer-x) * -18px), calc(var(--ranking-pointer-y) * -12px), 0) rotate(-8deg); transition: transform 180ms var(--ease); }
.ranking-hero::after { content: ""; position: absolute; inset: -20%; z-index: -1; background: repeating-linear-gradient(90deg, transparent 0 38px, rgba(255,255,255,0.15) 39px 40px), repeating-linear-gradient(0deg, transparent 0 38px, rgba(17,17,17,0.2) 39px 40px); background-size: 160px 160px; mix-blend-mode: overlay; transform: translate3d(calc(var(--ranking-pointer-x) * 12px), calc(var(--ranking-pointer-y) * 12px), 0) rotate(-6deg); animation: ranking-grid-drift 16s linear infinite; }
.ranking-hero__inner { position: relative; z-index: 3; max-width: 760px; transform: translate3d(calc(var(--ranking-pointer-x) * 5px), calc(var(--ranking-pointer-y) * 5px), 0); transition: transform 180ms var(--ease); }
.ranking-hero .h-eyebrow { color: var(--amarillo); }
.ranking-hero .h-titular { max-width: 16ch; margin-top: 0.7rem; color: var(--blanco); font-size: clamp(2.8rem, 6.5vw, 5.5rem); line-height: 0.9; text-shadow: 7px 7px 0 rgba(17,17,17,0.22); }
.ranking-hero__lead { max-width: 48ch; margin-top: var(--space-4); color: rgba(255,255,255,0.92); font-size: clamp(1rem, 0.95rem + 0.3vw, 1.25rem); }
.ranking-hero__signal { display: inline-flex; align-items: center; gap: 0.7rem; margin-top: var(--space-5); padding: 0.75rem 1rem; border: 2px solid var(--negro); background: var(--amarillo); color: var(--negro); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; box-shadow: 7px 7px 0 rgba(17,17,17,0.24); }
.ranking-hero__signal-dot { width: 10px; height: 10px; background: var(--rojo); box-shadow: 0 0 0 5px rgba(217,35,31,0.2); animation: ranking-pulse 1.5s ease-in-out infinite; }
.ranking-hero__stamp { position: absolute; right: clamp(1.5rem, 8vw, 8rem); top: 25%; z-index: 2; display: grid; place-items: center; width: clamp(120px, 16vw, 210px); aspect-ratio: 1; border: 4px solid var(--negro); background: var(--blanco); color: var(--negro); font-size: clamp(0.8rem, 1.4vw, 1.2rem); font-weight: 900; line-height: 1.05; letter-spacing: 0.08em; text-align: center; user-select: none; pointer-events: none; transform: translate3d(calc(var(--ranking-pointer-x) * 18px), calc(var(--ranking-pointer-y) * 18px), 0) rotate(9deg); box-shadow: 12px 12px 0 rgba(17,17,17,0.26); transition: transform 180ms var(--ease); }
@keyframes ranking-grid-drift { from { background-position: 0 0, 0 0; } to { background-position: 160px 0, 0 160px; } }
@keyframes ranking-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.55; transform: scale(0.72); } }
.podcasts-page { width: 100%; min-height: 100vh; overflow-x: hidden; background: #071316; }
.podcasts-hero {
  --podcast-x: 0;
  --podcast-y: 0;
  position: relative;
  display: grid;
  min-height: calc(100vh - var(--site-header-height, 0px));
  min-height: calc(100svh - var(--site-header-height, 0px));
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  padding-block: clamp(8rem, 14vw, 11rem) clamp(4rem, 8vw, 7rem);
  background: #071316;
  color: var(--blanco);
}
.podcasts-hero::before {
  content: "PODCASTS";
  position: absolute;
  right: -0.06em;
  bottom: -0.13em;
  z-index: -1;
  color: rgba(72, 221, 211, 0.1);
  font-size: clamp(6rem, 22vw, 22rem);
  font-weight: 900;
  line-height: 0.72;
  letter-spacing: -0.08em;
  transform: translate3d(calc(var(--podcast-x) * -22px), calc(var(--podcast-y) * -14px), 0) rotate(-7deg);
  transition: transform 240ms var(--ease);
}
.podcasts-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: radial-gradient(circle at 74% 48%, rgba(217, 35, 31, 0.48), transparent 24%), radial-gradient(circle at 24% 30%, rgba(0, 87, 168, 0.42), transparent 28%), radial-gradient(circle at 52% 78%, rgba(255, 213, 0, 0.2), transparent 22%), linear-gradient(115deg, #071316 0 28%, #10282b 57%, #071316 100%);
}
.podcasts-hero__aurora,
.podcasts-hero__aurora::before,
.podcasts-hero__aurora::after {
  position: absolute;
  pointer-events: none;
  border: 1px solid rgba(72, 221, 211, 0.25);
  border-radius: 50%;
  transform-style: preserve-3d;
}
.podcasts-hero__aurora { inset: -25%; z-index: 0; border-color: rgba(0, 87, 168, 0.42); transform: translate3d(calc(var(--podcast-x) * 12px), calc(var(--podcast-y) * 12px), 0) rotateX(64deg) rotateZ(-14deg); animation: podcasts-orbit 18s linear infinite; }
.podcasts-hero__aurora::before, .podcasts-hero__aurora::after { content: ""; inset: 13%; border-color: rgba(255, 213, 0, 0.5); animation: podcasts-pulse 5s ease-in-out infinite; }
.podcasts-hero__aurora::after { inset: 26%; border-color: rgba(217, 35, 31, 0.62); animation-delay: -1.7s; }
.podcasts-hero__bars { position: absolute; right: 12%; bottom: 18%; z-index: 1; display: flex; align-items: end; gap: clamp(5px, 0.8vw, 12px); height: clamp(150px, 26vw, 300px); transform: translate3d(calc(var(--podcast-x) * 16px), calc(var(--podcast-y) * 10px), 0) skewX(-12deg); transition: transform 240ms var(--ease); }
.podcasts-hero__bars span { display: block; width: clamp(5px, 0.7vw, 12px); height: var(--bar-height); background: linear-gradient(#ffd500, #d9231f 52%, #0057a8); box-shadow: 0 0 18px rgba(217, 35, 31, 0.55); animation: podcasts-bar 1.8s ease-in-out infinite alternate; animation-delay: var(--bar-delay); }
.podcasts-hero__disc { position: absolute; top: 18%; right: 18%; z-index: 2; width: clamp(150px, 21vw, 280px); aspect-ratio: 1; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 50%; background: repeating-radial-gradient(circle, #152b2d 0 2px, #0a1719 3px 7px); box-shadow: 0 0 0 14px rgba(255, 118, 83, 0.08), 0 0 80px rgba(255, 118, 83, 0.25); transform: translate3d(calc(var(--podcast-x) * 20px), calc(var(--podcast-y) * 14px), 0) rotate(calc(-18deg + var(--podcast-x) * 4deg)); transition: transform 240ms var(--ease); animation: podcasts-disc-spin 16s linear infinite; }
.podcasts-hero__disc::before { content: ""; position: absolute; inset: 39%; border: 1px solid rgba(255, 213, 0, 0.9); border-radius: 50%; background: #d9231f; box-shadow: 0 0 0 12px #0057a8, 0 0 20px rgba(255, 213, 0, 0.8); }
.podcasts-hero__inner { position: relative; z-index: 3; max-width: 760px; transform: translate3d(calc(var(--podcast-x) * 5px), calc(var(--podcast-y) * 5px), 0); transition: transform 240ms var(--ease); }
.podcasts-hero .h-eyebrow { color: var(--amarillo); }
.podcasts-hero .h-titular { max-width: 11ch; margin-top: 0.7rem; color: var(--blanco); font-size: clamp(2.8rem, 6.5vw, 5.5rem); line-height: 0.88; text-shadow: 7px 7px 0 rgba(0, 0, 0, 0.25); }
.podcasts-hero__lead { max-width: 48ch; margin-top: var(--space-4); color: rgba(255, 255, 255, 0.88); font-size: clamp(1rem, 0.95rem + 0.3vw, 1.25rem); }
.podcasts-hero__signal { display: inline-flex; align-items: center; gap: 0.7rem; margin-top: var(--space-5); padding: 0.75rem 1rem; border: 2px solid var(--amarillo); background: rgba(7, 19, 22, 0.72); color: var(--amarillo); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; box-shadow: 7px 7px 0 rgba(0, 0, 0, 0.25); }
.podcasts-hero__signal-dot { width: 10px; height: 10px; background: var(--rojo); box-shadow: 0 0 0 5px rgba(217, 35, 31, 0.18); animation: ranking-pulse 1.5s ease-in-out infinite; }
@keyframes podcasts-orbit { from { transform: translate3d(calc(var(--podcast-x) * 12px), calc(var(--podcast-y) * 12px), 0) rotateX(64deg) rotateZ(-14deg); } to { transform: translate3d(calc(var(--podcast-x) * 12px), calc(var(--podcast-y) * 12px), 0) rotateX(64deg) rotateZ(346deg); } }
@keyframes podcasts-pulse { 0%, 100% { transform: scale(0.92); opacity: 0.35; } 50% { transform: scale(1.06); opacity: 0.9; } }
@keyframes podcasts-bar { from { transform: scaleY(0.35); opacity: 0.5; } to { transform: scaleY(1); opacity: 1; } }
@keyframes podcasts-disc-spin { to { rotate: 360deg; } }
@media (max-width: 767px) {
  .podcasts-hero { min-height: calc(100svh - var(--site-header-height, 0px)); padding-block: 7rem 4rem; }
  .podcasts-hero .h-titular { max-width: 10ch; font-size: clamp(2.6rem, 12vw, 4.5rem); }
  .podcasts-hero__disc { top: 13%; right: -8%; width: 190px; opacity: 0.8; }
  .podcasts-hero__bars { right: 7%; bottom: 12%; height: 180px; opacity: 0.75; }
  .podcasts-hero__lead { max-width: 34ch; }
}
.sonar-hero { position: relative; overflow: hidden; min-height: clamp(520px, 70vh, 760px); display: grid; align-items: end; padding-block: clamp(8rem, 15vw, 12rem) clamp(4rem, 8vw, 7rem); background: linear-gradient(128deg, #111 0 39%, #d9231f 39% 64%, #0057a8 64%), repeating-linear-gradient(115deg, transparent 0 34px, rgba(255,255,255,0.2) 35px 37px, transparent 38px 74px), repeating-linear-gradient(0deg, transparent 0 26px, rgba(255,213,0,0.15) 27px 29px, transparent 30px 82px), radial-gradient(circle at 18% 24%, rgba(255,213,0,0.8) 0 2px, transparent 3px), conic-gradient(from 110deg at 62% 48%, rgba(0,87,168,0.7), rgba(217,35,31,0.7), rgba(255,213,0,0.6), rgba(0,87,168,0.7)); background-size: 100% 100%, 180% 180%, 150% 150%, 90px 90px, 160% 160%; background-position: 0 0, 0 0, 0 0, 0 0, 0 0; background-blend-mode: normal, screen, screen, screen, normal; color: var(--blanco); isolation: isolate; perspective: 900px; will-change: background-position, background-size; animation: sonar-depth-drift 9s cubic-bezier(0.2, 0.7, 0.3, 1) infinite alternate; }
.sonar-hero::before { content: "SONAR"; position: absolute; right: -0.05em; bottom: -0.15em; z-index: 0; color: rgba(255,213,0,0.92); font-size: clamp(8rem, 25vw, 24rem); font-weight: 900; line-height: 0.72; letter-spacing: -0.06em; pointer-events: none; transform: rotate(-8deg) translateZ(0); text-shadow: 10px 10px 0 rgba(17,17,17,0.2); }
.bandas-page .sonar-hero::before { content: "BANDAS"; }
.sonar-hero::after { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(0,0,0,0.8); pointer-events: none; transform: translateZ(1px); }
.sonar-hero__particles { position: absolute; inset: -18%; z-index: 2; overflow: hidden; perspective: 700px; transform-style: preserve-3d; pointer-events: none; }
.sonar-hero__particles::before, .sonar-hero__particles::after { content: ""; position: absolute; inset: 8% -10%; border: 1px solid rgba(255,255,255,0.15); transform: rotateX(64deg) rotateZ(-12deg) translateZ(-80px) scale(1.25); animation: sonar-plane-shift 8s ease-in-out infinite alternate; }
.sonar-hero__particles::after { inset: 22% -18%; border-color: rgba(255,213,0,0.24); transform: rotateX(66deg) rotateZ(18deg) translateZ(-180px) scale(1.4); animation-delay: -3s; }
.sonar-hero__particles .particle { position: absolute; display: block; width: clamp(8px, 1.2vw, 18px); aspect-ratio: 1; opacity: 0.95; transform: translate3d(0,0,0) scale(1); box-shadow: 0 0 18px currentColor, 0 0 42px currentColor; animation: sonar-particle-flight 6s cubic-bezier(0.2,0.7,0.3,1) infinite alternate; }
.sonar-hero__particles .particle--red { color: var(--rojo); background: var(--rojo); }
.sonar-hero__particles .particle--yellow { color: var(--amarillo); background: var(--amarillo); }
.sonar-hero__particles .particle--blue { color: var(--azul); background: #4ba5ff; }
.sonar-hero__particles .particle:nth-child(1) { left: 8%; top: 18%; animation-delay: -1s; }
.sonar-hero__particles .particle:nth-child(2) { left: 24%; top: 68%; animation-delay: -4s; }
.sonar-hero__particles .particle:nth-child(3) { left: 38%; top: 28%; animation-delay: -2s; }
.sonar-hero__particles .particle:nth-child(4) { left: 54%; top: 76%; animation-delay: -5s; }
.sonar-hero__particles .particle:nth-child(5) { left: 68%; top: 16%; animation-delay: -3s; }
.sonar-hero__particles .particle:nth-child(6) { left: 82%; top: 54%; animation-delay: -1.8s; }
.sonar-hero__particles .particle:nth-child(7) { left: 14%; top: 84%; animation-delay: -4.8s; }
.sonar-hero__particles .particle:nth-child(8) { left: 47%; top: 12%; animation-delay: -2.8s; }
.sonar-hero__particles .particle:nth-child(9) { left: 74%; top: 82%; animation-delay: -5.4s; }
.sonar-hero__particles .particle:nth-child(10) { left: 91%; top: 30%; animation-delay: -3.6s; }
.sonar-hero__particles .particle:nth-child(11) { left: 31%; top: 42%; animation-delay: -1.5s; }
.sonar-hero__particles .particle:nth-child(12) { left: 61%; top: 38%; animation-delay: -4.2s; }
.sonar-hero__particles .particle:nth-child(13) { left: 5%; top: 48%; animation-delay: -2.4s; }
.sonar-hero__particles .particle:nth-child(14) { left: 87%; top: 72%; animation-delay: -5.8s; }
.sonar-hero__particles .particle:nth-child(15) { left: 45%; top: 91%; animation-delay: -3.1s; }
.sonar-hero__inner { position: relative; z-index: 3; transform-style: preserve-3d; }
.sonar-hero .h-eyebrow { color: var(--amarillo); }
.sonar-hero .h-titular { max-width: 13ch; margin-top: 0.7rem; color: var(--blanco); font-size: clamp(2.6rem, 6vw, 5rem); line-height: 0.92; text-shadow: 5px 5px 0 rgba(0,0,0,0.24); }
.sonar-hero__lead { max-width: 58ch; margin-top: var(--space-3); color: rgba(255,255,255,0.9); font-size: clamp(1rem, 0.95rem + 0.3vw, 1.2rem); }
.sonar-form-section { padding-block: clamp(3rem, 7vw, 6rem); background: var(--crema); }
.sonar-layout { display: grid; grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr); gap: clamp(2rem, 7vw, 7rem); align-items: start; }
.sonar-aside { position: sticky; top: 6rem; }
.sonar-aside .h-titular { margin-top: 0.7rem; font-size: var(--fs-h2); line-height: 1; }
.sonar-aside > p:not(.h-eyebrow) { max-width: 34ch; margin-top: var(--space-3); color: var(--texto-sec); }
.sonar-aside__note { display: grid; gap: 0.4rem; max-width: 34ch; margin-top: var(--space-5); padding: 1rem; border-left: 5px solid var(--amarillo); background: rgba(255,213,0,0.14); color: var(--negro); }
.sonar-aside__note strong { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }
.sonar-aside__note span { font-size: 0.9rem; line-height: 1.4; }
.sonar-form { min-width: 0; padding: clamp(1.25rem, 3vw, 2.5rem); background: var(--blanco); border-top: 10px solid var(--azul); box-shadow: 10px 10px 0 rgba(17,17,17,0.09); }
.sonar-form__heading { margin-bottom: var(--space-4); }
.sonar-form__heading .h-titular { margin-top: 0.5rem; font-size: var(--fs-h2); }
.sonar-form__heading > p:last-child { margin-top: 0.65rem; color: var(--texto-sec); font-size: 0.9rem; }
.sonar-form fieldset { min-width: 0; margin: 0; padding: var(--space-3) 0; border: 0; border-top: 1px solid var(--borde); }
.sonar-form legend { padding: 0; color: var(--rojo); font-size: 0.8rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; }
.form-grid { display: grid; gap: 1rem; }
.form-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sonar-form label { display: block; margin-top: 1rem; color: var(--negro); font-size: 0.82rem; font-weight: 800; letter-spacing: 0.02em; }
.sonar-form label > span[aria-hidden="true"], .sonar-form .form-check span > span[aria-hidden="true"] { color: var(--rojo); }
.sonar-form label input:not([type="checkbox"]), .sonar-form label select, .sonar-form label textarea { display: block; margin-top: 0.4rem; }
.sonar-form input:not([type="checkbox"]), .sonar-form select, .sonar-form textarea { width: 100%; padding: 0.7rem 0.75rem; border: 1px solid #c9c5bd; border-radius: 0; background: #fcfbf8; color: var(--negro); font: inherit; font-size: 0.95rem; font-weight: 400; line-height: 1.35; }
.sonar-form textarea { min-height: 7rem; resize: vertical; }
.sonar-form input:focus, .sonar-form select:focus, .sonar-form textarea:focus { border-color: var(--azul); outline: 3px solid rgba(0,87,168,0.18); outline-offset: 0; }
.sonar-form input::placeholder, .sonar-form textarea::placeholder { color: #8e8a82; }
.form-check { display: flex !important; align-items: flex-start; gap: 0.65rem !important; font-weight: 600 !important; line-height: 1.35; }
.form-check input[type="checkbox"] { flex: 0 0 auto; width: 1.1rem; height: 1.1rem; margin-top: 0.1rem; accent-color: var(--rojo); }
.form-check--consent { margin-top: var(--space-3) !important; }
.sonar-submit { margin-top: var(--space-3); }
.sonar-form__status { min-height: 1.5rem; margin-top: 0.8rem; color: var(--azul); font-size: 0.9rem; font-weight: 700; }
.bandas-form .sonar-form__status.is-warning { color: var(--rojo); }
@keyframes sonar-depth-drift { from { background-position: 0 0, 0 0, 0 0, 0 0, 0 0; background-size: 100% 100%, 180% 180%, 150% 150%, 90px 90px, 160% 160%; } to { background-position: 0 0, 18% 12%, -12% 16%, 72px 48px, -14% 10%; background-size: 100% 100%, 250% 250%, 210% 210%, 132px 132px, 205% 205%; } }
@keyframes sonar-plane-shift { from { transform: rotateX(64deg) rotateZ(-12deg) translate3d(-3%, 2%, -80px) scale(1.25); opacity: 0.45; } to { transform: rotateX(70deg) rotateZ(14deg) translate3d(7%, -5%, 80px) scale(1.55); opacity: 1; } }
@keyframes sonar-particle-flight { from { transform: translate3d(-20px, 24px, -120px) rotate(0deg) scale(0.45); opacity: 0.25; } to { transform: translate3d(34px, -42px, 180px) rotate(180deg) scale(1.5); opacity: 1; } }
.modal-open { overflow: hidden; }
.sonar-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1.25rem; background: rgba(17,17,17,0.72); opacity: 0; pointer-events: none; transition: opacity 220ms var(--ease); }
.sonar-modal.is-visible { opacity: 1; pointer-events: auto; }
.sonar-modal__panel { position: relative; width: min(100%, 520px); padding: clamp(1.5rem, 5vw, 3rem); border-top: 12px solid var(--amarillo); background: var(--blanco); color: var(--negro); box-shadow: 12px 12px 0 rgba(0,0,0,0.2); transform: translateY(18px) rotate(-1deg); transition: transform 300ms var(--ease); }
.sonar-modal.is-visible .sonar-modal__panel { transform: translateY(0) rotate(-1deg); }
.sonar-modal__signal { position: absolute; top: -2.1rem; right: 1.2rem; display: grid; place-items: center; width: 4rem; height: 4rem; background: var(--rojo); color: var(--blanco); font-size: 2.4rem; font-weight: 900; transform: rotate(8deg); }
.sonar-modal__panel h2 { max-width: 14ch; margin-top: 0.65rem; font-size: clamp(1.6rem, 4vw, 2.5rem); line-height: 0.98; text-transform: uppercase; }
.sonar-modal__panel > p:not(.h-eyebrow) { max-width: 42ch; margin-top: 1rem; color: var(--texto-sec); }
.sonar-modal__close { margin-top: 1.5rem; }
@media (max-width: 767px) {
  .sonar-hero { min-height: 590px; background: linear-gradient(155deg, #111 0 43%, #d9231f 43% 72%, #0057a8 72%), repeating-linear-gradient(115deg, transparent 0 26px, rgba(255,255,255,0.2) 27px 29px, transparent 30px 62px), repeating-linear-gradient(0deg, transparent 0 22px, rgba(255,213,0,0.14) 23px 25px, transparent 26px 66px), radial-gradient(circle at 18% 18%, rgba(255,213,0,0.7) 0 2px, transparent 3px), conic-gradient(from 100deg at 56% 46%, rgba(0,87,168,0.7), rgba(217,35,31,0.65), rgba(255,213,0,0.55), rgba(0,87,168,0.7)); background-size: 100% 100%, 220% 220%, 180% 180%, 78px 78px, 180% 180%; }
  .sonar-hero .h-titular { max-width: 11ch; font-size: clamp(2.4rem, 10vw, 4rem); }
  .sonar-hero::before { right: -0.2em; bottom: 0.02em; font-size: 34vw; }
  .sonar-hero__particles { inset: -12%; }
  .sonar-layout { grid-template-columns: 1fr; gap: var(--space-4); }
  .sonar-aside { position: static; }
  .sonar-aside__note { margin-top: var(--space-3); }
  .sonar-form { padding: 1.25rem; }
  .form-grid--two { grid-template-columns: 1fr; gap: 0; }
  .bandas-appearance-grid { grid-template-columns: 1fr; }
  .bandas-choice { min-height: 0; }
  .bandas-stage-actions { position: sticky; bottom: 0; z-index: 4; padding: 0.75rem 0; background: linear-gradient(180deg, rgba(255,255,255,0), var(--blanco) 28%); }
  .ranking-hero { min-height: calc(100svh - var(--site-header-height, 0px)); padding-block: 7rem 4rem; }
  .ranking-hero .h-titular { max-width: 12ch; font-size: clamp(2.6rem, 12vw, 4.5rem); }
  .ranking-hero__stamp { right: 1rem; top: auto; bottom: 3rem; width: 112px; }
  .ranking-hero__lead { max-width: 34ch; }
}

/* Audience reservation page */
.ir-page { width: 100%; background: var(--crema); overflow-x: clip; }
.ir-page .ticker { width: 100%; contain: layout paint; }
.ir-hero { position: relative; display: grid; align-items: end; min-height: clamp(520px, 70vh, 760px); overflow: hidden; padding-block: clamp(8rem, 15vw, 12rem) clamp(4rem, 8vw, 7rem); background: radial-gradient(circle at 72% 34%, rgba(255,213,0,0.9) 0 2px, transparent 3px), linear-gradient(132deg, #0057a8 0 42%, #111 42% 67%, #d9231f 67%); color: var(--blanco); isolation: isolate; }
.ir-hero::before { content: "LIVE"; position: absolute; right: -0.08em; bottom: -0.18em; color: rgba(255,255,255,0.12); font-size: clamp(10rem, 30vw, 28rem); font-weight: 900; line-height: 0.72; letter-spacing: -0.08em; transform: skewX(-12deg); }
.ir-hero::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), repeating-linear-gradient(90deg, transparent 0 44px, rgba(255,255,255,0.14) 45px 46px), repeating-linear-gradient(0deg, transparent 0 44px, rgba(255,255,255,0.08) 45px 46px); background-size: 100% 100%, 160px 160px, 160px 160px; background-blend-mode: normal, screen, screen; animation: ir-grid-pulse 7s ease-in-out infinite alternate; }
.ir-hero__inner { position: relative; z-index: 3; }
.ir-hero .h-eyebrow { color: var(--amarillo); }
.ir-hero .h-titular { max-width: 13ch; margin-top: 0.7rem; color: var(--blanco); font-size: clamp(2.6rem, 6vw, 5rem); line-height: 0.92; text-shadow: 5px 5px 0 rgba(17,17,17,0.32); }
.ir-hero__lead { max-width: 54ch; margin-top: var(--space-3); color: rgba(255,255,255,0.88); font-size: clamp(1rem, 0.95rem + 0.3vw, 1.2rem); }
.ir-hero__rings { position: absolute; inset: -30%; z-index: 2; display: grid; place-items: center; perspective: 900px; pointer-events: none; }
.ir-hero__rings span { position: absolute; width: 26vw; min-width: 180px; max-width: 420px; aspect-ratio: 1; border: clamp(8px, 1.4vw, 18px) solid rgba(255,213,0,0.72); border-radius: 50%; transform: rotateX(68deg) rotateZ(-18deg) translateZ(0); box-shadow: 0 0 30px rgba(255,213,0,0.28), inset 0 0 30px rgba(255,213,0,0.14); animation: ir-ring-orbit 8s cubic-bezier(0.2,0.7,0.3,1) infinite alternate; }
.ir-hero__rings span:nth-child(2) { width: 42vw; border-color: rgba(217,35,31,0.65); transform: rotateX(68deg) rotateZ(24deg) translateZ(-80px); animation-delay: -2s; animation-duration: 10s; }
.ir-hero__rings span:nth-child(3) { width: 60vw; border-color: rgba(75,165,255,0.58); transform: rotateX(68deg) rotateZ(-42deg) translateZ(-160px); animation-delay: -4s; animation-duration: 12s; }
.ir-hero__rings span:nth-child(4) { width: 78vw; border-color: rgba(255,255,255,0.24); transform: rotateX(68deg) rotateZ(12deg) translateZ(-240px); animation-delay: -6s; animation-duration: 14s; }
.ir-hero__spark { position: absolute; z-index: 2; width: 12px; aspect-ratio: 1; background: var(--amarillo); box-shadow: 0 0 24px var(--amarillo); animation: ir-spark-drift 4s ease-in-out infinite alternate; }
.ir-hero__spark--one { top: 20%; right: 18%; }
.ir-hero__spark--two { bottom: 22%; left: 48%; background: var(--rojo); box-shadow: 0 0 24px var(--rojo); animation-delay: -2s; }
.ir-hero__stamp { display: inline-grid; place-items: center; width: 104px; height: 104px; margin-top: var(--space-4); border: 3px solid var(--amarillo); color: var(--amarillo); font-size: 0.9rem; font-weight: 900; letter-spacing: 0.1em; transform: rotate(-8deg); }
.ir-form-section { padding-block: clamp(3rem, 7vw, 6rem); background: var(--crema); }
.ir-layout { display: grid; grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr); gap: clamp(2rem, 7vw, 7rem); align-items: start; }
.ir-aside { position: sticky; top: 6rem; }
.ir-aside .h-titular { margin-top: 0.7rem; font-size: var(--fs-h2); line-height: 1; }
.ir-aside > p:not(.h-eyebrow) { max-width: 34ch; margin-top: var(--space-3); color: var(--texto-sec); }
.ir-aside__note { display: grid; gap: 0.4rem; max-width: 34ch; margin-top: var(--space-5); padding: 1rem; border-left: 5px solid var(--rojo); background: rgba(217,35,31,0.08); }
.ir-aside__note strong { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }
.ir-aside__note span { font-size: 0.9rem; line-height: 1.4; }
.ir-form { min-width: 0; padding: clamp(1.25rem, 3vw, 2.5rem); background: var(--blanco); border-top: 10px solid var(--rojo); box-shadow: 10px 10px 0 rgba(17,17,17,0.09); }
.ir-form__heading { margin-bottom: var(--space-3); }
.ir-form__heading .h-titular { margin-top: 0.5rem; font-size: var(--fs-h2); }
.ir-form__heading > p:last-child { margin-top: 0.65rem; color: var(--texto-sec); font-size: 0.9rem; }
.ir-form label { display: block; margin-top: 1rem; color: var(--negro); font-size: 0.82rem; font-weight: 800; }
.ir-form label > span[aria-hidden="true"], .ir-form .form-check span > span[aria-hidden="true"] { color: var(--rojo); }
.ir-form label input:not([type="checkbox"]), .ir-form label select, .ir-form label textarea { display: block; margin-top: 0.4rem; }
.ir-form input:not([type="checkbox"]), .ir-form select, .ir-form textarea { width: 100%; padding: 0.7rem 0.75rem; border: 1px solid #c9c5bd; border-radius: 0; background: #fcfbf8; color: var(--negro); font: inherit; font-size: 0.95rem; line-height: 1.35; }
.ir-form textarea { min-height: 5rem; resize: vertical; }
.ir-form input:focus, .ir-form select:focus, .ir-form textarea:focus { border-color: var(--rojo); outline: 3px solid rgba(217,35,31,0.16); outline-offset: 0; }
.form-check { display: flex !important; align-items: flex-start; gap: 0.65rem !important; font-weight: 600 !important; line-height: 1.35; }
.form-check input[type="checkbox"] { flex: 0 0 auto; width: 1.1rem; height: 1.1rem; margin-top: 0.1rem; accent-color: var(--rojo); }
.ir-submit { margin-top: var(--space-3); }
.ir-form__status { min-height: 1.5rem; margin-top: 0.8rem; color: var(--rojo); font-size: 0.9rem; font-weight: 700; }
.ir-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1.25rem; background: rgba(17,17,17,0.72); opacity: 0; pointer-events: none; transition: opacity 220ms var(--ease); }
.ir-modal.is-visible { opacity: 1; pointer-events: auto; }
.ir-modal__panel { position: relative; width: min(100%, 520px); padding: clamp(1.5rem, 5vw, 3rem); border-top: 12px solid var(--rojo); background: var(--blanco); color: var(--negro); box-shadow: 12px 12px 0 rgba(0,0,0,0.2); transform: translateY(18px) rotate(1deg); transition: transform 300ms var(--ease); }
.ir-modal.is-visible .ir-modal__panel { transform: translateY(0) rotate(1deg); }
.ir-modal__signal { position: absolute; top: -2.1rem; right: 1.2rem; display: grid; place-items: center; width: 4rem; height: 4rem; background: var(--amarillo); color: var(--negro); font-size: 1.8rem; transform: rotate(-8deg); }
.ir-modal__panel h2 { max-width: 14ch; margin-top: 0.65rem; font-size: clamp(1.6rem, 4vw, 2.5rem); line-height: 0.98; text-transform: uppercase; }
.ir-modal__panel > p:not(.h-eyebrow) { max-width: 42ch; margin-top: 1rem; color: var(--texto-sec); }
.ir-modal__close { margin-top: 1.5rem; }
@keyframes ir-grid-pulse { from { background-position: 0 0, 0 0; transform: scale(1); } to { background-position: 70px -44px, -42px 62px; transform: scale(1.12); } }
@keyframes ir-ring-orbit { from { transform: rotateX(68deg) rotateZ(-18deg) translate3d(-3%, 3%, -80px) scale(0.86); opacity: 0.35; } to { transform: rotateX(74deg) rotateZ(32deg) translate3d(6%, -5%, 100px) scale(1.18); opacity: 1; } }
@keyframes ir-spark-drift { from { transform: translate3d(-20px, 24px, 0) scale(0.5) rotate(0deg); } to { transform: translate3d(30px, -34px, 0) scale(1.4) rotate(180deg); } }
@media (max-width: 767px) {
  .ir-hero { min-height: 590px; }
  .ir-hero .h-titular { max-width: 11ch; font-size: clamp(2.4rem, 10vw, 4rem); }
  .ir-hero__rings { inset: -20%; }
  .ir-hero__stamp { width: 84px; height: 84px; font-size: 0.75rem; }
  .ir-layout { grid-template-columns: 1fr; gap: var(--space-4); }
  .ir-aside { position: static; }
  .ir-aside__note { margin-top: var(--space-3); }
  .ir-form { padding: 1.25rem; }
  .form-grid--two { grid-template-columns: 1fr; gap: 0; }
}

@keyframes floatCube {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(6px); }
}

@media (prefers-reduced-motion: reduce) {
  .ticker__track { animation: none; }
  .ticker__dot { animation: none; }
  .hero-cube-stage { animation: none; }
  .conduccion-section::before { animation: none; }
}

@keyframes cube-pattern-shift {
  0% {
    transform: perspective(900px) rotateX(60deg) rotateZ(-10deg) translate3d(0, 0, 0) scale(1.45);
  }
  100% {
    transform: perspective(900px) rotateX(64deg) rotateZ(-14deg) translate3d(22px, -12px, 0) scale(1.7);
  }
}

@media (max-width: 960px) {
  .feature-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .brand-bug__label { font-size: 0.76rem; }
  .brand-bug__svg { width: 30px; }
  .countdown { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Responsive hero typography adjustments to ensure text scales and reflows with cube */
@media (max-width: 1024px) {
  .hero-copy h1 {
    font-size: clamp(2rem, 8.5vw, 4rem); /* reduce upper bound on medium screens */
    line-height: 1.02;
    word-break: break-word;
  }
  .hero-sub {
    font-size: clamp(0.95rem, 2.6vw, 1.05rem);
    max-width: 48rem;
  }
  .hero-kicker { font-size: 0.68rem; }
  .hero-cta-row .btn { padding: 0.55rem 0.8rem; font-size: 0.9rem; }
  .hero-inner { padding-inline: clamp(0.75rem, 2vw, 1.25rem); }
}

/* Narrow screens: prioritize text, reduce cube footprint */
@media (max-width: 640px) {
  .hero-copy h1 {
    font-size: clamp(1.4rem, 9.5vw, 2.6rem); /* more aggressive shrink on small screens */
    line-height: 1.02;
    letter-spacing: -0.01em;
  }
  .hero-sub { font-size: 0.95rem; max-width: 40rem; }
  .hero-kicker { display: inline-block; margin-bottom: 0.6rem; }
  .hero-cta-row { gap: 0.6rem; }
  .hero-cta-row .btn { padding: 0.5rem 0.75rem; font-size: 0.85rem; }

  /* reduce cube footprint on very small viewports so text has priority */
  .hero-cube-stage { max-width: 46vw; min-height: 0; }
  #hero-cube-root { max-width: 46vw; max-height: 46vw; }
}

/* Medium-large: improve fluidity between ~1024–1279 so text scales smoothly */
@media (min-width: 1025px) and (max-width: 1279px) {
  .hero-copy h1 {
    font-size: clamp(2.6rem, 6.2vw, 5rem);
    line-height: 0.96;
  }
  .hero-copy { max-width: 62ch; }
  .hero-cube-stage { max-width: 420px; }
  #hero-cube-root { --cube-size: clamp(180px, 26vw, 420px); max-width: 420px; max-height: 420px; }
}

/* Large screens: cap headline and limit width so it doesn't grow too much */
@media (min-width: 1280px) {
  .hero-copy h1 {
    font-size: clamp(2.8rem, 3.0vw + 1rem, 4.8rem);
    line-height: 0.92;
  }
  .hero-copy { max-width: 60ch; }
  .hero-cube-stage { max-width: 460px; }
  #hero-cube-root { --cube-size: clamp(200px, 22vw, 460px); max-width: 460px; max-height: 460px; }
}

/* Mobile: reduce excessive top padding so cube no quede tan abajo */
@media (max-width: 640px) {
  .hero {
    padding-block: clamp(1.0rem, 3vw, 1.6rem) !important; /* much smaller top/bottom padding on small screens */
  }

  .hero-cube-stage {
    margin-top: 0; /* remove extra top spacing on the cube */
    margin-bottom: 0.2rem;
    min-height: 120px;
  }

  #hero-cube-root {
    max-width: 46vw;
    max-height: 46vw;
    margin-top: 0; /* ensure internal centering doesn't add offset */
  }
  /* center textual content and CTAs while keeping cube position */
  .hero-inner { align-items: center; text-align: center; }
  .hero-copy { text-align: center; align-self: center; width: 100%; }
  .hero-cta-row { justify-content: center; }

  /* Make hero-copy full-bleed on small screens (full viewport width) while keeping internal padding */
  .hero-copy {
    width: 100vw !important;
    max-width: none !important;
    box-sizing: border-box !important;
    padding-inline: var(--space-3) !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
  }
}

/* Extra strong overrides for very small viewports where padding still feels large */
@media (max-width: 420px) {
  .hero { padding-block: 0.8rem 1.0rem !important; }
  .hero-inner { justify-content: flex-start; gap: 0.6rem; }
  .hero-cube-stage { min-height: 90px !important; }
  #hero-cube-root { transform: translateY(0) !important; }
  .hero-copy { text-align: center; align-self: center; }
}

/* Reduce hero top padding and align items to top on small/medium screens so cube sits closer to ticker */
@media (max-width: 1024px) {
  .hero {
    padding-block: clamp(1.0rem, 3.5vw, 2.4rem) !important;
  }
  .hero-inner {
    align-items: flex-start;
    justify-content: flex-start;
  }
  .hero-cube-stage {
    /* Ensure the cube has a safe top offset so it doesn't overlap the fixed header */
    margin-top: calc(var(--site-header-height, 0px) + 12px) !important;
  }
  .hero-copy { margin-top: 0 !important; }
}

/* Use the header height variable to offset hero content so header doesn't overlap it */
@media (max-width: 1024px) {
  .hero {
    padding-block-start: calc(var(--site-header-height, 0px) + 8px) !important;
  }
}

@media (max-width: 768px) {
  .hero { padding-block: clamp(0.8rem, 3vw, 1.6rem) !important; }
  .hero-inner { align-items: flex-start; }
}
@media (max-width: 768px) {
  .hero {
    padding-block-start: calc(var(--site-header-height, 0px) + 12px) !important;
    padding-block-end: clamp(0.8rem, 3vw, 1.6rem) !important;
  }
  /* On very small screens keep a smaller top gap but still account for header */
  .hero-cube-stage {
    width: min(78vw, 320px) !important;
    max-width: 320px !important;
    min-height: clamp(220px, 70vw, 340px) !important;
    margin-top: calc(var(--site-header-height, 0px) + 8px) !important;
  }
  #hero-cube-root {
    width: 250px !important;
    height: 250px !important;
    max-width: 100% !important;
    max-height: 100% !important;
  }
}

/* Utility: ensure hero copy doesn't overflow its column */
.hero-copy { box-sizing: border-box; overflow-wrap: break-word; }

.hero-copy.reveal,
.hero-copy.reveal-left,
.hero-copy.reveal-right,
.hero-cube-stage.reveal,
.hero-cube-stage.reveal-left,
.hero-cube-stage.reveal-right {
  opacity: 1;
  transform: none;
}

/* Strong override: force full-bleed hero-copy on small screens when other rules block it */
@media (max-width: 768px) {
  .hero-copy {
    position: relative !important;
    width: 100vw !important;
    max-width: none !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    padding-inline: var(--space-3) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }
}
