:root {
  --mx: 0; --my: 0;
  --back-opacity: 1; --back-x: 0px; --back-y: 0px; --back-scale: 0.76;
  --four-y: 10vh; --four-scale: 0.78;
  --bazaar-y: 20vh;
  --blur-px: 0px; --back-brightness: 1;
  --bazaar-blur-px: 0px; --bazaar-brightness: 1; --bazaar-saturation: 1; --bazaar-opacity: 1;
  --shade-opacity: 1; --shade-z: 2;
  --shade-top-alpha: 0; --shade-mid-alpha: 0; --shade-bottom-alpha: 0;
  --blur-tint: 74, 181, 224;
  --title-y: 0px; --title-scale: 1; --title-opacity: 1;
  --login-y: 0px; --login-opacity: 0; --login-visibility: hidden;
  --bridge-x: -50%; --bridge-y: 0px; --bridge-bottom: 5vh;
  --bridge-width: 55vw; --bridge-scale: 1.02;
  --split-left-x: -50%;  --split-left-y: 0px;  --split-left-scale: 1;
  --split-right-x: -50%; --split-right-y: 0px; --split-right-scale: 1;
  --frame2-opacity: 0; --frame2-x: -50%; --frame2-y: -50%; --frame2-scale: 1.06;
  --intro-copy-y: 0px; --intro-copy-opacity: 1;
  --panel2-opacity: 0; --panel2-y: calc(-50% + 58px);
  --panel3-opacity: 0; --panel3-y: calc(-50% + 58px);
  --sights-opacity: 0; --sights-controls-opacity: 0; --sights-y: 0px;
  --sights-enter-x: 420vw; --sights-visibility: hidden;
  --sights-shift: 0px; --sights-scale: 1;
  --sights-top: clamp(112px, 19vh, 220px);
  --sights-screen-top: clamp(112px, 19vh, 220px);
  --ink: #111411; --paper: #fdf1e1; --paper-rgb: 253, 241, 225; --shadow: rgba(0, 0, 0, 0.32);
  --accent-green: #34be76; --accent-green-rgb: 52, 190, 118;
  --accent-gold: #feb129; --accent-gold-rgb: 254, 177, 41;
  --text-muted: #726c5c; --text-on-dark-muted: rgba(253, 241, 225, 0.62); --paper-dim: #f4ecdd;
  --display-font: "Fraunces", Georgia, "Times New Roman", serif;
  --sans-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
  --scroll-progress: 0;
  --stage-bg: #7fb4d4; --world-bg: #79b7dd; --page-bg: #0b1110;
  font-family: var(--sans-font);
  color: var(--paper);
  background: var(--page-bg);
  letter-spacing: 0;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--page-bg); }
body { min-height: 100%; margin: 0; overflow-x: clip; background: var(--page-bg); }
body.is-loading { overflow: hidden; height: 100vh; }
button { border: 0; font: inherit; background: none; }
.site-shell { min-height: 100vh; }

/* ---------- premium overlays: preloader, progress, grain, vignette, cursor ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 30px;
  background: var(--page-bg); color: var(--paper);
  transition: opacity 0.9s var(--ease-premium), visibility 0.9s var(--ease-premium);
}
.preloader-word {
  font-family: var(--display-font); font-weight: 500; font-style: italic;
  font-size: clamp(26px, 4vw, 52px); letter-spacing: 0.02em; opacity: 0.94;
}
.preloader-bar {
  width: min(220px, 55vw); height: 2px; border-radius: 2px; overflow: hidden;
  background: rgba(var(--paper-rgb), 0.16);
}
.preloader-bar-fill {
  height: 100%; width: 100%; background: var(--paper);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s var(--ease-premium);
}
.preloader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }

.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 50; pointer-events: none;
  background: rgba(var(--paper-rgb), 0.1);
}
.scroll-progress-fill {
  height: 100%; width: 100%; transform-origin: left;
  transform: scaleX(var(--scroll-progress));
  background: linear-gradient(90deg, rgba(var(--paper-rgb), 0.95), rgba(var(--paper-rgb), 0.55));
  will-change: transform;
}

.grain-overlay {
  position: fixed; inset: -12%; z-index: 45; pointer-events: none;
  opacity: 0.045; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
  background-size: 160px 160px;
  animation: grain-shift 8s steps(8) infinite;
}
@keyframes grain-shift {
  0% { transform: translate3d(0, 0, 0); }
  12.5% { transform: translate3d(-2%, 2%, 0); }
  25% { transform: translate3d(2%, -1%, 0); }
  37.5% { transform: translate3d(-1%, -2%, 0); }
  50% { transform: translate3d(2%, 2%, 0); }
  62.5% { transform: translate3d(-2%, -1%, 0); }
  75% { transform: translate3d(1%, 2%, 0); }
  87.5% { transform: translate3d(-1%, 1%, 0); }
  100% { transform: translate3d(0, 0, 0); }
}
.vignette {
  position: fixed; inset: 0; z-index: 44; pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, rgba(0,0,0,0) 45%, rgba(0,0,0,0.32) 100%);
}

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

/* ---------- scroll rig ---------- */
.cinema-scroll { position: relative; height: calc(100vh + 16888px); }
.stage {
  position: sticky; top: 0; height: 100vh; min-height: 620px;
  overflow: hidden; isolation: isolate; background: var(--stage-bg);
}
.world, .back-stack, .sky-img, .shade, .scene-img,
.hero-login, .hero-title, .intro-copy, .story-panel {
  position: absolute;
}
.world { inset: 0; overflow: hidden; background: var(--world-bg); }

/* ---------- header ---------- */
/* A true fixed-to-viewport bar (not nested inside the pinned cinematic
   stage), so it keeps following the visitor once they scroll past the
   sea-reveal/login beat and into the normal-flow sections below (Cruce,
   Actividades, Conócenos...) instead of disappearing with the stage.
   body.past-cinema (toggled in script.js once the pinned section's scroll
   range is exhausted) switches it from light-on-dark to dark-on-light,
   since those later sections sit on a cream background. */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  display: grid; grid-template-columns: minmax(260px, 1fr) auto minmax(260px, 1fr);
  align-items: center; gap: 32px; padding: 32px;
  color: rgba(var(--paper-rgb), 0.86);
  pointer-events: auto;
  z-index: 40;
  transition: background 0.6s var(--ease-premium), backdrop-filter 0.6s var(--ease-premium);
}
body.is-scrolled .site-header {
  background: linear-gradient(to bottom, rgba(8, 12, 11, 0.5) 0%, rgba(8, 12, 11, 0) 100%);
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
}
body.past-cinema .site-header {
  background: rgba(var(--paper-rgb), 0.86);
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  box-shadow: 0 1px 0 rgba(17, 20, 17, 0.08);
}
.site-logo {
  justify-self: start;
  font-family: var(--display-font);
  font-style: italic;
  font-size: 24px; line-height: 1; font-weight: 500;
  color: rgba(var(--paper-rgb), 0.92);
  text-decoration: none; white-space: nowrap;
  transition: opacity 0.3s var(--ease-premium), color 0.3s var(--ease-premium);
}
.site-logo:hover { opacity: 0.7; }
body.past-cinema .site-logo { color: var(--ink); }
.accent { color: var(--accent-green); }
.site-nav { display: flex; align-items: center; justify-content: center; gap: clamp(24px, 2.2vw, 44px); }
.site-nav a, .language-switcher {
  color: rgba(var(--paper-rgb), 0.86);
  font-weight: 700; line-height: 1;
  text-shadow: 0 2px 16px rgba(0,0,0,0.2);
  text-decoration: none;
  transition: color 0.3s var(--ease-premium), text-shadow 0.3s var(--ease-premium);
}
.site-nav a {
  position: relative; padding-bottom: 5px; font-size: 15px; font-weight: 500;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform 0.5s var(--ease-premium);
}
.site-nav a:hover, .site-nav a.is-active { color: var(--paper); }
.site-nav a:hover::after, .site-nav a.is-active::after { transform: scaleX(1); transform-origin: left; }
body.past-cinema .site-nav a, body.past-cinema .language-switcher { color: var(--ink); text-shadow: none; }
body.past-cinema .site-nav a:hover, body.past-cinema .site-nav a.is-active { color: var(--accent-green); }
.language-switcher {
  justify-self: end; display: inline-flex; align-items: center; justify-content: center;
  gap: 5px; padding: 0; background: transparent; font-size: 16px; cursor: pointer;
  transition: opacity 0.3s var(--ease-premium);
}
.language-switcher:hover { opacity: 0.7; }
.language-switcher span { display: inline-flex; line-height: 1; }

/* ---------- scene layers (shared) ---------- */
.scene-img {
  display: block; user-select: none; -webkit-user-drag: none;
  will-change: transform, opacity, filter; pointer-events: none;
}

.sky-img {
  inset: 0; width: 100%; height: 100%; object-fit: cover; transform: none;
  filter: blur(var(--blur-px)) brightness(var(--back-brightness));
  z-index: 0;
}

.back-stack {
  top: 0; bottom: 0; left: -3vw; right: -3vw;
  z-index: 1;
  opacity: var(--back-opacity);
  transform: translate3d(var(--back-x), var(--back-y), 0) scale(var(--back-scale));
  transform-origin: 50% 100%;
  will-change: transform, filter, opacity;
}
.back-img {
  inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: blur(var(--blur-px)) brightness(var(--back-brightness));
}
.back-bazaar, .back-four {
  top: auto; bottom: 0; left: 48%; right: auto; width: 112%; height: auto; object-fit: contain;
}
.back-bazaar {
  z-index: 3; opacity: var(--bazaar-opacity);
  filter: blur(var(--bazaar-blur-px)) brightness(var(--bazaar-brightness)) saturate(var(--bazaar-saturation));
  transform: translate3d(-50%, var(--bazaar-y), 0) scale(0.86);
}
.back-four {
  z-index: 1; opacity: 0.72; mix-blend-mode: screen;
  transform: translate3d(-50%, calc(var(--four-y) - 110px), 0) scale(var(--four-scale));
}

/* ---------- hero login card ---------- */
/* Lives in the later "sea reveal" beat (frame3 in script.js), not the
   opening hero: the mountain/arch layers fade away and the sea video is
   the only thing left on screen, with the title/intro copy already gone —
   a clean, uncluttered moment to show the login, instead of crowding the
   CANTABROWSER title. --login-opacity/--login-y are set from frame3's
   enter/active/exit progress, and it is centered in the viewport since
   nothing else competes for that space at this point in the scroll. */
.hero-login {
  left: 0; right: 0; top: 50%; padding: 0;
  display: flex; justify-content: center;
  opacity: var(--login-opacity, 0); visibility: var(--login-visibility, hidden);
  transform: translate3d(0, calc(-50% + var(--login-y, 0px)), 0);
  pointer-events: auto; will-change: transform, opacity;
  z-index: 11;
}
.auth-mark { align-self: center; width: 40px; height: 40px; margin-bottom: 2px; }
.auth-mark svg { width: 100%; height: 100%; display: block; }
.auth-switch {
  background: none; border: 0; padding: 0; margin: 0; font: inherit;
  color: var(--accent-green); font-weight: 700; cursor: pointer;
}
.auth-switch:hover { text-decoration: underline; }
.login-card {
  position: relative; width: min(400px, 88vw); margin: 0; padding: 36px 40px;
  display: flex; flex-direction: column; gap: 16px; align-items: stretch;
  border: 1px solid rgba(var(--paper-rgb), 0.5); border-radius: 26px;
  color: var(--ink); background: var(--paper);
  box-shadow: 0 26px 64px rgba(2, 47, 64, 0.24);
  pointer-events: auto;
}
.login-card h3 {
  margin: 0 0 4px; color: var(--ink); font-family: var(--display-font);
  font-weight: 500; font-size: 1.7rem; line-height: 1.1; text-align: center;
}
.login-field { display: flex; flex-direction: column; gap: 6px; width: 100%; font-size: 0.76rem; color: var(--text-muted); }
.login-field span { text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.login-field input {
  width: 100%; padding: 13px 16px; border-radius: 12px; border: 1px solid rgba(17, 20, 17, 0.14);
  background: rgba(17, 20, 17, 0.03); color: var(--ink);
  font-family: var(--sans-font); font-size: 1rem;
}
.login-field input::placeholder { color: rgba(17, 20, 17, 0.35); }
.login-field input:focus-visible { outline: 2px solid var(--accent-green); outline-offset: 1px; }
.login-submit {
  margin-top: 8px; padding: 15px 20px; width: 100%; border-radius: 999px; color: var(--ink);
  background: var(--accent-green); font-family: var(--sans-font); font-weight: 700; font-size: 1.05rem;
  cursor: pointer; box-shadow: 0 18px 40px rgba(52,190,118,0.3);
  transition: transform 0.35s var(--ease-premium), box-shadow 0.35s var(--ease-premium), background-color 0.35s var(--ease-premium);
}
.login-submit:hover {
  transform: translate3d(0, -3px, 0); background: var(--accent-gold);
  box-shadow: 0 24px 50px rgba(254,177,41,0.34);
}
.login-alt { margin: 0; font-size: 0.88rem; color: var(--text-muted); text-align: center; }

/* ---------- shared auth card language (login + register) ---------- */
.auth-card {
  position: relative; width: 100%; margin: 0; padding: 34px 32px;
  display: flex; flex-direction: column; gap: 10px; align-items: stretch;
  border: 1px solid rgba(var(--paper-rgb), 0.5); border-radius: 26px;
  color: var(--ink); background: var(--paper);
  box-shadow: 0 26px 64px rgba(2, 47, 64, 0.24);
}
.auth-card h3 {
  margin: 0; color: var(--ink); font-family: var(--display-font);
  font-weight: 500; font-size: 1.5rem; line-height: 1.1; text-align: center;
}
.auth-card h3 em { font-style: italic; color: var(--accent-green); }
.auth-sub {
  margin: 0 0 6px; color: var(--text-muted); font-size: 0.85rem;
  text-align: center; line-height: 1.4;
}
.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-field { display: flex; flex-direction: column; gap: 5px; font-size: 0.68rem; color: var(--text-muted); }
.auth-field span { text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.auth-field span em { text-transform: none; font-style: normal; font-weight: 400; opacity: 0.7; }
.auth-field input {
  width: 100%; padding: 10px 13px; border-radius: 10px; border: 1px solid rgba(17, 20, 17, 0.14);
  background: rgba(17, 20, 17, 0.03); color: var(--ink);
  font-family: var(--sans-font); font-size: 0.9rem;
}
.auth-field input::placeholder { color: rgba(17, 20, 17, 0.35); }
.auth-field input:focus-visible { outline: 2px solid var(--accent-green); outline-offset: 1px; }
.auth-submit {
  margin-top: 6px; padding: 12px 20px; border-radius: 999px; color: var(--ink);
  background: var(--accent-green); font-family: var(--sans-font); font-weight: 700; font-size: 0.95rem;
  cursor: pointer; box-shadow: 0 16px 34px rgba(52,190,118,0.28);
  transition: transform 0.35s var(--ease-premium), box-shadow 0.35s var(--ease-premium), background-color 0.35s var(--ease-premium);
}
.auth-submit:hover {
  transform: translate3d(0, -3px, 0); background: var(--accent-gold);
  box-shadow: 0 22px 44px rgba(254,177,41,0.32);
}
.auth-alt { margin: 4px 0 0; font-size: 0.8rem; color: var(--text-muted); text-align: center; }

/* ---------- register modal ---------- */
.auth-modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.auth-modal[hidden] { display: none; }
.auth-modal-backdrop {
  position: absolute; inset: 0; background: rgba(6, 10, 9, 0.72);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
/* The panel itself must stay overflow:visible (default) so the close
   button, deliberately positioned half outside the card at top:-14px;
   right:-14px, is never clipped — setting overflow-y on the panel forces
   overflow-x to clip too (per the CSS overflow spec), which is exactly
   what was slicing the button down to a sliver. Any scrolling needed on
   short viewports happens on the card itself instead. */
.auth-modal-panel { position: relative; width: min(440px, 100%); max-height: 88vh; }
.auth-card-register { max-height: 88vh; overflow-y: auto; }
.auth-modal-close {
  position: absolute; top: -14px; right: -14px; z-index: 2; width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: var(--paper); color: var(--ink); font-size: 1.3rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(2, 47, 64, 0.28), 0 0 0 1px rgba(17, 20, 17, 0.08);
}
@media (max-width: 640px) {
  .auth-card-register { padding: 28px 22px; }
  .auth-row { grid-template-columns: 1fr; gap: 10px; }
}

/* ---------- hero title ---------- */
.hero-title {
  left: 50%; top: clamp(260px, 34vh, 380px); width: min(94vw, 1780px); margin: 0;
  color: var(--paper); font-family: var(--display-font);
  font-size: 8.2rem; font-weight: 500; line-height: 0.78; letter-spacing: -0.01em; text-align: center;
  text-shadow: 0 8px 40px rgba(0, 0, 0, 0.55), 0 2px 10px rgba(0, 0, 0, 0.5);
  transform: translate3d(-50%, var(--title-y), 0) scale(var(--title-scale));
  opacity: var(--title-opacity); will-change: transform, opacity;
  z-index: 7;
}
/* Soft dark halo behind the text, independent of the background photo, so
   the title/copy/panel text keeps good contrast over busy or bright scenes
   (grass, sky, rock) instead of relying on text-shadow alone. */
.hero-title::before,
.intro-copy::before,
.story-panel::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
}
.hero-title::before {
  inset: -55% -20%;
  background: radial-gradient(ellipse closest-side at 50% 50%,
    rgba(0, 0, 0, 0.22) 0%, rgba(0, 0, 0, 0) 100%);
}

/* ---------- bridge (arch, full-bleed) / splitframes / frame-two (mountain, full-bleed) ---------- */
.bridge-img {
  inset: 0; width: 100%; height: 100%; object-fit: cover;
  transform: translate3d(var(--bridge-x), var(--bridge-y), 0) scale(var(--bridge-scale));
  transform-origin: var(--bridge-ox, 52%) var(--bridge-oy, 52%);
  z-index: 6;
}
.splitframe-img {
  left: 50%; bottom: -2vh; width: min(118vw, 2240px); height: auto; pointer-events: none;
  z-index: 6;
}
.splitframe-left {
  transform: translate3d(var(--split-left-x), var(--split-left-y), 0) scale(var(--split-left-scale));
  transform-origin: 21% 52%;
}
.splitframe-right {
  transform: translate3d(var(--split-right-x), var(--split-right-y), 0) scale(var(--split-right-scale));
  transform-origin: 79% 52%;
}
.frame-two-img {
  filter: none !important; backdrop-filter: none;
  inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: var(--frame2-opacity);
  transform: translate3d(var(--frame2-x), var(--frame2-y), 0) scale(var(--frame2-scale));
  transform-origin: var(--frame2-ox, 50%) var(--frame2-oy, 8%);
  z-index: 4;
}

/* ---------- shade ---------- */
.shade {
  inset: 0; z-index: var(--shade-z); pointer-events: none; opacity: var(--shade-opacity);
  background: linear-gradient(180deg,
    rgba(var(--blur-tint), var(--shade-top-alpha)) 0%,
    rgba(var(--blur-tint), var(--shade-mid-alpha)) 48%,
    rgba(var(--blur-tint), var(--shade-bottom-alpha)) 100%);
}

/* ---------- intro copy ---------- */
.intro-copy {
  left: 50%; bottom: clamp(56px, 28vh, 400px); width: min(560px, calc(100vw - 40px)); text-align: center;
  transform: translate3d(-50%, var(--intro-copy-y), 0);
  opacity: var(--intro-copy-opacity); will-change: transform, opacity;
  z-index: 9;
}
.intro-copy::before {
  inset: -55% -25%;
  background: radial-gradient(ellipse closest-side at 50% 38%,
    rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0) 100%);
}
.intro-copy p {
  margin: 0 auto; max-width: 560px; color: var(--paper);
  font-size: 1.18rem; font-weight: 500; line-height: 1.18;
  text-shadow: 0 2px 18px rgba(0,0,0,0.42);
}
.hero-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 26px; }
.hero-tags a {
  min-height: 42px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 25px; color: var(--ink); border-radius: 999px; background: var(--paper);
  font-size: 0.98rem; font-weight: 500; box-shadow: 0 12px 30px rgba(0,0,0,0.18);
  text-decoration: none; cursor: pointer;
  transition: transform 0.35s var(--ease-premium), box-shadow 0.35s var(--ease-premium);
}
.hero-tags a:hover { transform: translate3d(0, -3px, 0); box-shadow: 0 18px 38px rgba(0,0,0,0.24); }

/* ---------- story panels ---------- */
.story-panel {
  left: 50%; top: 45%; width: min(760px, calc(100vw - 42px)); text-align: center;
  pointer-events: none; transform: translate3d(-50%, -50%, 0); will-change: transform, opacity;
  z-index: 10;
}
.story-panel::before {
  inset: -55% -25%;
  background: radial-gradient(ellipse closest-side at 50% 38%,
    rgba(0, 0, 0, 0.22) 0%, rgba(0, 0, 0, 0) 100%);
}
.story-panel h2 {
  margin: 0; color: var(--paper); font-family: var(--display-font);
  font-size: 4.75rem; font-weight: 500; line-height: 0.95; text-shadow: 0 16px 38px var(--shadow);
}
.story-panel p {
  width: min(520px, 100%); margin: 26px auto 0; color: var(--paper);
  font-size: 1.14rem; font-weight: 500; line-height: 1.18; text-shadow: 0 2px 18px rgba(0,0,0,0.42);
}
.story-panel-bridge { top: 60%; opacity: var(--panel2-opacity); transform: translate3d(-50%, var(--panel2-y), 0); }
.story-panel-bazaar { top: 29%; opacity: var(--panel3-opacity); transform: translate3d(-50%, var(--panel3-y), 0); }

.note-button {
  min-height: 50px; margin-top: 28px; display: inline-flex; align-items: center; justify-content: center;
  gap: 12px; padding: 0 28px; border-radius: 999px; color: var(--ink); background: var(--paper);
  box-shadow: 0 16px 34px rgba(0,0,0,0.18); pointer-events: auto; cursor: pointer;
  transition: transform 0.4s var(--ease-premium), box-shadow 0.4s var(--ease-premium);
}
.note-button:hover { transform: translate3d(0, -3px, 0) scale(1.02); box-shadow: 0 24px 48px rgba(0,0,0,0.26); }
.note-button span:first-child {
  font-size: 1.25rem; line-height: 1; display: inline-block;
  transition: transform 0.4s var(--ease-premium);
}
.note-button:hover span:first-child { transform: translate3d(3px, -3px, 0); }

/* ---------- media queries ---------- */
@media (max-width: 1500px) {
  .hero-title { font-size: 6.5rem; }
  .story-panel h2 { font-size: 4.1rem; }
}
@media (max-width: 1100px) {
  .hero-title { top: 28vh; font-size: 4.4rem; }
  .story-panel h2 { font-size: 3.2rem; }
}
@media (max-width: 640px) {
  .stage { min-height: 640px; }
  .site-header { grid-template-columns: 1fr auto; gap: 18px; padding: 24px; }
  .site-nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start;
              gap: 18px; overflow-x: auto; scrollbar-width: none; }
  .site-nav::-webkit-scrollbar { display: none; }
  .hero-title { top: 30vh; font-size: 2.7rem; }
  .intro-copy { bottom: 42px; }
  .intro-copy p, .story-panel p { font-size: 1rem; }
  .hero-tags { gap: 8px; }
  .hero-tags a { min-height: 38px; padding: 0 16px; font-size: 0.88rem; }
  .story-panel { top: 42%; }
  .story-panel-bazaar { top: 26%; }
  .story-panel h2 { font-size: 2.45rem; }
  .login-card { width: min(360px, 90vw); padding: 28px 26px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scene-img, .back-stack, .hero-title, .intro-copy, .story-panel { transition: none; }
}

/* ======================================================================
   Landing de Cantabrowser — secciones añadidas tras el recorrido cinemático
   (actividades / presentación / conócenos / banner / misión / cta)
   ====================================================================== */
.site-shell > .cb-section:first-of-type,
.site-shell > .cb-banner:first-of-type { background: var(--paper); }

.cb-section { padding: clamp(72px, 11vw, 140px) 24px; position: relative; background: var(--paper); }
.cb-container { max-width: 1140px; margin: 0 auto; }
.cb-section-tinted { background: var(--paper-dim); }

.cb-eyebrow {
  display: inline-block; font-family: var(--sans-font); font-size: 12px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-green);
}
.cb-section-title {
  font-family: var(--display-font); font-weight: 500; font-size: clamp(2.2rem, 4vw, 3.3rem);
  color: var(--ink); margin: 10px 0 18px; line-height: 1.05;
}
.cb-section-lead { font-size: 1.08rem; color: var(--text-muted); max-width: 640px; line-height: 1.7; }
.cb-section-head { text-align: center; margin: 0 auto 56px; max-width: 680px; }
.cb-section-head .cb-section-lead { margin: 0 auto; }

/* ---------- Actividades: grid de tarjetas ---------- */
.cb-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.cb-card {
  position: relative; display: block; height: 380px; border-radius: 20px; overflow: hidden;
  text-decoration: none; box-shadow: 0 20px 50px rgba(19, 20, 15, 0.14);
  transition: transform 0.5s var(--ease-premium), box-shadow 0.5s var(--ease-premium);
}
.cb-card:hover { transform: translateY(-8px); box-shadow: 0 30px 70px rgba(19, 20, 15, 0.24); }
.cb-card img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s var(--ease-premium);
}
.cb-card:hover img { transform: scale(1.08); }
.cb-card-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13, 14, 10, 0) 35%, rgba(13, 14, 10, 0.86) 100%); }
.cb-card-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px; color: var(--paper); }
.cb-card-body h3 { font-family: var(--display-font); font-weight: 500; font-size: 1.5rem; margin: 0 0 8px; }
.cb-card-body p { font-size: 0.92rem; color: rgba(253, 246, 236, 0.78); margin: 0; line-height: 1.5; }
/* ---------- Presentación / Conócenos / Misión: dos columnas ---------- */
.cb-split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: center; }
.cb-split.cb-split-reverse .cb-split-text { order: 2; }
.cb-split-text p { font-size: 1.05rem; line-height: 1.75; color: var(--text-muted); margin: 0 0 20px; }
.cb-split-text p strong { color: var(--ink); }
.cb-split-media { display: flex; justify-content: center; }
.cb-split-media img { max-width: 100%; border-radius: 18px; }
.cb-split-media.cb-split-media-phone img { max-width: 260px; filter: drop-shadow(0 30px 60px rgba(19, 20, 15, 0.22)); }

.cb-photo-frame { position: relative; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 70px rgba(19, 20, 15, 0.18); }
.cb-photo-frame img { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }

/* ---------- Banner panorámico ---------- */
.cb-banner { position: relative; height: 56vh; min-height: 340px; overflow: hidden; display: flex; align-items: flex-end; }
.cb-banner img { position: absolute; inset: -6%; width: 112%; height: 112%; object-fit: cover; will-change: transform; }
.cb-banner-shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(13, 14, 10, 0.68) 0%, rgba(13, 14, 10, 0) 55%); }
.cb-banner-caption { position: relative; z-index: 2; color: var(--paper); padding: 40px 24px; max-width: 640px; margin: 0 auto; text-align: center; }
.cb-banner-caption p { font-family: var(--display-font); font-style: italic; font-size: clamp(1.3rem, 2.4vw, 1.9rem); line-height: 1.35; margin: 0; }

/* ---------- Nuestra misión ---------- */
.cb-mission-list { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.cb-mission-list li { display: flex; gap: 18px; align-items: flex-start; font-size: 1.02rem; color: var(--text-muted); line-height: 1.65; }
.cb-mission-list .cb-mission-num { flex: none; font-family: var(--display-font); font-style: italic; font-size: 1.6rem; color: var(--accent-green); line-height: 1; }

/* ---------- CTA final ---------- */
.cb-cta { background: var(--ink); color: var(--paper); text-align: center; padding: clamp(80px, 12vw, 140px) 24px; }
.cb-cta .cb-eyebrow { color: var(--accent-gold); }
.cb-cta h2 {
  font-family: var(--display-font); font-weight: 500; font-style: italic; font-size: clamp(2rem, 4.4vw, 3.4rem);
  margin: 14px 0 22px; max-width: 720px; margin-left: auto; margin-right: auto;
}
.cb-cta p { color: var(--text-on-dark-muted); max-width: 520px; margin: 0 auto 32px; font-size: 1.02rem; line-height: 1.6; }
.cb-btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 15px 34px; border-radius: 999px;
  background: var(--accent-green); color: var(--ink); font-family: var(--sans-font); font-weight: 700;
  font-size: 15px; letter-spacing: 0.02em; text-decoration: none; border: none; cursor: pointer;
  box-shadow: 0 16px 40px rgba(52, 190, 118, 0.28);
  transition: transform 0.4s var(--ease-premium), box-shadow 0.4s var(--ease-premium), background-color 0.4s var(--ease-premium);
}
.cb-btn:hover { transform: translateY(-3px); background: var(--accent-gold); box-shadow: 0 22px 50px rgba(254, 177, 41, 0.32); }
.cb-btn-outline {
  background: transparent; color: var(--ink); box-shadow: none;
  border: 1.5px solid rgba(17, 20, 17, 0.18);
}
.cb-btn-outline:hover { background: var(--accent-green); color: var(--ink); border-color: var(--accent-green); box-shadow: 0 16px 40px rgba(52, 190, 118, 0.24); }

/* ---------- Subpáginas (Gastronomía / Naturaleza / Actividades) ---------- */
.subpage-shell { background: var(--paper); }

.page-hero { position: relative; height: min(62vh, 560px); min-height: 340px; overflow: hidden; display: flex; align-items: flex-end; }
.page-hero img, .page-hero video { position: absolute; inset: -6%; width: 112%; height: 112%; object-fit: cover; will-change: transform; }
.page-hero-video { height: 94vh; min-height: 680px; background: var(--ink); }
.page-hero-video video { inset: 0; width: 100%; height: 100%; object-fit: contain; }
.cb-banner-xl { height: 90vh; min-height: 560px; }
.page-narrative { max-width: 720px; margin: 0 auto 24px; text-align: center; }
.page-narrative p { font-size: 1.08rem; line-height: 1.75; color: var(--text-muted); margin: 0 0 14px; }
.page-hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13, 14, 10, 0.18) 0%, rgba(13, 14, 10, 0.72) 100%); }
.page-hero-content { position: relative; z-index: 2; width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 24px clamp(40px, 6vw, 64px); }
.page-hero-content h1 {
  font-family: var(--display-font); font-weight: 500; font-size: clamp(2.3rem, 4.6vw, 3.6rem);
  color: var(--paper); margin: 0 0 12px; line-height: 1.08;
}
.page-hero-content p { font-size: 1.08rem; color: rgba(253, 246, 236, 0.86); max-width: 640px; line-height: 1.6; margin: 0; }
.page-hero-back {
  display: inline-block; margin-bottom: 16px; font-size: 0.86rem; font-weight: 600;
  color: rgba(253, 246, 236, 0.82); text-decoration: underline; text-underline-offset: 3px;
}
.page-hero-back:hover { color: var(--paper); }

.cb-more-links { text-align: center; max-width: 680px; }
.cb-more-buttons { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; margin-top: 22px; }

.detail-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: start; }
.detail-body p { font-size: 1.05rem; line-height: 1.75; color: var(--text-muted); margin: 0 0 20px; }
.detail-info {
  background: var(--paper-dim); border-radius: 18px; padding: 30px; position: sticky; top: 118px;
  display: flex; flex-direction: column; gap: 18px;
}
.detail-info-row { display: flex; flex-direction: column; gap: 4px; }
.detail-info-row + .detail-info-row { padding-top: 16px; border-top: 1px solid rgba(17, 20, 17, 0.08); }
.detail-info-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-green);
}
.detail-info-value { font-size: 0.98rem; color: var(--ink); font-weight: 600; line-height: 1.45; }

/* ---------- Revelado al hacer scroll ---------- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease-premium), transform 1s var(--ease-premium); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-stagger > * { opacity: 0; transform: translateY(32px); transition: opacity 0.8s var(--ease-premium), transform 0.8s var(--ease-premium); }
.reveal-stagger.is-visible > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.15s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.25s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.32s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.38s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.44s; }

@media (max-width: 992px) {
  .cb-card-grid { grid-template-columns: 1fr 1fr; }
  .cb-split { grid-template-columns: 1fr; gap: 40px; }
  .cb-split.cb-split-reverse .cb-split-media { order: 0; }
  .detail-grid { grid-template-columns: 1fr; gap: 32px; }
  .detail-info { position: static; }
}
@media (max-width: 640px) {
  .cb-card-grid { grid-template-columns: 1fr; }
  .cb-card { height: 300px; }
  .cb-section { padding: 64px 18px; }
  .page-hero { height: min(52vh, 420px); }
  .page-hero-video { height: 82vh; min-height: 520px; }
  .cb-banner-xl { height: 70vh; min-height: 420px; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }
}
