:root {
  --mx: 0; --my: 0;
  --v-a-opacity: 1; --v-b-opacity: 0; --v-c-opacity: 0;
  --back-x: 0px; --back-y: 0px; --back-scale: 1;
  --blur-px: 0px; --brightness: 1;
  --shade-opacity: 1; --shade-z: 2;
  --shade-top-alpha: 0; --shade-mid-alpha: 0; --shade-bottom-alpha: 0;
  --shade-tint: 18, 40, 34;
  --title-y: 0px; --title-scale: 1; --title-opacity: 1;
  --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-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: #16231d;
  --paper: #f7ead2;
  --teal: #2c6b62;
  --rust: #bd6a3f;
  --gold: #d3a244;
  --shadow: rgba(0, 0, 0, 0.34);

  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--paper);
  background: #0c1512;
  letter-spacing: 0;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; background: #0c1512; }
body { min-height: 100%; margin: 0; overflow-x: clip; background: #0c1512; }
button { border: 0; font: inherit; background: none; }
a { color: inherit; }
.site-shell { min-height: 100vh; }

/* ---------- Scroll rig ---------- */
.cinema-scroll { position: relative; height: calc(100vh + 3700px); }
.stage {
  position: sticky; top: 0; height: 100vh; min-height: 620px;
  overflow: hidden; isolation: isolate; background: #163a33;
}
.world { position: absolute; inset: 0; overflow: hidden; background: #1c443c; }

.back-stack, .site-header, .sights-slider, .sights-controls, .hero-title,
.intro-copy, .story-panel { position: absolute; }

/* ---------- Video layers ---------- */
.video-stack {
  position: absolute; inset: 0;
  transform: translate3d(var(--back-x), var(--back-y), 0) scale(var(--back-scale));
  transform-origin: 50% 50%;
  will-change: transform, filter;
  filter: blur(var(--blur-px)) brightness(var(--brightness));
}
.scene-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block; pointer-events: none; user-select: none;
  will-change: opacity;
}
.video-a { opacity: var(--v-a-opacity); z-index: 0; }
.video-b { opacity: var(--v-b-opacity); z-index: 1; }
.video-c { opacity: var(--v-c-opacity); z-index: 2; }

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

/* ---------- Header ---------- */
.site-header {
  top: 0; left: 0; right: 0; z-index: 10;
  display: grid; grid-template-columns: minmax(260px, 1fr) auto minmax(260px, 1fr);
  align-items: center; gap: 32px; padding: 32px;
  color: rgba(247, 234, 210, 0.9); pointer-events: auto;
}
.site-logo {
  justify-self: start; font-family: "Fraunces", serif; font-size: 22px; line-height: 1;
  font-weight: 500; color: rgba(247, 234, 210, 0.95); text-decoration: none; white-space: nowrap;
}
.site-nav { justify-self: center; display: flex; align-items: center; gap: clamp(24px, 2.2vw, 44px); }
.site-nav a, .language-switcher {
  color: rgba(247, 234, 210, 0.88); font-weight: 600; line-height: 1; text-decoration: none;
  text-shadow: 0 2px 16px rgba(0,0,0,0.25);
}
.site-nav a { font-size: 17px; font-weight: 400; }
.language-switcher {
  justify-self: end; display: inline-flex; align-items: center; gap: 5px; padding: 0;
  font-size: 15px; cursor: pointer;
}
.language-switcher span { display: inline-flex; align-items: center; line-height: 1; }

/* ---------- Slider zone ---------- */
.sights-slider {
  left: 0; right: 0; top: var(--sights-top); padding: 0;
  visibility: var(--sights-visibility);
  transform: translate3d(var(--sights-enter-x), 0, 0) scale(var(--sights-scale));
  transform-origin: 0 0; pointer-events: auto; will-change: transform; z-index: 4;
  opacity: var(--sights-opacity);
}
.sights-track {
  display: flex; gap: clamp(16px, 1.15vw, 24px); align-items: stretch;
  transform: translate3d(calc(var(--sights-shift) - 18vw), 0, 0);
  transition: transform 640ms cubic-bezier(0.22, 1, 0.36, 1); will-change: transform;
}
.sights-track.is-jumping { transition: none; }

.sight-card {
  position: relative; flex: 0 0 clamp(340px, 19vw, 410px); height: 220px; padding: 24px;
  overflow: hidden; border: 1px solid rgba(22, 35, 29, 0.14); border-radius: 22px;
  color: var(--ink); background: var(--paper);
  box-shadow: 0 18px 52px rgba(6, 24, 20, 0.22);
  cursor: pointer; pointer-events: auto; user-select: none;
}
.sight-card:focus-visible, .sight-card.is-active { outline: none; box-shadow: 0 18px 52px rgba(6, 24, 20, 0.22), 0 0 0 2px var(--teal); }
.sight-kicker {
  display: block; margin-bottom: 52px; color: var(--teal); font-size: 12px;
  font-weight: 700; line-height: 1.05; text-transform: uppercase; letter-spacing: 0.06em;
  position: relative; z-index: 1;
}
.sight-pin {
  position: absolute; top: 22px; right: 22px; width: 44px; height: 44px;
  pointer-events: none; color: var(--rust);
}
.sight-pin svg { width: 100%; height: 100%; }
.sight-card h3 {
  position: absolute; left: 24px; right: 24px; bottom: calc(24px + 40px + 12px);
  max-width: calc(100% - 24px); margin: 0; font-family: "Fraunces", serif;
  color: var(--ink); font-size: 24px; font-weight: 600; line-height: 1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; z-index: 1;
}
.sight-card p {
  position: absolute; left: 24px; right: 24px; bottom: 24px; margin: 0; z-index: 1;
  color: var(--ink); font-size: 15px; font-weight: 400; line-height: 1.28;
  display: -webkit-box; max-height: calc(2em * 1.28); overflow: hidden;
  -webkit-box-orient: vertical; -webkit-line-clamp: 2;
}

.sights-controls {
  left: 48px; right: auto; top: calc(var(--sights-screen-top) + 220px + 16px);
  display: flex; justify-content: flex-start; gap: 14px; z-index: 5;
  opacity: var(--sights-controls-opacity); pointer-events: none; will-change: transform, opacity;
}
.sights-controls.is-ready { pointer-events: auto; }
.sight-nav {
  width: 52px; height: 52px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; color: var(--ink); background: rgba(247, 234, 210, 0.95);
  box-shadow: 0 18px 36px rgba(0,0,0,0.22); cursor: pointer; font-size: 18px;
}

/* ---------- Hero title ---------- */
.hero-title {
  left: 50%; top: clamp(122px, 19vh, 205px); width: min(94vw, 1780px); margin: 0; z-index: 3;
  color: var(--paper); font-family: "Fraunces", serif; font-size: 12rem; font-weight: 500;
  line-height: 0.82; text-align: center; letter-spacing: -0.01em;
  transform: translate3d(-50%, var(--title-y), 0) scale(var(--title-scale));
  opacity: var(--title-opacity); will-change: transform, opacity;
  text-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

/* ---------- Intro copy ---------- */
.intro-copy {
  left: 50%; bottom: clamp(56px, 26vh, 380px); width: min(600px, calc(100vw - 40px));
  text-align: center; z-index: 9;
  transform: translate3d(-50%, var(--intro-copy-y), 0);
  opacity: var(--intro-copy-opacity); will-change: transform, opacity;
}
.intro-copy p {
  margin: 0 auto; max-width: 560px; color: var(--paper); font-size: 1.15rem; font-weight: 500;
  line-height: 1.32; text-shadow: 0 2px 18px rgba(0,0,0,0.44);
}
.hero-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }
.hero-tags span {
  min-height: 42px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 24px; color: var(--ink); border-radius: 999px; background: var(--paper);
  font-size: 0.95rem; font-weight: 600; box-shadow: 0 12px 30px rgba(0,0,0,0.18);
}

/* ---------- Story panels ---------- */
.story-panel {
  left: 50%; top: 45%; width: min(760px, calc(100vw - 42px)); text-align: center;
  pointer-events: none; z-index: 10; transform: translate3d(-50%, -50%, 0);
  will-change: transform, opacity;
}
.story-panel h2 {
  margin: 0; color: var(--paper); font-family: "Fraunces", serif; font-size: 4.4rem;
  font-weight: 500; line-height: 0.98; text-shadow: 0 16px 38px var(--shadow);
}
.story-panel p {
  width: min(520px, 100%); margin: 24px auto 0; color: var(--paper); font-size: 1.1rem;
  font-weight: 500; line-height: 1.32; text-shadow: 0 2px 18px rgba(0,0,0,0.44);
}
.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); }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 80px; width: min(440px, 100%); margin: 60px auto 0; }
.facts dt { color: var(--paper); font-family: "Fraunces", serif; font-size: 3.8rem; font-weight: 500; line-height: 0.9; text-shadow: 0 14px 34px var(--shadow); }
.facts dd { margin: 14px 0 0; color: var(--paper); font-size: 0.98rem; font-weight: 500; line-height: 1.2; text-shadow: 0 2px 18px rgba(0,0,0,0.44); }

.note-button {
  min-height: 50px; margin-top: 26px; 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.2); pointer-events: auto; cursor: pointer;
  text-decoration: none; font-weight: 600;
}
.note-button span:first-child { font-size: 1.2rem; line-height: 1; }

/* ---------- Routes / CTA section ---------- */
.routes-section { background: var(--paper); color: var(--ink); padding: 120px 24px; }
.routes-inner { max-width: 720px; margin: 0 auto; text-align: center; }
.routes-inner h2 { font-family: "Fraunces", serif; font-size: 2.8rem; font-weight: 500; margin: 0 0 18px; color: var(--ink); }
.routes-inner > p { font-size: 1.08rem; line-height: 1.5; margin: 0 0 44px; color: rgba(22,35,29,0.78); }
.routes-form { display: flex; flex-direction: column; gap: 18px; text-align: left; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.routes-form label { display: flex; flex-direction: column; gap: 8px; font-size: 0.92rem; font-weight: 600; color: var(--ink); }
.field-full { grid-column: 1 / -1; }
.routes-form input, .routes-form textarea {
  font: inherit; font-size: 1rem; padding: 13px 16px; border-radius: 12px;
  border: 1px solid rgba(22,35,29,0.22); background: #fffaf0; color: var(--ink); resize: vertical;
}
.routes-form input:focus, .routes-form textarea:focus { outline: 2px solid var(--teal); outline-offset: 1px; }
.submit-button {
  margin-top: 8px; align-self: flex-start; padding: 15px 34px; border-radius: 999px;
  background: var(--teal); color: var(--paper); font-weight: 700; cursor: pointer;
  box-shadow: 0 14px 30px rgba(44,107,98,0.3);
}
.submit-button:hover { background: #245b53; }

/* ---------- Media queries ---------- */
@media (max-width: 1500px) {
  .hero-title { font-size: 9.5rem; }
  .story-panel h2 { font-size: 3.8rem; }
}
@media (max-width: 1100px) {
  .hero-title { top: 15vh; font-size: 6.6rem; }
  .story-panel h2 { font-size: 3rem; }
  .facts { gap: 32px; margin-top: 42px; }
  .facts dt { font-size: 3rem; }
  .sight-card { flex-basis: clamp(320px, 40vw, 390px); min-height: 178px; }
  .field-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .stage { min-height: 640px; }
  .site-header { grid-template-columns: 1fr auto; gap: 18px; padding: 22px; }
  .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: 16vh; font-size: 3.6rem; }
  .intro-copy { bottom: 40px; }
  .intro-copy p, .story-panel p { font-size: 1rem; }
  .hero-tags { gap: 8px; }
  .hero-tags span { min-height: 38px; padding: 0 16px; font-size: 0.86rem; }
  .story-panel { top: 42%; }
  .story-panel-bazaar { top: 26%; }
  .story-panel h2 { font-size: 2.3rem; }
  .facts { gap: 16px; margin-top: 32px; }
  .facts dt { font-size: 2.3rem; }
  .sights-track { gap: 12px; transform: translate3d(calc(var(--sights-shift) - 18vw), 0, 0); }
  .sight-card { flex-basis: min(82vw, 330px); height: 220px; padding: 22px; border-radius: 20px; }
  .sights-controls { top: calc(var(--sights-screen-top) + 236px); }
  .sight-card h3 { max-width: 78%; font-size: 21px; }
  .sight-kicker { margin-bottom: 52px; }
  .routes-section { padding: 80px 20px; }
  .routes-inner h2 { font-size: 2.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scene-video, .video-stack, .hero-title, .intro-copy, .story-panel,
  .sights-track, .sights-slider { transition: none; }
}
