/* The Astro: Dock & Diner — website. The palette, type, scanlines and
   terminal panels are the game lobby's (scenes/ui/lobby.gd,
   assets/ui/lobby_bg.gdshader, scripts/ui/terminal_panel.gd). */

@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --amber: #ffb000;
  --amber-hi: #ffd060;
  --pink: #ff4f9a;
  --pink-dim: #6a2846;
  --text: #e8e8e8;
  --soft: #c9cdd2;
  --mute: #8a8f95;
  --night: #0b0d11;
  --base: #1a1d21;
  --edge: #0d292e;
  --panel: rgba(18, 20, 26, 0.88);
  --line: rgba(255, 176, 0, 0.5);
  --line-soft: rgba(232, 232, 232, 0.14);
  --cream: #fff3dc;
  --crust: #c98a3e;
  --red: #ff3b3b;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --glow: 0 0 6px rgba(255, 79, 154, 0.85), 0 0 20px rgba(255, 79, 154, 0.55), 0 0 48px rgba(255, 79, 154, 0.35);
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* The lobby's backdrop: a dark vignette drifting to teal at the edges. */
  background:
    radial-gradient(120% 90% at 50% 30%, var(--base) 0%, #14222a 55%, var(--edge) 100%) fixed,
    var(--night);
}

body {
  margin: 0;
  min-height: 100vh;
  font: 400 16px/1.65 var(--mono);
  font-feature-settings: "calt" 0; /* no code ligatures in prose */
  color: var(--text);
  overflow-x: clip;
}

/* The lobby's scanlines and film grain, behind everything (the grain also
   keeps the dark gradient from banding). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E"),
    repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, 0.2) 2px 4px);
}

a {
  color: var(--amber);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--amber-hi);
}

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

img {
  max-width: 100%;
}

.skip {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--amber);
  color: #111;
  font-weight: 700;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.amber {
  color: var(--amber);
}

.neon {
  color: var(--pink);
  text-shadow: var(--glow);
  animation: neon 11s steps(1, end) infinite;
}

/* A tube that's mostly steady and stutters now and then. */
@keyframes neon {
  0%,
  91%,
  92.2%,
  93.6%,
  100% {
    color: var(--pink);
    text-shadow: var(--glow);
  }

  90.4%,
  91.6%,
  93% {
    color: var(--pink-dim);
    text-shadow: none;
  }
}

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

/* ---------- top bar ---------- */

.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px var(--gutter);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.brand img {
  width: 28px;
  height: 28px;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px clamp(14px, 2.4vw, 28px);
}

.topnav a {
  color: var(--text);
  text-decoration: none;
  opacity: 0.82;
}

.topnav a:hover {
  color: var(--amber);
  opacity: 1;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: max(640px, min(100svh, 980px));
  padding: 110px clamp(16px, 6vw, 96px) 80px;
  overflow: hidden;
}

.hero-art,
.hero-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-art {
  z-index: -2;
}

.hero-art img {
  object-fit: cover;
  object-position: 60% 50%;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 10, 14, 0.9) 0%, rgba(8, 10, 14, 0.6) 32%, rgba(8, 10, 14, 0) 60%),
    linear-gradient(0deg, var(--night) 0%, rgba(11, 13, 17, 0) 26%),
    linear-gradient(180deg, rgba(8, 10, 14, 0.6) 0%, rgba(8, 10, 14, 0) 20%);
}

.hero-copy {
  max-width: 660px;
}

.kicker {
  margin: 0;
  color: var(--mute);
  font-weight: 700;
  font-size: clamp(18px, 2vw, 28px);
  letter-spacing: 0.1em;
}

.title {
  margin: 4px 0 24px;
  font-weight: 700;
  font-size: clamp(58px, 10.4vw, 148px);
  line-height: 0.95;
  letter-spacing: -0.01em;
}

.title span {
  display: block;
}

.title .kicker {
  margin-bottom: 6px;
  line-height: 1.2;
}

.tagline {
  margin: 0 0 30px;
  max-width: 34em;
  font-size: clamp(16px, 1.6vw, 19px);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.8);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.meta {
  margin: 22px 0 0;
  color: var(--soft);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.9);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border: 1px solid var(--amber);
  background: rgba(10, 12, 16, 0.62);
  color: var(--amber);
  font: 700 14px/1 var(--mono);
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}

a.btn:hover,
a.btn:focus-visible {
  background: var(--amber);
  color: #111;
}

.btn.is-soon {
  border-style: dashed;
  border-color: var(--mute);
  color: var(--text);
  cursor: default;
}

/* The lobby's amber standby light. */
.btn.is-soon::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
  animation: blink 1.6s steps(1) infinite;
}

.btn.ghost {
  border-color: var(--line-soft);
  color: var(--text);
}

/* ---------- sections ---------- */

.section {
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(64px, 9vw, 120px) var(--gutter) 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 28px;
}

h2 {
  margin: 0;
  color: var(--amber);
  font-size: clamp(24px, 3.2vw, 38px);
  line-height: 1.1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h2::before {
  content: "// ";
  content: "// " / ""; /* decoration: screen readers skip it */
  color: var(--mute);
}

.section > h2 {
  margin-bottom: 24px;
}

.lede {
  margin: 0;
  color: var(--mute);
}

/* ---------- terminal panels ---------- */

.terminal {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}

.terminal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--amber);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.terminal-head .id {
  color: var(--mute);
  font-weight: 400;
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-left: 10px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
}

.terminal-body {
  padding: clamp(18px, 3vw, 34px);
}

.terminal-body > :first-child {
  margin-top: 0;
}

.terminal-body > :last-child {
  margin-bottom: 0;
}

.prompt {
  color: var(--mute);
  letter-spacing: 0.06em;
}

.big {
  margin: 0 0 18px;
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 700;
  line-height: 1.35;
}

.intro p {
  max-width: 64ch;
}

.cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.05em;
  margin-left: 6px;
  vertical-align: -0.15em;
  background: var(--amber);
  animation: blink 1.1s steps(1) infinite;
}

/* ---------- today's specials ---------- */

.board {
  padding: clamp(22px, 4vw, 46px);
  border: 2px solid var(--pink);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(22, 24, 30, 0.95), rgba(13, 15, 19, 0.95));
  box-shadow:
    0 0 18px rgba(255, 79, 154, 0.35),
    inset 0 0 22px rgba(255, 79, 154, 0.14);
}

.board-note {
  margin: 0 0 30px;
  color: var(--mute);
  font-size: 13px;
  letter-spacing: clamp(0.04em, 1vw, 0.16em);
  text-align: center;
}

.menu {
  display: grid;
  gap: 28px 56px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dish-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.dish-name {
  color: var(--amber);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dots {
  flex: 1;
  min-width: 20px;
  border-bottom: 2px dotted rgba(232, 232, 232, 0.28);
  transform: translateY(-5px);
}

.price {
  color: var(--pink);
  font-weight: 700;
  white-space: nowrap;
}

.dish p {
  margin: 6px 0 0;
  color: var(--soft);
  font-size: 15px;
}

.dessert {
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px dashed rgba(255, 79, 154, 0.45);
}

.dessert-label {
  margin: 0 0 12px;
  color: var(--pink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.pie-btn {
  margin-top: 12px;
  padding: 10px 16px;
  border: 0;
  border-radius: 3px;
  background: var(--cream);
  box-shadow: 0 3px 0 var(--crust);
  color: var(--night);
  font: 700 13px/1 var(--mono);
  letter-spacing: 0.08em;
  cursor: pointer;
}

.pie-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--crust);
}

/* A pie on the page (site.js). */
.splat {
  position: absolute;
  z-index: 60;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation:
    splat-in 0.18s cubic-bezier(0.2, 1.6, 0.4, 1) both,
    splat-out 1.1s ease-in 3.4s forwards;
}

.splat svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.4));
}

.splat .drip {
  transform-box: fill-box;
  transform-origin: top;
  animation: drip 3.4s ease-in 0.2s both;
}

.splat-word {
  position: absolute;
  left: 50%;
  top: 0;
  color: var(--amber);
  font: 700 22px/1 var(--mono);
  letter-spacing: 0.06em;
  text-shadow: 0 2px 0 #000;
  animation: word-up 1.4s ease-out both;
}

@keyframes splat-in {
  from {
    transform: translate(-50%, -50%) scale(0.2);
  }

  to {
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes splat-out {
  to {
    opacity: 0;
    transform: translate(-50%, -42%);
  }
}

@keyframes drip {
  from {
    transform: scaleY(0.08);
  }

  to {
    transform: scaleY(1);
  }
}

@keyframes word-up {
  from {
    opacity: 0;
    transform: translate(-50%, 10px);
  }

  20% {
    opacity: 1;
  }

  to {
    opacity: 0;
    transform: translate(-50%, -46px);
  }
}

/* ---------- security feed ---------- */

.feed {
  display: grid;
  gap: 22px 18px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

figure {
  margin: 0;
}

.cam {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: #000;
}

.cam img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.8) contrast(1.05) brightness(0.9);
  transition: filter 0.25s, transform 0.4s;
}

.cam::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, 0.26) 2px 3px),
    radial-gradient(120% 100% at 50% 50%, transparent 58%, rgba(0, 0, 0, 0.5) 100%);
  transition: opacity 0.25s;
}

.cam:hover img,
.cam:focus-visible img {
  filter: none;
  transform: scale(1.03);
}

.cam:hover::after,
.cam:focus-visible::after {
  opacity: 0.3;
}

.cam-label,
.rec {
  position: absolute;
  top: 8px;
  z-index: 1;
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 2px #000, 0 0 6px #000;
}

.cam-label {
  left: 9px;
}

.rec {
  right: 9px;
}

.rec::before {
  content: "●";
  content: "●" / "";
  margin-right: 5px;
  color: var(--red);
  animation: blink 1.4s steps(1) infinite;
}

figcaption {
  margin-top: 8px;
  color: var(--mute);
  font-size: 13px;
}

.viewer {
  width: min(1280px, 94vw);
  max-height: 94vh;
  padding: 0;
  border: 1px solid var(--line);
  background: #07080a;
  color: var(--text);
}

.viewer::backdrop {
  background: rgba(4, 5, 7, 0.88);
}

.viewer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--amber);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.viewer-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(94vh - 112px);
  object-fit: contain;
  background: #000;
}

.viewer-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
}

.viewer-caption {
  flex: 1;
  margin: 0;
  font-size: 14px;
  text-align: center;
}

.viewer-btn {
  width: 42px;
  height: 38px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--amber);
  font: 700 18px/1 var(--mono);
  cursor: pointer;
}

.viewer-btn:hover {
  background: var(--amber);
  color: #111;
}

/* ---------- crew wanted ---------- */

.crew {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
}

.crew .terminal-body {
  padding: 18px 20px 22px;
}

.crew .terminal-body p {
  margin: 0;
  color: var(--soft);
  font-size: 15px;
}

.crew .btn {
  margin-top: 18px;
}

/* ---------- footer ---------- */

.site-footer {
  max-width: 1160px;
  margin: clamp(80px, 10vw, 140px) auto 0;
  padding: 0 var(--gutter) 44px;
}

.status-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--mute);
  font-size: 13px;
  letter-spacing: 0.06em;
}

.status-line .ok {
  color: var(--amber);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 18px 0 10px;
  font-size: 14px;
}

.fine {
  max-width: 92ch;
  margin: 0;
  color: var(--mute);
  font-size: 12px;
}

/* ---------- press kit ---------- */

.press-top {
  padding-top: 34px;
}

.back {
  font-size: 14px;
  text-decoration: none;
}

.press-title {
  margin: 4px 0 8px;
  font-size: clamp(44px, 7vw, 88px);
  font-weight: 700;
  line-height: 0.95;
}

.press-title span {
  display: block;
}

.press-title .kicker {
  margin-bottom: 6px;
  line-height: 1.2;
}

.prose p,
.prose li {
  max-width: 72ch;
}

.prose h3 {
  margin: 28px 0 8px;
  color: var(--pink);
  font-size: 16px;
  letter-spacing: 0.06em;
}

.prose ul {
  margin: 0;
  padding-left: 1.2em;
}

.prose li {
  margin: 6px 0;
}

.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 28px;
  margin: 0;
}

.facts dt {
  color: var(--mute);
}

.facts dd {
  margin: 0;
}

.downloads {
  display: grid;
  gap: 22px 18px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.downloads img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line-soft);
}

.downloads .tile {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line-soft);
  background: #262a31;
}

.downloads .tile img {
  width: auto;
  max-width: 82%;
  max-height: 78%;
  border: 0;
}

.downloads figcaption a {
  white-space: nowrap;
}

.credits-title {
  margin: 0;
  color: var(--amber);
  font-weight: 700;
}

.credits-byline {
  margin: 0 0 8px;
  color: var(--mute);
}

.credits-section h3 {
  margin: 24px 0 8px;
  color: var(--pink);
  font-size: 15px;
  letter-spacing: 0.08em;
}

.credits-section ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.credits-section li {
  padding: 3px 0;
  color: var(--soft);
}

/* ---------- 404 ---------- */

.notfound {
  display: grid;
  place-items: center;
  min-height: 72vh;
}

.notfound .terminal {
  width: 100%;
  max-width: 640px;
}

/* ---------- small screens ---------- */

@media (min-width: 820px) {
  .menu {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .hero {
    align-items: flex-start;
    min-height: max(700px, 100svh);
    padding-top: 92px;
  }

  /* The outpost sits in the lower part, under the title's sky. */
  .hero-art {
    top: 36%;
    height: 64%;
  }

  .hero-art img {
    object-position: 63% 50%;
  }

  .hero::before {
    background:
      linear-gradient(180deg, var(--night) 0%, rgba(11, 13, 17, 0.9) 36%, rgba(11, 13, 17, 0.35) 56%, rgba(11, 13, 17, 0) 70%),
      linear-gradient(0deg, var(--night) 0%, rgba(11, 13, 17, 0) 22%);
  }

  .topnav a.minor {
    display: none;
  }

  .facts {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .facts dd {
    margin-bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .neon,
  .cursor,
  .rec::before,
  .btn.is-soon::before,
  .splat,
  .splat .drip,
  .splat-word {
    animation: none;
  }

  .cam img {
    transition: none;
  }
}
