/* Bootstrap landing page. Colours follow the wordmark (cream, ember, tan) and the game's
   Avionics UI (black panels, thin cyan lines, B612 type). */
@font-face { font-family: "B612"; src: url("fonts/b612-regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "B612"; src: url("fonts/b612-bold.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("fonts/barlow-semicondensed-semibold.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("fonts/barlow-semicondensed-bold.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --bg: #07090b;
  --panel: #0d1114;
  --cream: #f4efe6;
  --text: #d9d3c7;
  --dim: #a39d92;
  --tan: #e3b577;
  --ember: #ff8a2a;
  --cyan: #3fd8ff;
  --line: rgba(63, 216, 255, 0.22);
  --body: "B612", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --head: "Barlow Semi Condensed", "Arial Narrow", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(ellipse 90% 520px at 50% 0, rgba(255, 138, 42, 0.09), transparent 70%);
  background-repeat: no-repeat;
  color: var(--text);
  font: 400 1rem/1.65 var(--body);
  overflow-wrap: break-word;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--tan); text-underline-offset: 0.18em; }
a:hover { color: var(--cream); }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 2px; }
strong { color: var(--cream); font-weight: 700; }

.skip { position: absolute; left: 16px; top: -100px; z-index: 10; padding: 8px 14px; background: var(--ember); color: #140a02; font-weight: 700; text-decoration: none; border-radius: 3px; }
.skip:focus { top: 12px; color: #140a02; }

.wrap { width: 100%; max-width: 1072px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.wrap-wide { width: 100%; max-width: 1472px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.wrap-inner { max-width: 1040px; margin: 0 auto; }
main > section { padding-top: 44px; padding-bottom: 12px; }

h1, h2 { margin: 0; }
h2 {
  font: 700 clamp(1.6rem, 1.15rem + 2vw, 2.4rem)/1.1 var(--head);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 16px;
}
.label {
  margin: 0 0 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
}
.label::before { content: ""; display: inline-block; width: 18px; height: 2px; margin-right: 10px; vertical-align: middle; background: var(--ember); }
.sub { margin: -6px 0 20px; color: var(--dim); max-width: 60ch; }
.dim { color: var(--dim); }

/* Top */
.top { padding-top: 36px; padding-bottom: 4px; text-align: center; }
.wordmark img { width: min(100%, 460px); margin: 0 auto; }
.lede { margin: 18px 0 0; font: 600 1.15rem/1.3 var(--head); letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }

/* Film */
main > .film-section { padding-top: 32px; }
.film {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--line);
  border-top: 2px solid var(--ember);
  border-radius: 3px;
  overflow: hidden;
}
.film iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.film-poster { position: absolute; inset: 0; display: block; color: var(--cream); text-decoration: none; }
.film-poster img { width: 100%; height: 100%; object-fit: cover; }
.film-poster:focus-visible { outline-offset: -4px; }
.play {
  position: absolute; left: 50%; top: 50%;
  width: 84px; height: 84px; margin: -42px 0 0 -42px;
  border-radius: 50%;
  background: rgba(7, 9, 11, 0.72);
  border: 2px solid var(--cream);
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.play::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  margin: -15px 0 0 -9px;
  border-style: solid; border-width: 15px 0 15px 26px;
  border-color: transparent transparent transparent var(--cream);
}
.film-poster:hover .play, .film-poster:focus-visible .play { background: var(--ember); border-color: var(--ember); transform: scale(1.06); }
.film-poster:hover .play::after, .film-poster:focus-visible .play::after { border-left-color: #140a02; }
.play-text {
  position: absolute; left: 10px; top: 10px;
  max-width: 52%;
  padding: 5px 10px;
  font-size: 0.8rem; font-weight: 700; line-height: 1.35;
  background: rgba(7, 9, 11, 0.78);
  border-left: 2px solid var(--ember);
  border-radius: 2px;
}
.play-text .dim { color: #cfc8bb; font-weight: 400; }
.film-note { margin: 12px 0 0; padding: 10px 14px; border-left: 2px solid var(--ember); background: var(--panel); color: var(--cream); }
.film-caption { margin: 18px 0 0; max-width: 72ch; }

/* About */
.points { list-style: none; margin: 0; padding: 0; max-width: 68ch; font-size: 1.0625rem; }
.points li { position: relative; padding: 9px 0 9px 26px; border-bottom: 1px solid rgba(244, 239, 230, 0.08); }
.points li::before { content: ""; position: absolute; left: 2px; top: 1.12em; width: 9px; height: 9px; background: var(--ember); transform: rotate(45deg); }
.status {
  margin-top: 28px; padding: 16px 18px 6px;
  max-width: 68ch;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 3px;
}
.status p { margin: 0 0 10px; }

/* Gallery */
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 18px; }
.gallery figure { margin: 0; }
.gallery a { display: block; aspect-ratio: 16 / 9; background: var(--panel); border: 1px solid rgba(244, 239, 230, 0.1); border-radius: 3px; overflow: hidden; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s ease; }
.gallery a:hover { border-color: var(--ember); }
.gallery a:hover img { transform: scale(1.02); }
.gallery figcaption { padding: 8px 2px 0; font-size: 0.875rem; line-height: 1.45; color: var(--dim); }
@media (min-width: 600px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .gallery { grid-template-columns: repeat(3, 1fr); gap: 22px; } }

/* Follow */
.buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; min-width: 132px; padding: 10px 24px;
  font: 700 1.1rem/1 var(--head); letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
  color: var(--cream);
  border: 1px solid rgba(244, 239, 230, 0.45);
  border-radius: 3px;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { border-color: var(--cream); background: rgba(244, 239, 230, 0.08); color: var(--cream); }
.btn-primary { background: var(--ember); border-color: var(--ember); color: #140a02; }
.btn-primary:hover { background: #ffa04d; border-color: #ffa04d; color: #140a02; }
.slot { margin-top: 20px; padding: 14px 18px; max-width: 68ch; border: 1px dashed rgba(244, 239, 230, 0.28); border-radius: 3px; color: var(--dim); }
.slot p { margin: 0; }

/* Footer */
.foot { margin-top: 56px; padding: 28px 0 36px; border-top: 1px solid var(--line); font-size: 0.875rem; color: var(--dim); }
.foot p { margin: 0 0 8px; max-width: 72ch; }
.foot-mark { width: 132px; margin-bottom: 14px; opacity: 0.85; }

@media (min-width: 768px) {
  body { font-size: 1.0625rem; }
  main > section { padding-top: 72px; padding-bottom: 16px; }
  .top { padding-top: 56px; }
  .wordmark img { width: 520px; }
  main > .film-section { padding-top: 44px; }
  .play { width: 104px; height: 104px; margin: -52px 0 0 -52px; }
}

/* About additions */
.label-gap { margin-top: 28px; }
.prose { max-width: 68ch; margin: 0; }
.notes { margin: 0 0 10px; padding-left: 1.1em; }
.notes li { margin: 0 0 6px; }

/* Live gallery */
.gallery figcaption strong { display: block; color: var(--cream); font-size: 0.9rem; }
.gallery-empty { color: var(--dim); }

/* Devlog */
.posts { list-style: none; margin: 0; padding: 0; max-width: 68ch; }
.posts li { padding: 12px 0; border-bottom: 1px solid rgba(244, 239, 230, 0.08); }
.posts a { font: 700 1.15rem/1.3 var(--head); letter-spacing: 0.02em; }
.posts p { margin: 4px 0 0; color: var(--dim); }
.post-date { display: block; font-size: 0.8rem; color: var(--cyan); }
.posts-empty { margin: 0; padding: 14px 18px; max-width: 68ch; border: 1px dashed rgba(244, 239, 230, 0.28); border-radius: 3px; color: var(--dim); }
.post { padding-top: 40px; padding-bottom: 40px; }
.post-title { font: 700 clamp(1.8rem, 1.2rem + 2vw, 2.6rem)/1.1 var(--head); color: var(--cream); margin: 0 0 20px; }
.post h2 { font-size: 1.5rem; margin-top: 32px; }
.post img { margin: 16px 0 4px; border-radius: 3px; }
.post-back { margin-top: 40px; }

/* Lightbox */
.lightbox { width: 100vw; height: 100vh; height: 100dvh; max-width: 100vw; max-height: 100vh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: rgba(4, 5, 6, 0.96); color: var(--text); overflow: hidden; }
.lightbox::backdrop { background: rgba(4, 5, 6, 0.9); }
.lightbox figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 16px 16px; }
.lightbox img { max-width: 100%; max-height: calc(100% - 80px); object-fit: contain; border-radius: 2px; }
.lightbox figcaption { max-width: 72ch; padding: 12px 4px 0; font-size: 0.9rem; line-height: 1.45; text-align: center; }
.lb-btn { position: absolute; width: 48px; height: 48px; border: 1px solid rgba(244, 239, 230, 0.35); border-radius: 50%; background: rgba(7, 9, 11, 0.7); cursor: pointer; }
.lb-btn:hover { border-color: var(--ember); }
.lb-prev::before, .lb-next::before { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; border: solid var(--cream); border-width: 0 0 2px 2px; }
.lb-prev { left: 12px; top: 50%; margin-top: -24px; }
.lb-prev::before { transform: translate(-30%, -50%) rotate(45deg); }
.lb-next { right: 12px; top: 50%; margin-top: -24px; }
.lb-next::before { transform: translate(-70%, -50%) rotate(-135deg); }
.lb-close { right: 12px; top: 8px; }
.lb-close::before, .lb-close::after { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 2px; background: var(--cream); transform: translate(-50%, -50%) rotate(45deg); }
.lb-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
@media (max-width: 599px) {
  .lb-prev, .lb-next { top: auto; bottom: 12px; margin-top: 0; }
  .lightbox figure { padding-bottom: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .gallery a:hover img, .film-poster:hover .play, .film-poster:focus-visible .play { transform: none; }
}

/* Site nav (every page) */
.site-nav { position: sticky; top: 0; z-index: 5; background: rgba(7, 9, 11, 0.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; }
.nav-mark img { width: 112px; }
.site-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.site-nav li a { display: block; padding: 8px 12px; font: 700 0.95rem/1 var(--head); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text); text-decoration: none; border-bottom: 2px solid transparent; }
.site-nav li a:hover { color: var(--cream); }
.site-nav li a[aria-current="page"] { color: var(--cream); border-bottom-color: var(--ember); }
@media (max-width: 420px) { .nav-mark img { width: 88px; } .site-nav li a { padding: 8px 8px; font-size: 0.85rem; } }

/* Home hero */
main > .hero { position: relative; padding: 0; min-height: min(78vh, 720px); display: flex; align-items: flex-end; overflow: hidden; }
.hero-bg, .hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-bg img { object-fit: cover; object-position: 50% 50%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(7, 9, 11, 0) 0%, rgba(7, 9, 11, 0.1) 55%, var(--bg) 100%); }
.hero-text { position: relative; z-index: 1; padding-top: 120px; padding-bottom: 40px; text-align: center; }
.hero .wordmark img { width: min(100%, 520px); margin: 0 auto; filter: drop-shadow(0 2px 18px rgba(0, 0, 0, 0.6)); }
.hero .lede { text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8); }
.hero-buttons { justify-content: center; margin: 22px 0 0; }

/* Page heads (devlog, gallery) */
.page-head { padding-top: 40px; }
.page-title { font: 700 clamp(2rem, 1.3rem + 2.6vw, 3rem)/1.05 var(--head); letter-spacing: 0.02em; text-transform: uppercase; color: var(--cream); margin: 0 0 12px; }
.posts-big a { font-size: 1.45rem; }
.post-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; }
