/* NewVillager — newvillager.world
   Field: pure black. Bone: pure white. The cover art is strictly monochrome,
   so the one accent — Lantern (#D9A441) — is sampled from the archival warm
   light (Redwood Room / ring-light photographs), per the build prompt's
   "sample accent colors from the archival photographs" rule. */

@font-face {
  font-family: 'Fraunces';
  src: url('../assets/fonts/fraunces-var.woff2') format('woff2');
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('../assets/fonts/fraunces-italic-var.woff2') format('woff2');
  font-weight: 300 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../assets/fonts/inter-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --field: #000000;
  --bone: #ffffff;
  --accent: #d9a441; /* Lantern — placeholder until sampled from cover art */
  --dim: rgba(255, 255, 255, 0.55);
  --faint: rgba(255, 255, 255, 0.28);
  --display: 'Fraunces', 'Times New Roman', serif;
  --body: 'Inter', -apple-system, 'Helvetica Neue', sans-serif;
}

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

html { background: var(--field); }

body {
  background: var(--field);
  color: var(--bone);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--bone); }
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- header / footer ---------- */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 20px 24px 0;
  position: relative;
  z-index: 2;
}

/* practical hover hint, opposite the wordmark */
#hint {
  font-family: var(--display);
  font-style: italic;
  font-size: 0.82rem;
  color: var(--dim);
  text-align: right;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  min-height: 1.2em;
}
#hint.show { opacity: 1; }
#hint .nm {
  font-style: normal;
  letter-spacing: 0.26em;
  font-size: 0.66rem;
  color: var(--accent);
  margin-right: 0.9em;
}
#hint.idle .nm { color: var(--faint); margin-right: 0; }
.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-variation-settings: 'opsz' 144;
  letter-spacing: 0.22em;
  font-size: 0.95rem;
  text-decoration: none;
}

.site-footer {
  margin-top: auto;
  padding: 40px 24px 28px;
  text-align: center;
  font-size: 0.72rem;
  color: var(--faint);
  display: grid;
  gap: 10px;
}
.site-footer a { color: var(--dim); text-decoration: none; }
.site-footer a:hover { color: var(--bone); }
.site-footer .socials { display: flex; gap: 18px; justify-content: center; letter-spacing: 0.08em; }
.colophon { font-family: var(--display); font-style: italic; }

/* ---------- stage: wheel + viewport ---------- */

.stage {
  position: relative;
  z-index: 1;
  width: min(94vmin, 880px);
  margin: 8px auto 0;
}
#wheel { display: block; width: 100%; height: auto; }

/* spokes — the glow is the only indicator; no rings, no labels */
.spoke { cursor: pointer; }
.spoke .symbol { opacity: 0.7; transition: opacity 0.25s ease, filter 0.25s ease; }
.spoke .hit { fill: transparent; stroke: transparent; }
.spoke:hover .symbol { opacity: 1; }
.spoke:focus { outline: none; }
.spoke:focus-visible .symbol {
  opacity: 1;
  filter: drop-shadow(0 0 12px color-mix(in srgb, var(--accent) 85%, transparent));
}

/* active / sibling states */
.has-active .spoke .symbol { opacity: 0.4; }
.has-active .spoke:hover .symbol,
.has-active .spoke:focus .symbol { opacity: 0.85; }
.has-active .spoke.is-active .symbol {
  opacity: 1;
  filter: drop-shadow(0 0 14px color-mix(in srgb, var(--accent) 80%, transparent));
}

/* the assembling flourish — once, on load */
.assemble .spoke {
  opacity: 0;
  animation: spoke-in 0.7s ease forwards;
  animation-delay: calc(var(--i) * 0.15s);
}
@keyframes spoke-in { to { opacity: 1; } }

/* ---------- center viewport ---------- */

#viewport {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.rooms { flex: 1; position: relative; overflow: hidden; z-index: 1; }

/* the cover-art grammar: when a symbol is active, its shape reveals the
   stage's paired photograph — huge, filling the page behind everything */
#stagemask {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: center / cover no-repeat;
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
  opacity: 0;
  transition: opacity 0.45s ease;
  z-index: 0;
}
#stagemask.show { opacity: 0.22; }

/* subtle cycle arrows at the page edges — right advances counterclockwise */
.edge-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: transparent;
  border: none;
  color: var(--faint);
  font-family: var(--display);
  font-size: 2.2rem;
  line-height: 1;
  padding: 0.5em 0.4em;
  cursor: pointer;
  transition: color 0.2s ease;
}
.edge-nav:hover { color: var(--accent); }
.edge-prev { left: 6px; }
.edge-next { right: 6px; }

.room {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--faint) transparent;
  padding: 10% 13% 16%;
  text-align: center;
}
.js .room { display: none; }
.js .room.is-active { display: block; animation: room-in 0.2s ease; }
@keyframes room-in { from { opacity: 0; } to { opacity: 1; } }

/* room typography */
.room h2 {
  font-family: var(--display);
  font-variation-settings: 'opsz' 144;
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.7em;
}
.room p { font-size: 0.86rem; color: var(--dim); margin-bottom: 0.9em; }
.room p strong { color: var(--bone); font-weight: 600; }

/* word rooms (patient empty rooms) */
.room-word {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  gap: 1em;
}
.room-word .word {
  font-family: var(--display);
  font-variation-settings: 'opsz' 144;
  font-weight: 800;
  font-size: clamp(1.8rem, 7.5vmin, 3.6rem);
  letter-spacing: 0.06em;
}
.room-word[hidden] { display: none; }
.room-word .line {
  font-family: var(--display);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--dim);
}

/* hero (OverPass / Now) */
.hero { display: flex; flex-direction: column; justify-content: center; min-height: 100%; gap: 0.4em; }
.eyebrow {
  font-size: 0.62rem;
  letter-spacing: 0.42em;
  color: var(--dim);
  text-transform: uppercase;
}
.hero h1 {
  font-family: var(--display);
  font-variation-settings: 'opsz' 144;
  font-weight: 750;
  font-size: clamp(1.4rem, 4.6vmin, 2.4rem);
  line-height: 1.08;
}
.hero .date {
  font-family: var(--display);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--bone);
}
.cta {
  display: inline-block;
  margin: 0.45em auto 0;
  padding: 0.6em 1.8em;
  border: 1px solid var(--bone);
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-decoration: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}
.cta:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 40%, transparent);
}

/* signal form */
.signal { margin-top: 0.9em; max-width: 74%; margin-left: auto; margin-right: auto; }
.signal h2 {
  font-family: var(--display);
  font-size: 0.98rem;
  font-style: italic;
  font-weight: 600;
  margin-bottom: 0.15em;
}
.signal .sub { font-size: 0.68rem; color: var(--faint); margin-bottom: 0.6em; }
.signal-row { display: flex; gap: 8px; justify-content: center; }
.signal input[type='email'] {
  background: transparent;
  border: 1px solid var(--faint);
  border-radius: 999px;
  color: var(--bone);
  font-family: var(--body);
  font-size: 0.76rem;
  padding: 0.5em 1em;
  width: 55%;
  min-width: 0;
}
.signal input::placeholder { color: var(--faint); }
.signal button {
  background: transparent;
  border: 1px solid var(--bone);
  border-radius: 999px;
  color: var(--bone);
  font-family: var(--body);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.5em 1.05em;
  cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.signal button:hover { border-color: var(--accent); color: var(--accent); }
.signal .note { font-size: 0.68rem; color: var(--accent); margin-top: 0.7em; display: none; }

/* EP cover */
.cover {
  display: block;
  width: min(58%, 260px);
  height: auto;
  margin: 0.4em auto 1em;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* tracklist */
.tracklist {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.4em;
  margin: 0.2em 0 1.1em;
}
.tracklist li {
  list-style: none;
  font-family: var(--display);
  font-size: 0.92rem;
  color: var(--bone);
}
.tracklist li::marker { content: ''; }
.tracklist .n {
  font-family: var(--body);
  font-size: 0.66rem;
  color: var(--faint);
  letter-spacing: 0.1em;
  margin-right: 0.9em;
}
.tracklist .vn { font-style: italic; color: var(--dim); }

/* streaming / discography lists */
.linklist { list-style: none; display: grid; gap: 0.45em; margin-bottom: 1.2em; }
.linklist a { font-size: 0.85rem; text-decoration: none; letter-spacing: 0.12em; text-transform: uppercase; color: var(--bone); }
.linklist a:hover { color: var(--accent); }
.disco { list-style: none; display: grid; gap: 0.8em; text-align: center; }
.disco li { font-size: 0.82rem; color: var(--dim); }
.disco .title { font-family: var(--display); font-style: italic; color: var(--bone); font-size: 0.95rem; }
.disco a { color: var(--dim); }
.disco a:hover { color: var(--accent); }

/* video facades */
.film { margin-bottom: 1.4em; }
.film-title { font-family: var(--display); font-style: italic; font-size: 0.95rem; margin-bottom: 0.4em; }
.facade {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--faint);
  background: #0a0a0a center / cover no-repeat;
  cursor: pointer;
  padding: 0;
}
.facade::after {
  content: '▶';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 2rem;
  color: var(--bone);
  background: rgba(0, 0, 0, 0.35);
  transition: color 0.25s ease;
}
.facade:hover::after { color: var(--accent); }
.film iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; }
.film .note { font-size: 0.72rem; color: var(--faint); margin-top: 0.5em; }

/* tour list */
.tour-year {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.18em;
  margin: 1.1em 0 0.4em;
}
.tour-rows { list-style: none; display: grid; gap: 0.32em; }
.tour-rows li { font-size: 0.74rem; color: var(--dim); line-height: 1.4; }
.tour-rows .d { color: var(--bone); font-weight: 600; letter-spacing: 0.06em; }
.tour-rows .w { color: var(--faint); font-style: italic; }
.tour-end { margin-top: 1.4em; font-family: var(--display); font-style: italic; color: var(--bone); }

/* photo gallery */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; height: auto; display: block; cursor: zoom-in; }
dialog.lightbox {
  background: transparent;
  border: none;
  margin: auto;
  padding: 0;
  max-width: 96vw;
  max-height: 96vh;
  display: none;
  align-items: center;
  gap: 10px;
  outline: none;
}
dialog.lightbox[open] { display: flex; }
dialog.lightbox::backdrop { background: rgba(0, 0, 0, 0.88); }
dialog.lightbox figure { margin: 0; text-align: center; }
dialog.lightbox img {
  max-width: min(84vw, 1100px);
  max-height: 84vh;
  display: block;
  margin: 0 auto;
  cursor: zoom-out;
}
dialog.lightbox figcaption {
  font-family: var(--display);
  font-style: italic;
  font-size: 0.8rem;
  color: var(--dim);
  padding-top: 0.7em;
}
.lb-nav {
  background: transparent;
  border: none;
  color: var(--dim);
  font-family: var(--display);
  font-size: 2.6rem;
  line-height: 1;
  padding: 0.4em 0.35em;
  cursor: pointer;
  flex: none;
  transition: color 0.2s ease;
}
.lb-nav:hover { color: var(--accent); }

/* placeholder marking — visible but dignified */
.ph { color: var(--faint); border-bottom: 1px dashed var(--faint); }

/* ---------- no-js fallback: rooms stack vertically ---------- */
html:not(.js) #viewport { position: static; transform: none; width: auto; aspect-ratio: auto; border-radius: 0; }
html:not(.js) .rooms { overflow: visible; }
html:not(.js) .room { position: static; padding: 40px 24px; max-width: 640px; margin: 0 auto; }
html:not(.js) .room-word { height: auto; padding: 30px 0; }

/* ---------- mobile (and short desktop windows, where the circle gets too small) ---------- */
@media (max-width: 719px), (max-height: 599px) {
  .stage { width: 100%; }
  #wheel { width: min(88vw, 420px); margin: 0 auto; }
  .edge-nav { display: none; }
  #viewport {
    position: static;
    transform: none;
    width: min(94vw, 560px);
    margin: 10px auto 0;
    aspect-ratio: auto;
    border-radius: 0;
    min-height: 52vh;
  }
  .room { position: absolute; inset: 0; padding: 14px 22px 30px; }
  html:not(.js) .room { position: static; }
  .hero h1 { font-size: clamp(1.8rem, 9vw, 2.6rem); }
  .signal input[type='email'] { width: 62%; }
  #hint { display: none; }
  #stagemask.show { opacity: 0.14; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .assemble .spoke { animation: none; opacity: 1; }
  .js .room.is-active { animation: none; }
  * { transition: none !important; }
}
