/* Shared look for the homepage and wiki: green waveguide HUD text over a darkened nature video. */

@font-face {
  font-family: "Departure Mono";
  src: url("/fonts/DepartureMono-Regular.woff2") format("woff2"),
       url("/fonts/DepartureMono-Regular.woff") format("woff");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --hud: #6dff9a;
  --hud-dim: rgba(109, 255, 154, 0.62);
  --hud-body: rgba(109, 255, 154, 0.85);
  --glow:
    0 0 2px rgba(109, 255, 154, 0.9),
    0 0 10px rgba(109, 255, 154, 0.45),
    0 0 28px rgba(109, 255, 154, 0.25);
  --glow-soft: 0 0 6px rgba(109, 255, 154, 0.35);

  /* Variables the page styles already read */
  --bg: #0a0d0a;
  --text: var(--hud);
  --muted: var(--hud-dim);
  --line: rgba(109, 255, 154, 0.28);
  --line-soft: rgba(109, 255, 154, 0.1);
  --open: rgba(109, 255, 154, 0.12);
  --open-hover: rgba(109, 255, 154, 0.24);
  --selected: var(--hud);
  --soft: rgba(109, 255, 154, 0.05);
  --soft-strong: rgba(109, 255, 154, 0.18);
  --strong: rgba(109, 255, 154, 0.45);
}

html {
  background: #050705;
}

/* Departure Mono is drawn on an 11px grid; sizes stay on multiples of 11 */
body {
  background: transparent;
  color: var(--text);
  font: 11px/1.9 "Departure Mono", ui-monospace, Menlo, monospace;
  letter-spacing: 0.06em;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-shadow: var(--glow-soft);
}

/* Video sits behind everything; hud.mjs sets the clip's poster, which doubles as the reduced-motion still */
.hud-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: #050705 center / cover no-repeat;
}
.hud-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hud-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(4, 7, 4, 0.35) 0%, rgba(4, 7, 4, 0.7) 100%),
    rgba(4, 7, 4, 0.25);
}
/* Text on dense pages sits directly on the video, so those pages get a darker overlay */
body:has(.hud-panel) .hud-bg::after {
  background:
    radial-gradient(ellipse at 50% 40%, rgba(4, 7, 4, 0.5) 0%, rgba(4, 7, 4, 0.78) 100%),
    rgba(4, 7, 4, 0.35);
}

/* Scanlines over the whole page */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, 0.22) 2px 3px);
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
}

h1,
h2 {
  font-size: 22px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: var(--glow);
}

input,
textarea,
select,
button {
  font: inherit;
  letter-spacing: inherit;
  text-shadow: inherit;
  caret-color: var(--hud);
}

::placeholder {
  color: var(--hud-dim);
  opacity: 0.7;
}

::selection {
  background: rgba(109, 255, 154, 0.3);
  color: var(--hud);
}

:focus-visible {
  outline: 1px dashed var(--hud-dim);
  outline-offset: 3px;
}

/* Corner brackets frame dense pages; the home chat floats on the video without them */
.hud-panel {
  position: relative;
  margin-top: 5.5rem;
  margin-bottom: 3rem;
  padding: 2.2rem 2.6rem;
}
.hud-panel::before,
.hud-panel::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 1px solid var(--hud-dim);
  pointer-events: none;
}
.hud-panel::before { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.hud-panel::after { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.hud-panel h1 {
  margin: 0 0 1.2rem;
}
.hud-panel h1::after {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 0.9em;
  margin-left: 0.25em;
  vertical-align: -0.08em;
  background: var(--hud);
  box-shadow: 0 0 8px var(--hud-dim);
  animation: hud-blink 1s steps(1) infinite;
}

.hud-cursor {
  display: inline-block;
  width: 0.55em;
  height: 0.9em;
  margin-left: 0.15em;
  vertical-align: -0.08em;
  background: var(--hud);
  box-shadow: 0 0 8px var(--hud-dim);
  animation: hud-blink 1s steps(1) infinite;
}

/* Bordered action, matching the careers page's [ APPLY ] */
.hud-button {
  display: inline-block;
  padding: 0.6em 1.2em;
  border: 1px solid var(--hud);
  background: transparent;
  color: var(--hud);
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 0 0 8px rgba(109, 255, 154, 0.25);
  cursor: pointer;
}
.hud-button:hover,
.hud-button:focus-visible {
  background: rgba(109, 255, 154, 0.12);
  outline: none;
}

@keyframes hud-blink { 50% { opacity: 0; } }

@media (max-width: 720px) {
  .hud-panel {
    margin-top: 4.5rem;
    padding: 1.6rem 1.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hud-cursor,
  .hud-panel h1::after { animation: none; }
}
