/* ==========================================================================
   Hide Pewma — hoja de estilos
   Clases de estado en <html>:
     .js        hay JavaScript (menú, formulario, mapa)
     .motion    hay JavaScript y el usuario no pidió reducir el movimiento
     .is-ready  main.js terminó de inicializar las animaciones
   Todo estado inicial oculto vive bajo .motion: sin JS, o con
   prefers-reduced-motion, el contenido queda visible y sin secciones fijas.
   ========================================================================== */

/* ---------- Fuentes (self-hosted, subset latino, variables) ---------- */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url("../assets/fonts/fraunces-latin-var.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 300 500;
  font-display: swap;
  src: url("../assets/fonts/fraunces-latin-var-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../assets/fonts/figtree-latin-var.woff2") format("woff2");
}

/* ---------- Variables ---------- */
:root {
  /* Marca */
  --cream: #F7F3EE;
  --sand: #EFE9E0;
  --rust: #A3562F;
  --rust-deep: #834222;
  --rust-light: #C9764C;
  --ochre: #B17B2B;
  --ochre-light: #D4A04E;
  --olive-dark: #5B5946;
  --olive-leaf: #8C8A5A;
  /* Superficies */
  --hide: #171712;
  --hide-soft: #22221A;
  --olive-deep: #25261D;
  /* Tintas */
  --ink: #1F1F18;
  --ink-on-dark: #F7F3EE;

  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-text: "Figtree", "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;

  --gutter: clamp(16px, 4vw, 64px);
  --max: 1360px;
  /* margen lateral de lo que va a sangre (header, hero, pista de aves):
     igual al gutter y, en pantallas muy anchas, alineado con .container */
  --edge: max(var(--gutter), calc((100vw - var(--max)) / 2));
  --focus: var(--ochre-light);
  --header-h: 60px;
  --section-py: clamp(4.5rem, 10vw, 8.5rem);
  --radius: 4px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* Derivados de la tinta actual: siguen al color heredado, también mientras
     el fondo de la página cambia de tono. */
  --muted: color-mix(in srgb, currentColor 72%, transparent);
  --faint: color-mix(in srgb, currentColor 52%, transparent);
  --line: color-mix(in srgb, currentColor 16%, transparent);
  --line-strong: color-mix(in srgb, currentColor 34%, transparent);
}
@media (min-width: 900px) {
  :root { --header-h: 72px; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}
html.motion { scroll-behavior: auto; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font-text);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.65;
  background-color: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

/* Grano fílmico: una sola capa fija, sin modos de fusión */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  background: url("../assets/brand/grain.png") 0 0 / 140px 140px;
  opacity: 0.065;
}

img, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, figure, ul, ol, dl, dd { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
em, i { font-style: italic; }
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}
::selection { background: var(--rust); color: var(--cream); }
[tabindex="-1"]:focus { outline: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 10px; left: 10px;
  z-index: 100;
  padding: 0.75rem 1.1rem;
  background: var(--cream);
  color: var(--ink);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform 0.25s var(--ease-out);
}
.skip-link:focus { transform: none; }

.container {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

/* Lenis (reglas mínimas de lenis.css, con el mapa como excepción) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* ---------- Tonos de sección ---------- */
.section { position: relative; }
/* --accent: acento para texto grande · --accent-sm: acento con contraste AA para texto chico */
.tone-hide  { --accent: var(--rust-light); --accent-sm: var(--rust-light); --accent-2: var(--ochre-light); --focus: var(--ochre-light); background-color: var(--hide); color: var(--ink-on-dark); }
.tone-olive { --accent: var(--rust-light); --accent-sm: var(--rust-light); --accent-2: var(--ochre-light); --focus: var(--ochre-light); background-color: var(--olive-deep); color: var(--ink-on-dark); }
.tone-cream { --accent: var(--rust); --accent-sm: var(--rust-deep); --accent-2: var(--ochre); --focus: var(--ink); background-color: var(--cream); color: var(--ink); }
.tone-sand  { --accent: var(--rust); --accent-sm: var(--rust-deep); --accent-2: var(--ochre); --focus: var(--ink); background-color: var(--sand); color: var(--ink); }

/* Con animaciones, el fondo es uno solo (el del body) y cambia de tono
   cuando una sección cruza el 55 % de la pantalla. La tinta se hereda, y con
   ella los acentos y el anillo de foco: mientras una sección clara todavía se
   ve sobre el fondo oscuro de la siguiente (o al revés), todo sigue al fondo
   que realmente tiene detrás y no al tono propio de la sección. */
html.motion body {
  --accent: var(--rust-light); --accent-sm: var(--rust-light); --accent-2: var(--ochre-light); --focus: var(--ochre-light);
  background-color: var(--hide);
  color: var(--ink-on-dark);
  transition: background-color 0.85s var(--ease-out), color 0.85s var(--ease-out);
}
html.motion body[data-tone="cream"] { background-color: var(--cream); color: var(--ink); }
html.motion body[data-tone="sand"]  { background-color: var(--sand); color: var(--ink); }
html.motion body[data-tone="olive"] { background-color: var(--olive-deep); color: var(--ink-on-dark); }
html.motion body[data-tone="hide"]  { background-color: var(--hide); color: var(--ink-on-dark); }
html.motion body[data-tone="cream"],
html.motion body[data-tone="sand"] { --accent: var(--rust); --accent-sm: var(--rust-deep); --accent-2: var(--ochre); --focus: var(--ink); }
html.motion .section {
  background-color: transparent;
  color: inherit;
  --accent: inherit; --accent-sm: inherit; --accent-2: inherit; --focus: inherit;
}
/* El hero y el cierre llevan su propia foto oscura detrás: no siguen al tono
   de la página (si no, al asomar la sección clara siguiente, sus botones
   heredarían la tinta oscura sobre la foto). */
html.motion .hero,
html.motion .outro {
  color: var(--ink-on-dark);
  --accent: var(--rust-light); --accent-sm: var(--rust-light); --accent-2: var(--ochre-light); --focus: var(--ochre-light);
}

/* ---------- Tipografía ---------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75em;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow__n { color: var(--accent-sm, var(--accent)); font-weight: 600; }
.eyebrow__rule {
  width: 2.25rem; height: 1px;
  background: currentColor;
  opacity: 0.45;
}

.h2 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2rem, 4.4vw, 3.85rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.h2 em { font-weight: 300; color: var(--accent); }

.lede {
  max-width: 34em;
  color: var(--muted);
  text-wrap: pretty;
}

.section-head {
  display: grid;
  gap: 1.1rem;
  margin-bottom: clamp(2.25rem, 5vw, 4rem);
}
@media (min-width: 900px) {
  .section-head--split {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    column-gap: clamp(2rem, 5vw, 5rem);
    align-items: end;
  }
  .section-head--split .eyebrow { grid-column: 1 / -1; }
}

.tbc {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.38em 0.95em;
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--muted);
}

/* Palabras partidas por JS (revelado con máscara) */
.w { display: inline-block; }
.split .w {
  overflow: hidden;
  vertical-align: top;
  padding: 0.08em 0.05em 0.18em;
  margin: -0.08em -0.05em -0.18em;
}
.split .wi { display: inline-block; }

/* ---------- Botones ---------- */
.btn {
  --btn-bg: var(--rust);
  --btn-fg: var(--cream);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 3.25rem;
  padding: 0.8rem 1.55rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background-color: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-text);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s var(--ease-out), border-color 0.3s var(--ease-out),
    color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.btn:active { transform: scale(0.98); }
.btn__icon {
  flex: none;
  width: 1.05em; height: 1.05em;
  transition: transform 0.26s var(--ease-out);
}
.btn--ghost {
  background-color: transparent;
  color: inherit;
  border-color: var(--line-strong);
}
.btn--sm { min-height: 2.75rem; padding: 0.5rem 1.15rem; font-size: 0.875rem; }
.btn--block { width: 100%; }
.btn[aria-disabled="true"] { cursor: not-allowed; opacity: 0.7; }
@media (hover: hover) {
  .btn:hover { --btn-bg: var(--rust-deep); }
  .btn:hover .btn__icon { transform: translateX(4px); }
  .btn:hover .btn__icon--out { transform: translate(3px, -3px); }
  .btn--ghost:hover { background-color: color-mix(in srgb, currentColor 9%, transparent); border-color: currentColor; }
  .btn[aria-disabled="true"]:hover { --btn-bg: var(--rust); background-color: transparent; border-color: var(--line-strong); }
}

.link {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: var(--line-strong);
  transition: text-decoration-color 0.25s var(--ease-out), color 0.25s var(--ease-out);
}
@media (hover: hover) {
  .link:hover { text-decoration-color: currentColor; color: var(--accent); }
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  --hb: 23 23 18;
  --focus: var(--ochre-light);
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-inline: var(--edge);
  color: var(--ink-on-dark);
  transition: color 0.4s var(--ease-out);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: rgb(var(--hb) / 0.97);
  border-bottom: 1px solid color-mix(in srgb, currentColor 12%, transparent);
  transition: background-color 0.4s var(--ease-out), opacity 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
}
/* Casi opaco y con poco desenfoque: lo que pasa por debajo (una foto, un
   botón, el logo del footer) apenas se insinúa y no deja manchas de color. */
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header::before {
    background-color: rgb(var(--hb) / 0.94);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
}
html.js .site-header[data-theme="light"] { --hb: 244 239 232; --focus: var(--ink); color: var(--ink); }
html.js .site-header[data-bare]::before { opacity: 0; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-right: auto;
  text-decoration: none;
}
.brand__mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 11px;
  background: var(--cream);
  box-shadow: inset 0 0 0 1px rgb(91 89 70 / 0.16);
  transition: transform 0.6s var(--ease-out-expo);
}
.brand__mark img { width: 27px; height: auto; }
@media (hover: hover) {
  .brand:hover .brand__mark { transform: rotate(-6deg) scale(1.06); }
}
.brand__name {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  white-space: nowrap;
}
@media (min-width: 900px) {
  .brand__mark { width: 42px; height: 42px; border-radius: 12px; }
  .brand__mark img { width: 30px; }
  .brand__name { font-size: 1.1rem; }
}

.site-nav { display: none; }
@media (min-width: 900px) {
  .site-nav {
    display: flex;
    align-items: center;
    gap: clamp(1.1rem, 2.2vw, 2.25rem);
    font-size: 0.9rem;
    font-weight: 500;
  }
  .site-nav a {
    position: relative;
    padding-block: 0.5rem;
    text-decoration: none;
    opacity: 0.86;
    transition: opacity 0.25s var(--ease-out);
  }
  .site-nav a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0.2rem;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: 0 50%;
    transition: transform 0.4s var(--ease-out);
  }
  .site-nav a:hover, .site-nav a[aria-current="true"] { opacity: 1; }
  .site-nav a:hover::after, .site-nav a[aria-current="true"]::after { transform: scaleX(1); }
}
.site-header__cta { display: none; }
@media (min-width: 560px) {
  .site-header__cta { display: inline-flex; }
}
/* Sin JavaScript no hay botón de menú: en pantallas chicas los enlaces van en
   una segunda fila del header, desplazable en horizontal. */
@media (max-width: 899.98px) {
  html:not(.js) { --header-h: 104px; }
  html:not(.js) .site-header { flex-wrap: wrap; align-content: center; row-gap: 0; }
  html:not(.js) .brand, html:not(.js) .site-header__cta { margin-block: 3px; }
  html:not(.js) .site-nav {
    order: 3;
    flex: 0 0 100%;
    display: flex;
    gap: 1.4rem;
    margin-inline: calc(-1 * var(--edge));
    padding-inline: var(--edge);
    overflow-x: auto;
    scrollbar-width: none;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
  }
  html:not(.js) .site-nav::-webkit-scrollbar { display: none; }
  html:not(.js) .site-nav a { padding-block: 0.7rem; text-decoration: none; }
}

.menu-toggle {
  display: none;
  position: relative;
  flex: none;
  width: 44px; height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
html.js .menu-toggle { display: block; }
@media (min-width: 900px) {
  html.js .menu-toggle { display: none; }
}
.menu-toggle span {
  position: absolute;
  left: 11px;
  width: 22px; height: 1.5px;
  background: currentColor;
  transition: transform 0.4s var(--ease-out), top 0.4s var(--ease-out);
}
.menu-toggle span:nth-child(1) { top: 18px; }
.menu-toggle span:nth-child(2) { top: 25px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { top: 21.5px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { top: 21.5px; transform: rotate(-45deg); }

/* Menú móvil */
.menu {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  padding: calc(var(--header-h) + 1.5rem) var(--edge) 2rem;
  --focus: var(--ochre-light);
  background: var(--hide);
  color: var(--ink-on-dark);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s var(--ease-out), visibility 0s linear 0.45s;
}
html.js .menu { display: flex; }
.menu.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.45s var(--ease-out), visibility 0s;
}
.menu__list { list-style: none; margin: 0; padding: 0; }
.menu__list li { border-bottom: 1px solid var(--line); }
.menu__list a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.85rem 0;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.9rem, 8.5vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-decoration: none;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease-out), transform 0.7s var(--ease-out-expo);
}
.menu__list span {
  font-family: var(--font-text);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--ochre-light);
}
.menu.is-open .menu__list a { opacity: 1; transform: none; }
.menu.is-open .menu__list li:nth-child(1) a { transition-delay: 0.06s; }
.menu.is-open .menu__list li:nth-child(2) a { transition-delay: 0.11s; }
.menu.is-open .menu__list li:nth-child(3) a { transition-delay: 0.16s; }
.menu.is-open .menu__list li:nth-child(4) a { transition-delay: 0.21s; }
.menu.is-open .menu__list li:nth-child(5) a { transition-delay: 0.26s; }
.menu.is-open .menu__list li:nth-child(6) a { transition-delay: 0.31s; }
.menu__foot { display: grid; gap: 1rem; font-size: 0.85rem; color: var(--muted); }
html.menu-open { overflow: hidden; }
html.menu-open .site-header { --hb: 23 23 18; color: var(--ink-on-dark); }
html.menu-open .site-header::before { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .menu, .menu__list a { transition-duration: 0.01s; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { background-color: var(--hide); color: var(--ink-on-dark); }
.hero__stage {
  position: relative;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
}
.hero__media { position: absolute; inset: 0; z-index: 0; will-change: transform; }
.hero__img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 21% 34%;
}
@media (min-aspect-ratio: 1/1) {
  .hero__img { object-position: 30% 30%; }
}
@media (min-aspect-ratio: 1/1) and (max-height: 520px) {
  /* apaisado y bajo: se muestra la parte alta de la foto para que la cara quede bajo el titular */
  .hero__img { object-position: 30% 4%; }
}
.hero__scrim {
  position: absolute; inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgb(23 23 18 / 0.8) 0%, rgb(23 23 18 / 0.6) 17%, rgb(23 23 18 / 0.3) 31%, rgb(23 23 18 / 0) 46%),
    linear-gradient(to top, rgb(23 23 18 / 0.9) 0%, rgb(23 23 18 / 0.62) 20%, rgb(23 23 18 / 0) 50%);
}
.hero__lid, .hero__stars, .hero__dim { display: none; }
.hero__ui {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--header-h) + clamp(1.5rem, 5.5vh, 3.75rem)) var(--edge) clamp(1.25rem, 4vh, 2.75rem);
}
.hero__top { display: grid; justify-items: center; gap: clamp(0.9rem, 2vh, 1.4rem); text-align: center; }
.hero__eyebrow { justify-content: center; color: color-mix(in srgb, currentColor 80%, transparent); }
.hero__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2rem, 9vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-shadow: 0 2px 36px rgb(23 23 18 / 0.5);
}
.hero__title em { color: inherit; }
html.motion .hero__title em { color: var(--ochre-light); }
.hero__title .line {
  display: block;
  overflow: hidden;
  padding: 0.06em 0.06em 0.16em;
  margin: -0.06em -0.06em -0.16em;
}
.hero__title .line > span { display: block; }
@media (min-width: 900px) {
  .hero__title { font-size: clamp(2.5rem, 5.3vw, 5.5rem); white-space: nowrap; }
  .hero__title .line { display: inline-block; vertical-align: top; }
}

.hero__bottom {
  grid-row: 3;
  display: grid;
  gap: 1.1rem;
  align-items: end;
}
.hero__lede {
  max-width: 31em;
  font-size: clamp(1rem, 0.95rem + 0.35vw, 1.2rem);
  line-height: 1.55;
  color: color-mix(in srgb, currentColor 90%, transparent);
  text-wrap: pretty;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero__cta .btn--primary { flex: 1 1 auto; }
.hero__caption {
  font-size: 0.72rem;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: color-mix(in srgb, currentColor 66%, transparent);
}
.hero__caption a { text-underline-offset: 0.2em; }
@media (min-width: 900px) {
  .hero__bottom { grid-template-columns: minmax(0, 36rem) minmax(0, 1fr); column-gap: 3rem; }
  .hero__lead { display: grid; gap: 1.4rem; }
  .hero__cta .btn--primary { flex: 0 0 auto; }
  .hero__caption { justify-self: end; text-align: right; max-width: 22em; }
}
@media (max-width: 899.98px) {
  .hero__lead { display: grid; gap: 1.1rem; }
}
@media (max-width: 899.98px) and (max-height: 700px) {
  .hero__lede { font-size: 0.95rem; }
  .hero__cta .btn--ghost { display: none; }
  .hero__bottom, .hero__lead { gap: 0.8rem; }
}

.hero__hint, .hero__coords { display: none; }

/* Pantallas muy bajas (teléfono apaisado): titular en una línea y menos adornos */
@media (max-width: 899.98px) and (max-height: 520px) {
  .hero__ui { padding-top: calc(var(--header-h) + 0.75rem); padding-bottom: 0.9rem; }
  .hero__top { gap: 0.5rem; }
  .hero__title { font-size: clamp(1.5rem, 4.6vw, 2.5rem); }
  .hero__title .line { display: inline-block; vertical-align: top; }
  .hero__lede { font-size: 0.92rem; max-width: 34em; }
  .hero__cta .btn { min-height: 2.75rem; padding-block: 0.5rem; }
  .hero__cta .btn--primary { flex: 0 0 auto; }
  html.motion .hero__coords, html.motion .hero__hint-line { display: none; }
  html.motion .hero__hint { bottom: 0.9rem; }
}

/* --- Hero con animaciones: escenario fijo y párpado --- */
html.motion .hero { height: 250vh; height: calc(100lvh + 150svh); }
html.motion .hero__stage {
  position: sticky;
  top: 0;
  min-height: 0;
  height: 100vh;
  height: 100lvh;
}
html.motion .hero__ui { min-height: 0; height: 100vh; height: 100svh; }
@media (max-width: 899.98px) {
  html.motion .hero { height: 220vh; height: calc(100lvh + 120svh); }
}
html.motion .hero__lid {
  display: block;
  position: absolute; inset: 0;
  z-index: 2;
  width: 100%; height: 100%;
  pointer-events: none;
}
.lid__cover, .lid__shade { fill: var(--hide); }
.lid__line {
  fill: none;
  stroke: var(--ochre-light);
  stroke-width: 1.25;
  opacity: 0.6;
}
html.is-ready .lid__cover { display: none; }
html.motion .hero__scrim { opacity: 0; }
/* Velo de salida: sobre la foto y el scrim, bajo el párpado, las estrellas y
   la interfaz (que se retira sola, sin oscurecerse) */
html.motion .hero__dim {
  display: block;
  position: absolute; inset: 0;
  z-index: 1;
  pointer-events: none;
  background: var(--hide);
  opacity: 0;
}
html.motion .hero__reveal { opacity: 0; }
html.motion .hero:not(.is-open) .hero__reveal { pointer-events: none; }

html.motion .hero__stars {
  display: block;
  position: absolute; inset: 0;
  z-index: 3;
  pointer-events: none;
}
.hero__star {
  position: absolute;
  width: var(--s, 14px); height: var(--s, 14px);
  color: var(--ochre-light);
  opacity: 0;
  animation: hp-twinkle var(--d, 5s) ease-in-out var(--t, 0s) infinite;
}
.hero__star--rust { color: var(--rust-light); }
.hero__star--pale { color: #DDD7C0; }

html.motion .hero__hint {
  display: grid;
  justify-items: center;
  gap: 0.8rem;
  position: absolute;
  left: 0; right: 0;
  bottom: clamp(1.25rem, 4vh, 2.75rem);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in srgb, currentColor 78%, transparent);
}
.hero__hint-line {
  position: relative;
  width: 1px; height: 38px;
  background: color-mix(in srgb, currentColor 28%, transparent);
  overflow: hidden;
}
.hero__hint-line::after {
  content: "";
  position: absolute; inset: 0;
  background: var(--ochre-light);
  animation: hp-hint 2.4s var(--ease-in-out) infinite;
}
html.motion .hero__coords {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  position: absolute;
  left: var(--edge); right: var(--edge);
  top: calc(50% + 5.6rem);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
  color: var(--ochre-light);
}
@media (min-width: 900px) {
  html.motion .hero__coords {
    justify-content: space-between;
    top: calc(53% - 0.6em);
  }
}

/* Entrada al cargar (no depende del scroll) */
html.motion .hero__title .line > span { animation: hp-rise 1.25s var(--ease-out-expo) 0.15s both; }
html.motion .hero__title .line + .line > span { animation-delay: 0.3s; }
html.motion .hero__eyebrow,
html.motion .hero__hint-in,
html.motion .hero__coords > span { animation: hp-fade 1.4s var(--ease-out) 0.2s both; }
html.motion .hero__hint-in { animation-delay: 1.05s; }
html.motion .hero__coords > span { animation-delay: 0.85s; }
html.motion .hero__img { animation: hp-breathe 16s ease-in-out infinite alternate; }
html.motion .hero:not(.is-inview) .hero__img,
html.motion .hero:not(.is-inview) .hero__star,
html.motion .hero:not(.is-inview) .hero__hint-line::after { animation-play-state: paused; }

@keyframes hp-rise { from { transform: translateY(115%); } to { transform: none; } }
@keyframes hp-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes hp-breathe { from { transform: scale(1); } to { transform: scale(1.045); } }
@keyframes hp-hint {
  0% { transform: translateY(-101%); }
  55% { transform: translateY(0); }
  100% { transform: translateY(101%); }
}
@keyframes hp-twinkle {
  0%, 100% { opacity: 0; transform: scale(0.4) rotate(0deg); }
  45%, 60% { opacity: 0.85; transform: scale(1) rotate(18deg); }
}

/* ==========================================================================
   Concepto
   ========================================================================== */
.concept { padding-block: var(--section-py); }
.concept__grid { display: grid; gap: clamp(2.5rem, 6vw, 5rem); }
.concept__text { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); align-content: center; }
.manifesto {
  max-width: 21em;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.65rem, 3.25vw, 3rem);
  line-height: 1.22;
  letter-spacing: -0.015em;
  text-wrap: pretty;
}
.manifesto em { color: var(--accent); }
html.motion .manifesto em { color: var(--ink); }
html.motion .manifesto .w { opacity: 0.16; }

.concept__figure { display: grid; gap: 0.75rem; }
.concept__frame {
  position: relative;
  aspect-ratio: 4 / 5;
  max-height: 70vh;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--sand);
}
.concept__frame img {
  position: absolute;
  left: 0; top: -8%;
  width: 100%; height: 116%;
  object-fit: cover;
  object-position: 61% 40%;
}
.caption {
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--muted);
}
.caption i { font-style: italic; }

@media (min-width: 900px) {
  .concept__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); align-items: center; }
  html.motion .concept { padding-top: 0; }
  html.motion .concept__scroll { height: 235vh; }
  html.motion .concept__sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    display: grid;
    align-items: center;
    padding-top: var(--header-h);
  }
  html.motion .concept__text { will-change: transform; }
}
/* Con alto de sobra, el panel fijo es más bajo que la pantalla: el contenido
   queda centrado un poco más arriba, llega antes cuando el hero se va y los
   tres principios aparecen pegados al manifiesto, sin media pantalla vacía. */
@media (min-width: 900px) and (min-height: 760px) {
  html.motion .concept__sticky { height: 88vh; }
  html.motion .concept__frame { max-height: 64vh; }
}

.principles {
  padding: 0;
  display: grid;
  gap: 2rem clamp(1.5rem, 3vw, 3rem);
  margin-top: clamp(3.5rem, 8vw, 6rem);
}
html.motion .principles { margin-top: clamp(0.5rem, 2vw, 1.5rem); }
@media (min-width: 760px) {
  .principles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.principle {
  display: grid;
  gap: 0.7rem;
  align-content: start;
  padding-top: 1.35rem;
  border-top: 1px solid var(--line);
}
.principle__n {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--accent-2);
}
.h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
}
.principle p { color: var(--muted); max-width: 30em; }

/* ==========================================================================
   Aves
   ========================================================================== */
.birds { padding-block: var(--section-py); }
.birds__head {
  display: grid;
  gap: 1rem 2.5rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.birds__titles { display: grid; gap: 1rem; }
.birds__intro { max-width: 32em; color: var(--muted); font-size: 0.98rem; text-wrap: pretty; }
.birds__count {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.5rem, 2.4vw, 2.25rem);
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
}
.birds__count b { font-weight: 300; color: var(--accent-2); }
.birds__count span { color: var(--faint); font-size: 0.6em; letter-spacing: 0.04em; }

.birds__viewport {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--edge);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.birds__viewport::-webkit-scrollbar { display: none; }
.birds__track {
  display: flex;
  gap: 14px;
  width: max-content;
  margin: 0;
  padding: 0 var(--edge);
  list-style: none;
}
.bird {
  flex: none;
  width: min(78vw, 340px);
  scroll-snap-align: start;
}
.bird__figure { position: relative; }
.bird__frame {
  position: relative;
  aspect-ratio: 5 / 6;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--hide-soft);
}
.bird__frame::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--ochre-light);
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
  pointer-events: none;
}
.bird__zoom {
  position: absolute; inset: 0;
  transition: transform 0.9s var(--ease-out-expo);
}
.bird__img {
  position: absolute;
  top: 0; left: -8%;
  width: 116%; height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: var(--focus, 50% 50%);
}
.bird__credit {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 2.2rem 0.75rem 0.6rem;
  font-size: 0.66rem;
  line-height: 1.3;
  letter-spacing: 0.03em;
  color: rgb(247 243 238 / 0.86);
  background: linear-gradient(to top, rgb(23 23 18 / 0.72), rgb(23 23 18 / 0));
  pointer-events: none;
}
.bird__body { display: grid; gap: 0.3rem; align-content: start; padding-top: 1rem; }
.bird__row { display: flex; align-items: baseline; gap: 0.8rem; }
.bird__name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.4rem, 2vw, 1.85rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.bird__n {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
  color: var(--accent-2);
}
.bird__latin {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 1rem;
  color: var(--muted);
}
.bird__fact {
  margin-top: 0.35rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}
@media (hover: hover) {
  .bird:hover .bird__zoom { transform: scale(1.045); }
  .bird:hover .bird__frame::after { opacity: 0.8; }
}

.birds__foot {
  display: grid;
  gap: 0.9rem;
  margin-top: clamp(1.5rem, 3vw, 2rem);
}
.birds__progress {
  position: relative;
  height: 1px;
  background: var(--line);
}
.birds__progress span {
  position: absolute; inset: -0.5px 0;
  background: var(--accent-2);
  transform: scaleX(0.083);
  transform-origin: 0 50%;
}
.birds__note { font-size: 0.75rem; color: var(--muted); }

/* Escritorio sin animaciones: grilla con las doce especies */
@media (min-width: 900px) {
  html:not(.motion) .birds__viewport { overflow: visible; }
  html:not(.motion) .birds__track {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3rem 1.5rem;
    width: min(100% - 2 * var(--gutter), var(--max));
    margin-inline: auto;
    padding: 0;
  }
  html:not(.motion) .bird { width: auto; }
  html:not(.motion) .birds__progress, html:not(.motion) .birds__count { display: none; }
}
@media (min-width: 1200px) {
  html:not(.motion) .birds__track { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Escritorio con animaciones: panel fijo y pista horizontal */
@media (min-width: 900px) {
  .birds__head {
    grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto;
    align-items: end;
  }
  .birds__intro { justify-self: end; }
  html.motion .birds { padding-block: 0; }
  html.motion .birds__scroll { min-height: 100vh; }
  html.motion .birds__sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-columns: minmax(0, 1fr);
    padding-top: calc(var(--header-h) + clamp(0.5rem, 3vh, 2rem));
    padding-bottom: clamp(0.75rem, 2.6vh, 1.75rem);
    overflow: hidden;
  }
  html.motion .birds__head { margin-bottom: clamp(1rem, 3vh, 2rem); }
  html.motion .birds__viewport { overflow: visible; scroll-snap-type: none; min-width: 0; min-height: 0; }
  html.motion .birds__track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 0 clamp(16px, 1.7vw, 28px);
    height: 100%;
    will-change: transform;
  }
  html.motion .bird {
    display: grid;
    grid-row: 1 / span 2;
    grid-template-rows: minmax(0, 1fr) auto;
    grid-template-rows: subgrid;
    width: clamp(260px, 22vw, 440px);
  }
  html.motion .bird--wide { width: clamp(380px, 34vw, 680px); }
  html.motion .bird__figure { display: grid; grid-template-rows: minmax(0, 1fr); min-height: 0; }
  html.motion .bird__frame { aspect-ratio: auto; min-height: 0; }
  html.motion .birds__foot { margin-top: clamp(0.75rem, 2.4vh, 1.5rem); }
}
@media (min-width: 900px) and (max-height: 800px) {
  html.motion .birds__intro { display: none; }
  html.motion .birds .h2 { font-size: clamp(1.75rem, 3.2vw, 2.6rem); }
  html.motion .bird__fact { font-size: 0.86rem; }
  html.motion .birds__note { display: none; }
}

/* ==========================================================================
   La experiencia
   ========================================================================== */
.xp { padding-block: var(--section-py); }
.xp__grid { display: grid; gap: clamp(2rem, 5vw, 4rem); }
.xp__frames { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.xp__frame {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--hide-soft);
}
.xp__frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: var(--focus, 50% 50%);
}
.xp__frame figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 2.6rem 0.9rem 0.7rem;
  font-size: 0.7rem;
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: rgb(247 243 238 / 0.9);
  background: linear-gradient(to top, rgb(23 23 18 / 0.7), rgb(23 23 18 / 0));
}
.xp__steps {
  position: relative;
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.xp-step { display: grid; gap: 0.8rem; align-content: center; justify-items: start; }
.xp-step__n {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.75rem, 6vw, 5rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  font-variant-numeric: lining-nums;
  color: var(--accent);
}
.xp-step h3 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.xp-step p:not(.xp-step__n) { max-width: 27em; color: var(--muted); text-wrap: pretty; }
.xp__steps-wrap { position: relative; }
.xp__rail { display: none; }

@media (max-width: 899.98px) {
  /* versión estática en pantallas chicas: los pies de foto no caben sobre miniaturas */
  html:not(.motion) .xp__frame figcaption { display: none; }
}
html.motion .xp__media { position: sticky; z-index: 2; }
html.motion .xp__frames {
  position: relative;
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--hide-soft);
}
html.motion .xp__frame {
  position: absolute; inset: 0;
  aspect-ratio: auto;
  border-radius: 0;
  will-change: clip-path;
}
html.motion .xp__frame + .xp__frame { clip-path: inset(100% 0% 0% 0%); }
html.motion .xp__frame img { will-change: transform; }
html.motion .xp-step { transition: opacity 0.6s var(--ease-out); opacity: 0.32; }
html.motion .xp-step.is-active { opacity: 1; }

@media (max-width: 899.98px) {
  html.motion .xp__media {
    top: var(--header-h);
    height: 42vh;
    height: 42svh;
    margin-inline: calc(-1 * var(--gutter));
  }
  html.motion .xp__frames { border-radius: 0; }
  html.motion .xp__steps { gap: 0; }
  html.motion .xp-step { min-height: 50vh; min-height: 50svh; align-content: start; padding-block: 2.25rem 1.5rem; }
  /* El último paso queda fuera de la caja que retiene a la imagen fija: así la
     foto se suelta cuando ese paso llega bajo ella y los dos se van juntos, en
     vez de quedar pegada arriba cuando ya entra la sección siguiente.
     --xp-last (alto del último paso) lo mide main.js. */
  html.motion .xp__grid { margin-bottom: var(--xp-last, 0px); }
  html.motion .xp__steps-wrap { margin-bottom: calc(-1 * var(--xp-last, 0px)); }
  html.motion .xp-step:last-child { min-height: 0; padding-bottom: 0; }
}
@media (min-width: 900px) {
  .xp__grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    column-gap: clamp(2.5rem, 7vw, 7rem);
    align-items: start;
  }
  html.motion .xp__media {
    top: calc(var(--header-h) + 1.5rem);
    height: calc(100vh - var(--header-h) - 3rem);
    max-height: 780px;
  }
  html.motion .xp__steps { gap: 0; padding-left: clamp(1.5rem, 3vw, 3rem); }
  html.motion .xp-step { min-height: 76vh; }
  html.motion .xp__rail {
    display: block;
    position: absolute;
    left: 0; top: 12vh; bottom: 12vh;
    width: 1px;
    background: var(--line);
  }
  html.motion .xp__rail span {
    position: absolute; inset: 0 -0.5px;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: 50% 0;
  }
}

/* ==========================================================================
   Entradas (maqueta)
   ========================================================================== */
.tickets { padding-block: var(--section-py); }
.tickets__grid { display: grid; gap: 1rem; }
@media (min-width: 900px) {
  .tickets__grid { grid-template-columns: 1.15fr 1fr 1fr; gap: clamp(1rem, 1.6vw, 1.5rem); align-items: stretch; }
}
.ticket {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  padding: clamp(1.5rem, 2.4vw, 2.25rem);
  border: 1px solid rgb(91 89 70 / 0.2);
  border-radius: 10px;
  /* superficie clara propia: no depende del tono de la página */
  --accent: var(--rust); --accent-sm: var(--rust-deep); --accent-2: var(--ochre); --focus: var(--ink);
  background-color: var(--sand);
  color: var(--ink);
  transition: transform 0.6s var(--ease-out-expo), border-color 0.4s var(--ease-out), box-shadow 0.6s var(--ease-out);
}
.ticket--featured {
  --accent: var(--rust-light);
  --accent-sm: var(--rust-light);
  --accent-2: var(--ochre-light);
  --focus: var(--ochre-light);
  background-color: var(--hide-soft);
  color: var(--ink-on-dark);
  border-color: transparent;
}
@media (hover: hover) {
  .ticket:hover {
    transform: translateY(-5px);
    border-color: var(--ochre);
    box-shadow: 0 22px 44px -28px rgb(23 23 18 / 0.5);
  }
}
.ticket__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; min-height: 1.9rem; }
.ticket__kind {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-sm, var(--accent));
}
.ticket__name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.ticket__price { display: grid; gap: 0.35rem; padding-block: 0.4rem 0.2rem; }
.ticket__amount {
  display: flex;
  align-items: baseline;
  gap: 0.18em;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(3.25rem, 5.6vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.ticket__amount .dash {
  display: inline-block;
  width: 1.5em;
  height: 0.055em;
  margin-left: 0.08em;
  align-self: center;
  background: currentColor;
  opacity: 0.55;
  border-radius: 1px;
  transform-origin: 0 50%;
}
.ticket__tbc { font-size: 0.85rem; font-weight: 500; letter-spacing: 0.02em; color: var(--accent-2); }
.ticket:not(.ticket--featured) .ticket__tbc { color: var(--olive-dark); }
.ticket__rows { display: grid; margin: 0; }
.ticket__rows div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.7rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}
.ticket__rows dt { color: var(--muted); }
.ticket__rows dd { font-weight: 500; text-align: right; }
.ticket .btn { margin-top: auto; }

.notify {
  display: grid;
  gap: clamp(1.5rem, 3vw, 3rem);
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  padding: clamp(1.5rem, 3vw, 2.75rem);
  border: 1px solid rgb(91 89 70 / 0.2);
  border-radius: 10px;
  --accent: var(--rust); --accent-sm: var(--rust-deep); --accent-2: var(--ochre); --focus: var(--ink);
  background-color: var(--cream);
  color: var(--ink);
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
}
@media (min-width: 900px) {
  .notify { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
}
.notify__copy { display: grid; gap: 0.8rem; }
.notify__copy p { color: var(--muted); max-width: 30em; }
.notify__form { display: grid; gap: 0.9rem; }
.notify__label { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; }
.notify__row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.notify__input {
  flex: 1 1 14rem;
  min-width: 0;
  min-height: 3.25rem;
  padding: 0.7rem 1.2rem;
  border: 1px solid rgb(91 89 70 / 0.42);
  border-radius: 999px;
  background: #fffdfa;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.notify__input::placeholder { color: var(--olive-dark); opacity: 1; }
.notify__input:focus { outline: none; border-color: var(--rust); box-shadow: 0 0 0 3px rgb(163 86 47 / 0.2); }
.notify__input[aria-invalid="true"] { border-color: #9c2f1e; }
.notify__note, .notify__status { font-size: 0.8rem; line-height: 1.45; color: var(--muted); }
.notify__status { font-weight: 500; color: var(--rust-deep); min-height: 1.2em; }
/* Región viva: tiene que existir en el árbol de accesibilidad antes de recibir
   el mensaje, así que vacía no se oculta. Solo sale del flujo de la grilla
   para no dejar una fila (y un gap) de más. */
.notify__status:empty { position: absolute; min-height: 0; }
.notify__alt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--muted);
}
.placeholder-num {
  font-weight: 600;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

/* ==========================================================================
   Ubicación
   ========================================================================== */
.place { padding-block: var(--section-py); }
.place__grid { display: grid; gap: clamp(2.5rem, 5vw, 4.5rem); }
@media (min-width: 900px) {
  .place__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; }
}
.place__text { display: grid; gap: clamp(1.5rem, 2.6vw, 2.25rem); }
.place__coords {
  display: grid;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.5rem, 6.4vw, 5.75rem);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: lining-nums;
  color: var(--accent);
}
.place__coords-line { display: block; overflow: hidden; padding-block: 0.06em 0.1em; }
.place__coords-line > span { display: block; }
.place__facts { display: grid; margin: 0; }
.place__facts div {
  display: grid;
  grid-template-columns: minmax(7.5rem, 0.8fr) minmax(0, 2fr);
  gap: 1rem;
  padding-block: 0.8rem;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}
.place__facts div:last-child { border-bottom: 1px solid var(--line); }
.place__facts dt {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 0.25em;
}
.place__facts dd { font-variant-numeric: tabular-nums; }
.place__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  margin-left: 0.4rem;
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: none;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 0.25s var(--ease-out), background-color 0.25s var(--ease-out);
}
html:not(.js) .copy-btn { display: none; }
@media (hover: hover) {
  .copy-btn:hover { border-color: currentColor; }
}
.copy-btn.is-done { border-color: var(--accent-sm, var(--rust-deep)); color: var(--accent-sm, var(--rust-deep)); }

.map { display: grid; gap: 0.75rem; }
.map__frame {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgb(91 89 70 / 0.22);
  background: #e4dccd;
}
@media (min-width: 600px) {
  .map__frame { aspect-ratio: 5 / 4; }
}
.map__poster, .map__frame iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
  filter: grayscale(0.4) sepia(0.26) contrast(0.96) brightness(1.02);
}
.map__poster { object-fit: cover; }
.map__pulse {
  position: absolute;
  left: 50%; top: 50%;
  width: 18px; height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  pointer-events: none;
}
.map__pulse::before, .map__pulse::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  background: var(--rust);
  opacity: 0.5;
}
html.motion .map__pulse::before { animation: hp-pulse 2.6s var(--ease-out) infinite; }
html.motion .map__pulse::after { animation: hp-pulse 2.6s var(--ease-out) 1.3s infinite; }
@keyframes hp-pulse {
  from { transform: scale(1); opacity: 0.5; }
  to { transform: scale(4.4); opacity: 0; }
}
.map__activate {
  display: none;
  position: absolute;
  inset: 0;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  border: 0;
  background: none;
  cursor: pointer;
}
html.smooth-wheel .map__activate { display: flex; }
html.smooth-wheel .map__frame iframe { pointer-events: none; }
.map__activate span {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: rgb(23 23 18 / 0.82);
  color: var(--cream);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.map__activate:hover span, .map__activate:focus-visible span { opacity: 1; transform: none; }
@media (hover: none) {
  .map__activate span { opacity: 1; transform: none; }
}
.map.is-live .map__activate, .map.is-static .map__activate { display: none; }
.map.is-live iframe { pointer-events: auto; }
.map.is-live .map__pulse { display: none; }
.map__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.4rem 1rem; }

/* ==========================================================================
   Código del observador
   ========================================================================== */
.code { padding-block: var(--section-py); }
.rules {
  display: grid;
  gap: 0 clamp(2rem, 6vw, 6rem);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: rule;
}
@media (min-width: 900px) {
  .rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.rule {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.35rem 1.25rem;
  padding-block: clamp(1.4rem, 2.6vw, 2.1rem);
}
.rule__line {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: var(--line-strong);
  transform-origin: 0 50%;
}
.rule__icon {
  grid-row: 1 / span 2;
  width: 1.5rem; height: 1.5rem;
  margin-top: 0.35rem;
  color: var(--accent-2);
  transition: transform 0.7s var(--ease-out-expo);
}
.rule h3 { display: flex; align-items: baseline; gap: 0.8rem; }
.rule__n {
  font-family: var(--font-text);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--accent-2);
}
.rule p { grid-column: 2; color: var(--muted); max-width: 30em; }
/* El destello es simétrico y puede girar un cuarto de vuelta; la gota y la
   hoja tienen arriba y abajo, así que solo se inclinan. */
@media (hover: hover) {
  .rule:hover .rule__icon { transform: rotate(-12deg) scale(1.14); }
  .rule:hover .rule__icon--spin { transform: rotate(90deg) scale(1.12); }
}

/* ==========================================================================
   Cierre: el ojo se cierra
   ========================================================================== */
.outro { background-color: var(--hide); color: var(--ink-on-dark); }
.outro__stage {
  position: relative;
  display: grid;
  min-height: 82vh;
  min-height: 82svh;
  overflow: hidden;
  isolation: isolate;
}
.outro__media { position: absolute; inset: 0; z-index: 0; will-change: transform; }
.outro__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 60% 62%;
}
/* La foto es un atardecer con bruma, suave por naturaleza. El velo la lleva a
   una penumbra cálida (ya casi de noche) y pone una sombra detrás del titular
   para que el crema se lea con contraste AA sobre el cielo claro. */
.outro__media::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 85% 52% at 50% 53%, rgb(30 21 12 / 0.34), rgb(30 21 12 / 0.2) 55%, rgb(30 21 12 / 0) 100%),
    linear-gradient(to bottom, rgb(23 21 16 / 0.64), rgb(30 22 13 / 0.3) 34%, rgb(30 22 13 / 0.34) 62%, rgb(23 21 16 / 0.74));
}
.outro__lid { display: none; }
.outro__ui {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: calc(var(--header-h) + 2rem) var(--gutter) 3rem;
  text-align: center;
}
.outro__a, .outro__b { grid-area: 1 / 1; display: grid; justify-items: center; gap: clamp(1.25rem, 3vh, 2rem); }
.outro__title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 8.4vw, 7rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
/* Sobre la foto, un punto más de peso y una sombra amplia. Con animaciones,
   la segunda frase aparece sobre el párpado cerrado (fondo liso): vuelve al
   peso fino. */
.outro__title { font-weight: 400; text-shadow: 0 2px 44px rgb(26 18 10 / 0.5); }
html.motion .outro__b .outro__title { font-weight: 300; text-shadow: none; }
.outro__title em { color: inherit; }
html.motion .outro__title em { color: var(--ochre-light); }
.outro__seal { width: clamp(84px, 11vw, 132px); }
.outro__caption {
  position: absolute;
  left: var(--gutter); right: var(--gutter); bottom: 1.1rem;
  z-index: 3;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: rgb(247 243 238 / 0.72);
  text-align: center;
}
/* Sin animaciones: una sola pantalla con todo a la vista */
html:not(.motion) .outro__ui { align-content: center; gap: 1.5rem; }
html:not(.motion) .outro__a, html:not(.motion) .outro__b { grid-area: auto; }
html:not(.motion) .outro__seal { display: none; }

html.motion .outro { height: 240vh; height: calc(100lvh + 140svh); }
@media (max-width: 899.98px) {
  /* recorrido más corto: en teléfono el tramo con el ojo ya cerrado se hacía largo */
  html.motion .outro { height: 215vh; height: calc(100lvh + 115svh); }
}
html.motion .outro__stage { position: sticky; top: 0; min-height: 0; height: 100vh; height: 100lvh; }
html.motion .outro__ui { height: 100vh; height: 100svh; }
html.motion .outro__lid {
  display: block;
  position: absolute; inset: 0;
  z-index: 2;
  width: 100%; height: 100%;
  pointer-events: none;
}
html.motion .outro__b > * { opacity: 0; }
html.motion .outro:not(.is-closed) .outro__b { pointer-events: none; }
html.motion .outro__caption { bottom: calc(100lvh - 100svh + 1.1rem); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { padding-block: clamp(3.5rem, 7vw, 6rem) 2rem; font-size: 0.92rem; }
.footer__top { display: grid; gap: 2.5rem; padding-bottom: clamp(2.5rem, 5vw, 4rem); }
@media (min-width: 900px) {
  .footer__top { grid-template-columns: minmax(0, 5fr) repeat(3, minmax(0, 2fr)); column-gap: clamp(1.5rem, 3vw, 3rem); }
}
.footer__brand { display: grid; gap: 1.25rem; align-content: start; justify-items: start; }
.footer__lockup { width: min(290px, 68vw); margin-left: -4px; }
.footer__tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--muted);
}
.footer__col { display: grid; gap: 0.9rem; align-content: start; }
.footer__col h2 {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.footer__col ul { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.footer__col a { text-decoration: none; }
.footer__col li { color: var(--muted); }
@media (hover: hover) {
  .footer__col a:hover { color: var(--accent-2); }
}

.credits { padding-block: clamp(2rem, 4vw, 3rem); border-top: 1px solid var(--line); scroll-margin-top: var(--header-h); }
.credits__head { display: grid; gap: 0.8rem; margin-bottom: 1.75rem; }
.credits__head h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  letter-spacing: -0.01em;
}
.credits__head p { max-width: 62em; font-size: 0.85rem; color: var(--muted); }
.credits__list {
  display: grid;
  gap: 0.7rem 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--muted);
}
@media (min-width: 640px) { .credits__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .credits__list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.credits__list strong { font-weight: 600; color: var(--ink-on-dark); }
.credits__list a { text-underline-offset: 0.2em; text-decoration-color: var(--line-strong); }
@media (hover: hover) {
  .credits__list a:hover { color: var(--ochre-light); text-decoration-color: currentColor; }
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--faint);
}

/* ==========================================================================
   Estados previos a la inicialización (solo con animaciones)
   ========================================================================== */
html.motion:not(.is-ready) [data-reveal],
html.motion:not(.is-ready) [data-split],
html.motion:not(.is-ready) .rule,
html.motion:not(.is-ready) .place__coords { visibility: hidden; }
html.motion [data-clip] { will-change: clip-path; }

/* Mientras GSAP anima la entrada de un elemento, sus transiciones CSS quedan
   en pausa: si las dos mueven el transform, lo pintado va detrás de lo pedido.
   main.js quita la clase (y el transform en línea) al terminar, y el hover
   vuelve a funcionar. */
html.motion .is-gs-reveal { transition: none !important; }
/* El botón del cierre entra con un transform ligado al scroll */
html.motion .outro__b .btn { transition-property: background-color, border-color, color; }

/* ==========================================================================
   Reducción de movimiento: también detiene lo que no depende del scroll
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header, .menu, body::after, .hero__lid, .outro__lid { display: none !important; }
}
