@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,600;0,700;1,700&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --abyss: #040d22;
  --deep: #071a36;
  --glass: #0b2445;
  --glass-high: #102c51;
  --pearl: #eefcff;
  --mist: #a6c9d2;
  --dim: #678b9d;
  --phosphor: #32f1df;
  --ultraviolet: #8568ff;
  --coral: #ff5f9e;
  --amber: #ffc869;
  --border-soft: rgba(166, 201, 210, .16);
  --border-bright: rgba(50, 241, 223, .48);
  --glow: 0 0 28px rgba(50, 241, 223, .16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--pearl);
  background: var(--abyss);
  font-family: "Manrope", system-ui, sans-serif;
  line-height: 1.55;
}
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; }

.topbar {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 0 clamp(20px, 5vw, 76px);
  border-bottom: 1px solid var(--border-soft);
  background: rgba(4,13,34,.92);
  backdrop-filter: blur(16px);
  position: relative;
  z-index: 20;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .13em;
}
.brand strong { color: var(--phosphor); }
.brand-orbit {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-bright);
  border-radius: 50%;
  position: relative;
}
.brand-orbit::before, .brand-orbit::after {
  content: "";
  position: absolute;
  width: 17px;
  height: 7px;
  border: 2px solid var(--phosphor);
  border-left: 0;
  border-right: 0;
  border-radius: 50%;
}
.brand-orbit::after { transform: rotate(90deg); }
.brand-orbit i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 10px var(--amber);
}
nav { display: flex; gap: 30px; }
nav a, footer a {
  text-decoration: none;
  color: var(--mist);
  font-size: 12px;
  font-weight: 600;
}
nav a:hover, footer a:hover { color: var(--phosphor); }
.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--phosphor);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-decoration: none;
}

.hero {
  min-height: 760px;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-image {
  position: absolute;
  inset: 0;
  background: url("../assets/images/lumen-cavern.png") center / cover no-repeat;
  transform: scale(1.01);
}
.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3,10,28,.98) 0%, rgba(3,10,28,.8) 34%, rgba(3,10,28,.18) 68%, rgba(3,10,28,.05)),
    linear-gradient(0deg, var(--abyss) 0%, transparent 18%);
}
.hero-copy {
  position: relative;
  z-index: 2;
  width: min(640px, 48%);
  margin-left: clamp(26px, 8vw, 126px);
}
.kicker {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 18px;
  color: var(--phosphor);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.kicker span {
  width: 34px;
  height: 1px;
  background: var(--phosphor);
  box-shadow: 0 0 8px var(--phosphor);
}
h1, h2, h3 {
  font-family: "Barlow Condensed", Impact, sans-serif;
  line-height: .9;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  font-size: clamp(74px, 9vw, 142px);
  letter-spacing: -.045em;
}
h1 em { color: transparent; -webkit-text-stroke: 1px var(--phosphor); font-style: italic; }
.hero-copy > p:not(.kicker) {
  max-width: 510px;
  margin: 30px 0;
  color: var(--mist);
  font-size: 17px;
}
.primary-button {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 0 25px;
  border: 1px solid var(--border-bright);
  background: rgba(11,36,69,.78);
  color: var(--pearl);
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--glow), inset 0 0 18px rgba(50,241,223,.05);
  transition: background .2s, transform .2s;
}
.primary-button:hover { transform: translateY(-2px); background: rgba(50,241,223,.12); }
.primary-button:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.depth-markers {
  position: absolute;
  right: clamp(18px, 4vw, 60px);
  top: 130px;
  bottom: 120px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  color: rgba(238,252,255,.55);
  font-size: 8px;
  letter-spacing: .14em;
}
.depth-markers i { width: 42px; flex: 1; border-right: 1px solid rgba(238,252,255,.18); }
.hero-whisper {
  position: absolute;
  z-index: 2;
  right: clamp(70px, 10vw, 150px);
  bottom: 42px;
  margin: 0;
  color: rgba(238,252,255,.52);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.expedition-section {
  padding: 110px clamp(16px, 6vw, 96px);
  background:
    radial-gradient(circle at 80% 30%, rgba(133,104,255,.08), transparent 30%),
    var(--abyss);
}
.section-heading {
  max-width: 1220px;
  margin: 0 auto 48px;
  display: grid;
  grid-template-columns: 1fr .7fr;
  align-items: end;
  gap: 90px;
}
.section-heading h2, .notes-intro h2, .legend-copy h2 {
  margin: 0;
  font-size: clamp(54px, 6vw, 92px);
  letter-spacing: -.025em;
}
.section-heading > p { margin: 0; color: var(--mist); }
.game-console {
  max-width: 1220px;
  margin: auto;
  border: 1px solid var(--border-soft);
  background: rgba(7,26,54,.86);
  box-shadow: 0 0 60px rgba(50,241,223,.08);
}
.console-strip {
  min-height: 82px;
  display: grid;
  grid-template-columns: .7fr 1.5fr .8fr .8fr .8fr;
  border-bottom: 1px solid var(--border-soft);
}
.instrument {
  padding: 16px 20px;
  border-right: 1px solid var(--border-soft);
}
.instrument:last-child { border-right: 0; }
.instrument small, .status-readout small, .pulse-button small {
  display: block;
  color: var(--dim);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .18em;
}
.instrument strong {
  display: block;
  margin-top: 3px;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 25px;
  letter-spacing: .04em;
}
.mini-track {
  height: 3px;
  margin-top: 7px;
  overflow: hidden;
  background: rgba(166,201,210,.12);
}
.mini-track i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--phosphor);
  box-shadow: 0 0 10px var(--phosphor);
  transition: width .25s;
}
.cavern-frame {
  position: relative;
  aspect-ratio: 12 / 7;
  overflow: hidden;
  background: #020716;
}
#gameCanvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}
.scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .15;
  background: repeating-linear-gradient(0deg, transparent 0 4px, rgba(166,201,210,.08) 5px);
}
.canvas-tip {
  position: absolute;
  left: 18px;
  bottom: 14px;
  color: rgba(166,201,210,.5);
  font-size: 8px;
  letter-spacing: .16em;
  pointer-events: none;
}
.game-overlay {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: none;
  place-items: center;
  align-content: center;
  padding: 30px;
  text-align: center;
  background: rgba(3,12,31,.82);
  backdrop-filter: blur(6px);
}
.game-overlay.open { display: grid; }
.overlay-sigil {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  border: 1px solid var(--border-bright);
  border-radius: 50%;
  color: var(--phosphor);
  font-size: 28px;
  box-shadow: var(--glow);
}
.game-overlay .kicker { justify-content: center; }
.game-overlay h3 { margin: 0; font-size: clamp(38px, 5vw, 64px); }
.game-overlay > p:not(.kicker) { max-width: 520px; margin: 18px auto 24px; color: var(--mist); }
.game-overlay .primary-button { margin: auto; }
.console-controls {
  min-height: 88px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 28px;
  padding: 14px 18px 14px 24px;
  border-top: 1px solid var(--border-soft);
}
.status-readout { display: flex; align-items: center; gap: 13px; }
.status-readout > i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--phosphor);
  box-shadow: 0 0 12px var(--phosphor);
}
.status-readout strong { display: block; font-size: 12px; }
.key-hints { display: flex; gap: 18px; color: var(--dim); font-size: 8px; letter-spacing: .1em; }
.key-hints b {
  display: inline-block;
  margin-left: 4px;
  padding: 3px 5px;
  border: 1px solid var(--border-soft);
  color: var(--mist);
}
.pulse-button {
  min-width: 148px;
  min-height: 58px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  overflow: hidden;
  border: 1px solid rgba(255,95,158,.55);
  background: rgba(255,95,158,.08);
  color: var(--pearl);
  cursor: pointer;
}
.pulse-icon { color: var(--coral); font-size: 26px; text-shadow: 0 0 10px var(--coral); }
.pulse-button i {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: var(--coral);
  box-shadow: 0 0 10px var(--coral);
}
.pulse-button:disabled { opacity: .38; cursor: not-allowed; }

.field-notes {
  display: grid;
  grid-template-columns: .75fr 1.25fr;
  gap: 110px;
  padding: 120px clamp(24px, 8vw, 130px);
  color: var(--abyss);
  background: #d9f3ef;
}
.field-notes .kicker { color: #147b75; }
.field-notes .kicker span { background: #147b75; box-shadow: none; }
.notes-intro > p:last-child { color: #42696c; }
.note-list { margin: 0; padding: 0; list-style: none; }
.note-list li {
  display: grid;
  grid-template-columns: 48px 1fr 36px;
  gap: 18px;
  align-items: start;
  padding: 28px 0;
  border-top: 1px solid rgba(4,13,34,.18);
}
.note-list li:last-child { border-bottom: 1px solid rgba(4,13,34,.18); }
.note-list > li > span { color: #147b75; font-family: "Barlow Condensed", sans-serif; font-weight: 700; }
.note-list h3 { margin: 0 0 8px; font-size: 25px; }
.note-list p { margin: 0; color: #42696c; }
.note-list b { color: #147b75; font-size: 24px; font-weight: 400; }

.legend-section {
  min-height: 690px;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 80px clamp(24px, 8vw, 130px);
  background:
    radial-gradient(ellipse at 25% 50%, rgba(50,241,223,.12), transparent 22%),
    linear-gradient(110deg, #020817, #071b37);
}
.bass-echo {
  position: relative;
  font-family: "Barlow Condensed", sans-serif;
  line-height: .65;
  text-transform: uppercase;
  transform: skewX(-8deg);
}
.bass-echo span, .bass-echo strong {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1px rgba(50,241,223,.15);
  font-size: clamp(150px, 23vw, 350px);
}
.bass-echo strong { margin-left: 10%; -webkit-text-stroke-color: rgba(255,95,158,.13); }
.bass-echo::after {
  content: "";
  position: absolute;
  width: 70%;
  height: 34%;
  top: 30%;
  left: 8%;
  border-radius: 50% 60% 55% 50%;
  background: radial-gradient(circle at 18% 38%, var(--amber) 0 3px, transparent 5px), rgba(2,8,23,.82);
  box-shadow: 0 0 40px rgba(50,241,223,.1);
}
.legend-copy { position: relative; z-index: 2; }
.legend-copy > p:not(.kicker) { color: var(--mist); font-size: 16px; }
.legend-copy > a {
  display: inline-flex;
  gap: 18px;
  margin-top: 18px;
  color: var(--phosphor);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .1em;
}

footer {
  min-height: 132px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px clamp(20px, 5vw, 76px);
  border-top: 1px solid var(--border-soft);
  background: #020817;
}
footer p { color: var(--dim); font-size: 10px; }
footer > div { display: flex; gap: 22px; }
.toast {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 24px;
  padding: 11px 18px;
  border: 1px solid var(--border-bright);
  background: rgba(7,26,54,.96);
  color: var(--pearl);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  box-shadow: var(--glow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 20px);
  transition: .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.legal-main {
  min-height: calc(100vh - 202px);
  padding: 90px 24px;
  background: radial-gradient(circle at 80% 20%, rgba(133,104,255,.1), transparent 25%), var(--abyss);
}
.legal-copy { max-width: 760px; margin: auto; }
.legal-copy h1 { margin: 0 0 30px; font-size: clamp(68px, 10vw, 118px); }
.legal-copy h2 { margin-top: 38px; font-size: 30px; }
.legal-copy p, .legal-copy li { color: var(--mist); }
.back-link { display: inline-block; margin-bottom: 36px; color: var(--phosphor); font-size: 12px; font-weight: 700; text-decoration: none; }

@media (max-width: 900px) {
  nav { display: none; }
  .hero-copy { width: 68%; }
  .section-heading, .field-notes { grid-template-columns: 1fr; gap: 42px; }
  .legend-section { grid-template-columns: 1fr; }
  .bass-echo { opacity: .55; position: absolute; inset: 25% 0 auto -5%; }
  .legend-copy { max-width: 560px; margin-left: auto; }
}

@media (max-width: 640px) {
  .topbar { height: 64px; padding: 0 16px; }
  .brand { font-size: 11px; letter-spacing: .08em; }
  .brand-orbit { width: 30px; height: 30px; }
  .header-cta { display: none; }
  .hero { min-height: 720px; align-items: flex-end; padding-bottom: 80px; }
  .hero-image { background-position: 67% center; }
  .hero-shade { background: linear-gradient(0deg, rgba(3,10,28,.98) 0%, rgba(3,10,28,.86) 45%, rgba(3,10,28,.08) 100%); }
  .hero-copy { width: auto; margin: 0 24px; }
  .hero-copy > p:not(.kicker) { font-size: 15px; }
  h1 { font-size: 76px; }
  .depth-markers, .hero-whisper { display: none; }
  .expedition-section { padding: 76px 12px; }
  .section-heading { padding: 0 12px; }
  .section-heading h2, .notes-intro h2, .legend-copy h2 { font-size: 56px; }
  .console-strip { grid-template-columns: repeat(4, 1fr); }
  .instrument { padding: 12px 8px; }
  .instrument strong { font-size: 20px; }
  .school-instrument { grid-column: span 2; order: 5; border-top: 1px solid var(--border-soft); }
  .cavern-frame { aspect-ratio: 7 / 8; }
  .console-controls { grid-template-columns: 1fr auto; gap: 10px; padding: 12px; }
  .key-hints { display: none; }
  .pulse-button { min-width: 112px; padding: 6px 10px; }
  .game-overlay { padding: 20px; }
  .game-overlay h3 { font-size: 42px; }
  .game-overlay > p:not(.kicker) { font-size: 13px; }
  .field-notes { padding: 78px 24px; }
  .note-list li { grid-template-columns: 34px 1fr; }
  .note-list b { display: none; }
  .legend-section { min-height: 630px; padding: 70px 24px; }
  footer { flex-direction: column; text-align: center; }
}

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