/* ==========================================================================
   Stork of Ages — BBS theme
   ==========================================================================
   Design tokens (see design plan in project notes):
   Color:
     --bg          #050607   near-black CRT background
     --panel       #0b1013   slightly lighter panel background
     --fg          #d7e6e6   primary body text, cool off-white
     --fg-dim      #6f9497   secondary/meta text
     --green        #4fd7e0   headings, borders, links
     --green-dim    #1f545a   dividers, inactive borders
     --status-bg   #7a1f1f   footer status bar background
     --status-fg   #f2dede   footer status bar text
   Type:
     --font-mono   body/menu text (terminal monospace)
     --font-display  logo/large headings (falls back to font-mono if no
                      pixel display font is installed — see fonts/README)
   ========================================================================== */

@font-face {
  font-family: "VT323";
  src: url("/fonts/VT323-Regular.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Px437 IBM VGA8";
  src: url("/fonts/Px437_IBM_VGA8.woff2") format("woff2");
  font-display: swap;
}

:root {
  --bg: #050607;
  --panel: #0b1013;
  --fg: #d7e6e6;
  --fg-dim: #6f9497;
  --green: #3ddc84;
  --green-dim: #1c5c38;
  --status-bg: #7a1f1f;
  --status-fg: #f2dede;

  --font-mono: "VT323", "Px437 IBM VGA8", "IBM Plex Mono", ui-monospace,
    "SFMono-Regular", Consolas, monospace;
  --font-display: var(--font-mono);

  --max-width: 900px;
  --border: 1px solid var(--green-dim);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-mono);
  /* VT323 renders small; bump base size so body copy stays readable */
  font-size: 20px;
  line-height: 1.4;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--green);
  color: var(--bg);
  padding: 0.5em 1em;
  z-index: 100;
}
.skip-link:focus {
  left: 0;
}

a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 2px;
}
a:hover,
a:focus-visible {
  color: var(--fg);
}
:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.crt {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1rem 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- Header ---- */

.bbs-header {
  border: var(--border);
  padding: 1rem;
  margin-bottom: 1rem;
}

.bbs-header__status {
  font-size: 0.85rem;
  color: var(--fg-dim);
  margin-bottom: 0.75rem;
}

.bbs-header__banner {
  text-align: center;
  margin-bottom: 1rem;
}

.bbs-logo {
  max-width: 100%;
  height: auto;
}

/* ---- Nav (BBS menu style) ---- */

.bbs-nav__list {
  list-style: none;
  margin: 0;
  padding: 0.75rem 0 0;
  border-top: 1px dashed var(--green-dim);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.bbs-nav__list a {
  text-decoration: none;
  color: var(--fg);
}
.bbs-nav__list a:hover,
.bbs-nav__list a:focus-visible {
  color: var(--green);
}
.bbs-nav__list li.is-active a {
  color: var(--green);
  text-decoration: underline;
}

.bbs-hotkey {
  color: var(--green);
  font-weight: bold;
}

/* ---- Main content ---- */

.bbs-main {
  flex: 1;
}

.bbs-page {
  border: var(--border);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.bbs-heading {
  font-family: var(--font-display);
  color: var(--green);
  font-size: 2rem;
  margin: 0 0 0.5rem;
  letter-spacing: 0.02em;
}

.bbs-subheading {
  color: var(--green);
  font-size: 1.4rem;
  margin: 2rem 0 0.75rem;
  border-bottom: 1px dashed var(--green-dim);
  padding-bottom: 0.25rem;
}

.bbs-subtitle {
  color: var(--fg-dim);
  margin: 0 0 0.5rem;
}

.bbs-meta {
  color: var(--fg-dim);
  font-size: 0.95rem;
}

.bbs-intro {
  color: var(--fg-dim);
}

.bbs-prose {
  max-width: 70ch;
}
.bbs-prose p {
  margin: 0 0 1rem;
}

.bbs-breadcrumb {
  margin-bottom: 1rem;
}
.bbs-breadcrumb a {
  text-decoration: none;
}

/* ---- Home page menu grid (Press / Film sections) ---- */

.bbs-menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 640px) {
  .bbs-menu-grid {
    grid-template-columns: 1fr;
  }
}

.bbs-menu-box {
  border: var(--border);
  padding: 1.25rem;
}

.bbs-menu-box__title {
  color: var(--green);
  margin: 0 0 0.75rem;
  font-size: 1.3rem;
}

.bbs-menu-box__link {
  display: inline-block;
  margin-top: 0.5rem;
  text-decoration: none;
}
.bbs-menu-box__link:hover,
.bbs-menu-box__link:focus-visible {
  text-decoration: underline;
}

/* ---- Menu lists (reel index, press index, tags) ---- */

.bbs-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: var(--border);
}

.bbs-menu-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--green-dim);
}

.bbs-menu-list a {
  text-decoration: none;
}
.bbs-menu-list a:hover,
.bbs-menu-list a:focus-visible {
  text-decoration: underline;
}

.bbs-menu-list__date {
  color: var(--fg-dim);
  white-space: nowrap;
  font-size: 0.9rem;
}

.bbs-menu-list--inline {
  border-top: none;
}
.bbs-menu-list--inline li {
  border-bottom: none;
  padding: 0.25rem 0;
}

.bbs-menu-list--books li {
  padding: 0.75rem 0;
}

.bbs-book-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--fg);
}
.bbs-book-row img {
  border: 1px solid var(--green-dim);
  flex-shrink: 0;
}
.bbs-book-row__title {
  display: block;
  color: var(--green);
  font-size: 1.2rem;
}

/* ---- Book detail page ---- */

.bbs-book {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.5rem;
}
@media (max-width: 640px) {
  .bbs-book {
    grid-template-columns: 1fr;
  }
}
.bbs-book__cover {
  width: 100%;
  height: auto;
  border: 1px solid var(--green-dim);
}

.bbs-badge {
  display: inline-block;
  padding: 0.15em 0.6em;
  border: 1px solid var(--green-dim);
  font-size: 0.9rem;
  margin: 0.25rem 0;
}
.bbs-badge--upcoming {
  color: var(--green);
  border-color: var(--green);
}

.bbs-note {
  color: var(--fg-dim);
  font-size: 0.95rem;
}

/* ---- Video embed / tags ---- */

.video-embed {
  border: var(--border);
  margin: 1rem 0;
  background: #000;
}

.bbs-tags {
  color: var(--fg-dim);
}
.bbs-tag {
  color: var(--green);
  margin-right: 0.5em;
}

/* ---- Footer status bar ---- */

.bbs-statusbar {
  background: var(--status-bg);
  color: var(--status-fg);
  padding: 0.5rem 1rem;
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.9rem;
}
.bbs-statusbar a {
  color: var(--status-fg);
}
.bbs-statusbar__sep {
  opacity: 0.6;
}

/* ---- Motion ---- */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

.video-embed {
  width: min(100%, 470px);
  margin: 1.5rem auto;
}

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