/*
 * Licensed font files are not bundled. Each face first tries a locally installed copy;
 * to self-host, drop the file in assets/fonts/ and add a url() source (see README).
 */
@font-face {
  font-family: "Aptos";
  src: local("Aptos");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Aptos";
  src: local("Aptos Bold"), local("Aptos-Bold");
  font-weight: 700;
  font-display: swap;
}

:root {
  --brand-blue: #0099CC;
  --info-bg: #78206E;
  --info-text: #000000;
  --contact-text: #822AC5;

  --font-body: "Aptos", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-arcade: "Courier New", Courier, monospace;

  --gutter: clamp(16px, 5vw, 72px);
  /* Set from JS to the measured footer height so the ship and score sit just above it. */
  --footer-h: 48px;
}

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

html,
body {
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: #000;
  color: #fff;
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

#game {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: crosshair;
}

/* Header and footer sit above the canvas but only their contents take pointer events. */
.topbar,
.contact,
.score {
  position: fixed;
  z-index: 1;
  pointer-events: none;
}

.topbar {
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(16px, 4.5vh, 40px) var(--gutter) 0;
}

.brand {
  display: block;
  width: auto;
  height: clamp(36px, 4vw, 56px);
  user-select: none;
}

.info-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: clamp(92px, 9.3vw, 136px);
  height: clamp(34px, 3.15vw, 46px);
  padding: 0 16px;
  border-radius: 5px;
  background: var(--info-bg);
  color: var(--info-text);
  font-family: var(--font-body);
  font-size: clamp(15px, 1.45vw, 20px);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.info-btn:hover {
  filter: brightness(1.2);
}

.info-btn:active {
  transform: translateY(1px);
}

.info-btn:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 3px;
}

.score {
  right: max(var(--gutter), calc(20vw - 40px));
  bottom: calc(var(--footer-h) + 12px);
  color: var(--brand-blue);
  font-family: var(--font-arcade);
  font-size: clamp(13px, 1.15vw, 18px);
  font-weight: 700;
  user-select: none;
}

.contact {
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 var(--gutter) max(clamp(12px, 3vh, 28px), env(safe-area-inset-bottom));
  color: var(--contact-text);
  font-family: var(--font-body);
  font-size: clamp(14px, 1.25vw, 17px);
  font-weight: 400;
  line-height: 1.4;
}

.contact a {
  pointer-events: auto;
  color: inherit;
  text-decoration: none;
}

.contact a:hover,
.contact a:focus-visible {
  text-decoration: underline;
}

.contact a:focus-visible {
  outline: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
