* {
  box-sizing: border-box;
}

:root {
  --azul-profundo: rgba(13, 72, 116, 0.24);
  --azul-suave: rgba(78, 181, 232, 0.62);
  --texto: #c8d8e8;
  --texto-tenue: #698096;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  background: #020204;
  color: var(--texto);
  font-family: Arial, Helvetica, sans-serif;
}

body {
  min-height: 100vh;
}

.universo {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 52%, rgba(3, 18, 34, 0.78), transparent 36%),
    radial-gradient(circle at 48% 48%, rgba(0, 10, 22, 0.78), transparent 58%),
    #020204;
}

.capa-neblina,
.capa-ondas {
  position: absolute;
  inset: -20%;
  pointer-events: none;
  will-change: transform, opacity;
}

.capa-neblina {
  filter: blur(48px);
  opacity: 0.42;
  mix-blend-mode: screen;
}

.capa-neblina-a {
  background:
    radial-gradient(ellipse at 28% 40%, rgba(25, 95, 143, 0.18), transparent 34%),
    radial-gradient(ellipse at 62% 54%, rgba(13, 66, 108, 0.15), transparent 38%),
    radial-gradient(ellipse at 48% 72%, rgba(16, 105, 143, 0.10), transparent 42%);
  animation: neblinaDeriva 52s ease-in-out infinite alternate;
}

.capa-neblina-b {
  background:
    radial-gradient(ellipse at 64% 34%, rgba(32, 132, 176, 0.12), transparent 30%),
    radial-gradient(ellipse at 36% 62%, rgba(6, 58, 102, 0.18), transparent 40%);
  animation: neblinaDerivaB 68s ease-in-out infinite alternate;
}

.capa-ondas {
  opacity: 0.32;
  filter: blur(1px);
  background:
    repeating-radial-gradient(ellipse at 50% 52%,
      transparent 0 88px,
      rgba(25, 95, 143, 0.08) 92px,
      transparent 104px),
    linear-gradient(115deg,
      transparent 0%,
      rgba(18, 82, 132, 0.07) 35%,
      transparent 54%,
      rgba(18, 82, 132, 0.05) 76%,
      transparent 100%);
}

.capa-ondas-a {
  animation: ondasLentas 70s linear infinite;
}

.capa-ondas-b {
  transform: rotate(18deg) scale(1.15);
  opacity: 0.22;
  animation: ondasLentasB 95s linear infinite;
}

.particulas-respiracion {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.particula {
  position: absolute;
  width: var(--tamano, 3px);
  height: var(--tamano, 3px);
  border-radius: 50%;
  background: rgba(104, 193, 232, 0.46);
  box-shadow: 0 0 12px rgba(77, 177, 226, 0.36);
  opacity: 0;
  transform: translate3d(0, 0, 0);
  animation: flotarParticula var(--duracion, 28s) ease-in-out infinite;
  animation-delay: var(--retraso, 0s);
}

.portal-header {
  position: fixed;
  top: 22px;
  right: 28px;
  z-index: 5;
  display: flex;
  gap: 12px;
}

.nav-link {
  color: rgba(176, 211, 232, 0.72);
  text-decoration: none;
  padding: 9px 12px;
  border: 1px solid rgba(77, 177, 226, 0.14);
  border-radius: 999px;
  background: rgba(2, 6, 14, 0.42);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.04);
  backdrop-filter: blur(12px);
}

.experiencia-respiracion {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(390px, 1fr) auto;
  place-items: center;
  gap: 12px;
  padding: 74px 24px 32px;
}

.estado-respiracion {
  text-align: center;
  text-shadow: 0 0 24px rgba(66, 169, 226, 0.20);
}

.subtitulo {
  display: inline-block;
  color: rgba(112, 178, 212, 0.68);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.34em;
}

.fase-palabra {
  margin: 12px 0 8px;
  color: rgba(190, 221, 237, 0.86);
  font-size: clamp(52px, 10vw, 112px);
  font-weight: 300;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  text-transform: uppercase;
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition: opacity 520ms ease, transform 520ms ease, filter 520ms ease;
  filter: drop-shadow(0 0 24px rgba(64, 168, 226, 0.18));
}

.fase-palabra.cambiando {
  opacity: 0;
  transform: translate3d(0, 10px, 0) scale(0.985);
  filter: drop-shadow(0 0 2px rgba(64, 168, 226, 0.04));
}

.estado-respiracion p {
  margin: 0;
  color: rgba(133, 164, 184, 0.64);
  transition: opacity 520ms ease, transform 520ms ease;
}

.estado-respiracion p.cambiando {
  opacity: 0;
  transform: translate3d(0, 6px, 0);
}

.orbita-wrap {
  display: grid;
  place-items: center;
  width: 100%;
}

.circulo-respiracion {
  --diametro: min(460px, 72vw);
  --radio: calc(var(--diametro) / 2);
  position: relative;
  width: var(--diametro);
  height: var(--diametro);
  border-radius: 50%;
  border: 1px solid rgba(72, 160, 214, 0.34);
  background:
    radial-gradient(circle at 50% 50%, rgba(12, 52, 82, 0.26), transparent 55%),
    rgba(1, 5, 12, 0.20);
  box-shadow:
    inset 0 0 52px rgba(45, 142, 202, 0.08),
    inset 0 0 110px rgba(20, 86, 136, 0.08),
    0 0 72px rgba(35, 128, 190, 0.13);
  transform: translate3d(0, 0, 0) scale(1);
  transition: transform 1200ms ease, box-shadow 1200ms ease, border-color 1200ms ease, opacity 1200ms ease;
  will-change: transform, box-shadow, opacity;
}

.circulo-respiracion::before,
.circulo-respiracion::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.circulo-respiracion::before {
  width: 72%;
  height: 72%;
  border: 1px solid rgba(72, 160, 214, 0.10);
  box-shadow: inset 0 0 30px rgba(72, 160, 214, 0.05);
}

.circulo-respiracion::after {
  width: 6px;
  height: 6px;
  background: rgba(103, 190, 230, 0.34);
  box-shadow: 0 0 24px rgba(75, 177, 228, 0.26);
}

.circulo-respiracion.fase-inhala {
  transform: translate3d(0, 0, 0) scale(1.055);
  border-color: rgba(95, 190, 238, 0.48);
  box-shadow:
    inset 0 0 64px rgba(56, 164, 225, 0.13),
    inset 0 0 130px rgba(20, 108, 164, 0.10),
    0 0 96px rgba(47, 160, 222, 0.23);
}

.circulo-respiracion.fase-sosten {
  transform: translate3d(0, 0, 0) scale(1.055);
  border-color: rgba(91, 177, 224, 0.40);
  box-shadow:
    inset 0 0 58px rgba(56, 164, 225, 0.11),
    0 0 78px rgba(47, 160, 222, 0.18);
}

.circulo-respiracion.fase-exhala {
  transform: translate3d(0, 0, 0) scale(0.965);
  border-color: rgba(60, 134, 184, 0.28);
  box-shadow:
    inset 0 0 42px rgba(45, 142, 202, 0.07),
    0 0 54px rgba(35, 128, 190, 0.10);
}

.circulo-respiracion.fase-descansa {
  transform: translate3d(0, 0, 0) scale(0.982);
  opacity: 0.88;
  border-color: rgba(56, 117, 164, 0.22);
  box-shadow:
    inset 0 0 36px rgba(45, 142, 202, 0.05),
    0 0 38px rgba(35, 128, 190, 0.07);
}

.pelota-respiracion,
.estela-respiracion {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  will-change: transform, opacity;
  pointer-events: none;
}

.pelota-respiracion {
  width: 18px;
  height: 18px;
  background: radial-gradient(circle, rgba(213, 240, 250, 0.82), rgba(82, 181, 232, 0.58) 48%, rgba(30, 94, 151, 0.24));
  box-shadow:
    0 0 18px rgba(102, 199, 239, 0.60),
    0 0 42px rgba(41, 142, 208, 0.36);
  transform: translate(-50%, -50%) rotate(-90deg) translateX(calc(var(--radio) - 1px));
}

.estela-respiracion {
  width: 46px;
  height: 46px;
  margin: -14px 0 0 -14px;
  background:
    radial-gradient(circle at 68% 50%, rgba(117, 211, 244, 0.28), transparent 30%),
    radial-gradient(circle at 34% 50%, rgba(72, 154, 213, 0.16), transparent 62%);
  filter: blur(5px);
  opacity: 0.76;
  transform: translate(-50%, -50%) rotate(-96deg) translateX(calc(var(--radio) - 18px));
}

.nucleo-respiracion {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 158px;
  height: 158px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(80, 166, 218, 0.14);
  background: rgba(0, 6, 14, 0.46);
  box-shadow: inset 0 0 36px rgba(38, 125, 188, 0.08);
  backdrop-filter: blur(10px);
}

.nucleo-respiracion span {
  color: rgba(187, 223, 239, 0.82);
  font-size: 64px;
  line-height: 1;
  font-weight: 300;
  text-shadow: 0 0 24px rgba(72, 172, 228, 0.18);
}

.nucleo-respiracion small {
  margin-top: 8px;
  color: rgba(106, 134, 154, 0.72);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 10px;
}

.panel-inferior {
  width: min(820px, 100%);
  display: grid;
  gap: 16px;
  justify-items: center;
}

.lecturas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.lecturas div {
  min-width: 150px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(67, 150, 204, 0.12);
  background: rgba(1, 8, 18, 0.32);
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.04);
  text-align: center;
}

.lecturas span {
  display: block;
  color: rgba(99, 148, 179, 0.72);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lecturas strong {
  display: block;
  margin-top: 5px;
  color: rgba(197, 228, 241, 0.82);
  font-size: 20px;
  font-weight: 400;
}

.controles {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

button {
  min-width: 112px;
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid rgba(73, 161, 216, 0.22);
  background: rgba(1, 8, 18, 0.42);
  color: rgba(200, 224, 236, 0.80);
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.05);
  cursor: pointer;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease, opacity 220ms ease;
}

button:hover {
  transform: translate3d(0, -2px, 0);
  border-color: rgba(86, 183, 235, 0.42);
  background: rgba(8, 28, 46, 0.52);
}

.volumen-control {
  width: min(420px, 100%);
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  color: rgba(124, 164, 190, 0.72);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.volumen-control input {
  width: 100%;
  accent-color: rgba(80, 177, 230, 0.78);
}

@keyframes neblinaDeriva {
  from { transform: translate3d(-4%, -2%, 0) scale(1.04) rotate(0deg); }
  to { transform: translate3d(4%, 3%, 0) scale(1.13) rotate(8deg); }
}

@keyframes neblinaDerivaB {
  from { transform: translate3d(5%, 3%, 0) scale(1.12) rotate(4deg); }
  to { transform: translate3d(-5%, -4%, 0) scale(1.02) rotate(-7deg); }
}

@keyframes ondasLentas {
  from { transform: translate3d(-2%, 0, 0) rotate(0deg) scale(1.04); }
  to { transform: translate3d(2%, -2%, 0) rotate(360deg) scale(1.08); }
}

@keyframes ondasLentasB {
  from { transform: translate3d(3%, -2%, 0) rotate(18deg) scale(1.12); }
  to { transform: translate3d(-3%, 2%, 0) rotate(378deg) scale(1.18); }
}

@keyframes flotarParticula {
  0% { opacity: 0; transform: translate3d(0, 24px, 0) scale(0.7); }
  18% { opacity: var(--opacidad, 0.45); }
  70% { opacity: var(--opacidad, 0.45); }
  100% { opacity: 0; transform: translate3d(var(--x, 20px), var(--y, -120px), 0) scale(1); }
}

@media (max-width: 760px) {
  .portal-header {
    top: 14px;
    right: 14px;
    left: 14px;
    justify-content: center;
  }

  .experiencia-respiracion {
    padding: 82px 16px 26px;
    grid-template-rows: auto minmax(320px, 1fr) auto;
  }

  .fase-palabra {
    letter-spacing: 0.10em;
    text-indent: 0.10em;
  }

  .circulo-respiracion {
    --diametro: min(360px, 82vw);
  }

  .nucleo-respiracion {
    width: 130px;
    height: 130px;
  }

  .nucleo-respiracion span {
    font-size: 50px;
  }

  button {
    flex: 1 1 140px;
  }

  .volumen-control {
    grid-template-columns: 1fr;
    text-align: center;
  }
}
