/**
 * Moony Puerto Rico ? experiencia visual
 * Tokens: #202945, #6bcbb8, #93358d, #ff5c35
 */

:root {
  --night-sky: #202945;
  --wax-turquoise: #6bcbb8;
  --dark-side-turquoise: #44797b;
  --twilight-violet: #93358d;
  --lunar-eclipse: #ff5c35;

  --font-body: 'Gravity', 'DM Sans', system-ui, sans-serif;
  --font-display: 'Pacifico', cursive;

  --logo-safe-o: 0.42em;
  --container: min(1080px, 92vw);
  --section-y: clamp(3.5rem, 11vw, 6.5rem);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.3, 0.64, 1);
}

/* Gravity: add /fonts and uncomment in production
@font-face { font-family: 'Gravity'; src: url('../fonts/Gravity-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
*/

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  overflow-x: clip;
  max-width: 100%;
  width: 100%;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1rem, 0.92rem + 0.35vw, 1.08rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  background-color: var(--night-sky);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  max-width: 100%;
  width: 100%;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none;
}

#contenido-principal {
  overflow-x: clip;
  max-width: 100%;
}

/* Grano cinematogr?fico global (sutil) */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: reduce) {
  body::after {
    opacity: 0.02;
  }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
}

a {
  color: var(--wax-turquoise);
  text-decoration: none;
  transition: color 0.3s var(--ease-out);
}

a:hover {
  color: #a8ebdc;
}

.container {
  width: var(--container);
  margin-inline: auto;
  padding-inline: max(1.25rem, env(safe-area-inset-left, 0px)) max(1.25rem, env(safe-area-inset-right, 0px));
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 150;
  max-width: 100%;
  overflow-x: clip;
  transition:
    background 0.45s var(--ease-out),
    border-color 0.45s var(--ease-out),
    box-shadow 0.45s var(--ease-out);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(32, 41, 69, 0.82);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom-color: rgba(107, 203, 184, 0.14);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.site-header__inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  min-height: calc(4.35rem + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
}

.brand {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  padding: var(--logo-safe-o);
  margin: calc(var(--logo-safe-o) * -1);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-width: 44px;
  min-height: 44px;
  box-sizing: border-box;
}

.brand__mark {
  display: block;
  width: clamp(64px, 13vw, 92px);
  height: auto;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.25));
}

.nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.25rem 1.15rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Una sola fila en escritorio: si no cabe, scroll horizontal (evita “segundo menú” bajo el logo) */
.nav--desktop {
  flex: 1 1 auto;
  justify-content: flex-end;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.nav--desktop::-webkit-scrollbar {
  display: none;
}

.nav--desktop a {
  flex-shrink: 0;
}

.nav a {
  color: rgba(255, 255, 255, 0.82);
  position: relative;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(107, 203, 184, 0.12);
}

.nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.2em;
  width: 100%;
  height: 1px;
  background: var(--wax-turquoise);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease-out);
}

.nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Botón menú comprimido (estilo compacto tipo Apple; solo móvil/tablet) */
.nav-compress__toggle {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  min-width: 44px;
  min-height: 40px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  border-radius: 0.25rem;
}

.nav-compress__icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 6px;
  width: 19px;
  height: 12px;
}

.nav-compress__line {
  display: block;
  height: 1.5px;
  width: 100%;
  background: currentColor;
  border-radius: 1px;
  transform-origin: center;
  transition:
    transform 0.32s var(--ease-out),
    opacity 0.32s var(--ease-out);
}

.nav-compress__toggle[aria-expanded='true'] .nav-compress__line:first-child {
  transform: translateY(3.75px) rotate(45deg);
}

.nav-compress__toggle[aria-expanded='true'] .nav-compress__line:last-child {
  transform: translateY(-3.75px) rotate(-45deg);
}

.nav-compress__toggle:focus-visible {
  outline: 2px solid var(--wax-turquoise);
  outline-offset: 3px;
}

.site-header--nav-open {
  border-bottom-color: rgba(107, 203, 184, 0.12);
}

/* Panel de navegación a pantalla completa (móvil) */
.nav-panel {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 0.32s var(--ease-out),
    visibility 0.32s;
}

.nav-panel.is-open {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}

/* Escritorio: el panel móvil no existe en el flujo (evita texto duplicado o superpuesto) */
@media (min-width: 901px) {
  .nav-panel {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-panel {
    transition: none;
  }

  .nav-compress__line {
    transition: none;
  }
}

.nav-panel__scrim {
  position: absolute;
  inset: 0;
  background: rgba(12, 15, 28, 0.55);
  backdrop-filter: blur(20px) saturate(1.1);
  -webkit-backdrop-filter: blur(20px) saturate(1.1);
}

.nav-panel__sheet {
  position: relative;
  z-index: 1;
  margin-top: calc(2.6rem + env(safe-area-inset-top, 0px));
  margin-left: max(0px, env(safe-area-inset-left, 0px));
  margin-right: max(0px, env(safe-area-inset-right, 0px));
  margin-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
  max-height: calc(100dvh - 2.6rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 0.5rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  border-radius: 0.65rem;
  border: 1px solid rgba(107, 203, 184, 0.16);
  background: linear-gradient(180deg, rgba(32, 41, 69, 0.97), rgba(32, 41, 69, 0.9));
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.nav-panel__links {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0 0.75rem;
}

.nav-panel__links a {
  display: block;
  padding: 0.95rem 1.35rem;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  border-bottom: 1px solid rgba(107, 203, 184, 0.1);
  transition: background 0.2s var(--ease-out), color 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(107, 203, 184, 0.12);
}

.nav-panel__links a:last-child {
  border-bottom: none;
}

.nav-panel__links a:hover,
.nav-panel__links a:focus-visible {
  background: rgba(107, 203, 184, 0.1);
  color: var(--wax-turquoise);
  outline: none;
}

.nav-panel__links a.is-active {
  color: var(--wax-turquoise);
  background: rgba(107, 203, 184, 0.08);
}

@media (max-width: 1100px) {
  .nav {
    font-size: 0.64rem;
    gap: 0.15rem 0.55rem;
  }
}

/* &le; 900px: barra m&aacute;s delgada + men&uacute; comprimido (sin fila de enlaces) */
@media (max-width: 900px) {
  .site-header.is-scrolled {
    background: rgba(32, 41, 69, 0.92);
  }

  .site-header__inner {
    min-height: calc(2.6rem + env(safe-area-inset-top, 0px));
    padding-top: env(safe-area-inset-top, 0px);
    gap: 0.35rem;
  }

  .brand__mark {
    width: clamp(44px, 12vw, 64px);
  }

  .nav--desktop {
    display: none !important;
  }

  .nav-compress__toggle {
    display: inline-flex;
  }

  .nav-panel {
    display: flex !important;
  }

  .nav-panel__sheet {
    width: min(calc(100vw - 1.25rem), 26rem);
    margin-left: auto;
    margin-right: auto;
  }
}

/* ---------- Hero (experiencia inmersiva) ---------- */
.hero {
  position: relative;
  min-height: 100dvh;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6.25rem 1.25rem 5rem;
  overflow-x: clip;
  overflow-y: visible;
  width: 100%;
  max-width: 100%;
  background: var(--night-sky);
  isolation: isolate;
}

@media (max-width: 900px) {
  .hero {
    padding-top: max(4.35rem, calc(3.35rem + env(safe-area-inset-top, 0px)));
    padding-bottom: 4.25rem;
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
  }
}

/* Aurora animada (malla org?nica) */
.hero__aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  mix-blend-mode: screen;
  pointer-events: none;
  will-change: transform;
}

.hero__aurora--a {
  width: min(75vw, 520px);
  height: min(75vw, 520px);
  left: 15%;
  top: 18%;
  background: radial-gradient(circle, rgba(107, 203, 184, 0.45) 0%, transparent 68%);
  animation: auroraFloat 18s ease-in-out infinite;
}

.hero__aurora--b {
  width: min(65vw, 440px);
  height: min(65vw, 440px);
  right: 8%;
  bottom: 22%;
  background: radial-gradient(circle, rgba(147, 53, 141, 0.22) 0%, transparent 65%);
  animation: auroraFloat 22s ease-in-out infinite reverse;
}

@keyframes auroraFloat {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(4%, -3%) scale(1.05);
  }
  66% {
    transform: translate(-3%, 4%) scale(0.96);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__aurora--a,
  .hero__aurora--b {
    animation: none;
    opacity: 0.35;
  }
}

.hero__mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 70% at 50% 100%, rgba(68, 121, 123, 0.18), transparent 52%),
    radial-gradient(ellipse 60% 45% at 10% 30%, rgba(107, 203, 184, 0.08), transparent 45%),
    radial-gradient(ellipse 50% 40% at 90% 25%, rgba(147, 53, 141, 0.1), transparent 40%);
  pointer-events: none;
  transition: transform 0.6s var(--ease-out);
  will-change: transform;
}

.hero__parallax {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}

.cloud-layer {
  position: absolute;
  inset: -12% -8%;
  background-repeat: no-repeat;
  background-position: 50% 62%;
  will-change: transform;
  opacity: 0.5;
}

.cloud-layer--back {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 420'%3E%3Cpath fill='%236bcbb8' fill-opacity='0.09' d='M0 290c220-90 360-45 520 0s320 90 520 45 160-70 160-70v155H0z'/%3E%3C/svg%3E");
  background-size: 145% auto;
}

.cloud-layer--mid {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 340'%3E%3Cpath fill='%23ffffff' fill-opacity='0.07' d='M0 230c190-55 340-25 500 25s360 65 520 25 180-50 180-50v130H0z'/%3E%3C/svg%3E");
  background-size: 132% auto;
  background-position: 38% 72%;
  opacity: 0.65;
}

.cloud-layer--front {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 300'%3E%3Cpath fill='%236bcbb8' fill-opacity='0.06' d='M0 210c160-45 300-15 440 35s300 55 460 15 300-100 300-100v160H0z'/%3E%3C/svg%3E");
  background-size: 128% auto;
  background-position: 52% 88%;
  opacity: 0.85;
}

.hero__glow {
  position: absolute;
  width: min(95vw, 560px);
  height: min(95vw, 560px);
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(107, 203, 184, 0.16) 0%, transparent 58%);
  pointer-events: none;
  transition: transform 0.35s var(--ease-out);
}

.hero__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 72% 58% at 50% 42%, transparent 0%, rgba(32, 41, 69, 0.45) 72%, var(--night-sky) 100%);
  pointer-events: none;
}

.hero__grain {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.hero__inner {
  position: relative;
  z-index: 3;
  max-width: min(42rem, calc(100% - 2.5rem));
  overflow: visible;
  padding-inline: clamp(1rem, 5vw, 2rem);
  margin-inline: auto;
}

.hero__eyebrow {
  margin: 0 0 1rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--wax-turquoise);
}

.hero__title {
  margin: 0 0 1rem;
  font-size: clamp(2.75rem, 10vw, 4.5rem);
  line-height: 1.22;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 8px 48px rgba(0, 0, 0, 0.35);
  /* Sin background-clip: en Pacifico suele cortar colas de letras */
  padding: 0.12em 0.28em 0.2em;
  overflow: visible;
}

.hero__slogan {
  margin: 0 0 1.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 2.75rem);
  color: var(--wax-turquoise);
  line-height: 1.2;
  text-shadow: 0 4px 32px rgba(107, 203, 184, 0.25);
}

.hero__lead {
  margin: 0 auto;
  max-width: 22em;
  font-size: clamp(1rem, 2.8vw, 1.15rem);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.02em;
}

.hero__thread {
  margin: 1.35rem auto 0;
  max-width: 28em;
  font-size: clamp(0.92rem, 2.4vw, 1.05rem);
  font-weight: 400;
  line-height: 1.58;
  color: rgba(255, 255, 255, 0.62);
}

.hero__signature {
  margin: 1.75rem auto 0;
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.8vw, 1.2rem);
  color: rgba(107, 203, 184, 0.78);
  letter-spacing: 0.03em;
}

/* Entrada escalonada hero (solo con JS listo) */
.hero__line {
  opacity: 0;
  transform: translateY(1.5rem);
}

.js-ready .hero__line {
  animation: heroRise 1s var(--ease-out) forwards;
}

.js-ready .hero__line:nth-child(1) {
  animation-delay: 0.1s;
}
.js-ready .hero__line:nth-child(2) {
  animation-delay: 0.22s;
}
.js-ready .hero__line:nth-child(3) {
  animation-delay: 0.34s;
}
.js-ready .hero__line:nth-child(4) {
  animation-delay: 0.46s;
}

@keyframes heroRise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__line {
    opacity: 1;
    transform: none;
    animation: none !important;
  }
}

.hero__scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  translate: -50% 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 0;
  font-size: 0;
  color: rgba(107, 203, 184, 0.55);
  transition: opacity 0.3s;
}

.hero__scroll-icon {
  display: block;
  width: 1.35rem;
  height: 1.35rem;
  border-right: 2px solid rgba(107, 203, 184, 0.45);
  border-bottom: 2px solid rgba(107, 203, 184, 0.45);
  transform: rotate(45deg);
  margin: 0;
  animation: scrollNudge 2.2s ease-in-out infinite;
}

@keyframes scrollNudge {
  0%,
  100% {
    transform: rotate(45deg) translate(0, 0);
    opacity: 0.5;
  }
  50% {
    transform: rotate(45deg) translate(4px, 4px);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__scroll-icon {
    animation: none;
  }
}

/* ---------- Sections ---------- */
.section {
  padding-block: var(--section-y);
}

/* Evita que titulares script queden cortados por el borde superior */
.section__head .section__title {
  padding-top: 0.15em;
  line-height: 1.2;
}

.section__head {
  margin-bottom: clamp(1.5rem, 4vw, 2.25rem);
}

.section__head--minimal .section__title {
  margin-bottom: 0.35rem;
}

.section__eyebrow {
  margin: 0 0 0.45rem;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--wax-turquoise);
}

.section__title {
  margin: 0 0 0.6rem;
  font-size: clamp(1.9rem, 4.5vw, 2.65rem);
  color: #fff;
  overflow: visible;
  padding: 0.08em 0.1em 0.15em;
}

.section__intro {
  margin: 0;
  max-width: 24ch;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.88rem;
  line-height: 1.45;
  letter-spacing: 0.02em;
}

#inicio,
#origen,
#latidos,
#claridad,
#hogar,
#eco,
#contacto {
  scroll-margin-top: calc(5.5rem + env(safe-area-inset-top, 0px));
}

@media (max-width: 900px) {
  #inicio,
  #origen,
  #latidos,
  #claridad,
  #hogar,
  #eco,
  #contacto {
    scroll-margin-top: calc(3.45rem + env(safe-area-inset-top, 0px));
  }
}

.container--narrow {
  max-width: min(36rem, min(92vw, 100%));
}

/* --- Capitulos: ritmo y respiracion --- */
.chapter-label {
  margin: 0 0 0.75rem;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(107, 203, 184, 0.65);
}

.chapter-label--inline {
  margin-bottom: 0.5rem;
}

.breathing-band {
  display: flex;
  justify-content: center;
  padding: clamp(2rem, 6vw, 3.5rem) 1rem;
  background: linear-gradient(180deg, var(--night-sky), rgba(68, 121, 123, 0.05), var(--night-sky));
}

.breathing-band__moon {
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--wax-turquoise);
  box-shadow: 0 0 24px rgba(107, 203, 184, 0.45);
  opacity: 0.75;
}

.chapter-divider {
  height: 1px;
  margin: 0 auto;
  max-width: min(12rem, 50vw);
  background: linear-gradient(90deg, transparent, rgba(107, 203, 184, 0.25), transparent);
}

.chapter-divider--sparse {
  margin-block: clamp(1.5rem, 4vw, 2.5rem);
  opacity: 0.7;
}

/* --- Pacto (origen) --- */
.pact {
  padding-block: clamp(4rem, 14vw, 7rem);
  background: radial-gradient(ellipse 80% 60% at 50% 20%, rgba(147, 53, 141, 0.06), transparent 55%);
}

.pact__title {
  margin: 0 0 1.75rem;
  font-size: clamp(1.85rem, 4.5vw, 2.45rem);
  color: #fff;
}

.pact__body {
  margin-bottom: 1.25rem;
}

.pact__graf {
  margin: 0 0 1.15rem;
  font-size: clamp(0.98rem, 2.4vw, 1.08rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.76);
}

.pact__graf:last-of-type {
  margin-bottom: 0;
}

.pact__ritual {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  color: var(--wax-turquoise);
  text-align: center;
  line-height: 1.4;
}

.story-ethics {
  margin: 1.75rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(107, 203, 184, 0.12);
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.38);
  max-width: 36ch;
}

/* --- Eco (puente sin venta) --- */
.eco {
  padding-block: clamp(4rem, 12vw, 7rem);
  background: linear-gradient(180deg, transparent, rgba(68, 121, 123, 0.07), transparent);
  border-top: 1px solid rgba(107, 203, 184, 0.08);
  border-bottom: 1px solid rgba(107, 203, 184, 0.08);
  text-align: center;
}

.eco__title {
  margin: 0 0 1.25rem;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  color: #fff;
}

.eco__lead {
  margin: 0 auto 1.75rem;
  font-size: clamp(1rem, 2.5vw, 1.12rem);
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.68);
  max-width: 28ch;
}

.eco__whisper {
  margin: 0 auto 2rem;
  font-size: 0.98rem;
  line-height: 1.62;
  color: rgba(255, 255, 255, 0.52);
  font-style: italic;
  max-width: 34ch;
}

.eco__sigil {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 1.55rem);
  color: var(--wax-turquoise);
  opacity: 0.9;
}

.site-footer__manifest {
  margin: 0 auto 1.25rem;
  max-width: 36ch;
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.48);
}

.nav a.is-active {
  color: var(--wax-turquoise);
}

.nav a.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ---------- Latidos (glass) ---------- */
.human {
  background: linear-gradient(180deg, var(--night-sky) 0%, rgba(68, 121, 123, 0.07) 48%, var(--night-sky) 100%);
}

.glass-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 860px) {
  .glass-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

.glass-card {
  position: relative;
  border-radius: 1.2rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(32, 41, 69, 0.5));
  backdrop-filter: blur(24px) saturate(1.25);
  -webkit-backdrop-filter: blur(24px) saturate(1.25);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition:
    transform 0.5s var(--ease-out),
    border-color 0.5s var(--ease-out),
    box-shadow 0.5s var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .glass-card:hover {
    transform: translateY(-6px);
    border-color: rgba(107, 203, 184, 0.35);
    box-shadow:
      0 32px 64px rgba(0, 0, 0, 0.38),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }

  .glass-card:hover .glass-card__visual img {
    transform: scale(1.06);
    filter: saturate(1) contrast(1.02);
  }

  .glass-card:hover .glass-card__shine {
    transform: translateX(100%);
  }
}

.glass-card__accent {
  position: absolute;
  width: 3px;
  inset: 0 auto 0 0;
  z-index: 2;
  background: var(--wax-turquoise);
  opacity: 0.9;
}

.glass-card--violet .glass-card__accent {
  background: linear-gradient(180deg, var(--twilight-violet), rgba(147, 53, 141, 0.25));
}

.glass-card--ember .glass-card__accent {
  background: linear-gradient(180deg, var(--lunar-eclipse), rgba(255, 92, 53, 0.25));
}

.glass-card__visual {
  position: relative;
  aspect-ratio: 4 / 5;
  min-height: 12.5rem;
  overflow: hidden;
  background: rgba(32, 41, 69, 0.85);
}

.glass-card__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.88) contrast(1.05);
  transition: transform 0.75s var(--ease-out), filter 0.5s;
}

.glass-card__visual--trigger {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(107, 203, 184, 0.15);
}

.glass-card__visual--trigger:focus-visible {
  outline: 2px solid var(--wax-turquoise);
  outline-offset: 3px;
}

.glass-card__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, transparent 40%, rgba(255, 255, 255, 0.12) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.9s var(--ease-out);
  pointer-events: none;
}

.glass-card__body {
  padding: 1.25rem 1.35rem 1.45rem;
}

.glass-card__region {
  margin: 0 0 0.65rem;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--wax-turquoise);
}

.glass-card__pulse {
  margin: 0;
  font-size: clamp(0.95rem, 2.2vw, 1.05rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
  font-style: italic;
}

/* ---------- Criterio ---------- */
.criterio {
  border-top: 1px solid rgba(107, 203, 184, 0.1);
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(107, 203, 184, 0.06), transparent 55%);
}

.criterion-strip {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 780px) {
  .criterion-strip {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

.criterion-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.65rem;
  padding: 1.75rem 1.25rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(107, 203, 184, 0.15);
  background: rgba(32, 41, 69, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition:
    transform 0.45s var(--ease-out),
    border-color 0.45s,
    box-shadow 0.45s;
}

@media (hover: hover) and (pointer: fine) {
  .criterion-card:hover {
    transform: translateY(-4px);
    border-color: rgba(107, 203, 184, 0.35);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.22);
  }
}

.criterion-card__icon {
  width: 2.75rem;
  height: 2.75rem;
  color: var(--wax-turquoise);
}

.criterion-card__icon svg {
  width: 100%;
  height: 100%;
}

.criterion-card__label {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
}

.criterion-card__whisper {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.52);
  max-width: 16ch;
  line-height: 1.45;
}

/* ---------- Compromiso ---------- */
.mvv {
  border-top: 1px solid rgba(107, 203, 184, 0.08);
  background: linear-gradient(180deg, rgba(68, 121, 123, 0.08) 0%, transparent 100%);
}

.mvv-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .mvv-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

.mvv-card {
  padding: 2rem 1.65rem;
  border-radius: 1.05rem;
  border: 1px solid rgba(107, 203, 184, 0.2);
  background: rgba(32, 41, 69, 0.55);
  position: relative;
  overflow: hidden;
}

.mvv-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(107, 203, 184, 0.08), transparent 45%);
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .mvv-card:hover::before {
    opacity: 1;
  }
}

.mvv-card h3 {
  margin: 0 0 0.65rem;
  font-size: 1.5rem;
  color: var(--wax-turquoise);
}

.mvv-card__one {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.02rem;
  line-height: 1.55;
}

.mvv-pulse {
  margin: 2.5rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  color: rgba(255, 255, 255, 0.78);
  text-align: center;
  max-width: 36ch;
  margin-inline: auto;
  line-height: 1.35;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 3rem 1.25rem;
  padding-bottom: max(3rem, calc(1.5rem + env(safe-area-inset-bottom, 0px)));
  text-align: center;
  border-top: 1px solid rgba(107, 203, 184, 0.1);
  background: radial-gradient(ellipse 60% 80% at 50% 100%, rgba(107, 203, 184, 0.06), transparent);
}

.site-footer__brand {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--wax-turquoise);
}

.site-footer__tagline {
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}

.site-footer__legal {
  margin: 0 auto;
  max-width: 44ch;
  font-size: 0.75rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.35);
}

/* ---------- Scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(2rem);
  transition:
    opacity 0.85s var(--ease-out),
    transform 0.85s var(--ease-spring);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Timeline de scroll (refuerzo sutil en navegadores compatibles) */
@supports (animation-timeline: view()) {
  .pact,
  .human,
  .criterio,
  .mvv,
  .eco {
    animation: sectionEase linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 38%;
  }

  @keyframes sectionEase {
    from {
      opacity: 0.88;
    }
    to {
      opacity: 1;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .pact,
  .human,
  .criterio,
  .mvv,
  .eco {
    animation: none !important;
  }
}

/* ---------- Tarjetas interactivas (historias; clic en imagen) ---------- */

/* ---------- Modal de historia (dialog nativo) ---------- */
/* Importante: sin [open], el dialog debe estar oculto. display:flex global rompe el cierre nativo. */
.story-dialog:not([open]) {
  display: none;
}

.story-dialog[open] {
  display: flex;
  margin: 0;
  padding: 1rem;
  border: none;
  background: transparent;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  z-index: 200;
}

.story-dialog::backdrop {
  background: rgba(12, 15, 28, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.story-dialog__panel {
  position: relative;
  width: min(40rem, 100%);
  max-height: min(92dvh, 100%);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border-radius: 1.25rem;
  border: 1px solid rgba(107, 203, 184, 0.22);
  background: linear-gradient(155deg, rgba(32, 41, 69, 0.92), rgba(32, 41, 69, 0.78));
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: storyDialogIn 0.45s var(--ease-out) both;
}

@keyframes storyDialogIn {
  from {
    opacity: 0;
    transform: translateY(1rem) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .story-dialog__panel {
    animation: none;
  }
}

.story-dialog__panel::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.story-dialog__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 20;
  margin: 0;
  width: 2.75rem;
  height: 2.75rem;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  background: rgba(32, 41, 69, 0.75);
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    background 0.25s var(--ease-out),
    border-color 0.25s,
    color 0.25s;
}

.story-dialog__close:hover {
  background: rgba(107, 203, 184, 0.2);
  border-color: rgba(107, 203, 184, 0.45);
  color: var(--wax-turquoise);
}

.story-dialog__media {
  margin: 0;
  border-radius: 1.15rem 1.15rem 0 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  max-height: 42vh;
  background: rgba(32, 41, 69, 0.9);
}

.story-dialog__media.story-dialog__media--empty {
  aspect-ratio: auto;
  max-height: none;
  min-height: 0;
}

.story-dialog__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-dialog__content {
  padding: 1.25rem 1.5rem 1.75rem;
}

.story-dialog__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--wax-turquoise);
}

.story-dialog__title {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 4vw, 2rem);
  color: #fff;
}

.story-dialog__quote {
  margin: 0 0 1.25rem;
  padding: 0;
  border: none;
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--wax-turquoise);
}

.story-dialog__body {
  font-size: 1rem;
  line-height: 1.72;
  color: rgba(255, 255, 255, 0.84);
}

.story-dialog__body p {
  margin: 0 0 1.05rem;
}

.story-dialog__body p:last-child {
  margin-bottom: 0;
}

/* ---------- Móvil y tablets (lectura principal en teléfono) ---------- */
@media (max-width: 480px) {
  body {
    font-size: max(1rem, 16px);
  }

  .hero {
    min-height: 100dvh;
    min-height: 100svh;
    padding-top: max(4.5rem, calc(3.6rem + env(safe-area-inset-top, 0px)));
    padding-bottom: max(4.5rem, env(safe-area-inset-bottom, 0px));
    padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
  }

  .hero__inner {
    padding-inline: max(0.85rem, env(safe-area-inset-left, 0px)) max(0.85rem, env(safe-area-inset-right, 0px));
  }

  .hero__title {
    font-size: clamp(2.35rem, 11vw, 3.35rem);
    line-height: 1.18;
  }

  .hero__slogan {
    font-size: clamp(1.25rem, 5.5vw, 1.85rem);
  }

  .hero__scroll-hint {
    bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  }

  .section {
    padding-block: clamp(2.6rem, 9vw, 4.5rem);
  }

  .section__title {
    font-size: clamp(1.55rem, 6vw, 2.2rem);
    word-break: break-word;
  }

  .pact__graf,
  .eco__lead {
    font-size: 1.02rem;
    line-height: 1.65;
  }

  .glass-card__body {
    padding: 1.1rem 1.15rem 1.35rem;
  }

  .glass-card__visual {
    min-height: 14rem;
    aspect-ratio: 3 / 4;
  }
}

@media (max-width: 540px) {
  .story-dialog[open] {
    padding: max(0.35rem, env(safe-area-inset-top, 0px)) max(0.5rem, env(safe-area-inset-right, 0px))
      max(0.5rem, env(safe-area-inset-bottom, 0px)) max(0.5rem, env(safe-area-inset-left, 0px));
    align-items: stretch;
  }

  .story-dialog__panel {
    width: 100%;
    max-width: 100%;
    max-height: min(96dvh, calc(100% - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
    border-radius: 1.05rem;
  }

  .story-dialog__close {
    top: max(0.5rem, env(safe-area-inset-top, 0px));
    right: max(0.5rem, env(safe-area-inset-right, 0px));
    width: 3rem;
    height: 3rem;
  }

  .story-dialog__media {
    max-height: 38vh;
  }

  .story-dialog__content {
    padding: 1.15rem max(1rem, env(safe-area-inset-left, 0px)) 1.65rem max(1rem, env(safe-area-inset-right, 0px));
  }

  .story-dialog__body {
    font-size: 1.03rem;
    line-height: 1.75;
  }
}
