/* =========================================================
   luminescence.dev — bioluminescent vault
   neubrutalism × luxurious tone, cold navy-metallic palette
   No rounded corners. No gradients except masked phosphor halos.
   ========================================================= */

:root {
  --abyss:    #0A1628; /* page substrate */
  --plinth:   #1E3A5F; /* concrete face */
  --slate:    #3A5577; /* welded seams */
  --chrome:   #9DA8B5; /* polished metal */
  --chrome2:  #8FA3B5; /* mono accent */
  --platinum: #C0C8D0; /* highlights */
  --light:    #E8F0F4; /* off-white */
  --phosphor: #5BE9D8; /* the only glow */

  --grid: 8px;

  --display:  'Bebas Neue', Impact, sans-serif;
  --body:     'Inter', system-ui, sans-serif;
  --mono:     'JetBrains Mono', ui-monospace, monospace;

  --ease-vault: cubic-bezier(0.22, 0.61, 0.36, 1);

  --shadow-hard: 4px 4px 0 0 #000;
  --border-block: 2px solid #06101e;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--abyss);
  color: var(--light);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.55;
  overflow-x: hidden;
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'><polyline points='11,1 11,8' fill='none' stroke='%235BE9D8' stroke-width='1.4'/><polyline points='11,14 11,21' fill='none' stroke='%235BE9D8' stroke-width='1.4'/><polyline points='1,11 8,11' fill='none' stroke='%235BE9D8' stroke-width='1.4'/><polyline points='14,11 21,11' fill='none' stroke='%235BE9D8' stroke-width='1.4'/></svg>") 11 11, default;
}

/* faint chrome grid hairlines (every 8 units) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(to right, rgba(157,168,181,0.05) 1px, transparent 1px);
  background-size: var(--grid) 100%;
  z-index: 1;
}

/* brushed-platinum noise overlay (very subtle) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/><feColorMatrix values='0 0 0 0 0.75   0 0 0 0 0.78   0 0 0 0 0.82   0 0 0 0.04 0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
  opacity: 0.5;
  mix-blend-mode: screen;
  z-index: 1;
}

/* ───────── LAYOUT FRAMING ───────── */
.section {
  position: relative;
  padding: 96px 96px 96px 120px;
  z-index: 2;
}

/* ───────── DEPTH GAUGE (left) ───────── */
.depth-gauge {
  position: fixed;
  top: 0;
  left: 0;
  width: 88px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  border-right: 2px solid #06101e;
  background: linear-gradient(to right, var(--abyss), var(--abyss) 70%, transparent);
  z-index: 50;
}
.dg-frame {
  width: 56px;
  height: calc(100vh - 160px);
}
.dg-track {
  fill: none;
  stroke: var(--chrome);
  stroke-width: 1.5;
  stroke-opacity: 0.5;
}
.dg-fluid {
  fill: var(--phosphor);
  fill-opacity: 0.85;
}
.dg-ticks line { stroke: var(--chrome); stroke-width: 1; stroke-opacity: 0.6; }
.dg-ticks text { fill: var(--chrome2); font-family: var(--mono); font-size: 7px; letter-spacing: 0.12em; }

.dg-readout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--chrome);
}
.dg-label { color: var(--chrome2); }
.dg-value {
  color: var(--phosphor);
  font-size: 13px;
  letter-spacing: 0.16em;
}

/* ───────── NAV RAIL (right) ───────── */
.nav-rail {
  position: fixed;
  top: 50%;
  right: 24px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 50;
}
.nav-brick {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 10px 14px;
  background: var(--plinth);
  border: 2px solid #06101e;
  box-shadow: var(--shadow-hard);
  text-decoration: none;
  color: var(--platinum);
  min-width: 96px;
  transition: transform 220ms var(--ease-vault), background 220ms var(--ease-vault);
}
.nav-brick .nb-num {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--chrome2);
}
.nav-brick .nb-name {
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: 0.1em;
  color: var(--platinum);
}
.nav-brick:hover {
  transform: translate(-2px, -2px);
  background: var(--slate);
}
.nav-brick.is-active {
  background: var(--abyss);
  border-color: var(--phosphor);
  box-shadow: 4px 4px 0 0 var(--phosphor), inset 0 0 0 1px var(--phosphor);
}
.nav-brick.is-active .nb-name { color: var(--phosphor); }
.nav-brick.is-active .nb-num  { color: var(--phosphor); }

/* ───────── HERO ───────── */
.section--hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--abyss);
  border-bottom: 2px solid #06101e;
}
.hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--chrome2);
  border-top: 1px solid var(--slate);
  border-bottom: 1px solid var(--slate);
  padding: 10px 0;
  margin-bottom: 64px;
}

.hero-stack {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
}
.hero-bracket {
  flex: 0 0 auto;
}
.hero-bracket svg {
  width: 28px;
  height: 220px;
  fill: none;
  stroke: var(--chrome);
  stroke-width: 2;
}

.hero-mark {
  position: relative;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(96px, 16vw, 220px);
  line-height: 0.85;
  letter-spacing: 0.08em;
  color: var(--light);
  flex: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-shadow: 0 0 0 transparent;
}
/* waterline glyph clipping the wordmark */
.hero-mark .waterline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22%;
  width: 100%;
  height: 14px;
  pointer-events: none;
}
.hero-mark .waterline path {
  fill: none;
  stroke: var(--phosphor);
  stroke-width: 2;
  stroke-opacity: 0.85;
  filter: drop-shadow(0 0 4px rgba(91,233,216,0.55));
}
/* "submerged" portion below waterline tinted phosphor */
.hero-mark::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  font: inherit;
  letter-spacing: inherit;
  text-align: center;
  color: var(--phosphor);
  opacity: 0.85;
  clip-path: polygon(0 78%, 100% 78%, 100% 100%, 0 100%);
}

.hero-sub {
  margin-top: 48px;
  text-align: center;
  font-size: 16px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--platinum);
}

.hero-foot {
  margin-top: 96px;
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--chrome2);
}
.hf-block {
  border: 1px solid var(--slate);
  padding: 8px 14px;
  background: rgba(30,58,95,0.35);
}
.hero-stamp {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--chrome);
}
.hero-stamp .dot {
  width: 4px; height: 4px;
  background: var(--phosphor);
  display: inline-block;
}

/* ───────── SECTION HEADERS ───────── */
.section-head {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 24px;
  margin-bottom: 56px;
  border-top: 2px solid var(--slate);
  border-bottom: 1px solid var(--slate);
  padding: 14px 0;
}
.sh-num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--phosphor);
  padding: 4px 10px;
  border: 1px solid var(--phosphor);
}
.sh-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(40px, 5vw, 72px);
  letter-spacing: 0.1em;
  color: var(--light);
  text-transform: uppercase;
}
.sh-rule {
  height: 2px;
  background: var(--slate);
  position: relative;
}
.sh-rule::after {
  content: "";
  position: absolute;
  right: 0;
  top: -4px;
  width: 0; height: 0;
  border-style: solid;
  border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent var(--chrome);
}
.sh-coord {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--chrome);
}

/* ───────── MASONRY ───────── */
.masonry {
  column-count: 3;
  column-gap: 24px;
  column-fill: balance;
}
.masonry--ledger { column-count: 3; column-gap: 20px; }

@media (max-width: 1100px) {
  .masonry, .masonry--ledger { column-count: 2; }
}
@media (max-width: 760px) {
  .masonry, .masonry--ledger { column-count: 1; }
}

/* ───────── BRICKS ───────── */
.brick {
  position: relative;
  display: block;
  break-inside: avoid;
  margin: 0 0 24px 0;
  padding: 22px 22px 24px;
  background: var(--plinth);
  border: var(--border-block);
  box-shadow: var(--shadow-hard);
  color: var(--light);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 480ms var(--ease-vault), transform 480ms var(--ease-vault);
  overflow: hidden;
}
.brick.surfaced {
  opacity: 1;
  transform: translateY(0);
}

.brick--small  { min-height: 160px; }
.brick--medium { min-height: 280px; }
.brick--tall   { min-height: 480px; }

/* Each fourth brick gets the wedge-cutout treatment */
.brick[data-wedge] { background: var(--abyss); border-color: #06101e; }
.brick[data-wedge]::before {
  content: "";
  position: absolute;
  width: 0; height: 0;
  border-style: solid;
  background: var(--platinum);
}
.brick[data-wedge="tl"]::before {
  top: 0; left: 0;
  border-width: 60px 60px 0 0;
  border-color: var(--platinum) transparent transparent transparent;
  clip-path: polygon(0 0, 100% 0, 0 100%);
  width: 60px; height: 60px;
  border: 0;
}
.brick[data-wedge="tr"]::before {
  top: 0; right: 0;
  width: 60px; height: 60px;
  border: 0;
  background: var(--platinum);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}
.brick[data-wedge="bl"]::before {
  bottom: 0; left: 0;
  width: 60px; height: 60px;
  border: 0;
  background: var(--platinum);
  clip-path: polygon(0 0, 0 100%, 100% 100%);
}
.brick[data-wedge="br"]::before {
  bottom: 0; right: 0;
  width: 60px; height: 60px;
  border: 0;
  background: var(--platinum);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

/* ───────── BRICK PLACARD ───────── */
.brick-placard {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--abyss);
  border: 1px solid var(--chrome);
  margin-bottom: 18px;
  position: relative;
  z-index: 2;
}
.brick-placard.mini { grid-template-columns: 1fr; padding: 6px 10px; }
.pl-cat {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--chrome2);
}
.pl-name {
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: 0.12em;
  color: var(--light);
  text-align: center;
}
.pl-depth {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--phosphor);
}

/* ───────── BRICK ART (specimens) ───────── */
.brick-art {
  margin: 12px -10px 18px;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 2;
}
.brick-art svg {
  width: 100%;
  max-width: 280px;
  height: auto;
}
.halo-host .halo {
  opacity: 0.55;
  transform-origin: center;
  animation: phosphor-breathe 6000ms var(--ease-vault) infinite;
}
.brick.surfaced .halo-host .halo { animation-play-state: running; }

@keyframes phosphor-breathe {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 0.8; }
}

.hex-frame {
  fill: none;
  stroke: var(--chrome);
  stroke-width: 1.4;
  stroke-opacity: 0.85;
}

/* specimen line styling (shared) */
.lantern, .sigil, .vial, .caliper, .beacon {
  fill: none;
  stroke: var(--platinum);
  stroke-width: 1.3;
  stroke-linejoin: miter;
  stroke-linecap: square;
}
.lantern path, .lantern rect { fill: var(--slate); fill-opacity: 0.4; }
.lantern .coil { stroke: var(--chrome); stroke-width: 1; }
.phosphor-vial {
  fill: var(--phosphor);
  fill-opacity: 0.45;
  stroke: var(--phosphor);
  stroke-width: 1;
}
.sigil polygon { fill: var(--slate); fill-opacity: 0.45; stroke: var(--platinum); }
.sigil .sigil-core { fill: var(--phosphor); stroke: var(--phosphor); }
.vial polygon { fill: var(--slate); fill-opacity: 0.4; }
.vial-fluid { fill: var(--phosphor); fill-opacity: 0.55; stroke: var(--phosphor); }
.caliper polyline, .caliper polygon { stroke: var(--platinum); }
.gem { fill: var(--phosphor); fill-opacity: 0.7; stroke: var(--phosphor); }
.beacon polygon { fill: var(--slate); fill-opacity: 0.55; stroke: var(--platinum); }
.beacon-tip { fill: var(--phosphor) !important; fill-opacity: 0.65 !important; }

/* ───────── BRICK BODY TEXT ───────── */
.brick-body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--platinum);
  position: relative;
  z-index: 2;
}
.brick-body.small { font-size: 13px; }
.brick-quote {
  font-size: 18px;
  line-height: 1.45;
  color: var(--light);
  font-weight: 400;
  font-family: var(--body);
  margin: 12px 0;
}
.brick-attr {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--chrome2);
  margin-top: 8px;
}
.brick-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--phosphor);
  border: 1px solid var(--phosphor);
  padding: 4px 10px;
  margin-bottom: 10px;
}
.brick-coord {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--chrome);
  padding: 2px 0;
}
.brick-bar {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--slate);
  margin: 10px 0;
}
.brick-stamp {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--phosphor);
  margin-top: 14px;
}
.brick-depthmark {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 8px;
}
.brick-depthmark.small .dm-num { font-size: 56px; }
.dm-num {
  font-family: var(--display);
  font-size: 86px;
  line-height: 0.9;
  letter-spacing: 0.04em;
  color: var(--light);
}
.dm-unit {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--chrome2);
}

/* ───────── LEDGER BRICKS ───────── */
.brick--ledger {
  min-height: 200px;
  padding: 18px 20px 22px;
}
.brick--ledger .lg-cat {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--chrome2);
  border-bottom: 1px solid var(--chrome2);
  padding-bottom: 4px;
  margin-bottom: 8px;
}
.brick--ledger .lg-name {
  font-family: var(--display);
  font-weight: 400;
  font-size: 32px;
  letter-spacing: 0.1em;
  color: var(--light);
  margin-bottom: 6px;
}
.brick--ledger .lg-depth {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--phosphor);
  margin-bottom: 12px;
}
.brick--ledger .lg-body {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--platinum);
}

/* ───────── DEPTH CROSS-SECTION ───────── */
.section--cross {
  background: linear-gradient(to bottom, var(--abyss) 0%, #06101e 100%);
  border-top: 2px solid #06101e;
  border-bottom: 2px solid #06101e;
}
.cross-stage {
  border: 2px solid #06101e;
  background: var(--plinth);
  box-shadow: var(--shadow-hard);
  overflow: hidden;
}
.cross-svg {
  display: block;
  width: 100%;
  height: 360px;
}
.cross-svg .zone { fill: var(--plinth); }
.cross-svg .z1 { fill: var(--slate); }
.cross-svg .z2 { fill: #2a456a; }
.cross-svg .z3 { fill: var(--plinth); }
.cross-svg .z4 { fill: var(--abyss); }
.cross-svg .rule { stroke: var(--chrome); stroke-width: 1; stroke-opacity: 0.45; }
.cross-svg .cross-labels text {
  fill: var(--platinum);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
}
.cross-svg .marker {
  fill: var(--phosphor);
}
.cross-svg .chevrons polyline {
  fill: none;
  stroke: var(--chrome);
  stroke-width: 1.5;
}
.cross-svg .vticks line {
  stroke: var(--chrome);
  stroke-width: 1;
  stroke-opacity: 0.6;
}
.cross-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--chrome);
}

/* ───────── ENDPLATE ───────── */
.section--endplate {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--abyss);
  border-top: 2px solid #06101e;
}
.endplate-frame {
  width: 100%;
  max-width: 1100px;
  background: var(--plinth);
  border: var(--border-block);
  box-shadow: var(--shadow-hard);
  padding: 36px;
  position: relative;
}
.endplate-frame::before,
.endplate-frame::after {
  content: "";
  position: absolute;
  width: 60px; height: 60px;
  background: var(--platinum);
}
.endplate-frame::before {
  top: 0; left: 0;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}
.endplate-frame::after {
  bottom: 0; right: 0;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.ep-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--chrome);
  padding: 12px 0;
  border-top: 1px solid var(--slate);
  border-bottom: 1px solid var(--slate);
}
.ep-bar {
  flex: 1;
  height: 1px;
  background: var(--slate);
  margin: 0 18px;
}
.ep-stamp {
  text-align: center;
  padding: 56px 0;
}
.eps-line {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--chrome2);
}
.eps-mark {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(80px, 12vw, 160px);
  letter-spacing: 0.1em;
  color: var(--phosphor);
  line-height: 1;
  margin: 12px 0;
  text-shadow: 0 0 24px rgba(91,233,216,0.35);
}
.eps-coord {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.24em;
  color: var(--platinum);
}

/* ───────── RESPONSIVE ───────── */
@media (max-width: 900px) {
  .section { padding: 72px 32px 72px 96px; }
  .nav-rail { display: none; }
  .hero-mark { font-size: clamp(72px, 18vw, 140px); }
  .hero-foot { flex-wrap: wrap; gap: 8px; }
  .ep-row { flex-wrap: wrap; gap: 8px; }
  .ep-bar { display: none; }
}
@media (max-width: 600px) {
  .section { padding: 56px 18px 56px 80px; }
  .depth-gauge { width: 64px; }
  .hero-meta { flex-direction: column; gap: 6px; }
  .hero-stack { gap: 8px; }
  .hero-bracket svg { height: 140px; width: 18px; }
  .section-head { grid-template-columns: 1fr; gap: 8px; }
  .sh-rule { display: none; }
}
