:root {
  --archive-ink: #f4efe4;
  --archive-muted: #aeb9bd;
  --archive-gold: #e8b85d;
  --archive-teal: #77d3c4;
  --archive-line: rgba(232, 184, 93, 0.3);
}

.glyphs-page {
  overflow-x: hidden;
  color: var(--archive-ink);
  background:
    linear-gradient(rgba(119, 211, 196, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(119, 211, 196, 0.035) 1px, transparent 1px),
    linear-gradient(145deg, #05070b, #0e141c 58%, #17130d);
  background-size: 42px 42px, 42px 42px, auto;
  font-family: "Manrope", sans-serif;
}

.glyph-site-header,
.glyph-footer {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.glyph-site-header {
  min-height: 76px;
  border-bottom: 1px solid rgba(232, 184, 93, 0.2);
}

.glyph-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--archive-ink);
  font: 600 0.74rem/1 "Cinzel", serif;
  text-decoration: none;
  text-transform: uppercase;
}

.glyph-brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--archive-line);
  color: var(--archive-gold);
}

.glyph-site-nav { display: flex; gap: 24px; }
.glyph-site-nav a {
  color: var(--archive-muted);
  font-size: 0.72rem;
  text-decoration: none;
  text-transform: uppercase;
}
.glyph-site-nav a:hover,
.glyph-site-nav a:focus-visible { color: var(--archive-gold); }

.glyph-page-shell {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(56px, 9vw, 112px) 0 72px;
}

.archive-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  align-items: end;
  gap: 40px;
  margin-bottom: 42px;
}
.archive-eyebrow {
  grid-column: 1 / -1;
  margin: 0 0 -22px;
  color: var(--archive-teal);
  font-size: 0.7rem;
  text-transform: uppercase;
}
.archive-heading h1 {
  margin: 0;
  font: 500 clamp(3.2rem, 8vw, 7.2rem)/0.9 "Cinzel", serif;
}
.archive-intro {
  max-width: 44ch;
  margin: 0;
  color: var(--archive-muted);
  font-size: clamp(1rem, 1.6vw, 1.16rem);
  line-height: 1.7;
}

#archive {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 690px;
  border: 1px solid var(--archive-line);
  background: #080b0f;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.48);
}
.archive-weather,
.archive-weather > div { position: absolute; inset: 0; pointer-events: none; }
.archive-weather > div { opacity: 0; transition: opacity 900ms ease; }
#weather-fog { background: radial-gradient(circle at 42% 35%, rgba(202, 219, 226, 0.28), transparent 30%), linear-gradient(110deg, transparent, rgba(196, 218, 224, 0.16), transparent); filter: blur(12px); }
#weather-shimmer { background: radial-gradient(circle at 55% 45%, rgba(255, 236, 174, 0.35), transparent 30%), radial-gradient(circle at 74% 28%, rgba(119, 211, 196, 0.22), transparent 20%); }
#weather-storm { background: linear-gradient(118deg, transparent 48%, rgba(255,255,255,.18) 49%, transparent 50%), radial-gradient(circle at 50% 55%, rgba(126, 45, 45, 0.32), transparent 45%); }
#weather-soil { background: radial-gradient(circle at 30% 76%, rgba(197, 146, 81, 0.28), transparent 25%), linear-gradient(180deg, transparent 30%, rgba(92, 61, 32, 0.35)); }
#archive[data-weather="fog"] #weather-fog,
#archive[data-weather="expand"] #weather-shimmer,
#archive[data-weather="collapse"] #weather-storm,
#archive[data-weather="soil"] #weather-soil { opacity: 1; }

#cave {
  position: relative;
  height: 430px;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 44%, #303138 0, #111319 25%, #050608 64%, #000 100%);
}
.cave-wall,
.cave-roof,
.cave-aperture { position: absolute; transition: 800ms cubic-bezier(.2,.8,.2,1); }
.cave-wall { top: -10%; width: 35%; height: 125%; background: linear-gradient(90deg, #020303, #1b1c1e 70%, transparent); }
.cave-wall-left { left: -3%; clip-path: polygon(0 0, 88% 8%, 100% 100%, 0 100%); }
.cave-wall-right { right: -3%; transform: scaleX(-1); clip-path: polygon(0 0, 88% 8%, 100% 100%, 0 100%); }
.cave-roof { inset: -18% 15% auto; height: 52%; border-radius: 50%; background: #030405; }
.cave-aperture { left: 50%; top: 45%; width: 18%; aspect-ratio: 1; border: 1px solid rgba(232, 184, 93, 0.3); border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 70px rgba(232, 184, 93, 0.16), inset 0 0 34px rgba(119, 211, 196, 0.12); }
.archive-sigil { position: absolute; left: 50%; top: 45%; color: rgba(232, 184, 93, 0.78); font-size: 2.8rem; transform: translate(-50%, -50%); text-shadow: 0 0 24px rgba(232, 184, 93, 0.5); }
#archive[data-weather="collapse"] .cave-aperture { width: 11%; border-color: rgba(224, 111, 91, 0.5); }
#archive[data-weather="expand"] .cave-aperture { width: 26%; box-shadow: 0 0 100px rgba(232, 184, 93, 0.34); }
#archive[data-weather="fog"] .archive-sigil { filter: blur(3px); }
#archive[data-weather="soil"] .cave-aperture { transform: translate(-50%, -38%) scaleY(0.72); }

#paths {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--archive-line);
  border-bottom: 1px solid var(--archive-line);
}
.path {
  min-height: 92px;
  padding: 18px 22px;
  border: 0;
  border-right: 1px solid var(--archive-line);
  border-radius: 0;
  color: var(--archive-ink);
  background: rgba(12, 17, 22, 0.94);
  font: 500 clamp(0.8rem, 1.4vw, 1rem)/1 "Cinzel", serif;
  text-align: left;
  cursor: pointer;
}
.path:last-child { border-right: 0; }
.path span { display: block; margin-bottom: 11px; color: var(--archive-teal); font: 500 0.62rem/1 "Manrope", sans-serif; }
.path:hover,
.path:focus-visible,
.path[aria-pressed="true"] { color: #120e07; background: var(--archive-gold); outline: 0; }
.path:hover span,
.path[aria-pressed="true"] span { color: #294740; }

.archive-reading { position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 20px; padding: 24px 28px; }
.archive-status,
.archive-trail { margin: 0; color: var(--archive-muted); font-size: 0.8rem; line-height: 1.5; }
.archive-trail { flex: 0 0 auto; color: var(--archive-teal); text-transform: uppercase; }
#chamber { position: relative; z-index: 2; padding: 0 28px 30px; }
.archive-chamber { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .6fr); gap: 26px; padding: 28px; border-left: 2px solid var(--archive-gold); background: rgba(21, 28, 34, 0.9); animation: chamberReveal 500ms ease both; }
.archive-chamber h2 { margin: 0 0 12px; color: var(--archive-gold); font: 500 clamp(1.5rem, 3vw, 2.4rem)/1.1 "Cinzel", serif; }
.archive-chamber p { margin: 0; color: var(--archive-muted); line-height: 1.65; }
.chamber-glyphs { display: grid; gap: 8px; align-content: start; }
.chamber-glyph { padding: 10px 12px; border: 1px solid rgba(119, 211, 196, 0.25); color: var(--archive-ink); font-size: 0.76rem; }
.glyph-footer { min-height: 100px; border-top: 1px solid rgba(232, 184, 93, 0.2); color: var(--archive-muted); font-size: 0.7rem; text-transform: uppercase; }

@keyframes chamberReveal { from { opacity: 0; transform: translateY(12px); } }

@media (max-width: 720px) {
  .glyph-site-header,
  .glyph-footer,
  .glyph-page-shell { width: min(100% - 32px, 1180px); }
  .glyph-site-header { align-items: flex-start; flex-direction: column; justify-content: center; padding: 16px 0; }
  .glyph-site-nav { width: 100%; justify-content: space-between; }
  .archive-heading { grid-template-columns: 1fr; gap: 20px; }
  .archive-eyebrow { margin-bottom: 0; }
  .archive-heading h1 { font-size: clamp(2.7rem, 15vw, 4.2rem); }
  #archive { min-height: 0; }
  #cave { height: 330px; }
  #paths { grid-template-columns: repeat(2, 1fr); }
  .path { min-height: 76px; }
  .path:nth-child(2) { border-right: 0; }
  .path:nth-child(-n+2) { border-bottom: 1px solid var(--archive-line); }
  .archive-reading { align-items: flex-start; flex-direction: column; padding: 20px; }
  #chamber { padding: 0 20px 20px; }
  .archive-chamber { grid-template-columns: 1fr; padding: 22px; }
  .glyph-footer { align-items: flex-start; flex-direction: column; justify-content: center; }
}

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