/* GOLDZILLA — black + brass museum luxury. Desktop only. Safe area S = 2560x1440. */

html, body {
  margin: 0;
  overflow: hidden;
  width: 100%;
  height: 100%;
  background: #0b0a09;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: #e6dcc8;
  -webkit-font-smoothing: antialiased;
}

/* ---------- fixed backdrop (out-of-range bleeds only) ---------- */
#backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: url(assets/L0_bleed_plate.webp) center / cover no-repeat #0b0a09;
  filter: blur(28px) brightness(.55);
  transform: scale(1.08);
  pointer-events: none;
}

/* ---------- fixed top legibility gradient ---------- */
#topgrad {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 14%;
  z-index: 5;
  background: linear-gradient(rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
}

/* ---------- header (viewport top-left) ---------- */
#brand {
  position: fixed;
  z-index: 6;
  top: clamp(16px, 2.2vw, 56px);
  left: clamp(16px, 2.2vw, 56px);
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.1vw, 22px);
  pointer-events: none;
}

#brand-coin {
  height: clamp(36px, 5.2vh, 76px);
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .6));
}

#wordmark {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: clamp(26px, 4.4vh, 64px);
  line-height: 1;
  letter-spacing: .06em;
  background: linear-gradient(180deg, #f7e3a1 0%, #d6a646 55%, #a8771f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .65));
}

#ticker {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: clamp(11px, 1.5vh, 18px);
  letter-spacing: .08em;
  color: #e9d59a;
  padding: .38em .7em;
  border: 1px solid #b8913f;
  border-radius: 999px;
  background: rgba(20, 16, 10, .6);
  white-space: nowrap;
}

/* ---------- utility strip (viewport top-right) ---------- */
#utility {
  position: fixed;
  z-index: 6;
  top: clamp(16px, 2.2vw, 56px);
  right: clamp(16px, 2.2vw, 56px);
  display: flex;
  align-items: center;
  gap: clamp(8px, 1vw, 16px);
}

#copy-feedback {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: clamp(13px, 1.6vh, 20px);
  letter-spacing: .08em;
  opacity: 0;
  transition: opacity .25s ease;
  white-space: nowrap;
}
#copy-feedback.show { opacity: 1; }
#copy-feedback.ok { color: #d9a948; }
#copy-feedback.err { color: #e0786a; }

#util-strip {
  display: flex;
  align-items: stretch;
  border: 1px solid #b8913f;
  border-radius: 999px;
  background: rgba(12, 10, 8, .92);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 0 18px 34px rgba(0, 0, 0, .92);
  overflow: hidden;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: clamp(13px, 1.6vh, 20px);
  letter-spacing: .08em;
  line-height: 1;
}

.util-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45em;
  padding: .42em 1.15em;
  color: #e9d59a;
  text-decoration: none;
  background: none;
  border: 0;
  border-left: 1px solid rgba(184, 145, 63, .45);
  font: inherit;
  letter-spacing: inherit;
  line-height: 1;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.util-seg:first-child { border-left: 0; }
.util-seg svg { width: 1em; height: 1em; display: block; }
.util-seg:not([aria-disabled="true"]):hover {
  background: rgba(184, 145, 63, .16);
  color: #ffe9a8;
  box-shadow: inset 0 0 14px rgba(255, 200, 90, .18);
}
.util-seg[aria-disabled="true"] {
  opacity: .55;
  cursor: default;
  pointer-events: none;
}

/* ---------- stage ---------- */
#stage {
  position: fixed;
  left: 0;
  top: 0;
  width: 2560px;
  height: 1440px;
  transform-origin: 0 0;
  z-index: 2;
  opacity: 0;
  transition: opacity .4s ease;
}
body.loaded #stage { opacity: 1; }

#art {
  position: absolute;
  inset: 0;
  overflow: visible;
}

#plate {
  position: absolute;
  left: -448px;
  top: -114px;
  width: 3456px;
  height: 1668px;
  user-select: none;
  -webkit-user-drag: none;
}

#dim {
  position: absolute;
  left: -448px;
  top: -114px;
  width: 3456px;
  height: 1668px;
  opacity: 0;
  background:
    radial-gradient(ellipse 45% 60% at 50% 45%, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .72) 75%),
    radial-gradient(ellipse 30% 40% at 52% 40%, rgba(60, 170, 255, .14), transparent 70%);
  transition: opacity .2s linear;
}

#shadow {
  position: absolute;
  left: 0;
  top: 0;
  width: 2560px;
  height: 1440px;
}

#pile {
  position: absolute;
  left: 0;
  top: 0;
  width: 2560px;
  height: 1440px;
  pointer-events: none;
}

.pile-coin {
  position: absolute;
  background: url(assets/FX_coin.webp) center / contain no-repeat;
  will-change: transform;
}
.pile-shadow {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0) 70%);
}

#c1, #c2, #glow {
  position: absolute;
  left: 0;
  top: 0;
  width: 2560px;
  height: 1440px;
}
#c1, #c2 { transition: none; }
#c2 { visibility: hidden; }
#c2.open { visibility: visible; }

#glow {
  opacity: 0;
  --x: 1800;
  -webkit-mask-image: linear-gradient(to right, transparent calc(var(--x) * 1px - 140px), #000 calc(var(--x) * 1px));
  mask-image: linear-gradient(to right, transparent calc(var(--x) * 1px - 140px), #000 calc(var(--x) * 1px));
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  transition: opacity 80ms linear;
}
#glow.show { opacity: 1; }

#glint {
  position: absolute;
  left: 0;
  top: 0;
  width: 2560px;
  height: 1440px;
  opacity: 0;
  background: linear-gradient(115deg, transparent 44%, rgba(255, 247, 220, .85) 50%, transparent 56%);
  background-size: 300% 100%;
  background-position: 100% 0;
  mix-blend-mode: screen;
  -webkit-mask-image: url(assets/C2_char_jaw.webp);
  mask-image: url(assets/C2_char_jaw.webp);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  pointer-events: none;
}

/* ---------- fx ---------- */
#fx {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

#dust {
  position: absolute;
  left: 0;
  top: 0;
  width: 2560px;
  height: 1440px;
}

#flying {
  position: absolute;
  left: 0;
  top: 0;
  width: 72px;
  height: 72px;
  transform-origin: 50% 50%;
  will-change: transform;
}

#dingcaption {
  position: absolute;
  left: 770px;
  top: 392px;
  transform: translate(-50%, -50%);
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 600;
  font-size: 56px;
  color: #f6ecd6;
  opacity: 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .7);
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}
#dingcaption.show { opacity: 1; transform: translate(-50%, calc(-50% - 8px)); }

/* ---------- ui ---------- */
#ui {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

#plaque {
  position: absolute;
  left: 1008px;
  top: 1011px;
  width: 544px;
  box-sizing: border-box;
  padding: 10px 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid #7c5c1c;
  border-radius: 3px;
  background: linear-gradient(180deg, #f0d892 0%, #c9a04a 55%, #94701f 100%);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 246, 214, .8), inset 0 -2px 4px rgba(70, 48, 8, .5);
  text-align: center;
}
#plaque::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(120, 88, 24, .5);
  border-radius: 2px;
  pointer-events: none;
}
.plaque-screw {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff3c8, #8a6a1d 75%);
  box-shadow: 0 1px 1px rgba(0, 0, 0, .5);
}
.plaque-screw.tl { left: 8px; top: 8px; }
.plaque-screw.tr { right: 8px; top: 8px; }
.plaque-screw.bl { left: 8px; bottom: 8px; }
.plaque-screw.br { right: 8px; bottom: 8px; }

.plaque-line1, .plaque-line2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 25px;
  line-height: 1.25;
  color: #2b1e0a;
  text-shadow: 0 1px 0 rgba(255, 240, 200, .5), 0 -1px 0 rgba(60, 40, 10, .35);
  white-space: nowrap;
}
.redact {
  display: inline-block;
  width: 150px;
  height: 24px;
  background: #0a0a0a;
  border-radius: 2px;
  vertical-align: -4px;
}

#roar {
  position: absolute;
  left: 1020px;
  top: 1156px;
  width: 520px;
  height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 3px solid #7a5512;
  border-radius: 999px;
  background: linear-gradient(180deg, #fbe7a6 0%, #e2b85a 38%, #b98a2c 62%, #e9c873 100%);
  color: #26180a;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 64px;
  letter-spacing: .04em;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .55), inset 0 2px 2px rgba(255, 250, 225, .9), inset 0 -4px 6px rgba(90, 60, 10, .45), 0 0 60px rgba(255, 190, 80, .35);
  animation: roar-breathe 2.6s ease-in-out infinite;
  transition: transform .06s ease, box-shadow .06s ease, filter .2s ease;
  -webkit-user-select: none;
  user-select: none;
}
@keyframes roar-breathe {
  0%, 100% { box-shadow: 0 8px 20px rgba(0, 0, 0, .55), inset 0 2px 2px rgba(255, 250, 225, .9), inset 0 -4px 6px rgba(90, 60, 10, .45), 0 0 46px rgba(255, 190, 80, .28); }
  50%      { box-shadow: 0 8px 20px rgba(0, 0, 0, .55), inset 0 2px 2px rgba(255, 250, 225, .9), inset 0 -4px 6px rgba(90, 60, 10, .45), 0 0 78px rgba(255, 200, 90, .5); }
}
#roar:active { transform: translateY(3px); filter: brightness(.94); }
#roar:focus-visible { outline: 4px solid #fff3c4; outline-offset: 6px; }
#roar[aria-disabled="true"] { cursor: default; animation: none; box-shadow: 0 6px 16px rgba(0, 0, 0, .5), inset 0 2px 2px rgba(255, 250, 225, .7), inset 0 -4px 6px rgba(90, 60, 10, .45); }

#roar-label { white-space: nowrap; }

#hint-backdrop {
  position: absolute;
  left: 1280px;
  top: 1352px;
  width: 1000px;
  height: 150px;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(0, 0, 0, .6), transparent);
  pointer-events: none;
}

#hint {
  position: absolute;
  left: 1280px;
  top: 1330px;
  transform: translate(-50%, -50%);
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 22px;
  letter-spacing: .22em;
  color: rgba(230, 220, 200, .72);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .9);
  white-space: nowrap;
}

#status {
  position: absolute;
  left: 1280px;
  top: 1372px;
  transform: translate(-50%, -50%);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 24px;
  letter-spacing: .18em;
  color: #d9a948;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .9);
  white-space: nowrap;
}
#st-success.flash { color: #e0786a; transition: color .05s linear; }
