/* =============================================================
   ALHAMBRA MEDIA — Design System
   Complementa Tailwind CSS (CDN). Aquí solo lo que Tailwind
   utilities no cubren limpiamente: tipografía fina, texturas
   de marca, placeholders de imagen y animaciones de scroll.
   ============================================================= */

/* -------------------------------------------------------------
   0. Transiciones entre páginas (View Transitions API nativa)
   ------------------------------------------------------------- */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.5s;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}
::view-transition-old(root) { animation-name: am-fade-out; }
::view-transition-new(root) { animation-name: am-fade-in; }
@keyframes am-fade-out { to { opacity: 0; } }
@keyframes am-fade-in { from { opacity: 0; } }

/* -------------------------------------------------------------
   0a. Fuentes alojadas en el propio servidor (10-oct-2026)
   Antes venían de Google Fonts: un CSS externo que bloqueaba el
   primer pintado y provocaba un salto de texto al llegar la fuente.
   Variables (un archivo cubre 400–700), subconjunto latino (incluye
   á é í ó ú ñ ü ¿ ¡). Licencia SIL Open Font License 1.1.
   ------------------------------------------------------------- */
@font-face {
  font-family: "Libre Baskerville";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/libre-baskerville-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Libre Baskerville";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/libre-baskerville-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* -------------------------------------------------------------
   0b. Fuentes de respaldo con métricas ajustadas (evita el salto de
   texto, CLS, mientras llegan Libre Baskerville e Inter de Google
   Fonts). size-adjust medido en Chrome el 10-oct-2026 comparando el
   ancho real del mismo texto: Libre Baskerville = 1,161 × Georgia;
   Inter = 1,065 × Arial. ascent/descent = métrica de la fuente web ÷
   size-adjust.
   ------------------------------------------------------------- */
@font-face {
  font-family: "Libre Baskerville Fallback";
  src: local("Georgia");
  size-adjust: 116.1%;
  ascent-override: 83.5%;
  descent-override: 23.3%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 106.5%;
  ascent-override: 90.9%;
  descent-override: 22.7%;
  line-gap-override: 0%;
}

/* -------------------------------------------------------------
   1. Tokens
   ------------------------------------------------------------- */
:root {
  --am-taupe: #746D69;
  --am-greige: #C9BCAB;
  --am-cream: #EDE5D8;
  --am-graphite: #2B2826;
  --am-bronze: #B8A082;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* -------------------------------------------------------------
   2. Base
   ------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

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

body {
  background-color: var(--am-cream);
  color: var(--am-graphite);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

::selection {
  background: var(--am-bronze);
  color: var(--am-cream);
}

:focus-visible {
  outline: 1px solid var(--am-bronze);
  outline-offset: 3px;
}

h1, h2, h3, h4 {
  text-wrap: balance;
  letter-spacing: -0.01em;
}

p { text-wrap: pretty; }

/* -------------------------------------------------------------
   3. Utilities de marca
   ------------------------------------------------------------- */

/* Kicker / eyebrow tipográfico — "PROPUESTA DE VALOR", "NIVEL 01" */
.am-kicker {
  font-family: 'Inter', "Inter Fallback", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--am-taupe);
}
/* Variante para texto sobre fotografía — contraste garantizado */
.am-kicker--on-image {
  color: var(--am-cream);
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

/* Línea fina decorativa bronce */
.am-hairline {
  height: 1px;
  width: 100%;
  background: linear-gradient(to right, var(--am-bronze), transparent);
}

.am-hairline-center {
  height: 1px;
  width: 3rem;
  background: var(--am-bronze);
}

/* Numeración editorial de servicios: 01 / 02 / 03 */
.am-index-number {
  font-family: 'Libre Baskerville', "Libre Baskerville Fallback", serif;
  font-style: italic;
  color: var(--am-greige);
  -webkit-text-stroke: 1px var(--am-bronze);
  color: transparent;
}

/* Botón primario — sólido grafito */
.btn-am-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 2rem;
  background: var(--am-graphite);
  color: var(--am-cream);
  font-family: 'Inter', "Inter Fallback", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid var(--am-graphite);
  transition: background-color .5s var(--ease-out), color .5s var(--ease-out), border-color .5s var(--ease-out);
}
.btn-am-primary:hover {
  background: var(--am-bronze);
  border-color: var(--am-bronze);
  color: var(--am-graphite);
}

/* Botón secundario — contorno bronce */
.btn-am-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.9rem;
  background: transparent;
  color: var(--am-graphite);
  font-family: 'Inter', "Inter Fallback", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid var(--am-bronze);
  transition: background-color .5s var(--ease-out), color .5s var(--ease-out);
}
.btn-am-outline:hover {
  background: var(--am-bronze);
  color: var(--am-cream);
}

/* -------------------------------------------------------------
   4. Placeholders de imagen — "render frames"
   Sustituir el <img> interior por el render/foto real.
   El marco queda listo con proporción, borde y etiqueta técnica.

   ⚠️ ORDEN DE CARGA: en el hero (index.php / en/index.php) este div
   lleva TAMBIÉN las utilidades de Tailwind "absolute inset-0" para
   posicionarse encima del section. Como .render-frame (aquí) y
   .absolute (Tailwind) tienen la misma especificidad, gana la regla
   que se cargue EN ÚLTIMO LUGAR en el <head> — por eso style.css se
   enlaza SIEMPRE DESPUÉS de tailwind.css en todas las páginas (ver
   README.md → "CSS / Tailwind"). Si algún día cambiáis ese orden,
   el hero pierde el position:absolute y la imagen deja de ocupar
   todo el ancho de la sección (bug real detectado en producción el
   22/08/2026). No declarar aquí un "position" que pueda chocar con
   utilidades de Tailwind sin tenerlo muy presente.
   ------------------------------------------------------------- */
.render-frame {
  position: relative;
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg, rgba(116,109,105,0.09) 0px, rgba(116,109,105,0.09) 1px, transparent 1px, transparent 14px),
    linear-gradient(160deg, #D8CFC1 0%, #C9BCAB 55%, #B4A692 100%);
  border: 1px solid rgba(184,160,130,0.35);
}
.render-frame picture {
  display: block;
  width: 100%;
  height: 100%;
}
.render-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Armoniza fotografías de orígenes distintos con la paleta cálida de marca */
  filter: saturate(0.85) sepia(0.16) contrast(1.03) brightness(0.98);
}
.render-frame .render-frame__label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.1rem;
  background: linear-gradient(to top, rgba(43,40,38,0.55), transparent);
  color: var(--am-cream);
  font-family: 'Inter', "Inter Fallback", sans-serif;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  pointer-events: none;
}
.render-frame .render-frame__corner {
  position: absolute;
  top: 0.9rem; right: 0.9rem;
  width: 1.6rem; height: 1.6rem;
  border-top: 1px solid var(--am-bronze);
  border-right: 1px solid var(--am-bronze);
  opacity: 0.85;
}

/* -------------------------------------------------------------
   5. Reveal on scroll
   ------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
/* Defensa: nunca dejar contenido invisible si el JS no corre */
.no-js .reveal,
html:not(.js-ready) .reveal {
  opacity: 1;
  transform: none;
}

/* -------------------------------------------------------------
   6. Header / navegación
   ------------------------------------------------------------- */
.am-header {
  /* Fondo 100% opaco y sólido (sin backdrop-filter): el blur en un
     elemento fixed provoca parpadeos/flashes en blanco al hacer scroll
     con rueda en algunas GPUs de Windows, y una opacidad <1 deja
     "sangrar" el contenido oscuro de debajo (texto, patrones) al
     hacer scroll por encima de secciones oscuras. */
  background: #EDE5D8;
}

.am-nav-link {
  position: relative;
  font-family: 'Inter', "Inter Fallback", sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--am-graphite);
}
.am-nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -6px;
  width: 0%;
  height: 1px;
  background: var(--am-bronze);
  transition: width .4s var(--ease-out);
}
.am-nav-link:hover::after,
.am-nav-link.is-active::after {
  width: 100%;
}
.am-nav-link.is-active {
  color: var(--am-taupe);
}

/* Menú móvil */
#mobile-menu {
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .45s var(--ease-out), transform .45s var(--ease-out);
}
#mobile-menu.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Hamburguesa animada */
.am-burger span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--am-graphite);
  transition: transform .35s var(--ease-out), opacity .35s var(--ease-out);
}
.am-burger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.am-burger.is-open span:nth-child(2) { opacity: 0; }
.am-burger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* -------------------------------------------------------------
   7. Textura hero — halo suave en bronce
   ------------------------------------------------------------- */
.am-halo {
  position: absolute;
  inset: -20% -10% -40% -10%;
  background: radial-gradient(45% 40% at 50% 30%, rgba(184,160,130,0.22), transparent 70%);
  filter: blur(36px);
  pointer-events: none;
  z-index: 0;
}

/* Patrón arquería sutil (evoca el logotipo, uso decorativo de fondo) */
.am-arcade-pattern {
  background-image: radial-gradient(circle at 10px 0, transparent 9px, rgba(184,160,130,0.18) 9px, rgba(184,160,130,0.18) 10px, transparent 10px);
  background-size: 40px 20px;
  background-repeat: repeat-x;
  background-position: bottom;
}

/* -------------------------------------------------------------
   8. Casos de uso — fichas de perfil
   ------------------------------------------------------------- */
.usecase-card {
  position: relative;
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out);
}
.usecase-card:hover {
  transform: translateY(-4px);
}
.usecase-number {
  font-family: 'Libre Baskerville', "Libre Baskerville Fallback", serif;
  font-style: italic;
  color: var(--am-bronze);
  opacity: 0.55;
}

/* -------------------------------------------------------------
   9. Formulario de contacto
   ------------------------------------------------------------- */
.am-field {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(116,109,105,0.4);
  padding: 0.85rem 0.1rem;
  font-family: 'Inter', "Inter Fallback", sans-serif;
  color: var(--am-graphite);
  transition: border-color .35s var(--ease-out);
}
.am-field:focus {
  outline: none;
  border-color: var(--am-bronze);
}
.am-field::placeholder { color: rgba(43,40,38,0.4); }

/* -------------------------------------------------------------
   10. Scrollbar discreto (opcional, no intrusivo)
   ------------------------------------------------------------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--am-cream); }
::-webkit-scrollbar-thumb { background: var(--am-greige); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--am-bronze); }

/* -------------------------------------------------------------
   11. Splash de bienvenida (solo Inicio)
   Doble red de seguridad: la animación CSS termina sola en
   opacity:0 + visibility:hidden aunque JS no llegue a ejecutarse;
   main.js la retira del DOM en cuanto puede y permite saltarla.
   ------------------------------------------------------------- */
.am-splash {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  background: var(--am-graphite);
  cursor: pointer;
  animation: am-splash-out 1.3s var(--ease-out) 1.7s forwards;
}
.am-splash__mark {
  width: 112px;
  height: 112px;
  opacity: 0;
  transform: scale(0.85);
  animation: am-splash-mark-in 0.8s var(--ease-out) 0.15s forwards;
}
.am-splash__motto {
  font-family: 'Libre Baskerville', "Libre Baskerville Fallback", serif;
  font-style: italic;
  font-size: 1.35rem;
  letter-spacing: 0.22em;
  color: var(--am-bronze);
  opacity: 0;
  animation: am-splash-text-in 0.8s var(--ease-out) 0.5s forwards;
}
@keyframes am-splash-mark-in { to { opacity: 1; transform: scale(1); } }
@keyframes am-splash-text-in { to { opacity: 1; } }
@keyframes am-splash-out { to { opacity: 0; visibility: hidden; } }

/* Clase que aplica main.js para retirarla del DOM/flujo al instante
   (al terminar la animación, al hacer clic, o como red de seguridad) */
.am-splash.is-hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 0.9s var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
  /* La sostenida de 1.7s + fundido es un efecto vistoso pero no
     imprescindible: se acorta a casi instantáneo. */
  .am-splash { animation-delay: 0.2s; animation-duration: 0.3s; }
  .am-splash__mark,
  .am-splash__motto { animation-duration: 0.2s; animation-delay: 0s; }
}

/* -------------------------------------------------------------
   12. FAQ — acordeón nativo (<details>/<summary>, sin JS)
   Contenido siempre presente en el DOM (bueno para SEO/GEO: los
   motores de IA y los rastreadores leen la respuesta aunque esté
   colapsada visualmente) — solo se anima el disclosure y el "+".
   ------------------------------------------------------------- */
.am-faq {
  border-top: 1px solid rgba(184,160,130,0.25);
}
.am-faq__item {
  border-bottom: 1px solid rgba(184,160,130,0.25);
}
.am-faq__item > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.6rem 0.2rem;
  font-family: 'Libre Baskerville', "Libre Baskerville Fallback", serif;
  font-size: 1.15rem;
  color: var(--am-graphite);
}
.am-faq__item > summary::-webkit-details-marker { display: none; }
.am-faq__item > summary::after {
  content: '+';
  flex-shrink: 0;
  font-family: 'Inter', "Inter Fallback", sans-serif;
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--am-bronze);
  transition: transform .4s var(--ease-out);
}
.am-faq__item[open] > summary::after { transform: rotate(45deg); }
.am-faq__item .am-faq__answer {
  padding: 0 0.2rem 1.8rem;
  max-width: 62ch;
  color: var(--am-taupe);
  line-height: 1.7;
}

/* -------------------------------------------------------------
   13. Breadcrumbs — jerarquía SILO visible (Inicio › Servicios › …)
   ------------------------------------------------------------- */
.am-breadcrumbs {
  font-family: 'Inter', "Inter Fallback", sans-serif;
  font-size: 0.78rem;
  color: var(--am-taupe);
}
.am-breadcrumbs a { color: var(--am-taupe); }
.am-breadcrumbs a:hover { color: var(--am-bronze); }
.am-breadcrumbs li:last-child { color: var(--am-graphite); }

/* -------------------------------------------------------------
   14. Selector de idioma (header)
   ------------------------------------------------------------- */
.am-lang-switch a {
  font-family: 'Inter', "Inter Fallback", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--am-taupe);
}
.am-lang-switch a[aria-current="true"] {
  color: var(--am-graphite);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--am-bronze);
}

/* -------------------------------------------------------------
   15. Banner de cookies (assets/js/cookie-banner.js)
   Barra inferior no bloqueante. "Aceptar" y "Rechazar" con el
   MISMO peso visual (criterio AEPD). En móvil ocupa todo el ancho
   y respeta la zona segura inferior (iPhone).
   ------------------------------------------------------------- */
.am-cookies {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 150;
  padding: 0 1rem calc(1rem + env(safe-area-inset-bottom));
  pointer-events: none;
  opacity: 0;
  transform: translateY(16px);
  visibility: hidden;
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out), visibility 0s linear .5s;
}
.am-cookies.is-visible {
  opacity: 1;
  transform: none;
  visibility: visible;
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out), visibility 0s;
}
.am-cookies__inner {
  pointer-events: auto;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  padding: 1.4rem 1.5rem;
  background: var(--am-cream);
  color: var(--am-graphite);
  border: 1px solid rgba(184,160,130,0.55);
  box-shadow: 0 18px 50px -20px rgba(43,40,38,0.45);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
}
.am-cookies__body { flex: 1 1 420px; min-width: 0; }
.am-cookies__title {
  font-family: 'Libre Baskerville', "Libre Baskerville Fallback", serif;
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}
.am-cookies__text {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--am-taupe);
}
.am-cookies__text a {
  color: var(--am-graphite);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--am-bronze);
}
.am-cookies__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.am-cookies__btn {
  flex: 1 1 auto;
  min-height: 44px; /* objetivo táctil mínimo */
  padding: 0.75rem 1.4rem;
  font-family: 'Inter', "Inter Fallback", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--am-graphite);
  color: var(--am-cream);
  border: 1px solid var(--am-graphite);
  cursor: pointer;
  transition: background-color .35s var(--ease-out), color .35s var(--ease-out), border-color .35s var(--ease-out);
}
.am-cookies__btn:hover { background: var(--am-bronze); border-color: var(--am-bronze); color: var(--am-graphite); }
.am-cookies__btn--ghost { background: transparent; color: var(--am-graphite); border-color: var(--am-bronze); }
.am-cookies__btn--ghost:hover { background: var(--am-bronze); color: var(--am-cream); }
.am-cookies__btn[hidden] { display: none; }

.am-cookies__panel {
  margin-top: 1.1rem;
  border-top: 1px solid rgba(184,160,130,0.35);
}
.am-cookies__panel[hidden] { display: none; }
.am-cookies__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(184,160,130,0.25);
}
.am-cookies__row-title { font-weight: 600; font-size: 0.85rem; }
.am-cookies__row-desc { font-size: 0.8rem; color: var(--am-taupe); line-height: 1.5; margin-top: 0.15rem; }
.am-cookies__always {
  flex-shrink: 0;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--am-bronze);
}
/* Interruptor accesible: checkbox nativo con apariencia de switch */
.am-cookies__switch {
  flex-shrink: 0;
  appearance: none;
  -webkit-appearance: none;
  width: 44px; height: 24px;
  border-radius: 999px;
  background: rgba(116,109,105,0.35);
  position: relative;
  cursor: pointer;
  transition: background-color .3s var(--ease-out);
}
.am-cookies__switch::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--am-cream);
  transition: transform .3s var(--ease-out);
}
.am-cookies__switch:checked { background: var(--am-graphite); }
.am-cookies__switch:checked::after { transform: translateX(20px); }

@media (max-width: 640px) {
  .am-cookies { padding: 0 0 env(safe-area-inset-bottom); }
  .am-cookies__inner { border-left: 0; border-right: 0; border-bottom: 0; padding: 1.2rem 1rem 1rem; }
  .am-cookies__text { font-size: 0.82rem; }
  .am-cookies__actions { flex-wrap: nowrap; width: 100%; gap: 0.4rem; }
  .am-cookies__btn { flex: 1 1 0; min-width: 0; padding: 0.7rem 0.35rem; letter-spacing: 0.08em; font-size: 0.66rem; }
}
@media (prefers-reduced-motion: reduce) {
  .am-cookies, .am-cookies.is-visible { transition: none; transform: none; }
}

/* Enlace "Configurar cookies" del pie, con aspecto de enlace */
.am-linklike {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

/* -------------------------------------------------------------
   16. Redes sociales (pie)
   ------------------------------------------------------------- */
.am-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid rgba(184,160,130,0.45);
  color: var(--am-graphite);
  transition: background-color .35s var(--ease-out), color .35s var(--ease-out), border-color .35s var(--ease-out);
}
.am-social svg { width: 18px; height: 18px; }
.am-social:hover { background: var(--am-graphite); border-color: var(--am-graphite); color: var(--am-cream); }

/* -------------------------------------------------------------
   17. Capa de efectos (assets/js/fx.js)
   Curva "muelle" con linear(): se asienta con un rebote mínimo, más
   natural que un ease-out clásico. Navegadores sin linear() usan el
   cubic-bezier de respaldo.
   ------------------------------------------------------------- */
:root { --ease-spring: cubic-bezier(0.16, 1, 0.3, 1); }
@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --ease-spring: linear(0, 0.009, 0.035 2.1%, 0.141 4.4%, 0.723 12.9%, 0.938 16.7%, 1.017 20.1%, 1.044 23.4%, 1.042 27.4%, 1.014 34.5%, 0.996 43.1%, 1.001 63.1%, 1);
  }
}

/* 17.1 Luz WebGL — el canvas ocupa la sección; sin WebGL se usa un
   degradado CSS equivalente (estático). */
.am-glow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s var(--ease-out);
}
.am-glow.is-ready { opacity: 1; }
.am-glow.is-fallback {
  opacity: 1;
  background:
    radial-gradient(40% 50% at 20% 25%, rgba(184,160,130,0.20), transparent 70%),
    radial-gradient(45% 55% at 85% 75%, rgba(184,160,130,0.14), transparent 70%);
}

/* 17.2 Titulares palabra a palabra */
.am-fx [data-am-split].is-split .am-w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  /* Holgura arriba y abajo: que no se corten tildes, mayúsculas ni
     descendentes (g, p, y); el margen negativo la compensa. */
  padding: 0.18em 0.04em 0.14em;
  margin: -0.18em -0.04em -0.14em;
}
.am-fx [data-am-split].is-split .am-w > span {
  display: inline-block;
  transform: translateY(105%);
  transition: transform 1.1s var(--ease-spring);
  transition-delay: calc(var(--i, 0) * 45ms);
}
.am-fx [data-am-split].is-in .am-w > span { transform: none; }

/* 17.3 Foco de luz en tarjetas */
[data-am-spot] { position: relative; isolation: isolate; }
[data-am-spot]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(184,160,130,0.22), transparent 60%);
  transition: opacity .5s var(--ease-out);
}
[data-am-spot]:hover::before { opacity: 1; }

/* 17.4 Línea guía que se dibuja con el scroll ([data-am-draw]) */
@property --am-p { syntax: "<number>"; inherits: true; initial-value: 0; }
.am-draw-line {
  position: absolute;
  background: var(--am-bronze);
  transform-origin: top left;
}
.am-draw-line--y { left: 0; top: 0.5rem; bottom: 0.5rem; width: 1px; transform: scaleY(var(--am-p, 0)); }
.am-draw-line--x { left: 0; right: 0; top: 0; height: 1px; transform: scaleX(var(--am-p, 0)); }
@keyframes am-draw-p { from { --am-p: 0; } to { --am-p: 1; } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    [data-am-draw] {
      animation: am-draw-p linear both;
      animation-timeline: view();
      animation-range: entry 10% cover 55%;
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  [data-am-draw] { --am-p: 1; }
}

/* 17.5 Hero: la imagen se acerca y el texto se desvanece al hacer
   scroll — solo CSS (scroll-driven animations). Sin soporte: hero
   estático, exactamente como antes. */
@keyframes am-hero-zoom { from { transform: scale(1); } to { transform: scale(1.12) translateY(3%); } }
@keyframes am-hero-fade { to { opacity: 0; transform: translateY(-8vh); } }
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .am-hero-media img {
      animation: am-hero-zoom linear both;
      animation-timeline: scroll(root);
      animation-range: 0 100vh;
    }
    .am-hero-copy {
      animation: am-hero-fade linear both;
      animation-timeline: scroll(root);
      animation-range: 0 80vh;
    }
  }
}

/* 17.6 FAQ: apertura suave (navegadores con ::details-content) */
@supports selector(::details-content) {
  .am-faq__item { interpolate-size: allow-keywords; }
  .am-faq__item::details-content {
    block-size: 0;
    overflow: clip;
    transition: block-size .5s var(--ease-out), content-visibility .5s allow-discrete;
  }
  .am-faq__item[open]::details-content { block-size: auto; }
}

/* 17.7 Proceso (home): pasos con línea guía que se dibuja */
.am-process { position: relative; }
.am-process__rail { position: absolute; left: 0; top: 0.5rem; bottom: 0.5rem; width: 1px; background: rgba(237,229,216,0.15); }
.am-process__step { position: relative; padding-left: 2.25rem; }
.am-process__step::before {
  content: "";
  position: absolute;
  left: -4px; top: 0.55rem;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--am-graphite);
  border: 1px solid var(--am-bronze);
}
@media (min-width: 1024px) {
  .am-process__rail { left: 0; right: 0; top: 0; bottom: auto; width: auto; height: 1px; }
  .am-process .am-draw-line--y { display: none; }
  .am-process__step { padding-left: 0; padding-top: 2.5rem; }
  .am-process__step::before { left: 0; top: -4px; }
}
@media (max-width: 1023px) {
  .am-process .am-draw-line--x { display: none; }
}

/* -------------------------------------------------------------
   18. Página 404
   ------------------------------------------------------------- */
.am-404 { background: var(--am-graphite); }
.am-404__stage {
  position: relative;
  overflow: hidden;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 7.5rem 0 4.5rem;
}
.am-404__grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(237,229,216,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(237,229,216,0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 60% 45%, #000 30%, transparent 80%);
  mask-image: radial-gradient(ellipse 70% 70% at 60% 45%, #000 30%, transparent 80%);
}
.am-404__title {
  font-size: clamp(2.1rem, 1.2rem + 3.6vw, 4.25rem);
  line-height: 1.05;
}
.am-404__links { border-top: 1px solid rgba(237,229,216,0.15); }
.am-404__link {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.1rem 0.25rem;
  min-height: 64px;
  border-bottom: 1px solid rgba(237,229,216,0.15);
}
.am-404__num { font-family: "Libre Baskerville", "Libre Baskerville Fallback", serif; font-style: italic; color: var(--am-bronze); font-size: 1.05rem; }
.am-404__arrow { color: var(--am-bronze); transition: transform .45s var(--ease-spring); }
.am-404__link:hover .am-404__arrow,
.am-404__link:focus-visible .am-404__arrow { transform: translateX(6px); }

.am-404__plan { color: var(--am-bronze); max-width: 420px; margin: 0 auto; }
.am-404__plan svg { width: 100%; height: auto; display: block; overflow: visible; }
.am-404__lines path { stroke-width: 1.4; stroke-dasharray: 1; stroke-dashoffset: 1; animation: am-404-draw 1.6s var(--ease-out) forwards; }
.am-404__dims path { stroke-width: 0.8; opacity: 0.55; stroke-dasharray: 1; stroke-dashoffset: 1; animation: am-404-draw 1.2s var(--ease-out) 2.2s forwards; }
.am-404__labels { font-family: "Inter", "Inter Fallback", sans-serif; font-size: 11px; letter-spacing: 0.2em; opacity: 0; animation: am-404-in .8s var(--ease-out) 2.6s forwards; }
.am-404__labels text:first-child { font-family: "Libre Baskerville", "Libre Baskerville Fallback", serif; font-style: italic; font-size: 15px; letter-spacing: 0.1em; }
.am-404__lines .d1 { animation-delay: .1s; }
.am-404__lines .d2 { animation-delay: .25s; }
.am-404__lines .d3 { animation-delay: .45s; }
.am-404__lines .d4 { animation-delay: .6s; }
.am-404__lines .d5 { animation-delay: .85s; animation-duration: 1.8s; }
.am-404__lines .d6 { animation-delay: 1.05s; animation-duration: 1.8s; }
.am-404__lines .d7 { animation-delay: 1.3s; }
.am-404__lines .d8 { animation-delay: 1.6s; opacity: .7; }
/* La celosía central queda en trazo discontinuo: "todavía en plano" */
.am-404__plan .d9 { stroke-dasharray: 0.015 0.015; stroke-dashoffset: 0; opacity: 0; animation: am-404-half 1.4s var(--ease-out) 1.9s forwards; }
@keyframes am-404-draw { to { stroke-dashoffset: 0; } }
@keyframes am-404-half { to { opacity: .45; } }
@keyframes am-404-in { to { opacity: 0.8; } }
.am-404__caption {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  justify-content: center;
  margin-top: 1.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(237,229,216,0.5);
}
.am-404__caption code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-transform: none;
  letter-spacing: 0;
  color: rgba(237,229,216,0.8);
  word-break: break-all;
}
@media (max-width: 1023px) {
  .am-404__stage { padding-top: 6.5rem; }
  .am-404__plan { max-width: 200px; }
}
@media (prefers-reduced-motion: reduce) {
  .am-404__lines path, .am-404__dims path { animation: none; stroke-dashoffset: 0; }
  .am-404__labels { animation: none; opacity: 0.8; }
  .am-404__plan .d9 { animation: none; opacity: .45; }
}

/* -------------------------------------------------------------
   19. Aviso "Imagen ilustrativa" sobre fotografías de archivo
   Mientras el sitio use fotos CC0 (no son trabajo del estudio), cada
   marco lo indica de forma visible — encargo web 28-sep, tarea A2.
   ------------------------------------------------------------- */
.render-frame__note {
  position: absolute;
  top: 0.9rem; left: 0.9rem;
  z-index: 2;
  padding: 0.3rem 0.55rem;
  font-family: 'Inter', "Inter Fallback", sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--am-cream);
  background: rgba(43,40,38,0.55);
  pointer-events: none;
}
.render-frame__note--hero { top: 6.25rem; left: auto; right: 1.5rem; }
@media (min-width: 1024px) { .render-frame__note--hero { right: 2.5rem; } }

/* -------------------------------------------------------------
   20. Página de enlaces (enlaces.php / en/links.php) — móvil primero
   ------------------------------------------------------------- */
.am-links {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  padding: calc(3rem + env(safe-area-inset-top)) 1.25rem calc(3rem + env(safe-area-inset-bottom));
}
.am-links__inner { position: relative; width: 100%; max-width: 440px; }
.am-links__logo { margin: 0 auto; width: 96px; height: 96px; border-radius: 50%; }
.am-links__btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 64px;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(237,229,216,0.22);
  background: rgba(43,40,38,0.55);
  color: var(--am-cream);
  transition: background-color .35s var(--ease-out), border-color .35s var(--ease-out), transform .45s var(--ease-spring);
}
.am-links__btn:hover, .am-links__btn:focus-visible { border-color: var(--am-bronze); background: rgba(184,160,130,0.12); }
.am-links__btn:active { transform: scale(0.985); }
.am-links__btn.is-primary { background: var(--am-bronze); border-color: var(--am-bronze); color: var(--am-graphite); }
.am-links__btn.is-primary:hover { background: var(--am-cream); border-color: var(--am-cream); }
.am-links__arrow { color: var(--am-bronze); transition: transform .45s var(--ease-spring); }
.am-links__btn.is-primary .am-links__arrow { color: var(--am-graphite); }
.am-links__btn:hover .am-links__arrow { transform: translateX(4px); }

/* -------------------------------------------------------------
   21. Scroll film (assets/js/scroll-film.js) — home
   Sin JS: bloque normal (imagen + textos apilados).
   Con JS (.is-live): sección alta con escenario fijo; el scroll
   mueve el vídeo y releva los textos.
   ------------------------------------------------------------- */
.am-film { position: relative; background: var(--am-graphite); color: var(--am-cream); }
.am-film__sticky { position: relative; }
.am-film__stage { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--am-graphite); }
.am-film__stage picture, .am-film__stage img, .am-film__video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
}
.am-film__poster { opacity: 0; transition: opacity .9s var(--ease-out); }
.am-film__poster:first-of-type, .am-film__poster.is-active { opacity: 1; }
.am-film__video { opacity: 0; transition: opacity .6s var(--ease-out); }
.am-film.is-video .am-film__video { opacity: 1; }
.am-film__shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top, rgba(43,40,38,0.92) 0%, rgba(43,40,38,0.35) 38%, rgba(43,40,38,0) 60%),
    linear-gradient(to right, rgba(43,40,38,0.55) 0%, rgba(43,40,38,0) 45%);
}
.am-film__beats { padding: 3rem 1.5rem 0; display: grid; gap: 2.5rem; }
.am-film__beat .am-kicker { color: var(--am-bronze); }
.am-film__note {
  position: absolute; z-index: 3; top: 1rem; right: 1rem;
  max-width: 17rem; padding: 0.35rem 0.6rem;
  font-size: 0.6rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; line-height: 1.5;
  color: rgba(237,229,216,0.85); background: rgba(43,40,38,0.6);
}
.am-film__progress { display: none; }

.am-film.is-live { height: 420vh; }
.am-film.is-live .am-film__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.am-film.is-live .am-film__stage { position: absolute; inset: 0; aspect-ratio: auto; }
.am-film.is-live .am-film__poster:first-of-type { opacity: 0; }
.am-film.is-live .am-film__poster.is-active { opacity: 1; }
.am-film.is-live.is-video .am-film__poster { opacity: 0; }
.am-film.is-live .am-film__beats {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 0;
  padding: 0 1.5rem calc(2.5rem + env(safe-area-inset-bottom));
  display: block;
}
.am-film.is-live .am-film__beat {
  position: absolute; left: 1.5rem; right: 1.5rem; bottom: calc(2.5rem + env(safe-area-inset-bottom));
  max-width: 34rem;
  opacity: 0; transform: translateY(24px);
  transition: opacity .7s var(--ease-out), transform .9s var(--ease-spring);
  pointer-events: none;
}
.am-film.is-live .am-film__beat.is-active { opacity: 1; transform: none; pointer-events: auto; }
.am-film.is-live .am-film__progress {
  display: block; position: absolute; z-index: 2; right: 1.5rem; top: 50%;
  width: 1px; height: 30vh; transform: translateY(-50%); background: rgba(237,229,216,0.2);
}
.am-film__progress span { position: absolute; inset: 0; background: var(--am-bronze); transform-origin: top; transform: scaleY(0); }
.am-film.is-loading .am-film__progress { background: rgba(184,160,130,0.35); }

@media (min-width: 1024px) {
  .am-film__note { top: 6.5rem; right: 2.5rem; }
  .am-film.is-live .am-film__beat { left: 2.5rem; bottom: 4rem; }
  .am-film.is-live .am-film__progress { right: 2.5rem; }
  .am-film__beats { padding: 4rem 2.5rem 0; grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .am-film.is-live { height: 380vh; }
  .am-film__shade { background: linear-gradient(to top, rgba(43,40,38,0.95) 0%, rgba(43,40,38,0.5) 40%, rgba(43,40,38,0) 65%); }
  .am-film__note { top: 5.75rem; }
}
/* Movimiento reducido / sin vídeo: menos recorrido, solo fundidos */
.am-film.is-live.is-stills { height: 300vh; }

/* -------------------------------------------------------------
   22. Vídeo alojado (includes/video.php)
   ------------------------------------------------------------- */
.am-video { margin: 0; background: var(--am-graphite); border: 1px solid rgba(184,160,130,0.35); }
.am-video video { display: block; width: 100%; height: auto; }
.am-film:not(.is-live) .am-film__beats { padding-bottom: 4rem; }
@media (max-width: 640px) {
  .am-film__note { left: 1rem; right: 1rem; max-width: none; font-size: 0.55rem; letter-spacing: 0.08em; text-align: center; }
}

/* -------------------------------------------------------------
   23. Artículos de /recursos/ (cuerpo de texto)
   ------------------------------------------------------------- */
.am-prose { font-size: 1.075rem; line-height: 1.8; color: var(--am-graphite); max-width: 68ch; }
.am-prose > * + * { margin-top: 1.25em; }
.am-prose h2 { font-family: 'Libre Baskerville', "Libre Baskerville Fallback", serif; font-size: 1.65rem; line-height: 1.25; margin-top: 2.4em; scroll-margin-top: 7rem; }
.am-prose h3 { font-family: 'Libre Baskerville', "Libre Baskerville Fallback", serif; font-size: 1.25rem; margin-top: 1.8em; }
.am-prose a { text-decoration: underline; text-decoration-color: var(--am-bronze); text-underline-offset: 4px; }
.am-prose a:hover { color: var(--am-bronze); }
.am-prose ul, .am-prose ol { padding-left: 1.25rem; }
.am-prose ul { list-style: disc; } .am-prose ol { list-style: decimal; }
.am-prose li::marker { color: var(--am-bronze); }
.am-prose .am-lead { font-size: 1.25rem; color: var(--am-taupe); }
.am-prose table { width: 100%; font-size: 0.92rem; border-top: 1px solid rgba(184,160,130,0.35); }
.am-prose th, .am-prose td { padding: 0.7rem 0.6rem 0.7rem 0; border-bottom: 1px solid rgba(184,160,130,0.25); text-align: left; vertical-align: top; }

/* -------------------------------------------------------------
   24. Scroll film como HERO de la home (10-oct-2026)
   ------------------------------------------------------------- */
.am-film--hero .am-film__beat--hero { max-width: 52rem; }
.am-film--hero .am-film__beat--hero { bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
.am-film__hint {
  display: none;
  position: absolute; z-index: 2; left: 50%; bottom: calc(1.25rem + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  flex-direction: column; align-items: center; gap: 0.6rem;
  font-family: 'Inter', "Inter Fallback", sans-serif;
  font-size: 0.62rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase;
  color: rgba(237,229,216,0.7);
  transition: opacity .5s var(--ease-out);
  pointer-events: none;
}
.am-film__hint i { display: block; width: 1px; height: 2.25rem; background: linear-gradient(rgba(237,229,216,0.7), transparent); transform-origin: top; animation: am-hint 2.2s var(--ease-out) infinite; }
@keyframes am-hint { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.am-film--hero.is-live .am-film__hint { display: flex; }
.am-film--hero.is-scrolled .am-film__hint { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .am-film__hint i { animation: none; } }
@media (max-width: 860px) {
  .am-film--hero .am-film__beat--hero h1 { font-size: clamp(1.9rem, 1.2rem + 3.6vw, 2.6rem); margin-bottom: 1.1rem; }
  .am-film--hero .am-film__beat--hero > p:not(.am-kicker) { font-size: 0.95rem; margin-bottom: 1.4rem; }
  .am-film--hero .am-film__beat--hero .am-kicker { margin-bottom: 1rem; letter-spacing: 0.2em; }
  .am-film--hero .am-film__beat--hero { bottom: calc(4.75rem + env(safe-area-inset-bottom)); }
}
.am-film--hero .am-film__beat--hero { max-width: 46rem; }
.am-film--hero .am-film__shade {
  background:
    linear-gradient(to top, rgba(43,40,38,0.92) 0%, rgba(43,40,38,0.4) 42%, rgba(43,40,38,0) 65%),
    linear-gradient(to right, rgba(43,40,38,0.7) 0%, rgba(43,40,38,0.25) 45%, rgba(43,40,38,0) 65%);
}
@media (max-width: 860px) {
  .am-film--hero .am-film__beat--hero .am-kicker,
  .am-film--hero .am-film__beat--hero > p:not(.am-kicker),
  .am-film--hero .am-film__hint { display: none; }
  .am-film--hero .am-film__beat--hero .btn-am-outline {
    background: none; border: 0; padding: 0.5rem 0; text-decoration: underline; text-underline-offset: 5px;
  }
  .am-film--hero .am-film__shade { background: linear-gradient(to top, rgba(43,40,38,0.95) 0%, rgba(43,40,38,0.6) 45%, rgba(43,40,38,0.1) 75%); }
  .am-film--hero .am-film__beat--hero { bottom: calc(2.5rem + env(safe-area-inset-bottom)); }
}
@media (max-width: 860px) { .am-film--hero.is-live .am-film__hint { display: none; } }

/* -------------------------------------------------------------
   25. Luz interactiva en CSS (sustituye a WebGL, 10-oct-2026)
   Dos focos que derivan despacio (::before/::after, solo transform)
   y un foco que sigue al puntero (--gx/--gy desde fx.js).
   ------------------------------------------------------------- */
.am-glow.is-css {
  opacity: 1;
  overflow: hidden;
  background: radial-gradient(520px circle at var(--gx, 50%) var(--gy, 50%), rgba(184,160,130,0.20), transparent 62%);
  background-size: 100% 100%;
  transition: opacity 1.2s var(--ease-out);
}
.am-glow.is-css:not(.is-pointer) { background: none; }
.am-glow.is-css::before,
.am-glow.is-css::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
}
.am-glow.is-css::before {
  width: 70vmax; height: 70vmax; left: -22vmax; top: -30vmax;
  background: radial-gradient(closest-side, rgba(184,160,130,0.26), rgba(184,160,130,0.08) 55%, transparent);
  animation: am-glow-a 26s ease-in-out infinite alternate;
}
.am-glow.is-css::after {
  width: 80vmax; height: 80vmax; right: -30vmax; bottom: -38vmax;
  background: radial-gradient(closest-side, rgba(184,160,130,0.20), rgba(184,160,130,0.06) 55%, transparent);
  animation: am-glow-b 32s ease-in-out infinite alternate;
}
@keyframes am-glow-a { to { transform: translate3d(9vmax, 6vmax, 0) scale(1.08); } }
@keyframes am-glow-b { to { transform: translate3d(-8vmax, -5vmax, 0) scale(1.1); } }
@media (prefers-reduced-motion: reduce) {
  .am-glow.is-css::before, .am-glow.is-css::after { animation: none; }
}

/* El hero nace ya a pantalla completa (sin esperar a scroll-film.js):
   evita el salto de maquetación (CLS) al activarse el JS. El JS solo
   añade .is-live, que alarga la sección hacia abajo (fuera de pantalla). */
.am-film--hero { height: 100vh; height: 100svh; }
.am-film--hero .am-film__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.am-film--hero .am-film__stage { position: absolute; inset: 0; aspect-ratio: auto; }
.am-film--hero .am-film__beats { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 0; display: block; }
.am-film--hero .am-film__beat {
  position: absolute; left: 1.5rem; right: 1.5rem; bottom: calc(2.5rem + env(safe-area-inset-bottom));
  max-width: 34rem; opacity: 0; transform: translateY(24px); pointer-events: none;
  transition: opacity .7s var(--ease-out), transform .9s var(--ease-spring);
}
.am-film--hero .am-film__beat.is-active { opacity: 1; transform: none; pointer-events: auto; }
.am-film--hero .am-film__beat--hero { max-width: 46rem; bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
@media (min-width: 1024px) {
  .am-film--hero .am-film__beat { left: 2.5rem; bottom: 4rem; }
  .am-film--hero .am-film__beat--hero { bottom: 5.5rem; }
}
@media (max-width: 860px) {
  .am-film--hero .am-film__beat--hero { bottom: calc(2.5rem + env(safe-area-inset-bottom)); }
}
