/* ============ SENSIUS WELLNESS — sitio inmersivo ============ */

:root {
  --navy: #0A1128;
  --navy-deep: #060B1C;
  --cyan: #38BDF8;
  --cyan-soft: rgba(56, 189, 248, 0.25);
  --white: #EAF6FF;
  --glass: rgba(10, 17, 40, 0.55);
  --glass-border: rgba(56, 189, 248, 0.28);
  --font-display: "Avenir Next", "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Avenir Next", "Montserrat", "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  background: var(--navy-deep);
  color: var(--white);
  font-family: var(--font-body);
  overflow-x: hidden;
}

html.branch-open, body.branch-open { overflow: hidden; }

/* Durante una rama de ion, el panel manda: se ocultan nav, chatbot y overlays */
body.branch-open #topbar,
body.branch-open #overlays,
body.branch-open #chat-tip,
body.branch-open #chat-bubble { opacity: 0; pointer-events: none; }
#topbar, #chat-bubble, #overlays { transition: opacity 0.4s ease; }

#ion-panel[hidden] { display: none; }

/* ============ LOADER ============ */
#loader {
  position: fixed; inset: 0; z-index: 100;
  background: radial-gradient(ellipse at 50% 40%, #0D1735 0%, var(--navy-deep) 70%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px; transition: opacity 0.8s ease;
}
#loader.hide { opacity: 0; pointer-events: none; }
.loader-logo { width: min(260px, 55vw); filter: drop-shadow(0 0 24px var(--cyan-soft)); }
.loader-bar {
  width: min(280px, 60vw); height: 3px; border-radius: 3px;
  background: rgba(56, 189, 248, 0.15); overflow: hidden;
}
.loader-bar-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--cyan), #7DD3FC);
  border-radius: 3px; transition: width 0.3s ease;
  box-shadow: 0 0 12px var(--cyan);
}
.loader-hint { font-size: 13px; letter-spacing: 0.12em; opacity: 0.55; text-transform: uppercase; }

/* ============ CANVAS ============ */
#stage { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; }

/* ============ NAV ============ */
#topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px clamp(20px, 4vw, 56px);
  background: linear-gradient(180deg, rgba(6, 11, 28, 0.75), transparent);
}
.brand img { height: 44px; display: block; filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.35)); }
#topbar nav { display: flex; gap: clamp(16px, 3vw, 40px); }
#topbar nav a {
  color: var(--white); text-decoration: none;
  font-size: 13px; letter-spacing: 0.18em; font-weight: 600;
  opacity: 0.8; transition: opacity 0.25s, text-shadow 0.25s;
  padding: 6px 2px;
}
#topbar nav a:hover, #topbar nav a.active {
  opacity: 1; text-shadow: 0 0 14px var(--cyan);
}

/* ============ OVERLAYS ============ */
.ov {
  position: fixed; z-index: 10;
  opacity: 0; pointer-events: none;
  will-change: opacity, transform;
}
.ov.interactive { pointer-events: auto; }

.ov-hero {
  inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 0 6vw; gap: 22px;
}
.ov-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 5.2vw, 68px); font-weight: 800;
  letter-spacing: 0.02em; line-height: 1.12;
  text-shadow: 0 2px 30px rgba(6, 11, 28, 0.9), 0 0 60px rgba(56, 189, 248, 0.25);
}
.ov-hero .sub {
  max-width: 640px; font-size: clamp(15px, 1.6vw, 19px); line-height: 1.6;
  opacity: 0.92; text-shadow: 0 2px 16px rgba(6, 11, 28, 0.95);
}
.microcopy { font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; opacity: 0.6; }

.ov-river {
  inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 0 8vw; text-align: center;
}
.ov-river blockquote {
  max-width: 720px; font-size: clamp(20px, 2.6vw, 32px); font-weight: 500;
  line-height: 1.5; text-shadow: 0 2px 24px rgba(6, 11, 28, 0.95);
}
.ov-river strong { color: var(--cyan); font-weight: 700; }

.ov-valley {
  top: 14vh; left: 0; right: 0; text-align: center; padding: 0 6vw;
}
.ov-valley h2, .ov-complete h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 52px); font-weight: 800; letter-spacing: 0.14em;
  text-shadow: 0 0 40px rgba(56, 189, 248, 0.4), 0 2px 24px rgba(6, 11, 28, 0.9);
}
.ov-valley p {
  margin-top: 14px; max-width: 560px; margin-inline: auto;
  font-size: clamp(14px, 1.5vw, 18px); line-height: 1.6; opacity: 0.92;
  text-shadow: 0 2px 16px rgba(6, 11, 28, 0.95);
}

/* CTA instructivo bajo el cristal central del valle */
.ov-valley-hint {
  left: 0; right: 0; bottom: 11vh; padding: 0 6vw;
  display: flex; justify-content: center;
}
.valley-hint {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  font-size: clamp(17px, 2.2vw, 27px); font-weight: 700; letter-spacing: 0.01em;
  color: #F2FBFF;
  padding: 14px 30px; border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(56, 189, 248, 0.16);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  text-shadow: 0 0 18px rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.3);
  animation: hintGlow 2.6s ease-in-out infinite;
}
.valley-hint .tap-ic { flex: none; color: var(--cyan); animation: tapNudge 2.2s ease-in-out infinite; }
@keyframes hintGlow {
  0%, 100% { box-shadow: 0 0 22px rgba(56, 189, 248, 0.28); }
  50% { box-shadow: 0 0 46px rgba(56, 189, 248, 0.62); }
}
@keyframes tapNudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}

/* CTA al hub Aprende (tras completar, antes de la orbe) */
.ov-learn {
  inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 0 8vw; gap: 20px;
}
.learn-kicker {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.4vw, 40px); font-weight: 800; letter-spacing: 0.02em;
  text-shadow: 0 0 40px rgba(56, 189, 248, 0.45), 0 2px 22px rgba(6, 11, 28, 0.9);
}
.cta-learn { font-size: 16px; padding: 15px 32px; }

.ov-complete {
  inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 0 8vw;
}
.ov-complete p {
  margin-top: 18px; max-width: 620px; font-size: clamp(15px, 1.7vw, 20px);
  line-height: 1.6; opacity: 0.94; text-shadow: 0 2px 18px rgba(6, 11, 28, 0.95);
}

.ov-orb {
  inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end; text-align: center;
  padding-bottom: 16vh; gap: 16px;
}
.orb-brand { font-size: clamp(13px, 1.4vw, 17px); letter-spacing: 0.42em; font-weight: 700; opacity: 0.85; }
.orb-slogan {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.4vw, 44px); font-weight: 700; letter-spacing: 0.03em;
  text-shadow: 0 0 44px rgba(56, 189, 248, 0.5), 0 2px 24px rgba(6, 11, 28, 0.9);
}

/* ============ CTA ============ */
.cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 30px; border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(56, 189, 248, 0.12);
  color: var(--white); font-family: var(--font-body);
  font-size: 15px; font-weight: 600; letter-spacing: 0.06em;
  cursor: pointer; text-decoration: none;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: background 0.3s, box-shadow 0.3s, transform 0.2s;
}
.cta:hover:not(:disabled) {
  background: rgba(56, 189, 248, 0.24);
  box-shadow: 0 0 28px rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
}
.cta:disabled { opacity: 0.45; cursor: default; }
.cta-small { padding: 10px 18px; font-size: 13px; }
.cta .arrow { display: inline-block; }
.cta-scroll .arrow { animation: bob 1.6s ease-in-out infinite; }
.cta-bounce { animation: bounce 1.5s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

/* Botón secundario del hero: más discreto para que NO compita con el indicador de scroll */
.cta-secondary {
  background: transparent;
  border-color: rgba(56, 189, 248, 0.35);
  font-weight: 500; opacity: 0.9;
}
.cta-secondary:hover:not(:disabled) { background: rgba(56, 189, 248, 0.14); }

/* ===== Indicador de scroll: gota de luz que cae por un canal (motivo agua/río) ===== */
.scroll-hint {
  position: absolute; left: 50%; bottom: clamp(16px, 5vh, 44px);
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  background: none; border: 0; cursor: pointer; padding: 6px 14px;
  -webkit-appearance: none; appearance: none;
}
.scroll-track {
  position: relative; width: 2px; height: 44px; border-radius: 2px; overflow: hidden;
  background: linear-gradient(to bottom,
    rgba(56, 189, 248, 0.04), rgba(56, 189, 248, 0.32), rgba(56, 189, 248, 0.04));
}
.scroll-drop {
  position: absolute; left: 50%; top: -6px; width: 5px; height: 5px; margin-left: -2.5px;
  border-radius: 50%; background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan), 0 0 20px rgba(56, 189, 248, 0.7);
  animation: dropFall 1.9s cubic-bezier(0.6, 0, 0.4, 1) infinite;
}
.scroll-hint-text {
  font-family: var(--font-body);
  font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--white); opacity: 0.72; text-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
  transition: opacity 0.3s;
}
.scroll-hint:hover .scroll-hint-text { opacity: 1; }

@keyframes dropFall {
  0% { top: -6px; opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { top: 44px; opacity: 0; }
}

/* ============ HOTSPOTS ============ */
#hotspots { position: fixed; inset: 0; z-index: 15; pointer-events: none; }
.hotspot {
  position: absolute; transform: translate(-50%, -50%);
  min-width: 52px; min-height: 52px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; cursor: pointer;
  pointer-events: none; opacity: 0;
  transition: opacity 0.5s ease;
}
#hotspots.active .hotspot { pointer-events: auto; opacity: 1; }
.hotspot .hex {
  width: 54px; height: 60px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: rgba(56, 189, 248, 0.22);
  border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; letter-spacing: 0.02em;
  color: #F2FBFF;
  text-shadow: 0 0 6px var(--cyan), 0 0 14px rgba(56, 189, 248, 0.85);
  box-shadow: inset 0 0 0 1.5px var(--cyan), 0 0 16px rgba(56, 189, 248, 0.35);
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
  animation: hexpulse 2.6s ease-in-out infinite;
}
.hotspot:hover .hex, .hotspot:focus-visible .hex {
  background: rgba(56, 189, 248, 0.5);
  transform: scale(1.2);
  box-shadow: inset 0 0 0 1.5px #BEEFFF, 0 0 34px rgba(56, 189, 248, 0.85);
  text-shadow: 0 0 8px #fff, 0 0 20px var(--cyan);
  animation-play-state: paused;
}
.hotspot:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; border-radius: 50%; }
/* Pulso de glow en el hexágono y en la letra (aura cian de marca) */
@keyframes hexpulse {
  0%, 100% {
    box-shadow: inset 0 0 0 1.5px var(--cyan), 0 0 12px rgba(56, 189, 248, 0.3);
    text-shadow: 0 0 5px var(--cyan), 0 0 10px rgba(56, 189, 248, 0.55);
  }
  50% {
    box-shadow: inset 0 0 0 1.5px var(--cyan), 0 0 28px rgba(56, 189, 248, 0.75);
    text-shadow: 0 0 8px var(--cyan), 0 0 22px rgba(56, 189, 248, 1);
  }
}

/* ============ PANEL DE ION ============ */
#ion-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 30;
  width: min(440px, 92vw);
  display: flex; flex-direction: column; justify-content: center;
  padding: 80px 44px 60px;
  background: var(--glass);
  border-left: 1px solid var(--glass-border);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  transform: translateX(105%);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
#ion-panel.open { transform: translateX(0); }
.ion-symbol {
  font-size: 15px; font-weight: 700; letter-spacing: 0.1em;
  color: var(--cyan); border: 1.5px solid var(--glass-border);
  width: 64px; height: 72px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: flex; align-items: center; justify-content: center;
  background: rgba(56, 189, 248, 0.1); margin-bottom: 26px;
}
#ion-panel h3 {
  font-family: var(--font-display);
  font-size: 34px; font-weight: 800; letter-spacing: 0.16em;
}
.ion-nick { margin-top: 6px; font-size: 18px; font-weight: 600; color: var(--cyan); font-style: italic; }
.ion-tag {
  margin-top: 16px; font-size: 13px; line-height: 1.5; letter-spacing: 0.2px;
  padding: 10px 14px; border-radius: 12px;
  background: rgba(56, 189, 248, 0.08); border: 1px solid rgba(56, 189, 248, 0.28);
}
.ion-tag[hidden] { display: none; }
.ion-tag-label { color: var(--cyan); font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; font-size: 12px; }
.ion-copy { margin-top: 18px; font-size: 16px; line-height: 1.7; opacity: 0.94; }
.ion-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 18px;
  padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 700;
  color: #050A18; background: linear-gradient(90deg, var(--cyan), #7DD3FC);
  text-decoration: none; box-shadow: 0 0 18px rgba(56, 189, 248, 0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ion-link[hidden] { display: none; }
.ion-link:hover { transform: translateY(-1px); box-shadow: 0 0 26px rgba(56, 189, 248, 0.8); }
.ion-link:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.panel-nav {
  position: absolute; bottom: 28px; left: 44px; right: 44px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; letter-spacing: 0.14em; opacity: 0.85;
}
.panel-arrow {
  background: none; border: 1px solid var(--glass-border); color: var(--white);
  width: 44px; height: 44px; border-radius: 50%; font-size: 17px; cursor: pointer;
  transition: background 0.25s, box-shadow 0.25s;
}
.panel-arrow:hover { background: rgba(56, 189, 248, 0.2); box-shadow: 0 0 16px rgba(56, 189, 248, 0.4); }
.panel-close {
  position: absolute; top: 22px; right: 22px;
  background: none; border: none; color: var(--white);
  font-size: 19px; cursor: pointer; opacity: 0.7;
  width: 44px; height: 44px; transition: opacity 0.25s, text-shadow 0.25s;
}
.panel-close:hover { opacity: 1; text-shadow: 0 0 12px var(--cyan); }

/* ============ SECCIÓN APP ============ */
.app-section {
  position: relative; z-index: 12; /* por encima de los overlays: al subir, los cubre */
  background: linear-gradient(180deg, rgba(6, 11, 28, 0) 0%, var(--navy-deep) 9%, var(--navy) 60%, var(--navy-deep) 100%);
  display: flex; flex-direction: column; align-items: center;
  padding: 18vh 6vw 100px; text-align: center; gap: 26px;
}
.app-section h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 50px); font-weight: 800; letter-spacing: 0.12em;
  text-shadow: 0 0 36px rgba(56, 189, 248, 0.35);
}
.app-sub { max-width: 560px; font-size: clamp(14px, 1.6vw, 18px); line-height: 1.65; opacity: 0.92; }
.app-sub strong { color: var(--cyan); }
.phone-wrap { padding: 10px 0 6px; animation: phonefloat 5s ease-in-out infinite; }
@keyframes phonefloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.phone {
  position: relative; width: min(340px, 82vw); height: min(690px, 145vw);
  border-radius: 44px; padding: 14px;
  background: linear-gradient(160deg, #10203F, #060B1C);
  border: 1px solid var(--glass-border);
  box-shadow: 0 0 60px rgba(56, 189, 248, 0.18), 0 30px 80px rgba(0, 0, 0, 0.6);
}
.phone-notch {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 22px; background: #060B1C;
  border-radius: 0 0 16px 16px; z-index: 2;
}
.phone iframe {
  width: 100%; height: 100%; border: none; border-radius: 32px;
  background: var(--navy-deep);
}

/* ============ FOOTER ============ */
footer {
  position: relative; z-index: 5;
  background: var(--navy-deep);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 56px 6vw 42px; text-align: center;
  border-top: 1px solid rgba(56, 189, 248, 0.12);
}
.footer-logo { width: 150px; opacity: 0.9; }
.legal { font-size: 13px; font-style: italic; opacity: 0.6; max-width: 520px; line-height: 1.6; }
.copyright { font-size: 12px; opacity: 0.4; letter-spacing: 0.1em; }

/* ============ CHATBOT ============ */
/* ============ BOTÓN GLOBAL DE SONIDO ============ */
#sound-toggle {
  position: fixed; left: 24px; bottom: 24px; z-index: 50;
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: rgba(10, 17, 40, 0.7); color: var(--white); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.25), 0 8px 24px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: transform 0.25s, box-shadow 0.25s, opacity 0.3s;
}
#sound-toggle:hover { transform: scale(1.08); box-shadow: 0 0 28px rgba(56, 189, 248, 0.5); }
#sound-toggle:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
#sound-toggle .ic-off { display: none; }
#sound-toggle.muted { color: var(--muted, #9BB0D0); opacity: 0.8; }
#sound-toggle.muted .ic-on { display: none; }
#sound-toggle.muted .ic-off { display: block; }

/* Launcher de marca del chatbot: símbolo del logo con glow cyan intenso.
   Abre el widget de ElevenLabs (Cindy) al hacer clic. */
#chat-bubble {
  position: fixed; right: 24px; bottom: 24px; z-index: 9999;
  width: 64px; height: 64px; border-radius: 50%;
  border: none; cursor: pointer; padding: 8px;
  background: radial-gradient(circle at 50% 45%, #0a1b3a 0%, #050a18 100%);
  display: grid; place-items: center;
  box-shadow:
    0 0 12px 2px rgba(34, 211, 238, 0.9),
    0 0 28px 8px rgba(34, 211, 238, 0.55),
    0 0 60px 18px rgba(34, 211, 238, 0.25);
  animation: chatPulse 2.4s ease-in-out infinite;
  transition: transform 0.2s ease, opacity 0.3s ease;
}
#chat-bubble img {
  width: 100%; height: 100%; object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.8));
}
#chat-bubble:hover { transform: scale(1.08); }
#chat-bubble:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }
@keyframes chatPulse {
  0%, 100% { box-shadow:
    0 0 12px 2px rgba(34, 211, 238, 0.9),
    0 0 28px 8px rgba(34, 211, 238, 0.55),
    0 0 60px 18px rgba(34, 211, 238, 0.25); }
  50% { box-shadow:
    0 0 18px 4px rgba(34, 211, 238, 1),
    0 0 40px 14px rgba(34, 211, 238, 0.7),
    0 0 80px 26px rgba(34, 211, 238, 0.35); }
}

/* El launcher por defecto del widget se oculta por JS (inyección en su shadow
   root), ya que no expone ::part(); ver initConvai() en js/main.js. */

/* Globo de texto junto al launcher: invita a hablar con Cindy. */
#chat-tip {
  position: fixed; right: 100px; bottom: 30px; z-index: 9998;
  max-width: 220px; text-align: left;
  padding: 12px 16px; border-radius: 16px;
  font-family: var(--font-body); font-size: 14px; font-weight: 600; line-height: 1.35;
  color: var(--white); cursor: pointer;
  background: rgba(10, 17, 40, 0.92);
  border: 1px solid var(--glass-border);
  box-shadow: 0 0 22px rgba(34, 211, 238, 0.4), 0 8px 24px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; transform: translateX(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
#chat-tip[hidden] { display: none; }
#chat-tip.show { opacity: 1; transform: translateX(0); animation: tipBob 2.8s ease-in-out infinite; }
/* Cola apuntando a la derecha, hacia el launcher */
#chat-tip::after {
  content: ''; position: absolute; right: -6px; bottom: 18px;
  width: 12px; height: 12px; transform: rotate(45deg);
  background: rgba(10, 17, 40, 0.92);
  border-right: 1px solid var(--glass-border);
  border-top: 1px solid var(--glass-border);
}
#chat-tip:hover { box-shadow: 0 0 30px rgba(34, 211, 238, 0.6), 0 8px 24px rgba(0, 0, 0, 0.5); }
#chat-tip:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
@keyframes tipBob { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-4px); } }

/* X para cerrar el chat, sobre la esquina del cuadro de diálogo */
#chat-close {
  position: fixed; z-index: 10000;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--glass-border);
  background: rgba(10, 17, 40, 0.94); color: var(--white);
  font-size: 14px; line-height: 1; cursor: pointer;
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.55), 0 4px 14px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: transform 0.2s, box-shadow 0.2s;
}
#chat-close[hidden] { display: none; }
#chat-close:hover { transform: scale(1.1); box-shadow: 0 0 22px rgba(34, 211, 238, 0.85); }
#chat-close:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ============ TOAST ============ */
#toast {
  position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%);
  z-index: 60; padding: 12px 24px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-size: 14px; letter-spacing: 0.04em;
  animation: toastin 0.4s ease;
}
@keyframes toastin { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ============ MÓVIL ============ */
@media (max-width: 767px) {
  .brand img { height: 34px; }
  #topbar nav { gap: 14px; }
  #topbar nav a { font-size: 11px; letter-spacing: 0.1em; }
  .ov-valley { top: 11vh; }
  #ion-panel { width: 100vw; padding: 70px 28px 90px; border-left: none; }
  .panel-nav { left: 28px; right: 28px; }
  #chat-bubble { right: 16px; bottom: 16px; width: 56px; height: 56px; }
  #chat-tip { right: 84px; bottom: 22px; max-width: 190px; font-size: 13px; padding: 10px 13px; }
  #sound-toggle { left: 16px; bottom: 16px; width: 44px; height: 44px; }
  .hotspot .hex { width: 46px; height: 52px; font-size: 14px; }
  .ov-valley-hint { bottom: 13vh; }
  .valley-hint { font-size: 16px; padding: 12px 22px; gap: 9px; }
  .valley-hint .tap-ic { width: 20px; height: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .cta-scroll .arrow, .cta-bounce, .phone-wrap, #chat-bubble, .hotspot .hex,
  .scroll-drop { animation: none; }
}
