:root {
  --ink: #f4f0ea;
  --muted: #b6a99a;
  --accent: #ec5a1e;
  --accent-soft: #ff7a3c;
}

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

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

body {
  background: #000;
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

html.cv-locked,
html.cv-locked body { overflow: hidden; touch-action: none; }

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

main { position: relative; z-index: 2; }

.panel {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: 6vw;
  pointer-events: none;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  transition: opacity 0.8s ease;
}
.loader.hidden { opacity: 0; pointer-events: none; }

.loader-progress { position: relative; width: 120px; height: 120px; }
.loader-progress svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: rgba(236, 90, 30, 0.15); stroke-width: 4; }
.ring-prog {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(236, 90, 30, 0.6));
}
.loader-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.hero { justify-content: center; text-align: center; position: relative; }
.hero-inner { max-width: 860px; }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: calc(4.5vh + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid rgba(244, 240, 234, 0.35);
  border-radius: 16px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
  pointer-events: none;
}
.scroll-cue span {
  width: 4px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
  animation: scroll-cue 1.8s ease-in-out infinite;
}
@keyframes scroll-cue {
  0%   { opacity: 0; transform: translateY(0); }
  30%  { opacity: 1; }
  60%  { opacity: 1; transform: translateY(12px); }
  100% { opacity: 0; transform: translateY(12px); }
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.45em;
  font-size: 0.72rem;
  color: var(--accent);
  margin-bottom: 1.6rem;
}

h1 {
  font-size: clamp(2.8rem, 10vw, 7rem);
  line-height: 0.95;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-shadow: 0 0 70px rgba(236, 90, 30, 0.25);
}
h1 .accent { color: var(--accent); }

.lead {
  margin-top: 1.8rem;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: var(--muted);
  line-height: 1.6;
}

.dest { justify-content: flex-end; }

.card {
  pointer-events: auto;
  width: min(440px, 92vw);
  background: rgba(22, 15, 11, 0.55);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(236, 90, 30, 0.25);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(40px);
}

.card .photo {
  height: 180px;
  background-size: cover;
  background-position: center;
  position: relative;
}
.card .photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(22, 15, 11, 0.95), transparent 60%);
}
.card .region-no {
  position: absolute;
  top: 14px; left: 16px;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 10px;
  border-radius: 20px;
}

.card .body { padding: 1.4rem 1.6rem 1.7rem; }

.card .tag {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}
.card h3 {
  font-size: 1.8rem;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.05;
}
.card .hint-click {
  margin-top: 0.6rem;
  font-size: 0.74rem;
  color: var(--muted);
}

.card .dests {
  list-style: none;
  margin-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.card .d-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.62rem 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.25s ease, padding-left 0.25s ease, color 0.25s ease;
}
@media (hover: hover) {
  .card .d-row:hover {
    background: rgba(236, 90, 30, 0.14);
    padding-left: 0.8rem;
  }
}
.card .d-row:active {
  background: rgba(236, 90, 30, 0.25);
  transition-duration: 0.08s;
}
.card .d-name {
  font-size: 0.98rem;
  font-weight: 600;
}
.card .d-name::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 9px;
  vertical-align: middle;
}
.card .d-coord {
  font-size: 0.74rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cityview {
  position: fixed;
  inset: 0;
  z-index: 40;
  overflow: hidden;
  background: #050402;
  opacity: 0;
  pointer-events: none;
  touch-action: none;
  transform: scale(1.04);
  transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}
.cityview.open {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.cv-map { position: absolute; inset: 0; }
.cv-map canvas { outline: none; }
.mapboxgl-ctrl-logo, .mapboxgl-ctrl-attrib { opacity: 0.35; }

.cv-photo {
  width: 230px;
  height: 142px;
  border-radius: 16px;
  background-size: cover;
  background-position: center;
  margin-bottom: 0.7rem;
  border: 1px solid rgba(236, 90, 30, 0.5);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  transition: opacity 0.28s ease;
}
.cv-photo.fading { opacity: 0; }

.cv-gallery {
  display: flex;
  gap: 8px;
  margin-bottom: 1.1rem;
}
.cv-gallery img {
  width: 66px;
  height: 50px;
  object-fit: cover;
  border-radius: 9px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.18);
  opacity: 0.72;
  transition: opacity 0.22s ease, border-color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}
@media (hover: hover) {
  .cv-gallery img:hover {
    opacity: 1;
    border-color: var(--accent-soft);
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(236, 90, 30, 0.35);
  }
}
.cv-gallery img.active {
  opacity: 1;
  border-color: var(--accent);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 16px rgba(236, 90, 30, 0.5);
}

.cv-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(125% 95% at 32% 42%, transparent 28%, rgba(5, 4, 2, 0.45) 72%, rgba(5, 4, 2, 0.92) 100%),
    linear-gradient(180deg, rgba(5, 4, 2, 0.55), transparent 22%);
}

.cv-close {
  position: absolute;
  top: calc(20px + env(safe-area-inset-top));
  left: calc(20px + env(safe-area-inset-left));
  z-index: 3;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  padding: 10px 18px;
  border-radius: 30px;
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateX(-12px);
  transition: background 0.22s ease, border-color 0.22s ease,
              opacity 0.45s 0.25s ease, transform 0.45s 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.cityview.open .cv-close { opacity: 1; transform: translateX(0); }
@media (hover: hover) {
  .cv-close:hover { background: var(--accent); border-color: var(--accent); }
}

.cv-info {
  position: absolute;
  left: 0; bottom: 0;
  z-index: 3;
  max-width: 640px;
  padding: 6vw 5vw 5vh;
  touch-action: pan-y;
  overscroll-behavior: contain;
  transform: translateY(24px);
  opacity: 0;
  transition: transform 0.55s 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.55s 0.3s ease;
}
.cityview.open .cv-info {
  transform: translateY(0);
  opacity: 1;
}
.cv-region { font-size: 0.78rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--accent); }
.cv-name {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.95;
  margin-top: 0.3rem;
  text-shadow: 0 6px 34px rgba(0, 0, 0, 0.7);
}
.cv-coord { margin-top: 0.5rem; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 0.85rem; }
.cv-desc { margin-top: 1rem; max-width: 540px; line-height: 1.6; color: #ece4da; font-size: 1.05rem; }
.cv-high { list-style: none; display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.3rem; }
.cv-high li {
  font-size: 0.82rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(236, 90, 30, 0.5);
  border-radius: 24px;
  color: #fff;
  background: rgba(236, 90, 30, 0.14);
}
.cv-best { margin-top: 1.4rem; font-size: 1.05rem; font-weight: 600; }
.cv-best span {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.outro { justify-content: center; text-align: center; }
.outro-inner h2 { font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 800; text-transform: uppercase; }
.outro-inner p { margin-top: 1rem; color: var(--muted); font-size: 1.15rem; }

.dots {
  position: fixed;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.dots button {
  position: relative;
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
}
.dots button::after {
  content: "";
  position: absolute;
  inset: -10px;
}
.dots button.active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 14px rgba(236, 90, 30, 0.7);
  animation: dot-pulse 2.4s ease-in-out infinite;
}
@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(236, 90, 30, 0.5); }
  50%      { box-shadow: 0 0 22px rgba(236, 90, 30, 1), 0 0 40px rgba(236, 90, 30, 0.3); }
}

@media (max-width: 760px) {
  .dest {
    justify-content: center;
    align-items: flex-end;
    padding: 6vw 6vw calc(10vh + env(safe-area-inset-bottom));
  }
  .dots { right: calc(12px + env(safe-area-inset-right)); gap: 16px; }
  .card {
    width: min(440px, 94vw);
    backdrop-filter: blur(12px) saturate(130%);
    -webkit-backdrop-filter: blur(12px) saturate(130%);
  }
  .card .photo { height: 150px; }

  .cv-info {
    max-width: 100%;
    max-height: 66dvh;
    overflow-y: auto;
    padding: 5vw 5vw calc(4vh + env(safe-area-inset-bottom));
  }
  .cv-photo { width: 150px; height: 94px; }
  .cv-gallery img { width: 54px; height: 40px; }
  .cv-name { font-size: clamp(2rem, 9vw, 3.2rem); }
  .cv-desc { font-size: 0.98rem; max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
