/* ==========================================================================
   ESA ARCADE - Design tokens, reset, typography and shared primitives.
   Everything visual in the arcade is built from the values in :root.
   ========================================================================== */

:root {
  /* --- Navy ------------------------------------------------------------ */
  --navy-900: #030b16;
  --navy-850: #05101f;
  --navy-800: #071728;
  --navy-700: #0a2039;
  --navy-600: #0e2c4d;
  --navy-500: #143a63;
  --navy-400: #1d4e80;

  /* --- Gold ------------------------------------------------------------ */
  --gold-100: #fdeec4;
  --gold-300: #f8d98b;
  --gold-400: #f3c35a;
  --gold-500: #e5a92f;
  --gold-600: #c0871f;
  --gold-700: #8e6314;

  /* --- Neutrals -------------------------------------------------------- */
  --cream: #fff6e4;
  --paper: #f1e5cb;
  --muted: #8ba2bd;
  --muted-dim: #62778f;
  --ink: #081322;

  /* --- Character / accent ---------------------------------------------- */
  --zima: #2f7fd8;
  --zima-deep: #15497f;
  --shaza: #9560ac;
  --shaza-deep: #5d3570;
  --danger: #e8584f;
  --success: #3fbb7d;

  /* --- Per-game accents ------------------------------------------------ */
  --accent-bomb: #e8584f;
  --accent-coin: #f3c35a;
  --accent-bonk: #4fb7c9;

  /* --- Type ------------------------------------------------------------ */
  --font-display: "Bahnschrift", "DIN Alternate", "Haettenschweiler",
                  "Arial Narrow", "Avenir Next Condensed", "Segoe UI",
                  system-ui, sans-serif;
  --font-ui: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont,
             "Helvetica Neue", Arial, sans-serif;

  /* --- Motion ---------------------------------------------------------- */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-back: cubic-bezier(.34, 1.56, .64, 1);

  /* --- Elevation ------------------------------------------------------- */
  --shadow-panel: 0 24px 60px rgba(0, 0, 0, .48), inset 0 2px 0 rgba(255, 255, 255, .05);
  --shadow-card: 0 18px 38px rgba(0, 0, 0, .42);
  --glow-gold: 0 0 36px rgba(243, 195, 90, .28);

  /* --- Geometry -------------------------------------------------------- */
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 9px;
  --rule-gold: linear-gradient(90deg,
      transparent 0%,
      rgba(243, 195, 90, .15) 12%,
      var(--gold-500) 50%,
      rgba(243, 195, 90, .15) 88%,
      transparent 100%);
}

/* --------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--navy-900);
  color: var(--cream);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

body {
  overflow: hidden;              /* the arcade is a fixed single-view app */
  overscroll-behavior: none;
}

img { display: block; -webkit-user-drag: none; user-select: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
h1, h2, h3, p { margin: 0; }

:focus-visible {
  outline: 3px solid var(--gold-400);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   Typography primitives
   -------------------------------------------------------------------------- */
.display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .06em;
  line-height: .92;
  text-transform: uppercase;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--gold-400);
}

.body-copy {
  color: #b9cadd;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Egyptian geometric rule - a restrained gold divider used under headers.
   Pure CSS so it costs nothing to render.
   -------------------------------------------------------------------------- */
.rule {
  position: relative;
  height: 10px;
  flex: none;
}
.rule::before {
  content: "";
  position: absolute;
  inset: 4px 0 auto;
  height: 2px;
  background: var(--rule-gold);
}
.rule::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  background: var(--gold-400);
  transform: rotate(45deg);
  box-shadow: -22px 0 0 -3px var(--gold-600), 22px 0 0 -3px var(--gold-600);
}

/* --------------------------------------------------------------------------
   Panels - navy slab with a gold hairline and notched Egyptian corners.
   -------------------------------------------------------------------------- */
.panel {
  position: relative;
  background:
    linear-gradient(165deg, rgba(29, 78, 128, .55), rgba(5, 16, 31, .92)),
    var(--navy-800);
  border: 1px solid rgba(243, 195, 90, .28);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
}

.panel-corners::before,
.panel-corners::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  border: 2px solid var(--gold-500);
  opacity: .7;
  pointer-events: none;
}
.panel-corners::before {
  top: 10px; left: 10px;
  border-right: 0; border-bottom: 0;
  border-top-left-radius: 6px;
}
.panel-corners::after {
  bottom: 10px; right: 10px;
  border-left: 0; border-top: 0;
  border-bottom-right-radius: 6px;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  transition: transform .14s var(--ease-out), box-shadow .14s var(--ease-out),
              background .14s var(--ease-out), border-color .14s var(--ease-out);
}

.btn-gold {
  color: #221703;
  background: linear-gradient(180deg, var(--gold-300), var(--gold-500));
  box-shadow: 0 5px 0 var(--gold-700), 0 12px 22px rgba(0, 0, 0, .4),
              inset 0 1px 0 rgba(255, 255, 255, .6);
}
.btn-gold:hover {
  background: linear-gradient(180deg, #fde7ae, var(--gold-400));
  transform: translateY(-2px);
  box-shadow: 0 7px 0 var(--gold-700), 0 16px 28px rgba(0, 0, 0, .45),
              inset 0 1px 0 rgba(255, 255, 255, .7);
}
.btn-gold:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--gold-700), 0 6px 12px rgba(0, 0, 0, .4),
              inset 0 1px 0 rgba(255, 255, 255, .5);
}

.btn-ghost {
  color: #cfe0f1;
  background: rgba(14, 44, 77, .72);
  border: 1px solid rgba(243, 195, 90, .3);
  box-shadow: 0 4px 0 rgba(3, 11, 22, .8), 0 10px 20px rgba(0, 0, 0, .32);
}
.btn-ghost:hover {
  color: var(--cream);
  background: rgba(20, 58, 99, .9);
  border-color: var(--gold-400);
  transform: translateY(-2px);
}
.btn-ghost:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(3, 11, 22, .8); }

.btn-small { min-height: 38px; padding: 0 16px; font-size: 13px; letter-spacing: .12em; }

/* --------------------------------------------------------------------------
   Key caps - used in intro screens and the HUD.
   -------------------------------------------------------------------------- */
.keycap {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 7px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--cream);
  background: linear-gradient(180deg, var(--navy-500), var(--navy-700));
  border: 1px solid rgba(243, 195, 90, .34);
  box-shadow: 0 3px 0 rgba(3, 11, 22, .9), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.keycap.wide { min-width: 86px; font-size: 12px; letter-spacing: .1em; }

/* --------------------------------------------------------------------------
   Utility
   -------------------------------------------------------------------------- */
.hidden { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

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