/* ═══════════════════════════════════════════════════════════════
   A-Tone — style.css
   CSS unificado de REFERENCIA_DE_DISENO/index.html + about.html
   Duplicados eliminados. Organizado por secciones.
   ═══════════════════════════════════════════════════════════════ */

/* ─── TOKENS ─────────────────────────────────────────────── */
:root {
  --bg:        #0c0c0a;
  --surface:   #131311;
  --fg:        #ede9dc;
  --muted:     #827c8a;
  --b0:        rgba(237,233,220,.11);
  --b1:        rgba(237,233,220,.22);
  --b2:        rgba(237,233,220,.68);
  --accent:    #8231ff;

  /* Cuaderno — colores por disciplina */
  --c-audio:   #f5d020;   /* amarillo pollito */
  --c-video:   #8231ff;   /* púrpura corporativo (= --accent) */
  --c-code:    #39ff14;   /* verde fósforo */

  /* Foreground (texto) sobre cada color de disciplina */
  --c-audio-fg: #0c0c0a;
  --c-video-fg: #fff;
  --c-code-fg:  #0c0c0a;
  --accent-fg:  #fff;          /* fallback si no se sobreescribe */

  --f-disp: Georgia, 'Times New Roman', 'Iowan Old Style', serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, 'Courier New', monospace;
  --f-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

/* ─── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img, video { display: block; width: 100%; }

/* ─── SPLASH SCREEN ──────────────────────────────────────── */
.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0c0c0a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.splash__logo {
  pointer-events: none;
}

.splash .logo-svg {
  /* Escala 2x en desktop (max-width 300px ≈ 81px alto con viewBox 320:86),
     se reduce fluidamente en mobile manteniendo el aspect ratio para no
     desbordar el viewport. */
  width: 90vw;
  max-width: 300px;
  height: auto;
  color: var(--fg);
}

/* ─── NAV ────────────────────────────────────────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 56px;
  border-bottom: 1px solid var(--b0);
  background: rgba(12,12,10,.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform .35s ease;
}
.nav.nav-hidden {
  transform: translateY(-100%);
}
.logo {
  display: inline-flex;
  align-items: center;
  color: var(--fg);
  text-decoration: none;
}

#logo-track{filter: brightness(0.5);}

.logo:hover { color: var(--accent); }
.logo svg { display: block; }

/* ─── Logo fills ─────────────────────────────────────────── */
#logo-playhead { fill: url(#logo-glow); }
#logo-playbtn  { fill: #ffffff; }
#logo-playtri  { fill: #ffffff; }

/* Idle: grayscale tras la animación */
.logo-svg.idle,
.logo-svg-static {filter: grayscale(0.4) contrast(1.7); transition: filter 0.4s ease; }

/* Hover en idle: recupera el color */
.logo:hover .logo-svg.idle,
.logo:hover .logo-svg-static { filter: grayscale(0); }
.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  transition: color .2s;
  text-decoration: none;
}
.nav-link__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.nav-link__label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .24em;
  text-transform: uppercase;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  padding-left: 0;
  white-space: nowrap;
  transition: max-width .3s cubic-bezier(0.4, 0, 0.2, 1),
              opacity .2s ease,
              padding-left .3s ease;
}
.nav-links a:hover,
.nav-links a.active { color: var(--fg); }
.nav-links a:hover .nav-link__label,
.nav-links a.active .nav-link__label {
  max-width: 100px;
  opacity: 1;
  padding-left: 6px;
}

/* Centrado real del bloque de iconos: laterales a flex:1 para que
   space-between deje .nav-links en el centro exacto del viewport,
   alineado con .hero-kicker-top. Solo desktop: en ≤960px el nav de
   iconos se oculta y .nav-actions usa margin-left:auto. */
@media (min-width: 961px) {
  .logo { flex: 1; }
  .nav-actions { flex: 1; justify-content: flex-end; }
}

.nav-user {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--b2);
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: color .2s, border-color .2s;
  flex-shrink: 0;
}
.nav-user:hover { color: var(--fg); border-color: var(--fg); }

/* ─── NAV STORE BUTTON ──────────────────────────────────── */
.nav-store {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--b2);
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: 'IBM Plex Mono', monospace;
  transition: color .2s, border-color .2s;
  flex-shrink: 0;
  position: relative;
}
.nav-store:hover { color: var(--fg); border-color: var(--fg); }
.nav-store.is-active { color: var(--fg); border-color: var(--accent); }

.nav-store-badge {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}
.nav-store-badge.visible { display: flex; }

/* ─── NAV HAMBURGER ─────────────────────────────────────── */
.nav-hamburger {
  display: none;                  /* oculto en desktop */
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform .25s ease-in-out, opacity .25s ease-in-out,
              background .25s ease-in-out;
}
.nav-hamburger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background: #fff;
}
.nav-hamburger.is-open span:nth-child(2) {
  opacity: 0;
  transform: translateX(-20px);
}
.nav-hamburger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background: #fff;
}

/* ─── HERO (homepage) ────────────────────────────────────── */

/* ─── MOBILE MENU ───────────────────────────────────────── */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 150;
  pointer-events: none;
  visibility: hidden;
  overflow: hidden;
}
.mobile-menu.is-open {
  pointer-events: auto;
  visibility: visible;
}

/* Overlay — dark semi-transparent backdrop */
.mobile-menu__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  opacity: 0;
  will-change: opacity;
}

/* Panel — dark card sliding from below the nav */
.mobile-menu__panel {
  position: absolute;
  top: 73px;
  left: 0;
  z-index: 1;
  width: 100%;
  max-height: calc(100vh - 73px);
  overflow-y: auto;
  background: #141414;
  border-radius: 0 0 14px 14px;
  padding: 28px 24px 36px;
  box-sizing: border-box;
  transform: translateY(-100%);
  will-change: transform;
}

/* Two-column grid */
.mobile-menu__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* ── Columns ──────────────────────────────── */
.mobile-menu__col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ── Items ────────────────────────────────── */
.mobile-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s, background 0.2s;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-8px);
  will-change: transform, opacity;
}
.mobile-menu__item:hover,
.mobile-menu__item:focus-visible {
  color: #fff;
  background: rgba(255,255,255,0.04);
}
.mobile-menu__item.is-active {
  color: #fff;
}

/* Icon inside items */
.mobile-menu__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

/* Label */
.mobile-menu__label {
  white-space: nowrap;
}

/* ── Left column (navigation): muted tones ── */
.mobile-menu__col--nav .mobile-menu__item {
  color: rgba(255, 255, 255, 0.5);
}
.mobile-menu__col--nav .mobile-menu__icon {
  opacity: 0.55;
}

/* ── Right column (content): saturated accent tones ── */
.mobile-menu__col--content .mobile-menu__item {
  color: rgba(255, 255, 255, 0.7);
  background: rgba(130, 49, 255, 0.06);
}
.mobile-menu__col--content .mobile-menu__icon {
  color: var(--accent);
  opacity: 1;
}
.mobile-menu__col--content .mobile-menu__item:hover,
.mobile-menu__col--content .mobile-menu__item:focus-visible {
  background: rgba(130, 49, 255, 0.14);
}


.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  border-bottom: 1px solid var(--b0);
}
.hero-kicker {
  display: block;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero-kicker-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(12, 12, 10, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
/* Kicker delante de todas las capas, arriba-centro, fijo (sin parallax) */
.hero-kicker-top {
  position: absolute;
  top: 96px;
  left: 0;
  right: 0;
  z-index: 10;
  text-align: center;
  pointer-events: none;
}
.hero-display {
  font-family: var(--f-disp);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(41px, 4vw, 52px);
  line-height: .95;
  letter-spacing: -.03em;
  text-transform: uppercase;
  color: #e9e4d8;
  mix-blend-mode: lighten; /* acabado metálico: se funde con las luces de la imagen */
  margin-bottom: 0;
}
.hero-word { display: block; will-change: transform; }
.hero-caps {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cap {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  border: 1px solid var(--b1);
  color: var(--muted);
  padding: 5px 11px;
  transition: border-color .2s, color .2s;
}
.cap:hover { border-color: var(--b2); color: var(--fg); }

/* ─── Hero por capas (parallax / carta holográfica) ─────────── */
/* Todas las capas comparten caja y encuadre contain: la imagen completa
   (1920×960) siempre visible, con letterbox/pillarbox según viewport. */
.hero-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* landscape: imagen completa con letterbox/pillarbox */
  object-position: center;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  will-change: transform;
  padding-top: 114px;
}
/* En portrait (< 1:1) la imagen 2:1 con contain es una franja ínfima → cover */
@media (max-aspect-ratio: 1/1) {
  .hero-layer { object-fit: cover; }
}
img.hero-layer {
  transform: scale(1.06); /* buffer vs. bordes en parallax; mantener sincronizado con LAYER_SCALE en hero-parallax.js */
}
.hero-layer--masked {
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  /* mask-origin: content-box alinea la máscara con el content-box que usa
     object-fit. Necesario porque .hero-layer tiene padding-top para desplazar
     la imagen bajo el nav; sin esto la máscara referencia el border-box y
     queda 57px por encima de la imagen en viewports típicos. */
  -webkit-mask-origin: content-box;
  mask-origin: content-box;
}
@media (max-aspect-ratio: 1/1) {
  .hero-layer--masked {
    -webkit-mask-size: cover;
    mask-size: cover;
  }
}
.hero-layer--text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  padding: 0 24px 8vh;
}
.hero-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  padding: 0 56px 56px;
}
/* Botón de permiso de giroscopio (iOS) — lo inyecta hero-parallax.js.
   Centrado y con halo pulsante: sin pulsarlo, iOS no da acceso al sensor y
   el hero solo muestra la deriva autónoma (fácil de confundir con el efecto). */
.hero-gyro-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 11;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: rgba(12, 12, 10, .6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--fg);
  padding: 14px 24px;
  cursor: pointer;
  animation: gyro-btn-pulse 2.4s ease-out infinite;
}
@keyframes gyro-btn-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(130, 49, 255, .55); }
  70%  { box-shadow: 0 0 0 18px rgba(130, 49, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(130, 49, 255, 0); }
}
/* Sin soporte WebP: fuera imágenes, el texto se queda (por eso NO se oculta
   .hero-stage entero: la capa de texto vive dentro). */
.hero.no-webp img.hero-layer { display: none; }

/* ─── STATEMENT (fuente oculta para splash screen) ───────── */
.splash-source {
  display: none;
}

/* ── Anti-FOUC: pre-ocultar items animados hasta que GSAP tome el control ── */
.js-anim [data-anim="item"] {
  opacity: 0;
  transform: scale(0.94);
}

/* Palabra envuelta por el sistema text-reveal */
/* anim-word: inline por defecto (<span>) — no inline-block porque
   rompería el flujo de texto y causaría saltos de altura al wrappear. */
.anim-word { display: inline; }

/* ─── SPLASH OVERLAY — transición home → estudio ─────────── */
.splash-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 48px;
  padding: 56px;
  cursor: pointer;
}

.splash-overlay .splash-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  opacity: 0.5;
  margin-bottom: 8px;
}

.splash-overlay .splash-icon svg {
  overflow: visible;
}

.splash-overlay .splash-icon__label {
  font-family: var(--f-disp);
  font-style: italic;
  font-size: 13px;
  color: var(--muted);
}

/* ─── Clapperboard animation (Work splash icon) ──────────── */
.clapper-top {
  transform-origin: 4px 7px;
  animation: clapper-snap 1.3s ease-in-out infinite;
}

@keyframes clapper-snap {
  0%, 100% { transform: rotate(0deg); }
  18% { transform: rotate(-30deg); }
  36% { transform: rotate(0deg); }
}

.splash-overlay .stmt-quote {
  font-family: var(--f-disp);
  font-style: italic;
  font-size: clamp(28px, 3.5vw, 56px);
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--fg);
  text-align: center;
  max-width: 720px;
  text-wrap: balance;
}

.splash-overlay .stmt-attr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.splash-overlay .stmt-attr__label {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.5;
}

.splash-overlay .stmt-attr__name {
  font-family: var(--f-disp);
  font-style: italic;
  font-size: clamp(14px, 1.8vw, 18px);
  line-height: 1.35;
  color: var(--muted);
  text-align: center;
  text-wrap: balance;
}

.splash-overlay .progress-circle {
  --progress-circle-size: 40px;
  /* visibility en vez de display — reserva su espacio desde el
     primer frame para que el flex column no salte al aparecer. */
  display: inline-block;
  visibility: hidden;
}
.splash-overlay .progress-circle.is-active {
  display: inline-block;
  visibility: visible;
}
/* ── Progress Circle — componente reutilizable (@components/progress-circle.twig) ── */
/* Tamaño visual: --progress-circle-size (default 36px). Geometry fija: r=18, circ=113.1 */
.progress-circle {
  display: none;
  width: var(--progress-circle-size, 36px);
  height: var(--progress-circle-size, 36px);
}
.progress-circle.is-active {
  display: block;
}
.progress-circle circle {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 113.1;
  stroke-dashoffset: 113.1;
  transform: rotate(-90deg);
  transform-origin: 22px 22px;
}

