:root {
  --ink: #1a1423;
  --paper: #fff6e8;
  --sun: #ffd166;
  --coral: #ff6b6b;
  --berry: #c77dff;
  --sky: #4cc9f0;
  --leaf: #80ed99;
  --honey: #f4a261;
  --night: #22223b;
  --mute: #6b6478;
  --line: rgba(26, 20, 35, 0.12);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Archivo", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(76, 201, 240, 0.35), transparent 55%),
    radial-gradient(800px 480px at 100% 0%, rgba(199, 125, 255, 0.28), transparent 50%),
    radial-gradient(700px 420px at 50% 100%, rgba(255, 209, 102, 0.3), transparent 55%),
    linear-gradient(180deg, #ffe8c8 0%, var(--paper) 28%, #ffe0f0 70%, #e8f7ff 100%);
  line-height: 1.5;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; cursor: pointer; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, .brand, .intro-mark, .logo {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

/* INTRO */
.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background:
    radial-gradient(600px 400px at 50% 40%, #ffd166, transparent 60%),
    linear-gradient(160deg, #4cc9f0, #c77dff 50%, #ff6b6b);
  transition: opacity 500ms var(--ease), visibility 500ms;
}
.intro.is-gone {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.intro-inner { text-align: center; color: #fff; padding: 2rem; }
.intro-mark {
  margin: 0;
  font-size: clamp(2.4rem, 8vw, 4.5rem);
  letter-spacing: 0.12em;
  text-shadow: 0 8px 30px rgba(0,0,0,0.2);
}
.intro-tag {
  margin: 0.6rem 0 1.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.28em;
  font-weight: 600;
}
.intro-bar {
  width: min(280px, 70vw);
  height: 3px;
  margin: 0 auto 1.25rem;
  background: rgba(255,255,255,0.3);
  border-radius: 99px;
  overflow: hidden;
}
.intro-bar i {
  display: block;
  height: 100%;
  width: 0%;
  background: #fff;
  transition: width 80ms linear;
}
.intro-skip {
  background: transparent;
  border: 0;
  color: #fff;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0.85;
}
.intro-skip:hover { opacity: 1; }

/* TOP */
.top {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 3vw, 2rem);
  background: rgba(255, 246, 232, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
}
.logo-mark {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: linear-gradient(135deg, #ff6b6b, #ffd166 40%, #4cc9f0 70%, #80ed99);
  box-shadow: 0 0 0 2px #fff;
}
.nav { display: flex; gap: 1.1rem; font-size: 0.82rem; color: var(--mute); }
.nav em {
  font-style: normal;
  opacity: 0.55;
  margin-right: 0.25rem;
  font-size: 0.7rem;
}
.nav a:hover { color: var(--ink); }
@media (max-width: 900px) { .nav { display: none; } }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  border: 0;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  transition: transform 200ms var(--ease), background 200ms var(--ease), box-shadow 200ms var(--ease);
  box-shadow: 0 10px 28px rgba(26, 20, 35, 0.18);
}
.btn:hover { transform: translateY(-2px); background: #2b2240; }
.btn:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; }
.btn-sm { min-height: 40px; padding: 0.5rem 1rem; font-size: 0.8rem; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  box-shadow: none;
}
.btn-ghost:hover { background: rgba(26, 20, 35, 0.06); }
.btn-soon, .btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn-soon:hover, .btn:disabled:hover { transform: none; background: var(--ink); }

/* HERO */
.hero {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 1.5rem;
  align-items: center;
  min-height: 100svh;
  padding: clamp(5.5rem, 10vh, 7rem) clamp(1.1rem, 3vw, 2.5rem) 2rem;
}
.kicker {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c1121f;
}
.hero h1 {
  margin: 0;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  text-transform: uppercase;
}
.lede {
  margin: 1rem 0 0;
  max-width: 34ch;
  color: var(--mute);
  font-size: 1.05rem;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.5rem;
}
.hero-micro {
  margin: 1.4rem 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 600;
}

.hero-stage {
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
  border: 2px solid rgba(26, 20, 35, 0.1);
  box-shadow: 0 30px 80px rgba(199, 125, 255, 0.18), 0 12px 30px rgba(255, 107, 107, 0.12);
  background: #7ec8ff;
  min-height: 520px;
}
.map-wrap {
  position: relative;
  width: 100%;
  height: min(68vh, 640px);
  min-height: 480px;
  background: linear-gradient(180deg, #7ec8ff 0%, #ffe29a 70%, #8fd18a 100%);
}
#village-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
}
#village-canvas:active { cursor: grabbing; }
.hotspots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.hotspot {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: auto;
  will-change: transform;
  border: 0;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.42rem 0.7rem;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
  white-space: nowrap;
  transition: background 180ms var(--ease), color 180ms var(--ease), box-shadow 180ms var(--ease);
}
.hotspot:hover, .hotspot.is-active {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 12px 28px rgba(26, 20, 35, 0.28);
}
.hotspot.is-visited::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 6px;
  border-radius: 50%;
  background: #80ed99;
  vertical-align: middle;
}
.map-tools {
  position: absolute;
  right: 0.85rem;
  top: 0.85rem;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.tool {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 0;
  background: rgba(255, 246, 232, 0.92);
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}
.tool:hover { background: #fff; }
.map-hint {
  position: absolute;
  left: 0.85rem;
  bottom: 0.75rem;
  z-index: 3;
  margin: 0;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(26, 20, 35, 0.55);
  color: #fff;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  font-weight: 600;
  pointer-events: none;
}

.venue-card {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  width: min(280px, calc(100% - 1.7rem));
  padding: 1rem;
  border-radius: 1.1rem;
  background: rgba(255, 246, 232, 0.95);
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(0,0,0,0.18);
  backdrop-filter: blur(8px);
  z-index: 3;
}
.venue-card[hidden] { display: none; }
.venue-idx {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--mute);
}
.venue-card h2 { margin: 0.25rem 0 0; font-size: 1.45rem; }
.venue-type {
  margin: 0.15rem 0 0.55rem;
  color: #c1121f;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.venue-card p { margin: 0; color: var(--mute); font-size: 0.88rem; }
.venue-card img {
  margin: 0.75rem 0;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 0.85rem;
}

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-stage { min-height: 420px; }
  .map-wrap { height: 58vh; min-height: 380px; }
  .map-hint { display: none; }
}

/* STRIP */
.strip {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: linear-gradient(90deg, #ff6b6b, #ffd166, #80ed99, #4cc9f0, #c77dff);
  padding: 0.7rem 0;
}
.strip-track {
  display: flex;
  gap: 1.1rem;
  width: max-content;
  font-weight: 800;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: #fff;
  text-shadow: 0 1px 0 rgba(0,0,0,0.15);
  animation: marquee 28s linear infinite;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* SECTIONS */
.dens, .alphas, .path, .reside {
  padding: clamp(3.5rem, 9vh, 6rem) clamp(1.1rem, 3vw, 2.5rem);
  max-width: 1180px;
  margin: 0 auto;
}
.sec-head { max-width: 40rem; margin-bottom: 2rem; }
.sec-head h2 { margin: 0; font-size: clamp(1.9rem, 4vw, 3.1rem); }
.sub { margin: 0.75rem 0 0; color: var(--mute); }
.progress {
  margin: 1rem 0 0;
  display: inline-block;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 0.88rem;
}
.progress strong { color: #c1121f; }

.den-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.85rem;
}
.den-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.75rem;
  border-radius: 1.1rem;
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--line);
  text-align: left;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease), border-color 200ms var(--ease);
}
.den-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(26, 20, 35, 0.1);
}
.den-card.is-active, .den-card.is-visited {
  border-color: rgba(26, 20, 35, 0.35);
}
.den-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 0.75rem;
}
.den-card .idx {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--mute);
}
.den-card strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
}
.den-card span {
  color: var(--mute);
  font-size: 0.8rem;
}
@media (max-width: 1000px) { .den-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .den-grid { grid-template-columns: repeat(2, 1fr); } }

.alpha-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
}
.alpha-row img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 1rem;
  border: 3px solid #ffd166;
  box-shadow: 0 12px 30px rgba(244, 162, 97, 0.35);
}
@media (max-width: 700px) { .alpha-row { grid-template-columns: repeat(3, 1fr); } }

.path-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}
.path-steps li {
  padding: 1.2rem;
  border-radius: 1.1rem;
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--line);
}
.path-steps li.now {
  background: linear-gradient(160deg, #ffd166, #ff9f7a);
  border-color: transparent;
}
.path-steps span {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
  color: var(--mute);
}
.path-steps li.now span { color: var(--ink); }
.path-steps h3 { margin: 0 0 0.45rem; font-size: 1.15rem; }
.path-steps p { margin: 0; color: var(--mute); font-size: 0.9rem; }
.path-steps li.now p { color: rgba(26,20,35,0.75); }
@media (max-width: 860px) { .path-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .path-steps { grid-template-columns: 1fr; } }

.reside {
  text-align: center;
  max-width: 820px;
}
.reside .brand {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 3rem);
  background: linear-gradient(90deg, #ff6b6b, #c77dff, #4cc9f0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.reside h2 {
  margin: 0.5rem auto 0.9rem;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
}
.reside h2 em {
  font-style: italic;
  font-weight: 500;
  color: var(--mute);
}
.reside > p { margin: 0 auto; color: var(--mute); max-width: 40ch; }
.reside .cta-row { justify-content: center; }

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem clamp(1.1rem, 3vw, 2.5rem) 2.2rem;
  border-top: 1px solid var(--line);
  color: var(--mute);
  font-size: 0.88rem;
}
.foot strong {
  display: block;
  color: var(--ink);
  font-family: var(--font-display);
}
.foot-links { display: flex; gap: 1.2rem; align-items: center; }
.muted { opacity: 0.6; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .strip-track { animation: none; }
  .intro-bar i { transition: none; }
}
