/* Public landing. Design system locked in the public-landing delta.
   Boutique, vanguardist, minimal, animation-rich, dreamy. Bone page, drifting
   color washes, honey shadows, glass panels. No dark backgrounds, no landscape
   backdrops, no navbars/tickers/grids. Mobile first, desktop explicit.

   This file carries the STATIC layout (commit 2) plus the choreography and
   fallbacks (commit 3). Scene entrance states live under `.js` so that with
   JavaScript off every scene is simply visible. */

:root {
  color-scheme: light;

  --bone: #f3ead6;
  --ink: #221a10;
  --ink-2: #5a4d39;
  --ink-muted: #8a7a62;
  --ink-quiet: #a08f74;
  --ink-faint: #b0a184;
  --accent: #8a4a1a;

  --wash-terracotta: #e0a075;
  --wash-teal: #8fc4b2;
  --wash-gold: #e3c26e;

  --serif: "Iowan Old Style", "Source Serif Pro", Charter, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", sans-serif;
  --mono: "SF Mono", Menlo, monospace;

  --glass-fill: rgba(255, 255, 255, 0.32);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-sheen: linear-gradient(115deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.12) 38%, transparent 60%);
  --honey-shadow: rgba(90, 64, 30, 0.32);
  --honey-shadow-deep: rgba(90, 64, 30, 0.42);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bone);
  color: var(--ink);
  font-family: var(--sans);
  overflow-x: hidden;
}

/* ---------- Drifting color washes (behind everything) ---------- */

.washes {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.wash {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  will-change: transform;
}
.wash--terracotta {
  top: -6%; right: -8%;
  width: 320px; height: 320px;
  background: var(--wash-terracotta);
  opacity: 0.38;
  animation: washDriftA 12s ease-in-out infinite;
}
.wash--teal {
  bottom: -10%; left: -6%;
  width: 300px; height: 300px;
  background: var(--wash-teal);
  opacity: 0.32;
  animation: washDriftB 14s ease-in-out 3s infinite;
}
.wash--gold {
  top: 38%; left: 40%;
  width: 260px; height: 260px;
  background: var(--wash-gold);
  opacity: 0.3;
  animation: washDriftC 11s ease-in-out 1.5s infinite;
}
@keyframes washDriftA { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-32px, 24px); } }
@keyframes washDriftB { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(28px, -20px); } }
@keyframes washDriftC { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(20px, 30px); } }

/* ---------- Persistent corner chrome ---------- */

.chrome {
  position: fixed;
  top: 16px;
  z-index: 160; /* above the expanded view (150) so MENU stays reachable */
  font-family: var(--sans);
  font-size: 9px;
  margin: 0;
  color: var(--ink-quiet);
}
.chrome--wordmark { left: 18px; letter-spacing: 0.34em; }
.chrome--menu {
  right: 18px;
  letter-spacing: 0.24em;
  color: var(--ink-2);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-size: 9px;
  letter-spacing: 0.24em;
}
.chrome--menu:hover { color: var(--ink); }
/* Folio counter sits at bottom center (R2.1). */
.chrome--folio {
  top: auto;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  letter-spacing: 0.2em;
}
/* Hidden inside the expanded view (its own room). */
body.exp-open .chrome--wordmark,
body.exp-open .chrome--folio { opacity: 0; pointer-events: none; }

/* Left-edge wayfinder: one tick per scene, the active one drawn out. Not a
   navbar; a quiet sense of where you are. */
.wayfinder {
  position: fixed;
  left: 20px; top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 13px;
  align-items: flex-start;
}
.wayfinder__mark {
  width: 14px; height: 2px;
  border: 0; padding: 0;
  background: rgba(34, 26, 16, 0.22);
  cursor: pointer;
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1), background 0.45s ease;
}
.wayfinder__mark.is-on { width: 28px; background: var(--ink); }
.wayfinder__mark:hover { background: var(--ink-2); }
body.exp-open .wayfinder { opacity: 0; pointer-events: none; }
@media (max-width: 520px) { .wayfinder { left: 12px; gap: 11px; } }

/* ---------- Corner menu (R2.1) ---------- */

.menu {
  position: fixed;
  inset: 0;
  z-index: 170;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
.menu.is-open { opacity: 1; pointer-events: auto; }
.menu::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(243, 234, 214, 0.55);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
  backdrop-filter: blur(22px) saturate(130%);
}
.menu__close {
  position: absolute;
  top: 14px; right: 18px;
  z-index: 2;
  font-size: 15px;
  line-height: 1;
  color: var(--ink-2);
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--sans);
}
.menu__nav {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.menu__link {
  font-family: var(--serif);
  font-size: 26px;
  color: var(--ink);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.menu.is-open .menu__link { opacity: 1; transform: none; }
.menu__link--key { font-style: italic; color: var(--accent); font-size: 20px; }
.menu__corner {
  position: absolute;
  bottom: 16px;
  z-index: 2;
  font-size: 9px;
  color: var(--ink-faint);
  margin: 0;
  text-decoration: none;
}
.menu__corner--left { left: 18px; letter-spacing: 0.3em; }
.menu__corner--right { right: 18px; }

/* ---------- Scenes ---------- */

.scenes { position: relative; z-index: 1; }

.scene {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
}

/* Contrast between sections: each scene carries a faint tint over the drifting
   washes so the boundaries read as distinct rooms. Portada stays open bone; the
   atlas is its own full-bleed world (below). */
.scene--slideshow { background: rgba(126, 158, 150, 0.10); }
.scene--contacto { background: rgba(164, 112, 54, 0.11); }

/* Scene 1, portada */
.portada { text-align: center; }
.portada__word {
  font-family: var(--serif);
  font-size: clamp(64px, 12vw, 96px);
  letter-spacing: 0.1em;
  color: var(--ink);
  line-height: 1;
  margin: 0;
}
.portada__letter { display: inline-block; }
.portada__rule {
  display: block;
  height: 1px;
  width: 120px;
  background: rgba(34, 26, 16, 0.3);
  margin: 22px auto 0;
}
.portada__tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--ink-2);
  margin: 20px 0 0;
}
.word { display: inline-block; }

/* Portada scroll cue (R2.5): grows and fades on a loop, hides after scroll */
.portada__cue {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.scene--portada.on .portada__cue { opacity: 1; }
.portada__cue.is-hidden { opacity: 0 !important; pointer-events: none; }
.portada__cue-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(34, 26, 16, 0), rgba(34, 26, 16, 0.5));
  transform-origin: top;
  animation: cueGrow 2.2s ease-in-out infinite;
}
.portada__cue-label {
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--ink-quiet);
  text-transform: lowercase;
}
@keyframes cueGrow {
  0% { transform: scaleY(0.2); opacity: 0; }
  40% { opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* ---------- Scene 2, slideshow (R2.6) ---------- */
.scene--slideshow { padding: 0; }
.slideshow { position: relative; width: 100%; min-height: 100svh; overflow: hidden; }
.slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}
.slide.is-on { opacity: 1; pointer-events: auto; }
.slideshow__dots {
  position: absolute;
  bottom: 46px; left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 10px;
}
.slideshow__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: rgba(34, 26, 16, 0.2);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}
.slideshow__dot.is-on { background: var(--ink); transform: scale(1.3); }

/* Slide c: dentro de un volumen (glass phone mock + index) */
.dentro {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 6vw, 72px);
  flex-wrap: wrap;
}
.dentro__phone {
  position: relative;
  width: 210px;
  height: 380px;
  border-radius: 26px;
  padding: 22px 20px;
  background: var(--glass-fill);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
  backdrop-filter: blur(12px) saturate(130%);
  border: 1px solid var(--glass-border);
  box-shadow: 0 22px 44px var(--honey-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.dentro__eyebrow { font-size: 8px; letter-spacing: 0.2em; color: var(--ink-muted); margin: 6px 0 0; }
.dentro__title { font-family: var(--serif); font-size: 20px; color: var(--ink); margin: 8px 0 18px; }
.dentro__sk { display: block; height: 8px; border-radius: 4px; background: rgba(90, 77, 57, 0.16); margin: 0 0 9px; }
.dentro__sk--1 { width: 90%; }
.dentro__sk--2 { width: 72%; margin-bottom: 22px; }
.dentro__sk--3 { width: 78%; margin: 0; }
.dentro__sk--4 { width: 64%; margin: 0; }
.dentro__rail { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.dentro__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }
.dentro__index {
  list-style: none;
  margin: 0; padding: 0;
  text-align: left;
}
.dentro__item {
  font-family: var(--serif);
  font-size: clamp(16px, 3.4vw, 21px);
  color: var(--ink);
  margin: 0 0 16px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.dentro__item:last-child { margin-bottom: 0; }
.slide--dentro.is-on .dentro__item { opacity: 1; transform: none; }
.dentro__num { color: var(--ink-muted); font-family: var(--sans); font-size: 11px; letter-spacing: 0.12em; margin-right: 10px; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .dentro__phone { background: rgba(247, 238, 216, 0.92); }
}

/* Scene 2 inner: manifiesto */
.manifiesto { width: min(920px, 100%); position: relative; min-height: 46vh; }
.manifiesto__line {
  font-family: var(--serif);
  font-size: clamp(28px, 6.4vw, 42px);
  line-height: 1.14;
  margin: 0;
  position: absolute;
}
.manifiesto__line--a { top: 4%; left: 4%; color: var(--ink); }
.manifiesto__line--b {
  bottom: 4%; right: 4%;
  color: var(--accent);
  font-style: italic;
  text-align: right;
}
.manifiesto__foot {
  position: absolute;
  bottom: -12%;
  left: 0; right: 0;
  text-align: center;
  font-size: 9px;
  letter-spacing: 0.26em;
  color: var(--ink-quiet);
  margin: 0;
}

/* Scene 4, metodo */
.metodo { text-align: center; position: relative; width: 100%; }
.metodo__word {
  font-family: var(--serif);
  font-size: clamp(34px, 8vw, 52px);
  color: var(--ink);
  margin: 0;
}
.metodo__word--final { font-style: italic; color: var(--accent); }
.metodo__foot {
  position: absolute;
  bottom: -18vh;
  left: 0; right: 0;
  text-align: center;
  font-size: 9px;
  letter-spacing: 0.26em;
  color: var(--ink-quiet);
  margin: 0;
}

/* Scene 5, contacto */
.contacto { text-align: center; }
.contacto__title {
  font-family: var(--serif);
  font-size: clamp(38px, 9vw, 50px);
  color: var(--ink);
  margin: 0;
}
.contacto__letter { display: inline-block; }
.contacto__cta {
  display: inline-block;
  margin-top: 28px;
  background: var(--ink);
  color: var(--bone);
  border-radius: 999px;
  padding: 14px 34px;
  font-size: 13px;
  text-decoration: none;
  box-shadow: 0 14px 30px rgba(34, 26, 16, 0.3);
}
.contacto__corner {
  position: absolute;
  bottom: 18px;
  z-index: 80;
  font-size: 9px;
  color: var(--ink-faint);
  margin: 0;
  text-decoration: none;
}
.contacto__corner--left { left: 18px; letter-spacing: 0.3em; }
.contacto__corner--right { right: 18px; }
a.contacto__corner--right:hover { color: var(--ink-2); }

/* ---------- Scene 3, el atlas (R2.3, R2.4) ---------- */

/* Full-bleed: the atlas is its own room. Zero frame, opaque bone base that
   covers the page washes, and its own washes so the edge fades blend to a
   matching color with no seam (R2.4). */
.scene--mesa {
  padding: 0;
  background: var(--bone);
}
.mesa {
  position: relative;
  width: 100%;
  min-height: 100svh;
  padding: 0;
  cursor: grab;
  touch-action: pan-y;
  overflow: hidden;
}

/* The atlas's own washes; they deepen on arrival (R2.3). */
.mesa__washes { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.mesa__wash {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  will-change: transform, opacity;
  transition: opacity 1.2s ease;
}
.mesa__wash--a { top: -8%; left: 4%; width: 320px; height: 320px; background: var(--wash-terracotta); opacity: 0.34; animation: washDriftA 11s ease-in-out infinite; }
.mesa__wash--b { bottom: -10%; right: -4%; width: 300px; height: 300px; background: var(--wash-teal); opacity: 0.3; animation: washDriftB 13s ease-in-out 3s infinite; }
.mesa__wash--c { top: 44%; left: 46%; width: 260px; height: 260px; background: var(--wash-gold); opacity: 0.28; animation: washDriftC 12s ease-in-out 1.5s infinite; }
.scene--mesa.on .mesa__wash--a { opacity: 0.42; }
.scene--mesa.on .mesa__wash--b { opacity: 0.38; }
.scene--mesa.on .mesa__wash--c { opacity: 0.34; }

/* The EL ATLAS watermark, behind the table, fades in on arrival (R2.3). */
.mesa__watermark {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(72px, 18vw, 220px);
  letter-spacing: 0.06em;
  color: rgba(34, 26, 16, 0.06);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.mesa__stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: auto; /* no-JS interim native pan; with JS -> hidden + transform */
  -webkit-overflow-scrolling: touch;
}
/* Arrival zoom wrapper (R2.3): the table zooms 1.06 -> 1 on entry. */
.mesa__zoom { position: absolute; inset: 0; transform-origin: center; }
.js .scene--mesa .mesa__zoom {
  transform: scale(1.06);
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.js .scene--mesa.on .mesa__zoom { transform: scale(1); }
.mesa__bg,
.mesa__world {
  position: absolute;
  left: 0; top: 0;
  will-change: transform;
}
.mesa__routes { position: absolute; left: 0; top: 0; pointer-events: none; }

.mesa__glyph {
  position: absolute;
  font-family: var(--serif);
  color: rgba(34, 26, 16, 0.05);
  margin: 0;
  user-select: none;
}
.mesa__coord {
  position: absolute;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(90, 77, 57, 0.5);
  margin: 0;
}

/* Edge fades */
.mesa__fade {
  position: absolute;
  z-index: 45;
  pointer-events: none;
}
.mesa__fade--l { left: 0; top: 0; bottom: 0; width: 56px; background: linear-gradient(to right, var(--bone), rgba(243, 234, 214, 0)); }
.mesa__fade--r { right: 0; top: 0; bottom: 0; width: 56px; background: linear-gradient(to left, var(--bone), rgba(243, 234, 214, 0)); }
.mesa__fade--t { left: 0; right: 0; top: 0; height: 50px; background: linear-gradient(to bottom, var(--bone), rgba(243, 234, 214, 0)); }
.mesa__fade--b { left: 0; right: 0; bottom: 0; height: 50px; background: linear-gradient(to top, var(--bone), rgba(243, 234, 214, 0)); }

/* Atlas label sits top center (MENU owns top-right); search will tuck
   beneath it (R2.8). */
.mesa__label {
  position: absolute;
  top: 16px; left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--ink-quiet);
  margin: 0;
  text-align: center;
}
.mesa__hint {
  position: absolute;
  bottom: 84px; left: 0; right: 0;
  z-index: 60;
  text-align: center;
  font-size: 10px;
  color: var(--ink-quiet);
  margin: 0;
}
/* The continue affordance reads as a button (R2.5). Sits above the bottom
   center folio counter. */
.mesa__seguir {
  position: absolute;
  bottom: 46px; left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.38);
  -webkit-backdrop-filter: blur(8px) saturate(130%);
  backdrop-filter: blur(8px) saturate(130%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 6px 16px rgba(90, 64, 30, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  padding: 8px 20px;
  cursor: pointer;
  font-family: var(--sans);
}
.mesa__seguir:hover { color: var(--ink); background: rgba(255, 255, 255, 0.55); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .mesa__seguir { background: rgba(247, 238, 216, 0.92); }
}

/* ---------- Cards (sealed photo) ---------- */

.card-wrap { position: absolute; width: 160px; }
.card {
  display: block;
  width: 160px;
  height: 220px;
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background-size: cover;
  background-position: center;
  box-shadow: 0 22px 40px var(--honey-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s;
}
.card__sheen {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  pointer-events: none;
  background: var(--glass-sheen);
}
.card__plate {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 9px 12px;
  background: rgba(247, 238, 216, 0.68);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.7);
  text-align: left;
}
.card__vol { font-size: 8px; letter-spacing: 0.18em; color: var(--ink-muted); }
.card__country { font-family: var(--serif); font-size: 16px; color: var(--ink); }

.card__note {
  font-family: var(--serif);
  font-style: italic;
  font-size: 11.5px;
  color: var(--ink-muted);
  margin: 10px 4px 0;
}

/* Ghost card */
.card--ghost {
  background: rgba(255, 255, 255, 0.45);
  -webkit-backdrop-filter: blur(13px) saturate(130%);
  backdrop-filter: blur(13px) saturate(130%);
  border: 1px dashed rgba(120, 100, 70, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.card--ghost .card__ring {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px dashed rgba(90, 77, 57, 0.6);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-2);
  font-size: 22px;
  font-family: var(--serif);
}
.card--ghost .card__prompt { font-family: var(--serif); font-size: 15px; color: var(--ink); }
.card--ghost .card__eyebrow {
  position: absolute;
  top: 12px; left: 0; right: 0;
  text-align: center;
  font-size: 8px;
  letter-spacing: 0.18em;
  color: var(--ink-muted);
}

/* Hover lift, desktop pointers only */
@media (hover: hover) and (pointer: fine) {
  .card:hover,
  .card.is-lifted {
    transform: rotate(0deg) translateY(-14px) scale(1.06) !important;
    box-shadow: 0 40px 66px var(--honey-shadow-deep), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  }
}
.card.is-lifted {
  transform: rotate(0deg) translateY(-14px) scale(1.06) !important;
  box-shadow: 0 40px 66px var(--honey-shadow-deep), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  z-index: 30;
}
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- La vista expandida (R2.2), built by JS ---------- */

.exp {
  position: fixed;
  inset: 0;
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}
.exp.is-open { opacity: 1; pointer-events: auto; }
.exp__bg { position: absolute; inset: 0; background: var(--bone); }
.exp__washes { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.exp__wash { position: absolute; border-radius: 50%; filter: blur(60px); }
.exp__wash--a { top: -40px; left: -30px; width: 260px; height: 260px; background: var(--wash-terracotta); opacity: 0.4; animation: washDriftA 11s ease-in-out infinite; }
.exp__wash--b { bottom: -50px; left: 60px; width: 220px; height: 220px; background: var(--wash-gold); opacity: 0.32; animation: washDriftC 13s ease-in-out 4s infinite; }

/* Photo field: from the rail to the right edge, bleeding to the edges */
.exp__field {
  position: absolute;
  left: 250px; top: 0; right: 0; bottom: 0;
  overflow: hidden;
  cursor: pointer;
}
.exp__photo { position: absolute; inset: 0; opacity: 0; transition: opacity 0.8s ease; }
.exp__photo.is-on { opacity: 1; }
.exp__kb { position: absolute; inset: -30px; background-size: cover; background-position: center; }
.exp__kb--1 { animation: kb1 25s linear infinite alternate; }
.exp__kb--2 { animation: kb2 26s linear infinite alternate; }
.exp__kb--3 { animation: kb3 27s linear infinite alternate; }
@keyframes kb1 { 0% { transform: scale(1.06) translate(0, 0); } 100% { transform: scale(1.16) translate(-16px, -9px); } }
@keyframes kb2 { 0% { transform: scale(1.16) translate(12px, 0); } 100% { transform: scale(1.06) translate(-9px, -7px); } }
@keyframes kb3 { 0% { transform: scale(1.08) translate(0, 7px); } 100% { transform: scale(1.18) translate(9px, -11px); } }
.exp__field.is-night { background: linear-gradient(to bottom, #060a1e, #101a38 70%, #1c2440); }
.exp__field.is-night .exp__photo { display: none; }
.exp__stars { position: absolute; inset: 0; display: none; }
.exp__field.is-night .exp__stars { display: block; }
.exp__scrim {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 120px; pointer-events: none;
  background: linear-gradient(to top, rgba(10, 4, 0, 0.62), rgba(10, 4, 0, 0));
}
.exp__verse {
  position: absolute;
  left: 36px; right: 120px; bottom: 20px;
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: #f7eed8;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
  transition: opacity 0.26s ease;
  z-index: 2;
}
.exp__dots { position: absolute; right: 20px; bottom: 26px; display: flex; gap: 8px; z-index: 2; }
.exp__dot { width: 6px; height: 6px; border-radius: 50%; border: 0; padding: 0; background: rgba(247, 238, 216, 0.45); cursor: pointer; transition: background 0.3s; }
.exp__dot.is-on { background: #f7eed8; }

/* Left rail (bone; the page washes continue behind it) */
.exp__rail { position: absolute; left: 0; top: 0; bottom: 0; width: 250px; z-index: 3; }
.exp__back {
  position: absolute; top: 16px; left: 20px; z-index: 5;
  font-size: 10px; letter-spacing: 0.12em; color: var(--ink-2);
  background: none; border: 0; cursor: pointer; font-family: var(--sans);
}
/* The card: an object resting on the print, overlapping the boundary */
.exp__card-fly {
  position: absolute;
  left: 96px; top: 64px;
  width: 190px; height: 258px;
  z-index: 4;
  transform-origin: center;
}
.exp__card {
  width: 100%; height: 100%;
  border-radius: 15px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 36px 64px rgba(40, 20, 4, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  background-size: cover; background-position: center;
  animation: floatCard 7s ease-in-out infinite;
}
.exp.is-flying .exp__card { animation: none; }
@keyframes floatCard { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-7px) rotate(-2deg); } }
.exp__card-sheen { position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255, 255, 255, 0.5), transparent 60%); }
.exp__card-plate {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 10px 13px;
  background: rgba(247, 238, 216, 0.72);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.exp__card-vol { font-size: 9px; letter-spacing: 0.18em; color: var(--ink-muted); }
.exp__card-country { font-family: var(--serif); font-size: 18px; color: var(--ink); }

.exp__dossier { position: absolute; left: 20px; right: 20px; top: 352px; z-index: 3; }
.exp__eyebrow { font-size: 9px; letter-spacing: 0.2em; color: var(--ink-muted); margin: 0; }
.exp__country { font-family: var(--serif); font-size: 30px; color: var(--ink); margin: 4px 0 0; }
.exp__pitch { font-family: var(--serif); font-style: italic; font-size: 12.5px; color: var(--ink-2); margin: 8px 0 0; line-height: 1.5; }
.exp__flavor { font-size: 9px; letter-spacing: 0.14em; color: var(--ink-muted); margin: 9px 0 0; }
.exp__cta { display: inline-block; margin-top: 14px; background: var(--ink); border-radius: 999px; padding: 10px 24px; color: var(--bone); font-size: 11px; text-decoration: none; cursor: pointer; }
.exp__key { display: inline-block; font-family: var(--serif); font-style: italic; font-size: 12px; color: var(--accent); margin: 10px 0 0; text-decoration: none; }
.exp__key span { border-bottom: 1px solid rgba(138, 74, 26, 0.4); padding-bottom: 1px; }
.exp--ghost .exp__flavor, .exp--ghost .exp__key { display: none; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .exp__card-plate { background: rgba(247, 238, 216, 0.92); }
}

/* Mobile: photo field on top, card overlaps its bottom-left, rail stacks below */
@media (max-width: 720px) {
  .exp__field { left: 0; right: 0; top: 0; height: 55vh; bottom: auto; }
  .exp__rail { position: static; width: auto; height: auto; padding: calc(55vh + 150px) 24px 44px; }
  .exp__back { color: #f7eed8; }
  .exp__card-fly { top: calc(55vh - 130px); left: 24px; }
  .exp__dossier { position: static; margin: 0; }
}

/* ---------- Glass fallback (no backdrop-filter) ---------- */

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card__plate { background: rgba(247, 238, 216, 0.92); }
  .card--ghost { background: rgba(247, 238, 216, 0.92); }
}

/* ---------- Scene choreography (only with JS; static without) ----------
   Entrance states live under html.js so that with JavaScript disabled every
   scene is simply visible. landing.js adds `.on` to the active scene and sets
   the per-item transition delays. */

.js .scene--mesa .mesa__stage { overflow: hidden; }

/* Scene 1, portada */
.js .scene--portada .portada__letter {
  opacity: 0;
  transform: translateY(42px) rotate(5deg);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.scene--portada.on .portada__letter { opacity: 1; transform: none; }
.js .scene--portada .portada__rule { width: 0; transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1); }
.scene--portada.on .portada__rule { width: 120px; }
.js .scene--portada .word { opacity: 0; transform: translateY(20px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1); }
.scene--portada.on .word { opacity: 1; transform: none; }

/* Slide a, manifiesto (choreography gated on the active slide) */
.js .slide--manifiesto .word {
  opacity: 0;
  transform: translateY(24px);
  filter: blur(6px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), filter 0.8s ease;
}
.slide--manifiesto.is-on .word { opacity: 1; transform: none; filter: blur(0); }

/* Slide b, metodo */
.js .slide--metodo .word { opacity: 0; transition: opacity 0.8s ease; }
.slide--metodo.is-on .word { opacity: 1; }
.metodo__word {
  transition: opacity 0.42s ease, transform 0.42s ease, filter 0.42s ease;
}

/* Scene 5, contacto */
.js .scene--contacto .contacto__letter {
  opacity: 0;
  transform: translateY(42px) rotate(5deg);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.scene--contacto.on .contacto__letter { opacity: 1; transform: none; }
.js .scene--contacto .contacto__cta { opacity: 0; transition: opacity 0.8s ease; animation: breathe 4.5s ease-in-out infinite; }
.scene--contacto.on .contacto__cta { opacity: 1; }
.js .scene--contacto .contacto__corner { opacity: 0; transition: opacity 0.8s ease; }
.scene--contacto.on .contacto__corner { opacity: 1; }
@keyframes breathe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

/* Reduced motion: everything visible, no motion */
@media (prefers-reduced-motion: reduce) {
  .wash, .mesa__wash { animation: none; }
  .exp__kb, .exp__card { animation: none !important; }
  .portada__cue-line { animation: none; opacity: 1; transform: none; }
  .slide { transition: none !important; }
  .js .scene .word,
  .js .scene .portada__letter,
  .js .scene .contacto__letter,
  .js .scene--contacto .contacto__cta,
  .js .scene--contacto .contacto__corner,
  .slide--dentro .dentro__item,
  .menu__link {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
    animation: none !important;
  }
  .js .scene--portada .portada__rule { width: 120px !important; transition: none !important; }
  .js .scene--mesa .mesa__zoom { transform: none !important; transition: none !important; }
  .exp__photo, .exp__verse { transition: none !important; }
  .card { transition: none !important; }
}

