:root {
  --background: #020100;
  --text: #f5f1e8;
  --muted: #b8b1a4;
  --gold: #d6ad56;
  --gold-light: #ffe5a0;
  --gold-bright: #fff3c4;
  --border: rgba(214, 173, 86, .36);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 47%, rgba(137, 87, 18, .13), transparent 29rem),
    linear-gradient(180deg, #030200 0%, #000 100%);
  font-family: Georgia, "Times New Roman", serif;
}

.page {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(1rem, 2vw, 2rem);
  isolation: isolate;
  overflow: hidden;
}

.page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  opacity: .35;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(255,255,255,.32) 0 1px, transparent 1.5px),
    radial-gradient(circle at 72% 18%, rgba(255,255,255,.22) 0 1px, transparent 1.5px),
    radial-gradient(circle at 85% 72%, rgba(255,255,255,.18) 0 1px, transparent 1.5px),
    radial-gradient(circle at 27% 78%, rgba(255,255,255,.16) 0 1px, transparent 1.5px);
  background-size: 19rem 17rem, 23rem 21rem, 29rem 25rem, 31rem 27rem;
}

.ambient-glow {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: -2;
  width: min(78vw, 58rem);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(214,173,86,.09) 0, rgba(126,75,10,.05) 30%, transparent 68%);
  animation: ambientPulse 8s ease-in-out infinite;
}

.brand {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(72vw, 34rem);
  text-align: center;
  transform: translate(-50%, -50%);
}

.brand-kicker {
  margin: 0 0 .15rem;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(.68rem, 1.1vw, .84rem);
  letter-spacing: .34em;
  text-transform: uppercase;
}

.lamp-stage {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: clamp(12.5rem, 27vw, 20rem);
  aspect-ratio: 1;
  isolation: isolate;
}

.lamp-halo {
  position: absolute;
  inset: 11%;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}

.halo-one {
  background: radial-gradient(circle, rgba(255,225,150,.24) 0, rgba(214,173,86,.12) 34%, transparent 69%);
  filter: blur(10px);
  animation: haloPulse 4.8s ease-in-out infinite;
}

.halo-two {
  inset: 3%;
  background: radial-gradient(circle, transparent 38%, rgba(214,173,86,.06) 52%, transparent 72%);
  filter: blur(16px);
  animation: haloPulse 7s ease-in-out infinite reverse;
}

.lamp-button {
  display: inline-grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--gold);
  background: transparent;
  cursor: pointer;
  filter:
    drop-shadow(0 0 .8rem rgba(214,173,86,.30))
    drop-shadow(0 0 2.4rem rgba(150,89,9,.12));
  transition: color .5s ease, filter .5s ease, transform .5s ease;
  animation: lampBreath 5.4s ease-in-out infinite;
}

.lamp-button:hover,
.lamp-button:focus-visible,
.lamp-stage.is-awake .lamp-button {
  color: var(--gold-light);
  filter:
    drop-shadow(0 0 1rem rgba(255,225,150,.70))
    drop-shadow(0 0 3.3rem rgba(214,173,86,.42))
    drop-shadow(0 0 5.5rem rgba(138,79,5,.24));
  transform: scale(1.045);
  outline: none;
}

.lamp-stage.is-awake .halo-one { transform: scale(1.18); opacity: 1; }
.lamp-stage.is-awake .halo-two { transform: scale(1.10); opacity: .95; }

.lamp-button svg { width: 84%; height: auto; overflow: visible; }
.lamp-flame {
  transform-origin: center bottom;
  animation: flame 2.7s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(255,225,150,.9));
}

.lamp-spark {
  position: absolute;
  width: .22rem;
  height: .22rem;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 .75rem .18rem rgba(255,224,145,.68);
  opacity: 0;
  pointer-events: none;
}
.spark-one { left: 28%; top: 31%; animation: spark 5.6s 1.1s infinite; }
.spark-two { right: 26%; top: 40%; animation: spark 6.8s 2.8s infinite; }
.spark-three { left: 42%; top: 18%; animation: spark 7.6s 4.2s infinite; }

.main-title {
  margin: -1.2rem 0 0;
  color: var(--text);
  font-size: clamp(1.3rem, 3vw, 2.7rem);
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-shadow: 0 0 1.4rem rgba(214,173,86,.28);
}
.main-subtitle { margin: .45rem 0 0; color: var(--muted); font-size: clamp(.8rem, 1.3vw, .98rem); font-style: italic; }
.lamp-note { margin: .7rem 0 0; color: rgba(255,229,160,.58); font-family: Arial, Helvetica, sans-serif; font-size: .65rem; letter-spacing: .13em; text-transform: uppercase; }

.nav-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: .72rem;
  width: clamp(12.5rem, 18vw, 16.5rem);
  min-height: 4.5rem;
  padding: .72rem .85rem;
  border: 1px solid var(--border);
  border-radius: .85rem;
  color: var(--text);
  background: linear-gradient(135deg, rgba(25,23,19,.84), rgba(6,6,6,.66));
  box-shadow: 0 .7rem 2.3rem rgba(0,0,0,.34);
  text-decoration: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease, background .28s ease;
}
.nav-card:hover,
.nav-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(255,222,146,.72);
  box-shadow: 0 .8rem 2.7rem rgba(0,0,0,.5), 0 0 1.6rem rgba(214,173,86,.12);
  outline: none;
}
.nav-card.is-active { border-color: rgba(214,173,86,.52); }
.nav-card.is-active:hover { background: linear-gradient(135deg, rgba(42,34,20,.9), rgba(8,7,5,.74)); }

.nav-icon {
  display: grid;
  place-items: center;
  flex: 0 0 2.8rem;
  width: 2.8rem;
  height: 2.8rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--gold-light);
  background: rgba(214,173,86,.065);
}
.nav-icon svg { width: 1.55rem; height: 1.55rem; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.nav-copy { min-width: 0; }
.nav-title { display: block; font-family: Arial, Helvetica, sans-serif; font-size: clamp(.72rem, 1.05vw, .9rem); font-weight: 700; letter-spacing: .08em; line-height: 1.2; text-transform: uppercase; }
.nav-status { display: block; max-height: 0; overflow: hidden; color: var(--gold-light); font-family: Arial, Helvetica, sans-serif; font-size: .7rem; letter-spacing: .07em; line-height: 1.35; opacity: 0; transform: translateY(-.25rem); transition: max-height .25s ease, opacity .25s ease, transform .25s ease, margin .25s ease; }
.nav-card:hover .nav-status,
.nav-card:focus-visible .nav-status,
.nav-card.status-visible .nav-status { max-height: 2rem; margin-top: .25rem; opacity: 1; transform: translateY(0); }

.journal { top: 3%; left: 3%; }
.community { top: 3%; right: 3%; }
.zodiak { top: 27%; left: 3%; }
.library { top: 27%; right: 3%; }
.quiet-light { bottom: 27%; left: 3%; }
.laboratory { bottom: 27%; right: 3%; }
.silence { bottom: 3%; left: 3%; }
.markingegno { bottom: 3%; right: 3%; }

.lamp-status {
  max-height: 0;
  margin: 0;
  overflow: hidden;
  color: var(--gold-light);
  font-family: Arial, Helvetica, sans-serif;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(-.4rem);
  transition: max-height .28s ease, opacity .28s ease, transform .28s ease, margin .28s ease;
}
.lamp-button:hover ~ .lamp-status,
.lamp-button:focus-visible ~ .lamp-status,
.lamp-status.status-visible { max-height: 2rem; margin-top: .3rem; opacity: 1; transform: translateY(0); }

.screen-reader-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.version-mark { position: fixed; left: 50%; bottom: .45rem; transform: translateX(-50%); color: rgba(214,173,86,.38); font: 600 .58rem/1 Arial, Helvetica, sans-serif; letter-spacing: .18em; text-transform: uppercase; pointer-events: none; }

@keyframes flame { 0%,100% { transform: scaleY(.92) rotate(-1.2deg); opacity: .82; } 45% { transform: scaleY(1.08) rotate(1deg); opacity: 1; } 70% { transform: scaleY(.98) rotate(-.4deg); } }
@keyframes lampBreath { 0%,100% { filter: drop-shadow(0 0 .8rem rgba(214,173,86,.26)) drop-shadow(0 0 2.2rem rgba(150,89,9,.10)); } 50% { filter: drop-shadow(0 0 1.15rem rgba(255,218,126,.42)) drop-shadow(0 0 3rem rgba(150,89,9,.19)); } }
@keyframes haloPulse { 0%,100% { transform: scale(.94); opacity: .55; } 50% { transform: scale(1.08); opacity: .92; } }
@keyframes ambientPulse { 0%,100% { opacity: .55; transform: translate(-50%,-50%) scale(.96); } 50% { opacity: 1; transform: translate(-50%,-50%) scale(1.04); } }
@keyframes spark { 0%,74%,100% { opacity: 0; transform: translateY(.45rem) scale(.6); } 78% { opacity: .9; } 86% { opacity: .28; transform: translateY(-.55rem) scale(1.05); } 92% { opacity: 0; transform: translateY(-1rem) scale(.55); } }

@media (max-width: 920px) {
  body { overflow-y: auto; }
  .page { display: flex; min-height: 100svh; flex-direction: column; gap: .75rem; padding: 1rem; overflow: visible; }
  .brand { position: relative; top: auto; left: auto; order: 4; width: 100%; margin: .4rem 0; padding: .5rem 0; transform: none; }
  .lamp-stage { width: min(68vw, 18rem); }
  .nav-card { position: relative; inset: auto; width: 100%; min-height: 4.1rem; }
  .journal { order: 0; } .community { order: 1; } .zodiak { order: 2; } .library { order: 3; }
  .quiet-light { order: 5; } .laboratory { order: 6; } .silence { order: 7; } .markingegno { order: 8; }
  .nav-status { max-height: 2rem; margin-top: .22rem; opacity: .76; transform: none; }
}

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