/* CSS Layers para organización moderna (2026) */
@layer reset, variables, base, components, utilities;

/* Config & Variables con @property para tipado (2026) */
@property --bg {
  syntax: '<color>';
  inherits: false;
  initial-value: #080808;
}

@property --text-muted {
  syntax: '<color>';
  inherits: false;
  initial-value: #444;
}

@property --text-light {
  syntax: '<color>';
  inherits: false;
  initial-value: #8a7dff;
}

@property --accent {
  syntax: '<color>';
  inherits: false;
  initial-value: #66bce0;
}

@layer variables {
:root {
  /* Palette */
  --bg: #080808;
  --text-muted: #444;
  --text-light: #8a7dff;
  --accent: #66bce0;

  /* Timeline Scopes */
  timeline-scope: --s1, --s2, --s3, --s4, --s5, --s6;

  /* Typography: Base font size - Mobile first */
  font-size: 16px;
  
  /* Typography: Font families */
  --font-dosis: "Dosis", sans-serif;

  /* Typography: Font sizes - Mobile (320px - 480px) */
  --fs-base: 16px;
  --fs-h1: 1.8rem;
  --fs-title-large: 1.6rem;
  --fs-focus-text: 1.5rem;
  --fs-description: 1rem;
  --fs-closer: 0.95rem;
  --fs-closer-strong: 2rem;
  --fs-nav-icon: 1.3rem;
  --fs-nav-span: 0.7rem;
  --fs-comenzar-btn: 0.8rem;
  --fs-back-home-icon: 1.3rem;
}
}

/* Mobile Large / Small Tablet (481px - 768px) */
@media (min-width: 481px) {
  @layer variables {
  :root {
    font-size: 17px;
    --fs-h1: 2rem;
    --fs-title-large: 1.8rem;
    --fs-focus-text: 1.7rem;
    --fs-description: 1.05rem;
    --fs-closer: 1rem;
    --fs-closer-strong: 2.2rem;
    --fs-nav-icon: 1.4rem;
    --fs-nav-span: 0.72rem;
    --fs-comenzar-btn: 0.7rem;
    --fs-back-home-icon: 1.4rem;
  }
}
}

/* Tablet (769px - 1024px) */
@media (min-width: 769px) {
  @layer variables {
  :root {
    font-size: 18px;
    --fs-h1: 2.2rem;
    --fs-title-large: 2rem;
    --fs-focus-text: 1.9rem;
    --fs-description: 1.1rem;
    --fs-closer: 1.1rem;
    --fs-closer-strong: 2.4rem;
    --fs-nav-icon: 1.5rem;
    --fs-nav-span: 0.75rem;
    --fs-comenzar-btn: 0.5rem;
    --fs-back-home-icon: 1.5rem;
  }
}
}

/* Desktop (1025px - 1440px) */
@media (min-width: 1025px) {
  @layer variables {
  :root {
    font-size: 18px;
    --fs-h1: 2.4rem;
    --fs-title-large: 2.2rem;
    --fs-focus-text: 2rem;
    --fs-description: 1.1rem;
    --fs-closer: 1.2rem;
    --fs-closer-strong: 2rem;
    --fs-nav-icon: 1.5rem;
    --fs-nav-span: 0.75rem;
    --fs-comenzar-btn: 0.5rem;
    --fs-back-home-icon: 1.5rem;
  }
}
}

/* Large Desktop (1441px+) */
@media (min-width: 1441px) {
  @layer variables {
  :root {
    font-size: 20px;
    --fs-h1: 3.6rem;
    --fs-title-large: 2.7rem;
    --fs-focus-text: 2.2rem;
    --fs-description: 1.15rem;
    --fs-closer: 1.25rem;
    --fs-closer-strong: 2.2rem;
    --fs-nav-icon: 1.6rem;
    --fs-nav-span: 0.8rem;
    --fs-comenzar-btn: 0.6rem;
    --fs-back-home-icon: 1.6rem;
  }
}
}

/* Base / Reset */
@layer base {
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-light);
  font-family: "Manrope", sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

p {
  font-family: var(--font-dosis);
}

body.page-exit {
  animation: page-exit 0.6s ease-out forwards;
}
}

/* View Transitions API para transiciones suaves (2026) */
@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.3s;
  animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@layer base {
/* Líneas de fondo del body */
body::before {
  --line: hsl(246deg 100% 74.51%) !important;
  content: "";
  height: 100%;
  width: 100%;
  position: fixed;
  background: linear-gradient(90deg, var(--line) 1px, transparent 1px 10vmin) 0 -5vmin / 10vmin 10vmin,
    linear-gradient(var(--line) 1px, transparent 1px 10vmin) 0 -5vmin / 10vmin 10vmin;
  mask: linear-gradient(-15deg, transparent 30%, white);
  top: 0;
  z-index: -1;
  opacity: 0.3;
  transition: background 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none;
}

/* Líneas de fondo cuando el toggle está activado (App) */
body.toggle-active::before {
  --line: hsl(188.24deg 100% 50% / 54%) !important;
}
}

/* Botón Volver al Inicio */
@layer components {
.back-home {
  position: fixed;
  top: 6vw;
  left: 9.5vw;
  z-index: 1000;
  width: clamp(3.2rem, 4vw, 4.5rem);
  height: clamp(3.2rem, 4vw, 4.5rem);
  margin: 0;
  background: rgba(8, 8, 8, 0.7);
  backdrop-filter: blur(10px);
  border: 5px solid gray;
  border-radius: 50%;
  color: gray;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.8;
}

.back-home i {
  font-size: var(--fs-back-home-icon);
  transition: opacity 0.3s ease, transform 0.3s ease;
  position: absolute;
  top: 50%;
  left: 50%;
}

.back-home .fa-arrow-left {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.back-home .fa-arrow-up {
  opacity: 0;
  transform: translate(-50%, -50%) translateY(10px);
}

.back-home.scrolled .fa-arrow-left {
  opacity: 0;
  transform: translate(-50%, -50%) translateY(-10px);
}

.back-home.scrolled .fa-arrow-up {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.back-home:hover {
  opacity: 1;
  background: rgba(212, 197, 163, 0.1);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateX(-4px);
}

.back-home:hover .fa-arrow-left {
  transform: translate(-50%, -50%) translateX(-4px);
}

.back-home.scrolled:hover {
  transform: translateX(-4px);
}

.back-home.scrolled:hover .fa-arrow-up {
  transform: translate(-50%, -50%) translateX(-4px);
}

.back-home:active {
  transform: translateX(-2px) scale(0.95);
}

.back-home:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* Switch Box - Toggle a la derecha del botón de volver */
.switch-box {
  position: fixed;
  /* Desktop: a la derecha del botón (mismo top, left + ancho botón + espacio) */
  top: 6.6vw;
  left: calc(9.5vw + clamp(3.5rem, 4vw, 4.5rem) + 1rem);
  z-index: 1001;
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 1.5vw, 1rem);
  padding: clamp(0.5rem, 1vw, 0.75rem) clamp(0.75rem, 1.5vw, 1rem);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid darkgray;
  border-radius: clamp(12px, 1.5vw, 11px);
  pointer-events: auto;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.switch-box .label-l,
.switch-box .label-r {
  font-size: var(--fs-description);
  font-family: "Manrope", sans-serif;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  user-select: none;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.switch-box .label-l {
  margin-right: 0;
}

.switch-box .label-r {
  margin-left: 0;
}

.switch-box .label-l:hover,
.switch-box .label-r:hover {
  color: rgba(255, 255, 255, 0.9);
}

.switch-box .switch-box-input {
  display: none;
}

.switch-box .switch-box-slider {
  position: relative;
  display: inline-block;
  height: 8px;
  width: 32px;
  background: #d5d5d5;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.switch-box .switch-box-slider:after {
  position: absolute;
  left: -8px;
  top: -8px;
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #8a7dff;
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.3);
  content: '';
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.switch-box .switch-box-input:checked ~ .switch-box-slider:after {
  left: 16px;
  background: #00dcff;
}

.switch-box .switch-box-slider:hover {
  background: #c0c0c0;
}

.switch-box-input:focus-visible + .switch-box-slider {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.comenzar-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* Responsive para móvil */
@media (max-width: 768px) {
  .switch-box {
    /* Mobile: a la derecha del botón (mismo top, left + ancho botón + espacio) */
    top: 14rem;
    left: calc(1.5rem + clamp(3.5rem, 4vw, 4.5rem) + 3.5rem);
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
  }
  
  .switch-box .label-l {
    margin-right: 5px;
  }
  
  .switch-box .label-r {
    margin-left: 7px;
  }
  
  .switch-box .switch-box-slider {
    height: 6px;
    width: 28px;
  }
  
  .switch-box .switch-box-slider:after {
    width: 20px;
    height: 20px;
    left: -7px;
    top: -7px;
  }
  
  .switch-box .switch-box-input:checked ~ .switch-box-slider:after {
    left: 15px;
  }
}

/* Animación de salida de página */
@keyframes page-exit {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-20px);
  }
}

/* Layout: Sticky Visuals (Right) */
.sticky-visual {
  position: fixed;
  top: 0;
  right: 0;
  width: 50%;
  height: 100vh;
  display: grid;
  place-items: center;
  z-index: 10;
  pointer-events: none;
  border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.shape-container {
  position: absolute;
  width: 400px;
  height: 400px;
  display: grid;
  place-items: center;
  opacity: 0;

  /* Entry/Exit Animation */
  animation-name: shape-fade;
  animation-fill-mode: both;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Timeline Linkages */
.shape-1 {
  animation-timeline: --s1;
}
.shape-2 {
  animation-timeline: --s2;
}
.shape-3 {
  animation-timeline: --s3;
}
.shape-4 {
  animation-timeline: --s4;
}
.shape-5 {
  animation-timeline: --s5;
}
.shape-6 {
  animation-timeline: --s6;
}

/* Layout: Content (Left) */
.content {
  width: 50%;
  padding-bottom: 20vh;
  position: relative;
  z-index: 20;
}

/* Contenedor de contenidos con transiciones */
.content-wrapper {
  position: relative;
  width: 100%;
  contain: layout style paint;
  min-height: 100%;
  /* Performance optimization 2026 */
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
}

.content-1,
.content-2 {
  width: 100%;
  position: relative;
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  visibility: visible;
  transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              visibility 0s linear 0s,
              filter 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  filter: blur(0px);
}

.content-1.hidden,
.content-2.hidden {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  opacity: 0;
  transform: translateY(0) scale(0.98);
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              visibility 0s linear 0.6s,
              filter 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  filter: blur(4px);
}

.content-1:not(.hidden),
.content-2:not(.hidden) {
  position: relative;
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  visibility: visible;
  filter: blur(0px);
}

/* Respeta preferencias de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  .content-1,
  .content-2,
  .content-1.hidden,
  .content-2.hidden {
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
    transform: none;
    filter: none;
  }
}

header {
  height: 90vh;
  display: flex;
  align-items: center;
  padding-left: 10vw;
}

.scroll-section {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 10vw;
  padding-right: 2rem;

  /* View Timeline Source */
  view-timeline-axis: block;
  view-timeline-inset: 40% 40%;
  
  /* Container Queries para diseño más responsive (2026) */
  container-type: inline-size;
  container-name: scroll-section;
}

/* Section IDs */
.s1 {
  view-timeline-name: --s1;
}
.s2 {
  view-timeline-name: --s2;
}
.s3 {
  view-timeline-name: --s3;
}
.s4 {
  view-timeline-name: --s4;
}
.s5 {
  view-timeline-name: --s5;
}
.s6 {
  view-timeline-name: --s6;
}

.closing-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-left: 0;
  margin-top: 10vh;
}

/* Navegador inferior en sección final (solo móvil) */
.bh-bottom-nav {
  display: flex;
  gap: 0.75rem;
  width: fit-content;
  max-width: 100%;
  margin-top: 3rem;
  padding: 0;
  flex-direction: row;
  align-items: center;
}

.bh-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 20px 15px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid darkgray;
  border-radius: 12px;
  color: darkgray;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.8;
  flex-wrap: wrap;
}

.bh-nav-item i {
  font-size: var(--fs-nav-icon);
  transition: transform 0.3s ease;
}

.bh-nav-item span {
  font-size: var(--fs-nav-span);
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.bh-nav-item:hover {
  opacity: 1;
  background: rgba(212, 197, 163, 0.1);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(212, 197, 163, 0.2);
}

.bh-nav-item:hover i {
  transform: scale(1.1);
}

.bh-nav-item:active {
  transform: translateY(-2px) scale(0.98);
}

/* Components: Typography */
h1 {
  text-align: left !important;
  font-size: var(--fs-h1) !important;
  font-weight: bold !important;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: whitesmoke;
  opacity: 0.8;
}

.title-large {
  display: block;
  font-size: var(--fs-title-large);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-light);
  margin-top: 1rem;
  line-height: 1;
}

/* Cambiar color de .title-large cuando toggle está en App */
body.toggle-active .title-large {
  color: #66bce0;
}

.focus-text {
  font-size: var(--fs-focus-text);
  font-weight: 600;
  line-height: 1.1;
  color: var(--text-muted);
  margin: 0;
  max-width: 500px;
  letter-spacing: -0.02em;
  animation: content-focus linear both;
  animation-timeline: view();
  animation-range: cover 0% cover 100%;
}

.description {
  font-size: var(--fs-closer);
  color: white !important;
  margin-top: 1.5rem;
  max-width: 560px;
  line-height: 1.4;
  font-weight: 300;
  border-left: 2px solid var(--accent);
  padding-left: 1.5rem;
  animation: content-focus linear both;
  animation-timeline: view();
  animation-range: cover 0% cover 100%;
  letter-spacing: 2px;
}

.closer {
  font-size: var(--fs-closer);
  font-weight: 300;
  color: var(--text-muted);
  align-items: center;
  display: flex;
  flex-direction: column;
}
.closer strong {
  display: block;
  font-size: var(--fs-closer-strong);
  color: var(--text-light);
  margin-bottom: 1rem;
}

b {
  font-weight: 900;
  color: #bd00ff;
  font-size: var(--fs-closer);
}

/* Respetar estilo de <b> solo dentro de bhAppPanel */
#bhAppPanel b {
  font-weight: inherit;
  color: inherit;
  font-size: var(--fs-closer);
}

/* 1. Circle Outline */
.circle-outline {
  width: 300px;
  height: 300px;
  border: 2px solid var(--text-light);
  border-radius: 50%;
  box-shadow: 0 0 60px rgba(255, 255, 255, 0.05);
}

/* 2. Textured Stone */
.stone-block {
  width: 250px;
  height: 350px;
  background: linear-gradient(135deg, #333, #111);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}
.stone-block::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.4'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* 3. Grid */
.grid-lines {
  width: 300px;
  height: 300px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 20px;
}
.grid-box {
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.grid-box:nth-child(1) {
  border-top: 0;
  border-left: 0;
}
.grid-box:nth-child(4) {
  border-bottom: 0;
  border-right: 0;
}

/* 4. Balance */
.balance {
  width: 300px;
  height: 300px;
  position: relative;
}
.b-circle {
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  mix-blend-mode: exclusion;
}
.b-1 {
  background: #fff;
  top: 20%;
  left: 20%;
}
.b-2 {
  background: #666;
  bottom: 20%;
  right: 20%;
}

/* 5. Light Orb */
.light-orb {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 30% 30%,
    var(--accent),
    transparent 60%
  );
  filter: blur(40px);
  opacity: 0.6;
}

/* 6. End Line */
.end-line {
  width: 2px;
  height: 300px;
  background: var(--text-light);
  position: relative;
}
.end-line::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 1px;
  background: var(--text-light);
}

/* Components: Progress Indicators */

/* Desktop: Vertical Line on Border */
.desktop-progress {
  position: absolute;
  left: -1px;
  top: 0;
  width: 3px;
  height: 100%;
  background: var(--accent);
  transform-origin: top;
  transform: scaleY(0);
  animation: progress-grow linear;
  animation-timeline: scroll();
  z-index: 20;
}

/* Mobile: Circular Widget */
.mobile-progress {
  display: block;
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  z-index: 100;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 50%;
  padding: 5px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-progress svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  transition: opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.mobile-progress.scrolled svg {
  opacity: 1;
  pointer-events: auto;
}

.mobile-progress.completed svg {
  opacity: 0;
  pointer-events: none;
}

.mobile-progress .comenzar-btn {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 1;
    pointer-events: auto;
    padding: 12px;
    border-radius: 12px;
    border: 5px solid var(--accent);
    background: rgba(8, 8, 8, 0.9);
    color: var(--accent);
    font-size: var(--fs-nav-span);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-family: "Manrope", sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    z-index: 10;
}

.mobile-progress.scrolled .comenzar-btn {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.8);
}

.mobile-progress.completed .comenzar-btn {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-65%, -50%) scale(1);
  animation: comenzar-entrada 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-progress.completed .comenzar-btn:hover {
  background: rgba(212, 197, 163, 0.1);
  border-color: var(--accent);
  color: var(--accent);
  transform: translate(-65%, -50%) scale(1.05);
  box-shadow: 0 8px 20px rgba(212, 197, 163, 0.3);
}

.mobile-progress.completed .comenzar-btn:active {
  transform: translate(-50%, -50%) scale(0.98);
}

@keyframes comenzar-entrada {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8) translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) translateY(0);
  }
}

.progress-circle {
  fill: none;
  stroke: gray;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: circle-grow linear;
  animation-timeline: scroll();
}

.track-circle {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 8;
}

/* Keyframes */
@keyframes shape-fade {
  entry 0% {
    opacity: 0;
    transform: translateY(40px) scale(0.9);
  }
  entry 100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  exit 0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  exit 100% {
    opacity: 0;
    transform: translateY(-40px) scale(1.1);
  }
}

@keyframes content-focus {
  0% {
    filter: blur(12px);
    opacity: 0;
    transform: scale(0.8) translateY(40px);
    border-color: transparent;
  }
  30% {
    filter: blur(0);
    opacity: 1;
    transform: scale(1) translateY(0);
    color: var(--text-light);
    border-color: var(--accent);
  }
  70% {
    filter: blur(0);
    opacity: 1;
    transform: scale(1) translateY(0);
    color: var(--text-light);
    border-color: var(--accent);
  }
  100% {
    filter: blur(12px);
    opacity: 0;
    transform: scale(0.95) translateY(-40px);
    border-color: transparent;
  }
}

@keyframes progress-grow {
  to {
    transform: scaleY(1);
  }
}

@keyframes circle-grow {
  to {
    stroke-dashoffset: 0;
  }
}

/* Container Queries para diseño más preciso (2026) */
@container scroll-section (max-width: 768px) {
  .scroll-section {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/*  Responsive Design  */
@media (max-width: 768px) {
  .sticky-visual {
    opacity: 0.1;
    width: 100%;
    z-index: -1;
    border-left: none;
  }

  .content {
    width: 100%;
  }
  /* En móvil/tablet, todo centrado (h1, span, p) */
  header {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    justify-content: center;
    align-items: center;
    text-align: center;
  }
  
  header > div {
    width: 100%;
    text-align: center;
  }
  
  header h1 {
    text-align: center !important;
    margin-left: auto;
    margin-right: auto;
  }
  
  header .title-large {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }
  
  header .description {
    text-align: center !important;
    margin-left: auto;
    margin-right: auto;
  }
  
  .scroll-section,
  .scroll-section .focus-text,
  .scroll-section .description {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    align-items: center;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  /* Adjust Typography - Mobile overrides */
  .focus-text {
    font-size: var(--fs-focus-text);
  }
  .title-large {
    font-size: var(--fs-title-large);
  }
  .description {
    text-align: center;
  }

  /* Toggle Progress Indicators */
  .desktop-progress {
    display: none;
  }

  /* Ajustar botón en móvil - alineado con texto "Buhonea" */
  .back-home {
    top: 1.6rem;
    left: 1.5rem;
  }

  /* Mostrar navegador en móvil y centrar contenido */
  .closing-section {
    align-items: center;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .bh-bottom-nav {
    display: flex;
    padding: 0;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Estilos específicos para bhAppPanel con alta especificidad */
#bhAppPanel .bh-app-header {
    padding: clamp(16px, 1.2vw + 12px, 26px) clamp(18px, 2vw + 12px, 32px) 0 !important;
    padding-bottom: max(25px, env(safe-area-inset-right)) !important;
    border-bottom: 1px solid var(--bh-border) !important;
    display: flex !important;
    gap: 14px !important;
    flex-direction: column !important;
    align-content: flex-start !important;
    align-items: flex-start !important;
    flex-wrap: wrap !important;
    height: auto !important;
}
}