/* Project Echelon Zero hero. Every rule is scoped under .pez so it cannot affect the rest of the site. */
/* Layout: one full-screen scene of stacked canvas layers, HUD pinned to the corners like a game overlay */
.pez {
  --night: #0b1017;
  --steel: #1a2330;
  --haze: #d98a4e;
  --hud: #e9eef2;
  --hud-dim: #8a97a5;
  --signal: #fbb03b;
  --display: "Saira Condensed", "Arial Narrow", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  color-scheme: dark;
}
.pez, .pez *, .pez *::before, .pez *::after { box-sizing: border-box; }
.pez [hidden] { display: none !important; }
.pez { position: fixed; inset: 0; background: var(--night); color: var(--hud); font-family: var(--mono); overflow: hidden; }

.pez .stage { position: fixed; inset: 0; overflow: hidden; cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cg fill='none' stroke-linecap='square'%3E%3Cg stroke='%23000' stroke-opacity='.55' stroke-width='4'%3E%3Cpath d='M16 3v8M16 21v8M3 16h8M21 16h8'/%3E%3C/g%3E%3Cg stroke='%23fff' stroke-width='2'%3E%3Cpath d='M16 3v8M16 21v8M3 16h8M21 16h8'/%3E%3C/g%3E%3C/g%3E%3Ccircle cx='16' cy='16' r='1.6' fill='%23fbb03b'/%3E%3C/svg%3E") 16 16, crosshair; touch-action: none; }
.pez .world { position: absolute; inset: 0; transform-origin: 50% 70%; will-change: transform; }
.pez .layer { position: absolute; left: -20%; top: -20%; width: 140%; height: 140%; will-change: transform; pointer-events: none; }
.pez .overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* pop-up steel targets, anchored at the base of their post */
.pez .target { position: absolute; width: 64px; height: 118px; transform: translate(-50%, -100%) scale(var(--s, 1)); transform-origin: 50% 100%; pointer-events: none; }
.pez .target .flip { position: absolute; inset: 0; transform-origin: 50% 100%; transform: perspective(380px) rotateX(86deg); transition: transform .16s cubic-bezier(.2,1.6,.4,1); }
.pez .target.up .flip { transform: perspective(380px) rotateX(0deg); }
.pez .target.up { pointer-events: auto; }
.pez .target.hit .flip { transform: perspective(380px) rotateX(-84deg); transition: transform .32s cubic-bezier(.5,0,.9,.4); }
.pez .target.gone .flip { transform: perspective(380px) rotateX(86deg); transition: transform .2s ease-in; }
.pez .target.hit, .pez .target.gone { pointer-events: none; }
.pez .plate {
  position: absolute; left: 0; top: 0; width: 64px; height: 64px; border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 9px, rgba(20,16,10,.85) 9px 12px, transparent 12px 21px, rgba(20,16,10,.6) 21px 23px, transparent 23px),
    radial-gradient(circle at 35% 30%, #ffd48a, #fbb03b 45%, #a8661b 100%);
  box-shadow: 0 0 0 3px #1a1a1d, 0 6px 14px rgba(0,0,0,.45);
}
.pez .post { position: absolute; left: 29px; top: 60px; width: 6px; height: 50px; background: linear-gradient(90deg, #3a3d44, #15171b); }
.pez .foot { position: absolute; left: 14px; bottom: 0; width: 36px; height: 8px; background: #121418; border-radius: 2px; }
.pez .layer canvas { width: 100%; height: 100%; display: block; }

.pez .cta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; pointer-events: auto; margin-top: 4px; }
.pez .btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; cursor: pointer;
  font: 800 17px/1 var(--display); letter-spacing: .08em; text-transform: uppercase;
  padding: 12px 18px 11px; border: 2px solid var(--signal);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: transform .12s, background .12s, color .12s;
}
.pez .btn svg { width: 16px; height: 16px; flex: none; }
.pez .btn-primary { background: var(--signal); color: #14100a; }
.pez .btn-primary:hover { background: #ffc566; }
.pez .btn-ghost { background: rgba(11,16,23,.55); color: var(--hud); border-color: rgba(233,238,242,.45); backdrop-filter: blur(6px); }
.pez .btn-ghost:hover { border-color: var(--hud); }
.pez .btn:hover { transform: translateY(-1px); }
.pez .btn:focus-visible { outline: 2px solid var(--hud); outline-offset: 3px; }
.pez .promo {
  position: absolute; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: min(330px, calc(100vw - 32px)); padding: 18px 18px 16px; display: grid; gap: 8px; justify-items: start;
  background: rgba(11,16,23,.88); backdrop-filter: blur(10px); border: 1px solid rgba(251,176,59,.45);
  box-shadow: 0 18px 40px rgba(0,0,0,.5); cursor: default; z-index: 5;
  opacity: 0; transform: translateY(18px); transition: opacity .25s, transform .35s cubic-bezier(.2,1.3,.4,1);
}
.pez .promo.show { opacity: 1; transform: none; }
.pez .promo .head { display: flex; align-items: center; gap: 10px; }
.pez .promo .head img { width: 34px; height: auto; }
.pez .promo h2 { font: 800 28px/1 var(--display); text-transform: uppercase; letter-spacing: .02em; margin: 0; color: var(--hud); }
.pez .promo p { margin: 0 0 6px; font-size: 12.5px; line-height: 1.55; color: var(--hud-dim); }
.pez .promo-x {
  position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border: 0; background: transparent;
  color: var(--hud-dim); font: 400 20px/1 var(--mono); cursor: pointer;
}
.pez .promo-x:hover { color: var(--hud); }
.pez .promo-x:focus-visible { outline: 2px solid var(--signal); }
@keyframes nudge { 0%, 100% { box-shadow: 0 0 0 0 rgba(251,176,59,0); } 50% { box-shadow: 0 0 0 8px rgba(251,176,59,.35), 0 0 28px rgba(251,176,59,.6); } }
.pez .btn-primary.nudge { animation: nudge .9s ease-in-out 3; clip-path: none; }
@media (prefers-reduced-motion: reduce) { .pez .promo { transition: opacity .2s; transform: none; } .pez .btn-primary.nudge { animation: none; } }
.pez .btn small { font: 500 10px var(--mono); letter-spacing: .12em; opacity: .7; }

.pez .hud { position: absolute; pointer-events: none; }
.pez .title {
  right: max(16px, env(safe-area-inset-right, 0px)); top: calc(16px + env(safe-area-inset-top, 0px));
  width: min(660px, calc(100vw - 32px)); text-align: right;
  display: grid; gap: 10px; justify-items: end;
}
.pez .lockup { display: flex; align-items: center; gap: clamp(10px, 1.4vw, 18px); filter: drop-shadow(0 3px 14px rgba(0,0,0,.55)); }
.pez .lockup .emblem { height: clamp(64px, 8.5vw, 124px); width: auto; display: block; }
.pez h1 img { width: clamp(200px, 33vw, 480px); height: auto; display: block; }
.pez .title p { max-width: 34ch; }
.pez .eyebrow { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--signal); }
.pez h1 { margin: 0; }
.pez .title p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--hud-dim); }

.pez .panel {
  right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  pointer-events: auto; cursor: default;
  background: rgba(11,16,23,.72); backdrop-filter: blur(8px);
  border: 1px solid rgba(233,238,242,.14);
  padding: 14px; width: min(300px, calc(100vw - 32px));
  display: grid; gap: 12px; font-size: 12px;
}
.pez .panel[hidden] { display: none; }
.pez .seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid rgba(233,238,242,.2); }
.pez .seg button {
  font: inherit; font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  background: transparent; color: var(--hud-dim); border: 0; padding: 8px 6px; cursor: pointer;
}
.pez .seg button[aria-pressed="true"] { background: var(--hud); color: var(--night); }
.pez .seg button:focus-visible, .pez input:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.pez .row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.pez .row label { color: var(--hud-dim); text-transform: uppercase; letter-spacing: .1em; font-size: 11px; }
.pez input[type="range"] { width: 100%; accent-color: var(--signal); }
.pez .val { font-variant-numeric: tabular-nums; min-width: 4ch; text-align: right; }
.pez .note { color: var(--hud-dim); line-height: 1.5; margin: 0; }
.pez .depths { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; font-variant-numeric: tabular-nums; }
.pez .depths div { display: grid; gap: 4px; }
.pez .bar { height: 4px; background: rgba(233,238,242,.12); position: relative; }
.pez .bar i { position: absolute; inset: 0 auto 0 0; background: var(--signal); transition: width .3s; }
.pez .depths span { font-size: 10px; color: var(--hud-dim); text-transform: uppercase; letter-spacing: .08em; }

.pez .lean {
  left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  font-size: 11px; letter-spacing: .2em; color: var(--hud-dim); text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.pez .lean { text-align: center; line-height: 1.8; white-space: nowrap; }
.pez .sound {
  position: absolute; left: max(16px, env(safe-area-inset-left, 0px)); top: calc(16px + env(safe-area-inset-top, 0px));
  font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; cursor: pointer;
  background: rgba(11,16,23,.6); color: var(--hud); border: 1px solid rgba(233,238,242,.2); padding: 8px 12px;
}
.pez .sound[aria-pressed="false"] { color: var(--hud-dim); }
.pez .sound:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.pez .lean .hint { color: var(--signal); opacity: .8; }
.pez #ammo, .pez #score { color: var(--hud); font-weight: 500; }
@media (max-width: 640px) {
  .pez .lockup .emblem { height: 52px; }
  .pez h1 img { width: 196px; }
  .pez .lean { font-size: 10px; letter-spacing: .14em; }
  .pez .title p { display: none; }
  .pez .btn { font-size: 14px; padding: 10px 12px 9px; }
  .pez .promo { bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }
}
