/* Tokens, base, tipografía, capas, botones, nav, barra móvil, secciones y footer. */
:root {
  --abismo: #0A1312;
  --petroleo: #223D40;
  --petroleo-hondo: #152A2C;
  --crema: #EFD8CC;
  --brasa: #F0532B;
  --hidromiel: #D9A62C;
  --roble: #2B1D14;
  --capydeep: #8b84ff; /* crédito del estudio sobre fondo oscuro (el #635bff no llega a AA) */
  --f-titulo: 'Cinzel', 'Times New Roman', serif;
  --f-texto: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-runa: 'Noto Sans Runic', var(--f-texto);
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
  --nav-h: 64px;
  --barra-h: 0px;
  /* capas: la escena debajo y la interfaz de cada capítulo arriba */
  --z-escena: 0;
  --z-interfaz: 2;
  --z-nav: 10;
  --z-velo: 20;
  --z-modal: 22;
  --ease-relleno: cubic-bezier(.32, .72, 0, 1); /* el relleno, la sombra y el apretón de los botones */
}
@media (max-width: 767px) { :root { --barra-h: 64px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--abismo); color: var(--crema); font: 400 1rem/1.6 var(--f-texto); overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
img { height: auto; } /* el atributo height no estira la foto: manda el ancho o el aspect-ratio */
a { color: inherit; }
:focus-visible { outline: 2px solid var(--brasa); outline-offset: 3px; }
main:focus, [tabindex="-1"]:focus { outline: none; } /* el foco por script (el salto y los links a una sección, main.js) no dibuja un contorno de pantalla entera */
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.saltar { position: absolute; left: var(--gutter); top: -100px; z-index: 100; padding: 10px 16px; border-radius: 999px; background: var(--crema); color: var(--petroleo); font-weight: 800; }
.saltar:focus { top: 12px; }
/* centinela de la nav (main.js): cuando sale de la vista, la nav se vuelve sólida */
.centinela { position: absolute; top: 0; left: 0; width: 1px; height: 40px; pointer-events: none; }

/* grano de película */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

h1, h2, h3 { margin: 0; font-family: var(--f-titulo); font-weight: 900; line-height: 1.05; letter-spacing: .02em; text-wrap: balance; }
h2 { font-size: clamp(2.4rem, 7vw, 5.5rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); font-weight: 700; }
.palabra { white-space: nowrap; } /* palabras de SplitText: las letras no saltan de línea dentro de una palabra */
p { margin: 0; }
.etiqueta { font: 800 .75rem/1.2 var(--f-texto); letter-spacing: .28em; text-transform: uppercase; }
.runa { font-family: var(--f-runa); font-weight: 400; }

/* Botones: dos etiquetas generales en todo el sitio, «Reservar turno» y «WhatsApp»; las variantes, solo si cambia el destino.
   Hover: entra un relleno desde abajo y una sombra tintada en brasa. Foco: el anillo de :focus-visible, sin relleno.
   Al apretar escala a .97 con `scale`, que no pisa el transform que escribe GSAP. */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: 0 1.5em;
  border: 1.5px solid transparent; border-radius: 999px; background: transparent; text-decoration: none; cursor: pointer;
  font: 800 .82rem/1 var(--f-texto); letter-spacing: .18em; text-transform: uppercase; white-space: nowrap;
  transition: color .45s var(--ease-relleno), box-shadow .45s var(--ease-relleno), scale .2s var(--ease-relleno);
}
.btn::before {
  content: ''; position: absolute; inset: 0; z-index: -1; background: var(--relleno, var(--brasa));
  transform: scaleY(0); transform-origin: 50% 100%; transition: transform .45s var(--ease-relleno);
}
.btn:active { scale: .97; }
.btn--crema { background: var(--crema); color: var(--petroleo); }
.btn--linea { border-color: var(--crema); color: var(--crema); --relleno: var(--crema); }
@media (hover: hover) {
  .btn:hover::before { transform: scaleY(1); }
  .btn--crema:hover, .btn--linea:hover { color: var(--abismo); box-shadow: 0 14px 28px -14px rgba(240, 83, 43, .7); }
}

/* placeholder visible (contenido pendiente del cliente) */
.ph {
  display: inline-block; padding: .25em .6em; border-radius: 4px; vertical-align: middle;
  background: var(--hidromiel); color: var(--abismo); font: 800 .66rem/1.2 var(--f-texto); letter-spacing: .12em; text-transform: uppercase;
}

/* nav: links de texto limpio; la runa del capítulo a la vista (aria-current, main.js) es el único acento */
.nav { position: fixed; inset: 0 0 auto; z-index: var(--z-nav); display: flex; align-items: center; gap: 24px; height: var(--nav-h); padding: 0 var(--gutter); transition: background-color .3s; }
.nav.is-solid { background: rgba(10, 19, 18, .85); backdrop-filter: blur(10px); }
.nav__logo img { width: auto; height: 30px; }
.nav__links { display: none; gap: 28px; margin: 0 0 0 auto; padding: 0; list-style: none; }
.nav__links a { position: relative; display: inline-flex; align-items: center; min-height: 44px; font: 700 .76rem/1 var(--f-texto); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; }
.nav__links .runa { position: absolute; right: 100%; margin-right: .3em; font-size: 1rem; color: var(--brasa); opacity: 0; transition: opacity .3s; }
.nav__links a[aria-current="true"] .runa { opacity: 1; }
.nav__links a::after { content: ''; position: absolute; inset: auto 0 12px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease-relleno); }
@media (hover: hover) { .nav__links a:hover::after { transform: scaleX(1); } }
.nav__cta { margin-left: auto; min-height: 44px; }
@media (min-width: 1024px) { .nav__links { display: flex; } .nav__cta { margin-left: 0; } }
@media (max-width: 767px) { .nav__cta { display: none; } }

/* barra inferior fija (mobile) */
.barra { position: fixed; inset: auto 0 0; z-index: var(--z-nav); display: none; gap: 10px; height: var(--barra-h); padding: 8px var(--gutter);
  background: rgba(10, 19, 18, .92); backdrop-filter: blur(10px); border-top: 1px solid rgba(239, 216, 204, .12); }
.barra .btn { flex: auto; min-height: 46px; padding: 0 .9em; } /* «Reservar turno» entra en una línea desde 360 px */
@media (max-width: 767px) { .barra { display: flex; } body { padding-bottom: var(--barra-h); } }
/* que el foco o un scrollIntoView no dejen un control debajo de la barra fija */
@media (max-width: 767px) { a, button, input, textarea, select { scroll-margin-bottom: calc(var(--barra-h) + 16px); } }

/* secciones */
.sec { position: relative; padding: clamp(80px, 12vw, 160px) var(--gutter); scroll-margin-top: var(--nav-h); }
.sec__inner { position: relative; z-index: 2; max-width: var(--max); margin: 0 auto; }
.sec__runa { display: flex; align-items: center; gap: .8em; margin-bottom: 18px; color: var(--hidromiel); }
.sec__runa .runa { font-size: 1.6rem; letter-spacing: 0; color: var(--brasa); }
.sec__intro { max-width: 46ch; margin-top: 20px; font-size: 1.1rem; }
.sec--oscura { background: var(--abismo); }
.sec--petroleo { background: var(--petroleo-hondo); }
.sec--roble {
  background: radial-gradient(ellipse at 70% 30%, rgba(217, 166, 44, .18), transparent 60%),
    repeating-linear-gradient(90deg, #2b1d14 0 38px, #2f2016 38px 76px), var(--roble);
}

/* footer: en la capa de la interfaz, así nada tapa el crédito */
.footer { position: relative; z-index: var(--z-interfaz); padding: 96px var(--gutter) 32px; overflow: hidden; background: var(--abismo); text-align: center; }
.footer__marca { font: 900 clamp(3rem, 14vw, 13rem)/.85 var(--f-titulo); letter-spacing: .04em; color: transparent; -webkit-text-stroke: 1px rgba(239, 216, 204, .35); }
.footer__skal { margin-top: 28px; font: 900 clamp(1.8rem, 4vw, 3rem)/1 var(--f-titulo); }
.footer__bajada { margin-top: 10px; }
.footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; margin: 32px 0 20px; padding: 0; list-style: none; }
.footer__links a { font-weight: 700; }
.footer__dir { font-size: .9rem; }
/* «Pausar animaciones» (main.js), con el patrón de «Pausar reseñas»: antes del crédito, que sigue último y centrado al pie */
.footer__pausa { margin-top: 28px; }
.footer__pausa[aria-pressed="true"] { background: rgba(239, 216, 204, .14); }
.footer__credito { margin-top: 40px; font-size: .9rem; text-align: center; }
.footer__credito a { color: var(--capydeep); font-weight: 700; text-decoration: none; }

/* Sin js-motion (el CDN que no llegó o el ahorro de datos) los fundidos duran 150 ms como máximo, también los de los botones y la nav.
   Con selectores puntuales y no con un *: transition-property arranca en «all», así que un * pondría a funder todo lo que cambie. */
html:not(.js-motion) .btn, html:not(.js-motion) .btn::before,
html:not(.js-motion) .nav, html:not(.js-motion) .nav__links .runa, html:not(.js-motion) .nav__links a::after { transition-duration: .15s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; }
  .footer__pausa { display: none; } /* sin movimiento, no hay nada que pausar (como .sagas__pausa) */
}
