:root {
  /* Design typography token: Roboto Slab** from Google Fonts */
  --lagoon: #07121F;
  --orchid: #FF4FD8;
  --plum: #3A145C;
  --cyan: #19F7FF;
  --mint: #7CFFB2;
  --amber: #FFD166;
  --pearl: #F4FFE8;
  --display: "Roboto Slab", Georgia, serif;
  --editorial: "Bitter", Georgia, serif;
  --micro: "Arvo", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--lagoon);
  color: var(--pearl);
  font-family: var(--editorial);
}

.lagoon-field {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 82%, rgba(124, 255, 178, .18), transparent 28%),
    radial-gradient(circle at 82% 14%, rgba(255, 79, 216, .22), transparent 34%),
    linear-gradient(135deg, #07121F 0%, #101330 45%, #3A145C 100%);
  z-index: -5;
}

.hex-map {
  position: absolute;
  inset: -20%;
  opacity: .28;
  background-image:
    linear-gradient(30deg, rgba(25, 247, 255, .42) 12%, transparent 12.5%, transparent 87%, rgba(25, 247, 255, .42) 87.5%, rgba(25, 247, 255, .42)),
    linear-gradient(150deg, rgba(25, 247, 255, .42) 12%, transparent 12.5%, transparent 87%, rgba(25, 247, 255, .42) 87.5%, rgba(25, 247, 255, .42)),
    linear-gradient(30deg, rgba(255, 79, 216, .26) 12%, transparent 12.5%, transparent 87%, rgba(255, 79, 216, .26) 87.5%, rgba(255, 79, 216, .26)),
    linear-gradient(150deg, rgba(255, 79, 216, .26) 12%, transparent 12.5%, transparent 87%, rgba(255, 79, 216, .26) 87.5%, rgba(255, 79, 216, .26));
  background-size: 112px 196px;
  background-position: 0 0, 0 0, 56px 98px, 56px 98px;
  transform: rotate(-13deg) scale(1.1);
  animation: mapWake 9s ease-in-out infinite alternate;
}

.reef-glow { position: absolute; width: 45vw; height: 45vw; border-radius: 50%; filter: blur(60px); opacity: .32; }
.reef-glow-a { left: -12vw; bottom: -10vw; background: var(--cyan); }
.reef-glow-b { right: -14vw; top: -12vw; background: var(--orchid); }
.pollen { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 20px var(--mint), 11vw 17vh 0 var(--amber), 28vw -8vh 0 var(--cyan), -14vw 25vh 0 var(--orchid), 42vw 45vh 0 var(--mint); opacity: .75; animation: drift 12s linear infinite; }
.pollen-a { left: 18%; top: 20%; }
.pollen-b { left: 68%; top: 56%; animation-duration: 16s; }
.pollen-c { left: 44%; top: 82%; animation-duration: 20s; }

.pip-nav { position: fixed; right: 24px; top: 50%; transform: translateY(-50%); z-index: 20; display: grid; gap: 14px; }
.pip { width: 46px; height: 40px; border: 1px solid rgba(25,247,255,.45); background: rgba(7,18,31,.68); color: var(--pearl); clip-path: polygon(25% 0,75% 0,100% 50%,75% 100%,25% 100%,0 50%); cursor: pointer; font-family: var(--micro); font-size: 10px; letter-spacing: .12em; transition: .35s ease; }
.pip.active, .pip:hover { background: rgba(255,79,216,.22); border-color: var(--orchid); box-shadow: 0 0 22px rgba(255,79,216,.55); color: var(--mint); }

.ceremony { position: relative; }
.chamber { min-height: 100vh; position: relative; padding: clamp(32px, 6vw, 82px); display: grid; align-items: center; overflow: hidden; border-bottom: 1px solid rgba(244,255,232,.08); }
.chamber-mark, .registry-code, .hex-cell span, .layer-tab, .wall-stamp span { font-family: var(--micro); letter-spacing: .18em; text-transform: uppercase; }
.chamber-mark { position: absolute; left: clamp(24px, 5vw, 70px); top: 24px; color: var(--cyan); font-size: 11px; opacity: .85; }
.chamber::before { content: attr(data-chamber); position: absolute; right: 9vw; top: 6vh; font-family: var(--display); font-size: clamp(70px, 13vw, 190px); color: transparent; -webkit-text-stroke: 1px rgba(244,255,232,.12); text-shadow: 0 0 30px rgba(25,247,255,.16); }

.honeycomb { position: relative; width: min(58vw, 790px); height: min(62vw, 720px); }
.hex-cell { position: absolute; display: grid; place-items: center; text-align: center; padding: 26px; clip-path: polygon(25% 4%,75% 4%,100% 50%,75% 96%,25% 96%,0 50%); background: linear-gradient(145deg, rgba(58,20,92,.72), rgba(7,18,31,.76)); border: 1px solid rgba(25,247,255,.55); box-shadow: inset 0 0 32px rgba(25,247,255,.16), 0 0 28px rgba(25,247,255,.14); transition: transform .55s ease, filter .55s ease, box-shadow .55s ease; }
.hex-cell::after { content: ""; position: absolute; inset: 10px; clip-path: inherit; border: 1px solid rgba(244,255,232,.13); }
.hex-cell:hover { transform: translateY(-8px) rotate(2deg); box-shadow: inset 0 0 34px rgba(255,79,216,.22), 0 0 34px rgba(255,79,216,.28); }
.hex-cell span { color: var(--cyan); font-size: 10px; align-self: end; }
.hex-cell strong { font-family: var(--display); font-size: clamp(14px, 1.4vw, 22px); text-shadow: 1px 2px 0 rgba(7,18,31,.75), 0 0 16px rgba(244,255,232,.12); }
.small { width: 150px; height: 132px; }
.medium { width: 210px; height: 184px; }
.large { width: min(48vw, 520px); height: min(42vw, 455px); }
.micro { width: 84px; height: 74px; padding: 0; color: var(--amber); }
.dominant { width: min(42vw, 520px); height: min(42vw, 520px); }

.chamber-awakens { grid-template-columns: minmax(350px, 1fr) minmax(320px, .82fr); gap: 4vw; }
.vault-comb { transform: rotate(-7deg); }
.badge-cell { left: 20%; top: 13%; background: radial-gradient(circle, rgba(255,209,102,.25), rgba(58,20,92,.68) 45%, rgba(7,18,31,.82)); }
.cell-origin { left: 3%; top: 2%; }
.cell-signal { right: 2%; top: 2%; }
.cell-seal { right: 3%; bottom: 18%; }
.cell-punch { left: 15%; bottom: 8%; }
.decree { max-width: 760px; z-index: 2; transform: translateY(4vh); }
.registry-code { color: var(--amber); font-size: 12px; margin: 0 0 18px; }
h1, h2 { font-family: var(--display); margin: 0; line-height: .92; letter-spacing: -.055em; text-shadow: 2px 3px 0 rgba(7,18,31,.9), 0 0 28px rgba(25,247,255,.18); }
h1 { font-size: clamp(54px, 8.8vw, 138px); }
h2 { font-size: clamp(38px, 5.4vw, 88px); }
p { font-size: clamp(16px, 1.45vw, 22px); line-height: 1.55; color: rgba(244,255,232,.84); }

.living-badge { position: relative; width: 66%; aspect-ratio: 1; display: grid; place-items: center; animation: badgeAssemble 5s ease-in-out infinite alternate; }
.shell { position: absolute; inset: 0; clip-path: polygon(25% 3%,75% 3%,100% 50%,75% 97%,25% 97%,0 50%); }
.shell-back { background: linear-gradient(135deg, rgba(25,247,255,.34), rgba(255,79,216,.24)); box-shadow: 0 0 55px rgba(25,247,255,.42); transform: rotate(12deg); }
.shell-mid { inset: 12%; background: linear-gradient(145deg, rgba(244,255,232,.23), rgba(124,255,178,.32)); transform: rotate(-10deg); }
.shell-front { inset: 23%; background: radial-gradient(circle, var(--amber), rgba(255,79,216,.45) 55%, rgba(7,18,31,.7)); box-shadow: inset 0 0 30px rgba(244,255,232,.38); }
.id-glyph { position: relative; z-index: 2; font-family: var(--display); font-size: clamp(42px, 7vw, 86px); color: var(--pearl); text-shadow: 0 0 22px var(--cyan); }
.fern-vein { position: absolute; z-index: 3; width: 58%; height: 2px; background: var(--mint); transform: rotate(-38deg); box-shadow: 0 0 14px var(--mint); }
.fern-vein::before, .fern-vein::after { content: ""; position: absolute; width: 40%; height: 2px; background: inherit; top: -12px; left: 32%; transform: rotate(42deg); box-shadow: inherit; }
.fern-vein::after { top: 12px; transform: rotate(-42deg); }
.badge-orbit, .badge-orbit span { position: absolute; inset: -18%; }
.fish, .tetra, .angel, .butterfly, .final-fish { display: block; width: 38px; height: 17px; background: var(--cyan); clip-path: polygon(0 50%,25% 12%,72% 15%,100% 50%,72% 85%,25% 88%); box-shadow: 0 0 18px currentColor; color: var(--cyan); }
.fish-one { animation: orbit 7s linear infinite; }
.fish-two { animation: orbit 9s linear infinite reverse; color: var(--orchid); background: var(--orchid); }
.fish-three { animation: orbit 11s linear infinite; color: var(--mint); background: var(--mint); }

.chamber-layers { grid-template-columns: .55fr 1fr; gap: 5vw; }
.layer-stage { display: grid; gap: 16px; z-index: 3; max-width: 420px; }
.layer-tab { cursor: pointer; border: 1px solid rgba(25,247,255,.5); color: var(--pearl); background: rgba(7,18,31,.56); padding: 18px 22px; text-align: left; clip-path: polygon(8% 0,100% 0,92% 100%,0 100%); transition: .32s ease; }
.layer-tab.active, .layer-tab:hover { color: var(--lagoon); background: linear-gradient(90deg, var(--amber), var(--mint)); box-shadow: 0 0 24px rgba(124,255,178,.32); }
.layer-comb { width: min(55vw, 680px); }
.reveal-cell { inset: 50% auto auto 50%; translate: -50% -50%; opacity: 0; pointer-events: none; transform: rotate(-18deg) scale(.82); padding: 58px; align-content: center; gap: 18px; }
.reveal-cell.active { opacity: 1; pointer-events: auto; transform: rotate(0) scale(1); }
.reveal-cell span { color: var(--amber); }
.certificate-strip { position: absolute; right: 10vw; bottom: 7vh; max-width: 360px; padding: 20px 26px; border-left: 4px solid var(--orchid); background: rgba(58,20,92,.42); box-shadow: 0 0 26px rgba(255,79,216,.16); }
.certificate-strip span { display: block; color: var(--cyan); font-family: var(--micro); font-size: 11px; letter-spacing: .16em; }
.certificate-strip strong { font-family: var(--display); font-size: 24px; }

.fish-veins { position: absolute; inset: 0; width: 100%; height: 100%; }
.fish-veins path { fill: none; stroke: url(#none); stroke: var(--cyan); stroke-width: 2; stroke-dasharray: 14 22; filter: drop-shadow(0 0 10px var(--cyan)); opacity: .62; }
.procession-fish { position: absolute; inset: 0; pointer-events: none; }
.procession-fish span { position: absolute; left: var(--fish-x, 4%); top: var(--fish-y, 82%); transition: left .12s linear, top .12s linear, transform .12s linear; }
.procession-fish .angel { background: var(--orchid); color: var(--orchid); transform: scale(1.25); }
.procession-fish .butterfly { background: var(--amber); color: var(--amber); transform: scale(.9); }
.witness-comb { margin-left: 9vw; width: 78vw; height: 66vh; }
.witness-cell { width: 220px; height: 194px; }
.stamp-a { left: 4%; bottom: 5%; }
.stamp-b { left: 34%; top: 32%; }
.stamp-c { right: 8%; top: 7%; }
.stamp-d { right: 16%; bottom: 12%; }
.witness-copy { position: absolute; left: 7vw; top: 12vh; max-width: 650px; z-index: 4; }

.registry-wall { position: relative; height: 72vh; display: grid; place-items: center; }
.final-medallion { position: relative; width: min(55vw, 610px); height: min(55vw, 610px); clip-path: polygon(25% 3%,75% 3%,100% 50%,75% 97%,25% 97%,0 50%); display: grid; place-items: center; align-content: center; text-align: center; background: radial-gradient(circle, rgba(244,255,232,.24), rgba(255,209,102,.22) 32%, rgba(58,20,92,.72) 68%, rgba(7,18,31,.9)); border: 1px solid var(--amber); box-shadow: inset 0 0 70px rgba(255,209,102,.2), 0 0 80px rgba(255,209,102,.18); }
.final-medallion h2 { font-size: clamp(48px, 7vw, 106px); color: var(--pearl); }
.seal-ring { position: absolute; inset: 12%; clip-path: inherit; border: 2px dashed rgba(124,255,178,.55); animation: slowRotate 22s linear infinite; }
.wall-stamp { position: absolute; padding: 24px 30px; min-width: 190px; text-align: center; clip-path: polygon(20% 0,80% 0,100% 50%,80% 100%,20% 100%,0 50%); background: rgba(7,18,31,.7); border: 1px solid var(--cyan); box-shadow: 0 0 28px rgba(25,247,255,.18); }
.wall-stamp strong { display: block; font-family: var(--display); color: var(--mint); font-size: 28px; }
.stamp-left { left: 8vw; top: 18vh; transform: rotate(-12deg); }
.stamp-right { right: 9vw; bottom: 13vh; transform: rotate(9deg); border-color: var(--amber); }
.settle-copy { position: absolute; left: 7vw; bottom: 8vh; max-width: 620px; }
.final-fish { position: absolute; }
.final-fish-a { left: 12%; top: 45%; background: var(--cyan); animation: witnessFloat 5s ease-in-out infinite; }
.final-fish-b { right: 15%; top: 32%; background: var(--orchid); animation: witnessFloat 6s ease-in-out infinite reverse; }
.final-fish-c { right: 28%; bottom: 17%; background: var(--mint); animation: witnessFloat 7s ease-in-out infinite; }

.unverified.audit-shake { animation: auditShake .5s cubic-bezier(.36,.07,.19,.97); box-shadow: inset 0 0 40px rgba(255,79,216,.4), 0 0 38px rgba(255,79,216,.7); }
.unverified.corrected::before { content: "✓"; position: absolute; inset: auto 22px 20px auto; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--lagoon); background: var(--mint); box-shadow: 0 0 24px var(--mint); font-family: var(--display); z-index: 5; }
.audit-stamp { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 120px); z-index: 40; padding: 16px 28px; background: var(--mint); color: var(--lagoon); font-family: var(--micro); letter-spacing: .16em; clip-path: polygon(9% 0,91% 0,100% 50%,91% 100%,9% 100%,0 50%); box-shadow: 0 0 34px rgba(124,255,178,.5); transition: transform .45s ease; }
.audit-stamp.show { transform: translate(-50%, 0); }

@keyframes mapWake { from { opacity: .14; transform: rotate(-13deg) scale(1.05); } to { opacity: .36; transform: rotate(-11deg) scale(1.16); } }
@keyframes drift { to { transform: translate3d(12vw, -18vh, 0) rotate(180deg); } }
@keyframes badgeAssemble { from { transform: rotate(-4deg) scale(.96); filter: hue-rotate(0deg); } to { transform: rotate(5deg) scale(1.03); filter: hue-rotate(18deg); } }
@keyframes orbit { from { transform: rotate(0deg) translateX(54%) rotate(0deg); } to { transform: rotate(360deg) translateX(54%) rotate(-360deg); } }
@keyframes auditShake { 10%, 90% { transform: translateX(-1px) rotate(-1deg); } 20%, 80% { transform: translateX(3px) rotate(1deg); } 30%, 50%, 70% { transform: translateX(-6px) rotate(-2deg); } 40%, 60% { transform: translateX(6px) rotate(2deg); } }
@keyframes slowRotate { to { transform: rotate(360deg); } }
@keyframes witnessFloat { 50% { transform: translate(18px, -12px) rotate(7deg); } }

@media (max-width: 900px) {
  .chamber, .chamber-awakens, .chamber-layers { grid-template-columns: 1fr; padding: 78px 24px; }
  .honeycomb, .layer-comb, .vault-comb { width: 100%; height: 520px; }
  .dominant { width: 330px; height: 330px; }
  .large { width: 360px; height: 340px; }
  .decree { transform: none; }
  .pip-nav { right: 10px; }
  .witness-comb { margin-left: 0; width: 100%; }
  .witness-cell { width: 170px; height: 150px; }
  .final-medallion { width: 86vw; height: 86vw; }
  .wall-stamp { display: none; }
}
