:root {
  --ink: #080e0c;
  --green: #101b16;
  --green-2: #1a2a22;
  --text: #d8d4c4;
  --muted: #9da29a;
  --gold: #c4a76a;
  --moon: #8495a0;
  --line: rgba(196, 167, 106, 0.22);
  --paper: rgba(216, 212, 196, 0.035);
  --max: 72rem;
}

* { box-sizing: border-box; }
html { color-scheme: dark; background: var(--ink); }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 14%, rgba(132, 149, 160, 0.07), transparent 28rem),
    linear-gradient(180deg, var(--green) 0%, var(--ink) 56%, #060a09 100%);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.65;
  letter-spacing: 0.015em;
  overflow-x: hidden;
}

a { color: inherit; }
a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 5px;
  border-radius: 2px;
}

.skip-link {
  position: fixed;
  top: .75rem;
  left: .75rem;
  z-index: 20;
  padding: .55rem .8rem;
  color: var(--ink);
  background: var(--gold);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.site-shell {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header,
main,
.site-footer {
  width: min(calc(100% - 2rem), var(--max));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid rgba(216, 212, 196, 0.08);
}

.brand {
  text-decoration: none;
  line-height: 1.05;
}
.brand strong {
  display: block;
  color: var(--text);
  font-size: .92rem;
  font-weight: 500;
  letter-spacing: .22em;
}
.brand span {
  display: block;
  margin-top: .35rem;
  color: var(--moon);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .64rem;
  letter-spacing: .28em;
  text-transform: uppercase;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  position: relative;
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .72rem;
  letter-spacing: .16em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 180ms ease;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -.42rem;
  height: 1px;
  background: var(--gold);
  transition: right 180ms ease;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--gold); }
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after { right: 0; }

main { flex: 1; }

.eyebrow {
  margin: 0 0 1rem;
  color: var(--gold);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .7rem;
  letter-spacing: .23em;
  text-transform: uppercase;
}

.page-title {
  margin: 0;
  font-size: clamp(2.25rem, 7vw, 5.7rem);
  font-weight: 400;
  line-height: .98;
  letter-spacing: .04em;
  text-wrap: balance;
}

.subtitle {
  margin: 1rem 0 0;
  color: var(--moon);
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  font-style: italic;
}

/* Path */
.path-main {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(78vh, 50rem);
  padding: 5rem 0 7rem;
}
.forest-art {
  position: absolute;
  z-index: -2;
  left: 50%;
  bottom: 0;
  width: min(100vw, 92rem);
  max-width: none;
  height: auto;
  opacity: .72;
  transform: translateX(-50%);
  pointer-events: none;
  user-select: none;
}
.path-main::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(40rem, 80vw);
  height: min(40rem, 80vw);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 167, 106, 0.09), rgba(196, 167, 106, 0.025) 34%, transparent 70%);
  filter: blur(2px);
  animation: lantern-breathe 9s ease-in-out infinite;
}
.hero {
  max-width: 54rem;
  text-align: center;
  animation: reveal 1.2s ease-out both;
}
.hero-mark {
  display: inline-block;
  margin-bottom: 1.35rem;
  color: var(--gold);
  font-size: 1rem;
  text-shadow: 0 0 18px rgba(196, 167, 106, .25);
}
.hero h1 {
  margin: 0;
  font-size: clamp(2.7rem, 9vw, 7rem);
  font-weight: 400;
  letter-spacing: .12em;
  line-height: .95;
  text-indent: .12em;
}
.hero-kicker {
  margin: .8rem 0 3rem;
  color: var(--moon);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .7rem;
  letter-spacing: .35em;
  text-transform: uppercase;
}
.hero-quote {
  max-width: 44rem;
  margin: 0 auto;
  font-size: clamp(1.2rem, 3vw, 1.85rem);
  line-height: 1.55;
  text-wrap: balance;
}
.hero-note {
  margin: 1rem 0 2.4rem;
  color: var(--muted);
  font-style: italic;
}
.enter-link {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  padding: .72rem 0 .62rem;
  border-bottom: 1px solid var(--gold);
  color: var(--gold);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .73rem;
  letter-spacing: .2em;
  text-decoration: none;
  text-transform: uppercase;
  transition: letter-spacing 180ms ease, text-shadow 180ms ease;
}
.enter-link::after { content: "→"; font-size: 1rem; }
.enter-link:hover {
  letter-spacing: .24em;
  text-shadow: 0 0 15px rgba(196, 167, 106, .28);
}

/* Inner pages */
.page-intro {
  padding: clamp(4rem, 9vw, 8rem) 0 3.5rem;
  border-bottom: 1px solid rgba(216, 212, 196, 0.09);
}
.page-intro-inner { max-width: 52rem; }

.archives {
  max-width: 58rem;
  padding: 3rem 0 6rem;
}
.archive-entry {
  border-top: 1px solid var(--line);
}
.archive-entry:last-child { border-bottom: 1px solid var(--line); }
.archive-entry summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: baseline;
  padding: 1.45rem .15rem;
  cursor: pointer;
  list-style: none;
}
.archive-entry summary::-webkit-details-marker { display: none; }
.archive-entry summary::after {
  content: "+";
  color: var(--gold);
  font-family: system-ui, sans-serif;
  font-size: 1.1rem;
  font-weight: 300;
}
.archive-entry[open] summary::after { content: "–"; }
.entry-title {
  display: block;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
}
.entry-teaser {
  display: block;
  margin-top: .4rem;
  color: var(--muted);
  font-size: .92rem;
  font-style: italic;
}
.entry-body {
  max-width: 45rem;
  padding: .15rem .15rem 1.7rem;
  color: #c9c6b8;
}
.entry-body p:first-child { margin-top: 0; }
.status {
  display: inline-flex;
  gap: .5rem;
  align-items: center;
  margin-top: .7rem;
  color: var(--moon);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .67rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.status::before {
  content: "";
  width: .35rem;
  height: .35rem;
  border: 1px solid currentColor;
  transform: rotate(45deg);
}
.status.sealed { color: var(--gold); }

/* Stars */
.stars-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(16rem, .6fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
  padding: 3.5rem 0 6rem;
}
.sky-frame {
  position: relative;
  min-height: 31rem;
  overflow: hidden;
  border: 1px solid rgba(132, 149, 160, .14);
  background:
    radial-gradient(circle at 64% 28%, rgba(132,149,160,.08), transparent 13rem),
    rgba(6, 10, 9, .48) url("assets/stars.svg") center / cover no-repeat;
}
.sky-frame::before,
.sky-frame::after {
  content: "";
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 12vw 4vh 0 rgba(216,212,196,.6), 28vw 18vh 0 rgba(216,212,196,.35), 45vw 7vh 0 rgba(216,212,196,.55), 17vw 37vh 0 rgba(216,212,196,.4), 38vw 44vh 0 rgba(216,212,196,.5);
  animation: twinkle 5.5s ease-in-out infinite alternate;
}
.sky-frame::before { left: 8%; top: 10%; }
.sky-frame::after { right: 18%; top: 22%; animation-delay: -2.4s; }
.constellation-map {
  width: 100%;
  height: 100%;
  min-height: 31rem;
  display: block;
}
.constellation-map .line {
  fill: none;
  stroke: rgba(132,149,160,.38);
  stroke-width: 1;
}
.constellation-map .star {
  fill: #d8d4c4;
  stroke: rgba(196,167,106,.35);
  stroke-width: 4;
  paint-order: stroke;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 180ms ease, fill 180ms ease;
}
.constellation-map g:hover .star { fill: var(--gold); transform: scale(1.35); }
.constellation-map text {
  fill: rgba(216,212,196,.72);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  font-style: italic;
  letter-spacing: .05em;
}
.star-notes h2 {
  margin: 0 0 1rem;
  color: var(--gold);
  font-size: .8rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.star-notes p { margin: 0 0 1.2rem; color: var(--muted); }
.star-list {
  margin: 1.8rem 0 0;
  padding: 0;
  list-style: none;
}
.star-list li {
  padding: .65rem 0;
  border-top: 1px solid rgba(216,212,196,.08);
  color: #c8c5b7;
}
.star-list li::before { content: "✦"; margin-right: .65rem; color: var(--moon); font-size: .7rem; }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: center;
  padding: 1.35rem 0 1.7rem;
  border-top: 1px solid rgba(216, 212, 196, 0.08);
  color: #767d77;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .65rem;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.footer-mark { color: var(--gold); opacity: .65; }

@keyframes reveal {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes lantern-breathe {
  0%, 100% { opacity: .72; transform: scale(.96); }
  50% { opacity: 1; transform: scale(1.04); }
}
@keyframes twinkle {
  from { opacity: .32; }
  to { opacity: .9; }
}

@media (max-width: 720px) {
  .site-header { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .site-nav { width: 100%; }
  .site-nav ul { justify-content: space-between; gap: .8rem; }
  .path-main { min-height: 70vh; padding-top: 4rem; }
  .hero-kicker { margin-bottom: 2.2rem; }
  .stars-layout { grid-template-columns: 1fr; }
  .sky-frame, .constellation-map { min-height: 25rem; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: .35rem; }
}

@media (max-width: 420px) {
  .site-header, main, .site-footer { width: min(calc(100% - 1.4rem), var(--max)); }
  .site-nav a { font-size: .66rem; letter-spacing: .11em; }
  .hero h1 { font-size: clamp(2.55rem, 16vw, 4rem); }
  .archive-entry summary { padding-block: 1.25rem; }
  .sky-frame, .constellation-map { min-height: 21rem; }
}

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