@font-face {
  font-family: "Hanken Grotesk";
  src: url("/pulse/fonts/hanken-grotesk-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Spline Sans Mono";
  src: url("/pulse/fonts/spline-sans-mono-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --black: #090a08;
  --carbon: #11130f;
  --smoke: #1a1d18;
  --ivory: #e8e6dc;
  --ivory-dim: #a7aa9f;
  --buy: #c8ff00;
  --buy-pale: #edffae;
  --amber: #f2a51a;
  --fault: #f05e4f;
  --violet: #7668ef;
  --sans: "Hanken Grotesk", "Arial Narrow", Arial, sans-serif;
  --mono: "Spline Sans Mono", "SFMono-Regular", Consolas, monospace;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  background: var(--black);
  color: var(--ivory);
  font-family: var(--sans);
  font-synthesis: none;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 22%, rgba(200, 255, 0, 0.055), transparent 31%),
    linear-gradient(90deg, rgba(232, 230, 220, 0.018) 1px, transparent 1px),
    linear-gradient(rgba(232, 230, 220, 0.018) 1px, transparent 1px),
    var(--black);
  background-size: auto, 54px 54px, 54px 54px, auto;
  -webkit-font-smoothing: antialiased;
}

body::after {
  content: "";
  position: fixed;
  z-index: 200;
  inset: 0;
  pointer-events: none;
  opacity: 0.13;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.62) 0 0.35px, transparent 0.55px),
    radial-gradient(circle, rgba(255, 255, 255, 0.42) 0 0.3px, transparent 0.5px);
  background-position: 0 0, 2px 3px;
  background-size: 4px 4px, 5px 5px;
  mix-blend-mode: soft-light;
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  text-decoration: none;
}

kbd {
  display: inline-grid;
  min-width: 34px;
  min-height: 22px;
  place-items: center;
  padding: 3px 6px;
  border: 1px solid currentColor;
  border-bottom-width: 2px;
  border-radius: 3px;
  font: 650 8px/1 var(--mono);
}

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 5px;
}

.site-head {
  width: min(100%, 1600px);
  min-height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px clamp(14px, 2.6vw, 40px);
  border-bottom: 1px solid rgba(232, 230, 220, 0.16);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-key {
  width: 56px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ivory);
  border-radius: 999px;
  background: var(--buy);
  color: var(--black);
  box-shadow: 3px 3px 0 var(--ivory);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.brand > span:last-child {
  display: grid;
  gap: 2px;
}

.brand b {
  font-size: 14px;
  font-weight: 880;
  letter-spacing: -0.035em;
}

.brand small,
.build-status {
  color: var(--ivory-dim);
  font: 550 8px/1.2 var(--mono);
  letter-spacing: 0.1em;
}

.build-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.build-status i,
.sound-state i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--buy);
  box-shadow: 0 0 12px rgba(200, 255, 0, 0.88);
}

.game-shell {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: clamp(12px, 2vw, 30px);
}

.machine {
  overflow: hidden;
  border: 1px solid rgba(232, 230, 220, 0.5);
  background: var(--ivory);
  color: var(--black);
  box-shadow:
    0 40px 90px rgba(0, 0, 0, 0.44),
    0 0 0 7px rgba(232, 230, 220, 0.025);
}

.machine-topline,
.machine-footer {
  min-height: 47px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px clamp(12px, 2vw, 24px);
  font: 570 8px/1.2 var(--mono);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.machine-topline strong {
  color: #526600;
  font-weight: 750;
}

.scene {
  position: relative;
  height: clamp(560px, 72vh, 810px);
  min-height: 560px;
  overflow: hidden;
  border-top: 1px solid var(--black);
  border-bottom: 1px solid var(--black);
  background: var(--black);
  color: var(--ivory);
  isolation: isolate;
}

.game-viewport,
.game-viewport canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.scene-grain,
.scene-vignette,
.scene-flash {
  position: absolute;
  pointer-events: none;
  inset: 0;
}

.scene-grain {
  z-index: 22;
  opacity: 0.2;
  background:
    linear-gradient(rgba(255, 255, 255, 0.023) 50%, rgba(0, 0, 0, 0.035) 50%),
    linear-gradient(90deg, rgba(255, 0, 0, 0.012), rgba(0, 255, 0, 0.006), rgba(0, 0, 255, 0.012));
  background-size: 100% 4px, 7px 100%;
  mix-blend-mode: screen;
}

.scene-vignette {
  z-index: 21;
  box-shadow:
    0 0 120px rgba(0, 0, 0, 0.82) inset,
    0 -110px 150px rgba(0, 0, 0, 0.72) inset;
}

.scene-flash {
  z-index: 29;
  opacity: 0;
  background: var(--buy-pale);
  mix-blend-mode: screen;
}

.scene-flash.is-hit {
  animation: contact-flash 170ms steps(2, end);
}

.scene-flash.is-fault {
  background: var(--fault);
  animation: contact-flash 220ms ease;
}

@keyframes contact-flash {
  0% { opacity: 0; }
  18% { opacity: 0.82; }
  45% { opacity: 0.12; }
  100% { opacity: 0; }
}

.hud {
  position: absolute;
  z-index: 35;
  top: 18px;
  right: 20px;
  left: 20px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 16px;
  pointer-events: none;
}

.hud > div {
  display: grid;
  gap: 4px;
}

.hud span,
.career-track span,
.enemy-plate span,
.promotion span,
.promotion small,
.cold-open > span,
.combo span,
.end-screen > span,
.receipt span,
.receipt small {
  color: var(--ivory-dim);
  font: 560 8px/1.2 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hud strong {
  font: 780 clamp(11px, 1.4vw, 17px)/1 var(--mono);
  letter-spacing: -0.035em;
}

.floor-block {
  justify-items: center;
}

.floor-block strong {
  color: var(--buy);
}

.nerve-block {
  justify-items: end;
}

.nerve-lights {
  display: flex;
  gap: 5px;
}

.nerve-lights i {
  width: 22px;
  height: 7px;
  border: 1px solid rgba(232, 230, 220, 0.5);
  background: var(--buy);
  box-shadow: 0 0 12px rgba(200, 255, 0, 0.45);
  transition: background-color 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.nerve-lights i.is-lost {
  opacity: 0.24;
  background: var(--fault);
  box-shadow: none;
  transform: scaleY(0.55);
}

.career-track {
  position: absolute;
  z-index: 35;
  top: 70px;
  left: 50%;
  width: min(72%, 720px);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  transform: translateX(-50%);
  pointer-events: none;
}

.career-track::before {
  content: "";
  position: absolute;
  top: 4px;
  right: 8%;
  left: 8%;
  height: 1px;
  background: rgba(232, 230, 220, 0.18);
}

.career-track li {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 7px;
}

.career-track i {
  z-index: 1;
  width: 9px;
  height: 9px;
  border: 1px solid rgba(232, 230, 220, 0.42);
  border-radius: 50%;
  background: var(--black);
}

.career-track span {
  opacity: 0.35;
  font-size: 6px;
  text-align: center;
}

.career-track li.is-complete i,
.career-track li.is-current i {
  border-color: var(--buy);
  background: var(--buy);
  box-shadow: 0 0 13px rgba(200, 255, 0, 0.72);
}

.career-track li.is-complete span,
.career-track li.is-current span {
  opacity: 1;
  color: var(--buy);
}

.enemy-plate {
  position: absolute;
  z-index: 36;
  top: 120px;
  left: 50%;
  min-width: min(88%, 440px);
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 11px 20px;
  border: 1px solid rgba(232, 230, 220, 0.22);
  background: rgba(9, 10, 8, 0.72);
  text-align: center;
  transform: translateX(-50%);
  backdrop-filter: blur(10px);
  pointer-events: none;
}

.enemy-plate strong {
  font-size: clamp(17px, 2.2vw, 30px);
  font-weight: 870;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.enemy-pips {
  display: flex;
  gap: 4px;
  margin-top: 2px;
}

.enemy-pips i {
  width: 25px;
  height: 4px;
  background: var(--fault);
  transition: opacity 160ms ease, transform 160ms ease;
}

.enemy-pips i.is-cleared {
  opacity: 0.15;
  transform: scaleX(0.35);
}

.cold-open {
  position: absolute;
  z-index: 32;
  top: 21%;
  left: 50%;
  width: min(88%, 670px);
  text-align: center;
  transform: translateX(-50%);
  transition: opacity 400ms ease, transform 500ms cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}

.cold-open h1 {
  margin: 12px 0 15px;
  font-size: clamp(62px, 10vw, 142px);
  font-weight: 930;
  letter-spacing: -0.09em;
  line-height: 0.7;
  text-shadow: 0 18px 60px rgba(0, 0, 0, 0.62);
}

.cold-open p {
  margin: 0;
  font-size: clamp(14px, 1.8vw, 22px);
  font-weight: 580;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.cold-open.is-gone {
  opacity: 0;
  transform: translate(-50%, -22px) scale(0.97);
}

.button-stage {
  position: absolute;
  z-index: 45;
  bottom: clamp(26px, 4vh, 48px);
  left: 50%;
  width: min(74%, 520px);
  min-height: 180px;
  display: grid;
  place-items: center;
  transform: translateX(-50%);
}

.signal-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 380px;
  height: 138px;
  border: 2px solid var(--amber);
  border-radius: 999px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.ring-outer {
  z-index: 1;
  opacity: 0;
  box-shadow:
    0 0 28px rgba(242, 165, 26, 0.35),
    0 0 90px rgba(242, 165, 26, 0.13);
  will-change: transform, opacity, border-color;
}

.ring-outer.is-live {
  opacity: 0.82;
}

.ring-outer.is-ready {
  border-color: var(--buy);
  box-shadow:
    0 0 28px rgba(200, 255, 0, 0.65),
    0 0 100px rgba(200, 255, 0, 0.24);
}

.ring-target {
  z-index: 1;
  width: 320px;
  height: 108px;
  border-color: rgba(232, 230, 220, 0.38);
}

.button-housing {
  position: relative;
  z-index: 4;
  width: min(100%, 350px);
  height: 116px;
  display: grid;
  place-items: center;
  padding: 15px 26px 22px;
  border: 1px solid #8b9084;
  border-radius: 999px;
  background:
    linear-gradient(180deg, #767b70 0%, #373b34 31%, #12140f 72%, #050604 100%);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.42) inset,
    0 -5px 0 rgba(0, 0, 0, 0.78) inset,
    0 16px 28px rgba(0, 0, 0, 0.62),
    0 0 45px rgba(200, 255, 0, 0.08);
}

.button-housing::before {
  content: "";
  position: absolute;
  inset: 13px 22px 18px;
  border-radius: inherit;
  background: #020301;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.94) inset;
}

.bolt {
  position: absolute;
  z-index: 8;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8c9186;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.52), 0 -1px 0 #111;
}

.bolt-left { left: 9px; }
.bolt-right { right: 9px; }

.buy-button {
  position: relative;
  z-index: 6;
  width: 88%;
  height: 69px;
  display: grid;
  place-items: center;
  border: 1px solid var(--buy-pale);
  border-radius: 999px;
  background: linear-gradient(180deg, #efffb4 0%, var(--buy) 29%, #9fda00 78%, #729d00 100%);
  color: var(--black);
  box-shadow:
    0 3px 0 rgba(255, 255, 255, 0.64) inset,
    0 -5px 0 rgba(50, 70, 0, 0.34) inset,
    0 8px 0 #344700,
    0 13px 18px rgba(0, 0, 0, 0.8),
    0 0 34px rgba(200, 255, 0, 0.22);
  transform: translateY(-4px);
  transition: filter 110ms ease, transform 70ms ease, box-shadow 70ms ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.buy-button:hover:not(:disabled) {
  filter: brightness(1.08);
}

.buy-button.is-down,
.buy-button:active:not(:disabled) {
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.62) inset,
    0 -2px 0 rgba(50, 70, 0, 0.2) inset,
    0 2px 0 #344700,
    0 5px 8px rgba(0, 0, 0, 0.72),
    0 0 52px rgba(200, 255, 0, 0.56);
  transform: translateY(4px);
}

.buy-button span {
  font-size: clamp(34px, 4.2vw, 52px);
  font-weight: 930;
  letter-spacing: -0.07em;
  line-height: 1;
}

.press-instruction {
  position: absolute;
  z-index: 6;
  top: calc(50% + 77px);
  left: 50%;
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  transform: translateX(-50%);
}

.press-instruction strong {
  color: var(--buy);
  font: 720 9px/1 var(--mono);
  letter-spacing: 0.08em;
}

.press-instruction span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ivory-dim);
  font: 520 7px/1 var(--mono);
}

.kinetic-word {
  position: absolute;
  z-index: 44;
  top: 44%;
  left: 50%;
  opacity: 0;
  color: var(--buy);
  font-size: clamp(70px, 13vw, 190px);
  font-weight: 940;
  letter-spacing: -0.095em;
  line-height: 0.7;
  text-shadow: 0 0 55px rgba(200, 255, 0, 0.34);
  transform: translate(-50%, -50%) scale(0.72) rotate(-2deg);
  pointer-events: none;
}

.kinetic-word.is-active {
  animation: word-hit 560ms cubic-bezier(0.17, 0.89, 0.2, 1.2) both;
}

@keyframes word-hit {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.55) rotate(-4deg); }
  18% { opacity: 1; transform: translate(-50%, -50%) scale(1.05) rotate(0); }
  62% { opacity: 0.82; transform: translate(-50%, -54%) scale(1) rotate(0); }
  100% { opacity: 0; transform: translate(-50%, -68%) scale(1.08) rotate(1deg); }
}

.combo {
  position: absolute;
  z-index: 46;
  right: 28px;
  bottom: 30%;
  display: grid;
  justify-items: end;
  padding: 10px 13px;
  border-right: 4px solid var(--buy);
  background: rgba(9, 10, 8, 0.72);
  backdrop-filter: blur(8px);
}

.combo strong {
  color: var(--buy);
  font: 850 clamp(26px, 4vw, 52px)/0.9 var(--mono);
}

.promotion,
.end-screen {
  position: absolute;
  z-index: 55;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 25px;
  background: rgba(9, 10, 8, 0.88);
  text-align: center;
  backdrop-filter: blur(10px);
}

.promotion strong {
  margin: 10px 0;
  color: var(--buy);
  font-size: clamp(50px, 9vw, 130px);
  font-weight: 930;
  letter-spacing: -0.08em;
  line-height: 0.78;
}

.promotion small {
  padding: 8px 12px;
  border: 1px solid var(--buy);
  color: var(--buy);
}

.promotion.is-entering {
  animation: promotion-in 1.35s cubic-bezier(0.22, 0.8, 0.22, 1) both;
}

@keyframes promotion-in {
  0% { opacity: 0; clip-path: inset(48% 0 48% 0); }
  16% { opacity: 1; clip-path: inset(44% 0 44% 0); }
  55%, 88% { opacity: 1; clip-path: inset(0 0 0 0); }
  100% { opacity: 0; clip-path: inset(0 0 0 0); }
}

.end-screen h2 {
  margin: 13px 0 17px;
  color: var(--buy);
  font-size: clamp(70px, 13vw, 180px);
  font-weight: 940;
  letter-spacing: -0.09em;
  line-height: 0.72;
}

.end-screen {
  bottom: 174px;
}

.end-screen p {
  margin: 0 0 23px;
  font-size: clamp(15px, 2vw, 24px);
  font-weight: 570;
  letter-spacing: -0.025em;
}

.receipt {
  width: min(100%, 520px);
  display: grid;
  gap: 7px;
  padding: 15px 18px;
  border: 1px solid rgba(232, 230, 220, 0.45);
  background: rgba(232, 230, 220, 0.06);
}

.receipt strong {
  font: 740 clamp(14px, 2vw, 23px)/1 var(--mono);
}

.engine-fallback {
  position: absolute;
  z-index: 90;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 25px;
  background: var(--black);
  color: var(--fault);
  font: 700 12px/1.5 var(--mono);
  text-align: center;
}

.machine-footer {
  min-height: 54px;
}

.event-line {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.event-line > span {
  flex: 0 0 auto;
  padding: 6px 8px;
  background: var(--black);
  color: var(--buy);
}

.event-line strong {
  overflow: hidden;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sound-state {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #5c6057;
}

.game-note {
  margin: 11px 2px 0;
  color: var(--ivory-dim);
  font: 500 8px/1.4 var(--mono);
  letter-spacing: 0.05em;
  text-align: right;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .site-head {
    min-height: 61px;
    padding: 9px 12px;
  }

  .brand-key {
    width: 48px;
    height: 25px;
    font-size: 10px;
  }

  .brand small,
  .build-status {
    font-size: 6px;
  }

  .game-shell {
    padding: 8px;
  }

  .machine-topline {
    min-height: 39px;
    font-size: 6px;
  }

  .scene {
    height: min(78svh, 680px);
    min-height: 590px;
  }

  .hud {
    top: 12px;
    right: 11px;
    left: 11px;
    gap: 7px;
  }

  .hud span {
    font-size: 6px;
  }

  .hud strong {
    font-size: 9px;
  }

  .nerve-lights i {
    width: 15px;
    height: 6px;
  }

  .career-track {
    top: 53px;
    width: 91%;
  }

  .career-track span {
    max-width: 57px;
    font-size: 4.8px;
  }

  .enemy-plate {
    top: 91px;
    min-width: 78%;
    padding: 8px 12px;
  }

  .enemy-plate strong {
    font-size: 15px;
  }

  .cold-open {
    top: 18%;
  }

  .cold-open h1 {
    margin: 9px 0 12px;
    font-size: clamp(64px, 22vw, 92px);
  }

  .cold-open p {
    font-size: 13px;
  }

  .button-stage {
    bottom: 28px;
    width: 96%;
    min-height: 160px;
  }

  .signal-ring {
    width: 300px;
    height: 112px;
  }

  .ring-target {
    width: 258px;
    height: 93px;
  }

  .button-housing {
    width: 282px;
    height: 99px;
    padding: 13px 23px 20px;
  }

  .button-housing::before {
    inset: 11px 19px 16px;
  }

  .buy-button {
    height: 57px;
  }

  .buy-button span {
    font-size: 34px;
  }

  .press-instruction {
    top: calc(50% + 67px);
  }

  .press-instruction strong {
    font-size: 7px;
  }

  .press-instruction span {
    font-size: 6px;
  }

  .combo {
    right: 11px;
    bottom: 29%;
  }

  .machine-footer {
    align-items: flex-start;
    padding: 9px 10px;
  }

  .event-line {
    align-items: flex-start;
  }

  .event-line strong {
    overflow: visible;
    font-size: 7px;
    line-height: 1.35;
    text-overflow: clip;
    white-space: normal;
  }

  .sound-state {
    display: none;
  }

  .game-note {
    font-size: 6px;
  }
}

@media (max-width: 390px) {
  .brand b {
    font-size: 12px;
  }

  .build-status {
    max-width: 100px;
    text-align: right;
  }

  .scene {
    min-height: 560px;
  }

  .cold-open h1 {
    font-size: 70px;
  }

  .signal-ring {
    width: 270px;
  }

  .ring-target,
  .button-housing {
    width: 244px;
  }

  .button-housing {
    height: 92px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
