/* =========================================================
   ANDROGYM · estilos
   ========================================================= */

:root {
  --bg: #0b0b0a;
  --panel: #161614;
  --line: #3a3824;
  --text: #f3f2ea;
  --muted: #b9b7a6;
  --amber: #f2e43a;
  --orange: #e1d811;
  --green: #e1d811;
  --hazard: #d8a520;
  --font-title: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 600;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: .02em;
}

a { color: var(--amber); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* ---------- Botones ---------- */
.btn {
  --edge: #3f4b47;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--edge);
  border-radius: 6px;
  background: linear-gradient(#3a4441, #222a28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 3px 0 #111816, 0 6px 14px rgba(0,0,0,.35);
  cursor: pointer;
  transition: transform .12s, filter .15s, box-shadow .12s;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 1px 0 #111816; }

.btn-green {
  --edge: #fff36a;
  color: #111;
  text-shadow: none;
  background: linear-gradient(#f2e43a, #c9b800);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 3px 0 #6b6400, 0 6px 14px rgba(0,0,0,.35);
}
.btn-green:active { box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 1px 0 #6b6400; }

.btn-ghost { background: rgba(255,255,255,.03); box-shadow: none; }
.btn-ghost:active { box-shadow: none; }
.btn-sm { min-height: 38px; padding: 6px 14px; font-size: .9rem; }

/* ---------- HUD ---------- */
.hud {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px clamp(12px, 3vw, 32px);
  background: linear-gradient(180deg, rgba(9,18,16,.97), rgba(9,18,16,.92));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.hud-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ag-logo { display: block; color: #f2f5f3; }
.hud-logo { flex: none; display: block; border-radius: 6px; }
.hud-logo .ag-logo { width: 70px; height: 46px; }
.hud-plate {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 3px 14px 4px;
  border: 1px solid #3f4b47;
  border-radius: 6px;
  background: linear-gradient(#2b3431, #161d1b);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.hud-plate strong { font-family: var(--font-title); font-weight: 600; font-size: 1.05rem; letter-spacing: .16em; }
.status { display: flex; align-items: center; gap: 6px; font-size: .75rem; color: var(--muted); white-space: nowrap; overflow: hidden; }
.status > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.hud > .btn { flex: none; }
.status i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #e0533f; box-shadow: 0 0 8px #e0533f; }
.status.is-open i { background: var(--green); box-shadow: 0 0 8px var(--green); }

.hud-nav { display: flex; gap: 4px; margin-left: auto; }
.hud-nav a {
  padding: 8px 14px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-title);
  font-size: .9rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: 6px;
}
.hud-nav a:hover { border-color: var(--line); background: rgba(255,255,255,.04); }

/* ---------- Cinta de noticias ---------- */
.ticker {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px clamp(12px, 3vw, 32px);
  font-size: .85rem;
  background: rgba(5,10,9,.9);
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.ticker-label { flex: none; font-family: var(--font-title); font-size: .75rem; letter-spacing: .16em; color: var(--muted); }
.ticker-track {
  flex: 1;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
}
.ticker-move { display: flex; width: max-content; animation: ticker 60s linear infinite; }
.ticker-group { display: flex; align-items: center; gap: 22px; padding-right: 22px; white-space: nowrap; color: #f3e3c3; }
.ticker-group i { font-style: normal; color: var(--orange); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* =========================================================
   ESCENA
   ========================================================= */
.scene {
  --floor: 40%;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 100px);
  min-height: calc(100svh - 100px);
  padding: clamp(16px, 3vh, 32px) clamp(12px, 3vw, 40px) 22px;
}
.scene-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }

/* Pared: techo naranja traslúcido arriba y ventanales con vista a las montañas */
.wall {
  position: absolute;
  inset: 0 0 var(--floor) 0;
  background: #1b1d1c;
}
.roof {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 30%;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(0,0,0,.18)),
    repeating-linear-gradient(90deg, #f7c56b 0 18px, #e98a22 18px 30px, #ffd98a 30px 36px),
    #f0a640;
  box-shadow: 0 8px 18px rgba(0,0,0,.45);
}
.truss { position: absolute; inset: 0; width: 100%; height: 100%; }
.glass {
  position: absolute;
  left: 0; right: 0; top: 30%; bottom: 9%;
  overflow: hidden;
  background: linear-gradient(180deg, #cfe2ec, #e9eee4 60%, #f3eccd);
}
.mountains { position: absolute; inset: 0; width: 100%; height: 100%; }
/* Marcos negros de los ventanales */
.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent calc(62% - 4px), #111 calc(62% - 4px) 62%, transparent 62%),
    repeating-linear-gradient(90deg, #111 0 7px, transparent 7px 150px);
  box-shadow: inset 0 0 0 7px #111, inset 0 18px 30px rgba(0,0,0,.35);
}
/* Muro bajo con franja amarilla */
.wall::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 9%;
  background: linear-gradient(#e1d811 0 5px, #202221 5px, #141514);
}
/* Letrero luminoso con el logo en la pared */
.wall-emblem {
  position: absolute;
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 22px 10px;
  background: rgba(10,10,9,.82);
  border: 2px solid rgba(225,216,17,.55);
  border-radius: 8px;
  box-shadow: 0 0 30px rgba(225,216,17,.12), inset 0 0 24px rgba(0,0,0,.5);
  animation: neon 6s infinite;
}
.wall-emblem .ag-logo {
  width: clamp(120px, 13vw, 200px);
  aspect-ratio: 140 / 92;
  height: auto;
  filter: drop-shadow(0 0 6px rgba(255,255,255,.35)) drop-shadow(0 0 14px rgba(225,216,17,.35));
}
.wall-emblem span {
  font: 600 clamp(.7rem, 1vw, .9rem)/1 var(--font-title);
  letter-spacing: .5em;
  margin-right: -.5em;
  color: rgba(242,245,243,.75);
}
@keyframes neon {
  0%, 18%, 22%, 60%, 100% { opacity: 1; }
  20% { opacity: .55; }
  61% { opacity: .8; }
  62% { opacity: 1; }
}

.floor {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: var(--floor);
  overflow: hidden;
  perspective: 520px;
  perspective-origin: 50% 0;
  background: #141414;
}
.floor::before {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 220%;
  height: 160%;
  transform-origin: 50% 0;
  transform: rotateX(62deg);
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.55) 0 3px, transparent 3px 120px),
    repeating-linear-gradient(0deg, rgba(0,0,0,.55) 0 3px, transparent 3px 120px),
    repeating-conic-gradient(#202020 0 25%, #171717 0 50%) 0 0 / 15px 15px;
}
.floor::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255,190,110,.10), transparent 45%),
    radial-gradient(ellipse 30% 50% at 50% 35%, rgba(255,230,180,.08), transparent 70%);
}

.barrier {
  position: absolute;
  bottom: calc(var(--floor) - 18px);
  width: clamp(110px, 13vw, 190px);
  height: 34px;
  background: repeating-linear-gradient(-45deg, var(--hazard) 0 14px, #161616 14px 28px);
  border: 3px solid #0e0e0e;
  border-radius: 3px;
  box-shadow: 0 10px 18px rgba(0,0,0,.55);
}
.barrier--l { left: -12px; }

.dust { position: absolute; inset: 0; }
.dust span {
  position: absolute;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: rgba(255,236,190,.55);
  opacity: 0;
  animation: dust var(--d) linear infinite;
  animation-delay: var(--delay);
}
@keyframes dust {
  0% { transform: translate(0, 0); opacity: 0; }
  15% { opacity: .8; }
  85% { opacity: .5; }
  100% { transform: translate(var(--dx), -140px); opacity: 0; }
}

.vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 75% 70% at 50% 45%, transparent 55%, rgba(0,0,0,.6) 100%),
    linear-gradient(rgba(60,40,10,.08), rgba(60,40,10,.08));
}

/* ---------- Tarjeta de misión ---------- */
.mission {
  position: relative;
  align-self: flex-start;
  max-width: 460px;
  padding: 16px 20px 18px;
  background: rgba(7,13,12,.86);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 6px;
  box-shadow: 0 18px 40px rgba(0,0,0,.5);
  backdrop-filter: blur(3px);
}
.mission::before {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(225,216,17,.7), transparent 30%, transparent 70%, rgba(225,216,17,.6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}
.mission-tag {
  margin: 0 0 8px;
  font-family: var(--font-title);
  font-size: .85rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--orange);
}
.mission h1 { font-size: clamp(1.3rem, 2.2vw, 1.9rem); margin-bottom: 8px; }
.mission h1 em { font-style: normal; color: #E1D811; }
.mission p { margin: 0 0 14px; font-size: .92rem; color: #c9d6d0; }
.mission-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Estaciones (personajes) ---------- */
.stations {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: clamp(8px, 2vw, 28px);
  margin-top: auto;
  padding-top: 18px;
}
.station {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0;
  color: inherit;
  font: inherit;
  background: none;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.station::before {
  content: "";
  position: absolute;
  left: 6%; right: 6%; bottom: 4%;
  height: 22%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(225,216,17,.16), transparent 70%);
  transition: background .25s;
}
.station:hover::before,
.station:focus-visible::before { background: radial-gradient(ellipse at center, rgba(225,216,17,.34), transparent 70%); }
.station:focus-visible { outline-offset: 6px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 5px 4px 12px;
  font-family: var(--font-title);
  font-size: .85rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  background: rgba(8,14,13,.88);
  border: 1px solid #33433e;
  border-radius: 4px;
  transition: border-color .2s, box-shadow .2s;
}
.chip b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  font-size: .8rem;
  letter-spacing: 0;
  color: #1a1405;
  border-radius: 50%;
  background: linear-gradient(#ffd34d, #d99a14);
}
.station:hover .chip,
.station:focus-visible .chip { border-color: var(--green); box-shadow: 0 0 14px rgba(225,216,17,.3); }

/* Altura fija compartida para que las tres zonas queden alineadas
   y la escena completa quepa en la pantalla. */
.art {
  display: block;
  width: 100%;
  height: clamp(200px, calc(100vh - 585px), 400px);
  overflow: visible;
  transition: filter .25s, transform .25s;
}
.station:hover .art,
.station:focus-visible .art { filter: drop-shadow(0 0 12px rgba(120,230,120,.35)); transform: translateY(-3px); }

/* Escenas 3D (scene3d.js). Si no hay WebGL se quedan los dibujos .art */
.stage3d {
  position: relative;
  display: block;
  width: 100%;
  height: clamp(200px, calc(100vh - 585px), 400px);
  transition: transform .25s;
}
.stage3d canvas { display: block; width: 100%; height: 100%; }
.station.has-3d .art { display: none; }
.station:hover .stage3d,
.station:focus-visible .stage3d { transform: translateY(-3px); }
.bubble3d {
  position: absolute;
  top: 4%;
  right: 3%;
  padding: 6px 12px;
  font: 600 .8rem/1.2 var(--font-body);
  color: #12201c;
  background: #e9efed;
  border-radius: 10px;
  pointer-events: none;
  animation: floaty 4s ease-in-out infinite;
}
.bubble3d::after {
  content: "";
  position: absolute;
  left: 14px;
  bottom: -8px;
  border: 5px solid transparent;
  border-top: 6px solid #e9efed;
  border-left: 6px solid #e9efed;
}

.station-hint {
  position: absolute;
  left: 50%;
  bottom: -22px;
  font-size: .8rem;
  white-space: nowrap;
  color: var(--muted);
  opacity: 0;
  transform: translate(-50%, -4px);
  transition: opacity .2s, transform .2s;
}
.station:hover .station-hint,
.station:focus-visible .station-hint { opacity: 1; transform: translate(-50%, 0); }
@media (hover: none) { .station-hint { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- Barra inferior ---------- */
.bottom-nav { display: flex; justify-content: center; gap: 10px; margin-top: 28px; }
.bottom-nav button {
  min-width: 128px;
  padding: 11px 18px;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #dfe7e3;
  border: 1px solid #56625e;
  border-radius: 6px;
  background: linear-gradient(#4b5552, #2a312f);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 4px 0 #141a18, 0 8px 16px rgba(0,0,0,.4);
  cursor: pointer;
  transition: border-color .2s, transform .12s;
}
.bottom-nav button:hover { border-color: var(--green); }
.bottom-nav button:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 2px 0 #141a18; }

/* =========================================================
   ANIMACIONES DE LOS PERSONAJES (SVG)
   ========================================================= */
.svg-label { font: 600 9px ui-monospace, Consolas, monospace; letter-spacing: 1.5px; fill: #9ff7ea; opacity: .85; }
.bubble-text { font: 600 12.5px var(--font-body); fill: #12201c; }
.rep { font: 700 15px var(--font-title); fill: #ffd34d; opacity: 0; }

/* Entrenamiento: saco */
.bag { transform-origin: 44px 0; animation: bagSwing 3.2s ease-in-out infinite; }
@keyframes bagSwing { 0%, 100% { transform: rotate(5deg); } 50% { transform: rotate(-5deg); } }

/* Entrenamiento: sentadilla */
.sq-shin  { transform-origin: 122px 262px; animation: sqShin 2.6s ease-in-out infinite; }
.sq-thigh { transform-origin: 122px 222px; animation: sqThigh 2.6s ease-in-out infinite; }
.sq-torso { transform-origin: 122px 182px; animation: sqTorso 2.6s ease-in-out infinite; }
@keyframes sqShin  { 0%, 8%, 100% { transform: rotate(0); } 46%, 56% { transform: rotate(28deg); } }
@keyframes sqThigh { 0%, 8%, 100% { transform: rotate(0); } 46%, 56% { transform: rotate(-106deg); } }
@keyframes sqTorso { 0%, 8%, 100% { transform: rotate(0); } 46%, 56% { transform: rotate(116deg); } }
.rep--squat { animation: rep 2.6s ease-out infinite; }
.rep--curl  { animation: rep 2.2s ease-out infinite; }
@keyframes rep {
  0%, 80% { opacity: 0; transform: translateY(6px); }
  88% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-14px); }
}

/* Entrenamiento: saltos de tijera */
.jj-body  { animation: jjBody 1.1s ease-in-out infinite; }
.jj-arm-l { transform-origin: 196px 138px; animation: jjArmL 1.1s ease-in-out infinite; }
.jj-arm-r { transform-origin: 214px 138px; animation: jjArmR 1.1s ease-in-out infinite; }
.jj-leg-l { transform-origin: 199px 184px; animation: jjLegL 1.1s ease-in-out infinite; }
.jj-leg-r { transform-origin: 211px 184px; animation: jjLegR 1.1s ease-in-out infinite; }
@keyframes jjBody { 0%, 50%, 100% { transform: translateY(0); } 25%, 75% { transform: translateY(-7px); } }
@keyframes jjArmL { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(150deg); } }
@keyframes jjArmR { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-150deg); } }
@keyframes jjLegL { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(14deg); } }
@keyframes jjLegR { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-14deg); } }

/* Entrenamiento: curl */
.curl-fore { transform-origin: 301px 166px; animation: curl 2.2s ease-in-out infinite; }
@keyframes curl { 0%, 100% { transform: rotate(0); } 45%, 55% { transform: rotate(140deg); } }

/* Laboratorio */
.holo-cone { animation: holoFlicker 3s infinite; }
@keyframes holoFlicker { 0%, 100% { opacity: .9; } 50% { opacity: .65; } 52% { opacity: .95; } 54% { opacity: .55; } }
.holo-mol { transform-box: fill-box; transform-origin: center; animation: spinY 4.5s ease-in-out infinite; }
@keyframes spinY { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(-1); } }
.float { animation: floaty 5s ease-in-out infinite; }
.float--slow { animation-duration: 7s; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.peptide { animation: floaty 6s ease-in-out infinite; }
.aa {
  transform-box: fill-box;
  transform-origin: center;
  animation: pulse 2.4s ease-in-out infinite;
  animation-delay: calc(var(--i) * .18s);
}
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.35); } }
.ring { transform-box: fill-box; transform-origin: center; animation: spin 22s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.sci-body { animation: breathe 3.6s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(1.5px); } }
.sci-head { transform-origin: 180px 136px; animation: headTilt 5s ease-in-out infinite; }
@keyframes headTilt { 0%, 100% { transform: rotate(0); } 35%, 65% { transform: rotate(5deg); } }
.sci-arm { transform-origin: 206px 160px; animation: swirl 1.8s ease-in-out infinite alternate; }
@keyframes swirl { from { transform: rotate(-4deg); } to { transform: rotate(5deg); } }
.flask-liquid { animation: glowPulse 2s ease-in-out infinite; }
@keyframes glowPulse { 50% { opacity: .7; } }
.glint { opacity: 0; animation: glint 4s infinite; }
@keyframes glint { 0%, 70%, 100% { opacity: 0; } 75%, 85% { opacity: 1; } }

.bub { opacity: 0; animation: bub 2s ease-in infinite; }
@keyframes bub {
  0% { transform: translateY(0); opacity: 0; }
  15% { opacity: .9; }
  100% { transform: translateY(var(--rise, -18px)); opacity: 0; }
}

.blink { transform-box: fill-box; transform-origin: center; animation: blink 4.5s infinite; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }

/* Comunicaciones */
.eq {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: eq 1.1s ease-in-out infinite;
  animation-delay: calc(var(--i) * -.17s);
}
@keyframes eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
.led { animation: led 1.2s steps(1) infinite; }
.led--red { animation-duration: 1.6s; }
@keyframes led { 50% { opacity: .25; } }
.radio-wave { transform-box: fill-box; transform-origin: center; opacity: 0; animation: radio 2.4s ease-out infinite; }
@keyframes radio { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(3.2); opacity: 0; } }
.wave-arm { transform-origin: 280px 194px; animation: wave 4s ease-in-out infinite; }
@keyframes wave {
  0%, 40%, 100% { transform: rotate(0); }
  8%, 24% { transform: rotate(-16deg); }
  16%, 32% { transform: rotate(14deg); }
}
.girl-head { transform-origin: 240px 148px; animation: nod 4s ease-in-out infinite; }
@keyframes nod { 0%, 40%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(-4deg); } }
.ponytail { transform-origin: 252px 118px; animation: pony 3s ease-in-out infinite; }
@keyframes pony { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(5deg); } }
.bubble { animation: floaty 4s ease-in-out infinite; }
.steam { opacity: 0; animation: steam 2.4s ease-in-out infinite; }
@keyframes steam { 0% { opacity: 0; transform: translateY(4px); } 40% { opacity: .6; } 100% { opacity: 0; transform: translateY(-10px); } }

/* =========================================================
   SECCIONES
   ========================================================= */
.hazard-line {
  height: 8px;
  background: repeating-linear-gradient(-45deg, var(--hazard) 0 12px, #161616 12px 24px);
  opacity: .85;
}

.section { max-width: 1120px; margin: 0 auto; padding: clamp(56px, 8vw, 96px) 20px 0; }
.section:last-of-type { padding-bottom: clamp(56px, 8vw, 96px); }
.section-head { margin-bottom: 28px; }
.kicker { margin: 0 0 6px; font-family: var(--font-title); font-size: .85rem; letter-spacing: .18em; text-transform: uppercase; color: var(--orange); }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.section-head p { max-width: 560px; margin: 10px 0 0; color: var(--muted); }

.panel {
  background: linear-gradient(180deg, #1a1a17, #111110);
  border: 1px solid var(--line);
  border-radius: 10px;
}

/* Planes */
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 380px)); gap: 20px; }
.plan { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 26px 22px 22px; }
.plan.is-featured { border-color: rgba(225,216,17,.6); box-shadow: 0 0 0 1px rgba(225,216,17,.25), 0 20px 40px rgba(0,0,0,.35); }
.plan-badge {
  position: absolute;
  top: -12px;
  left: 22px;
  padding: 3px 10px;
  font-family: var(--font-title);
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #1a1006;
  background: var(--orange);
  border-radius: 4px;
}
.plan-name { font-size: 1.4rem; letter-spacing: .1em; }
.plan-price { display: flex; align-items: baseline; gap: 4px; margin: 0; }
.plan-price strong { font-family: var(--font-title); font-size: 2.4rem; font-weight: 600; color: #fff; }
.plan-price span { color: var(--muted); }
.plan-list { flex: 1; display: grid; align-content: start; gap: 8px; margin: 0; padding: 0; list-style: none; }
.plan-list li { position: relative; padding-left: 24px; color: #cfdcd6; }
.plan-list li::before { content: "✓"; position: absolute; left: 0; font-weight: 700; color: var(--green); }

/* Horarios */
.table-wrap { overflow-x: auto; }
.schedule { width: 100%; min-width: 480px; border-collapse: collapse; }
.schedule th, .schedule td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); }
.schedule thead th { font-family: var(--font-title); font-size: .8rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.schedule tbody th { font-weight: 600; white-space: nowrap; }
.schedule tbody tr:last-child th, .schedule tbody tr:last-child td { border-bottom: 0; }
.schedule .is-today { background: rgba(225,216,17,.08); }
.schedule .is-today th { box-shadow: inset 3px 0 0 var(--green); }
.today-badge {
  margin-left: 8px;
  padding: 2px 8px;
  font-family: var(--font-title);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  vertical-align: middle;
  color: #0b1a07;
  background: var(--green);
  border-radius: 999px;
}

/* Sedes */
.sedes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); align-items: start; gap: 20px; }
.sede { overflow: hidden; }
.sede-info { display: flex; flex-direction: column; gap: 16px; padding: 24px; }
.sede-name { font-size: 1.5rem; letter-spacing: .08em; }
.sede-place { margin: 4px 0 0; font-family: var(--font-title); font-size: .9rem; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); }
.sede-map {
  display: block;
  width: 100%;
  height: 260px;
  border: 0;
  border-top: 1px solid var(--line);
  filter: grayscale(.4) invert(.9) hue-rotate(180deg) contrast(.9);
}
.sede-city { margin: 2px 0 0; font-size: .9rem; color: var(--muted); }
.contact-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
  padding: 20px 24px;
}
.loc-row { display: flex; flex-direction: column; margin: 0; }
.loc-row span { font-family: var(--font-title); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.loc-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Footer */
.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 20px;
  font-size: .9rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.footer p { margin: 0; margin-right: auto; }
.footer-logo { width: 54px; height: 36px; }
.footer nav { display: flex; gap: 16px; }
.footer a { color: var(--text); text-decoration: none; }
.footer a:hover { color: var(--amber); }

/* =========================================================
   DIÁLOGOS
   ========================================================= */
.dlg {
  width: min(560px, calc(100vw - 24px));
  max-width: none;
  max-height: calc(100vh - 24px);
  padding: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  overflow: visible;
}
.dlg::backdrop { background: rgba(2,6,5,.72); backdrop-filter: blur(3px); }
.dlg[open] .dlg-box { animation: pop .22s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }

.dlg-box {
  position: relative;
  max-height: calc(100vh - 24px);
  overflow: auto;
  padding: 22px 24px 24px;
  background: linear-gradient(180deg, rgba(16,26,24,.98), rgba(8,14,13,.98));
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 6px;
  box-shadow: 0 24px 60px rgba(0,0,0,.6);
}
.dlg-title { margin: 0 44px 10px 0; font-size: 1.25rem; letter-spacing: .1em; color: var(--orange); }
.dlg-box > p { margin: 0 0 16px; color: #d3dfd9; }
.dlg-x {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--text);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}
.dlg-x:hover { border-color: var(--green); }
.dlg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; padding: 0; list-style: none; }
.dlg-grid li { display: flex; flex-direction: column; gap: 2px; padding: 12px; background: rgba(255,255,255,.02); border: 1px solid var(--line); border-radius: 6px; }
.dlg-grid b { font-family: var(--font-title); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #fff; }
.dlg-grid span { font-size: .88rem; color: var(--muted); }
.dlg-box > p.coach-line,
.dlg-box > p.supplier { font-size: .9rem; color: var(--muted); }
.supplier strong { color: #8ee66a; }
.note { margin: 0 0 16px; padding-left: 10px; font-size: .8rem; color: var(--muted); border-left: 2px solid var(--orange); }
.dlg-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }

/* Formulario */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: .85rem; font-weight: 600; color: #dbe6e1; }
.opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  min-height: 44px;
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
  background: #0a1311;
  border: 1px solid #2f413b;
  border-radius: 6px;
}
.field textarea { resize: vertical; }
.field select option { color: var(--text); background: #0a1311; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(225,216,17,.2); }
.field [aria-invalid="true"] { border-color: #ff7a6b; }
.field-error { font-size: .82rem; color: #ff8b7d; }
.field-error:empty { display: none; }

.form-ok { padding: 16px; background: rgba(225,216,17,.07); border: 1px solid rgba(225,216,17,.4); border-radius: 6px; }
.form-ok p { margin: 0 0 12px; }
.form-ok-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.wa-links { display: contents; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 860px) {
  .hud-nav { display: none; }
  .hud > .btn { margin-left: auto; }

  .scene { min-height: auto; padding-bottom: 28px; }
  .wall { bottom: auto; height: 460px; }
  .floor { top: 460px; height: auto; perspective: none; }
  .floor::before { left: 0; width: 100%; height: 100%; transform: none; }
  .barrier { display: none; }
  .wall-emblem { display: none; }

  .mission { max-width: none; }
  .stations { grid-template-columns: 1fr; gap: 44px; width: 100%; max-width: 440px; margin: 28px auto 24px; }
  .art { height: auto; }
  .stage3d { height: auto; aspect-ratio: 380 / 300; }

  .bottom-nav {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 30;
    gap: 8px;
    margin: 0;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(8,14,13,.95);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(6px);
  }
  .bottom-nav button { flex: 1; min-width: 0; padding: 10px 6px; font-size: .85rem; }
  body { padding-bottom: 72px; }
}

@media (max-width: 520px) {
  .hud { gap: 10px; }
  .hud > .btn { display: none; } /* en celular ya está "Contacto" en la barra inferior */
  .hud-plate { padding: 3px 10px 4px; }
  .hud-plate strong { font-size: .95rem; letter-spacing: .12em; }
  .ticker-label { display: none; }
  .schedule { min-width: 0; font-size: .9rem; }
  .schedule th, .schedule td { padding: 12px 10px; }
  .dlg-box { padding: 20px 16px; }
  .dlg-grid { grid-template-columns: 1fr; }
  .dlg-actions .btn { flex: 1; }
}

/* Menos movimiento para quien lo prefiera */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* =========================================================
   SERVICIOS, FOTOS Y CONTACTO
   ========================================================= */
.services-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.services-grid li { padding: 16px; border-left: 3px solid var(--orange); }
.promo { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; margin-top: 8px; }
.promo-photo { margin: 0; overflow: hidden; }
.promo-photo img { display: block; width: 100%; height: auto; }
.promo-photo figcaption { padding: 12px 16px; font-size: .9rem; color: var(--muted); }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; margin-top: 20px; }
.person { display: flex; flex-direction: column; gap: 12px; padding: 24px; }
.person .kicker { margin: 0; }
.mail { overflow-wrap: anywhere; }
.footer-logo-img { display: block; width: 72px; height: auto; border-radius: 6px; }
.comms-cards { display: grid; gap: 14px; margin-top: 18px; }
.comms-cards .person { padding: 18px; }
@media (max-width: 480px) {
  .dlg-grid { grid-template-columns: 1fr; }
  .person .btn, .sede .btn { flex: 1 1 100%; }
}
