:root {
  --ink: #e8e4da;
  --dim: #9aa3ad;
  --bg: #0d1016;
  --panel: #151a22;
  --line: #2a313c;
  --amber: #ffb347;
  --red: #ff4d3d;
  --wide: 0.22em;
}

* { box-sizing: border-box; }

/* Links take the palette, never the browser's blue: amber, and a duller
   brass once visited. */
a { color: var(--amber); text-underline-offset: 0.18em; }
a:visited { color: #c9955a; }
a:hover, a:focus-visible { color: #ffd08a; }

html { background: var(--bg); scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

.hero {
  position: relative;
  min-height: min(84vh, 820px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

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

/* The street, not the sky: the squad holds the lower right of the picture. */
.hero-art { object-fit: cover; object-position: 50% 62%; }

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    /* Into the page along the bottom edge only, so the squad stays in view;
       the title's side darkened from the left. */
    linear-gradient(to top, var(--bg) 0%, rgba(13, 16, 22, 0.7) 9%, rgba(13, 16, 22, 0) 32%),
    linear-gradient(to right, rgba(13, 16, 22, 0.82) 0%, rgba(13, 16, 22, 0.45) 30%, rgba(13, 16, 22, 0) 55%);
}

.hero-text {
  position: relative;
  padding: 0 6vw max(9vh, 5.5rem);
  max-width: 900px;
}

.kicker, .status, h2, figcaption {
  text-transform: uppercase;
  letter-spacing: var(--wide);
  font-size: 0.8rem;
}

.kicker { color: var(--amber); margin: 0 0 0.6rem; }

h1 {
  margin: 0;
  font-size: clamp(3rem, 11vw, 7.5rem);
  line-height: 0.92;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
}

.tagline {
  margin: 1.1rem 0 1.4rem;
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  color: var(--ink);
  font-style: italic;
}

.status { color: var(--dim); display: flex; align-items: center; gap: 0.6rem; }

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 12px var(--red);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse { 50% { opacity: 0.35; } }

/* The hero fills the first screen, so this says there is more below it, and
   takes you there. */
.scroll-cue, .scroll-cue:visited {
  position: absolute;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  color: var(--ink);
  font-size: 0.75rem;
  letter-spacing: var(--wide);
  text-transform: uppercase;
  text-decoration: none;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
  opacity: 0.85;
}

.scroll-cue::after {
  content: "";
  width: 0.8rem;
  height: 0.8rem;
  border-right: 2px solid var(--amber);
  border-bottom: 2px solid var(--amber);
  transform: rotate(45deg);
  animation: nudge 1.8s ease-in-out infinite;
}

.scroll-cue:hover, .scroll-cue:focus-visible { color: var(--amber); opacity: 1; }
.scroll-cue:focus-visible { outline: 2px solid var(--amber); outline-offset: 6px; border-radius: 4px; }

@keyframes nudge { 50% { transform: translateY(0.35rem) rotate(45deg); } }

@media (prefers-reduced-motion: reduce) {
  .dot, .scroll-cue::after { animation: none; }
  html { scroll-behavior: auto; }
}

/* Narrow screens see a slice of the middle: the slice with the walker and the squad. */
@media (max-width: 900px) {
  .hero-art { object-position: 64% 60%; }
}

/* ---- body ---- */

main { max-width: 1100px; margin: 0 auto; padding: 0 6vw; }

.teaser { max-width: 680px; margin: 4rem auto 5rem; }

.teaser p { margin: 0 0 1.2rem; color: var(--dim); }

.teaser .lede { color: var(--ink); font-size: 1.3rem; line-height: 1.5; }

.teaser em { color: var(--amber); font-style: normal; }

.stills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
  margin: 0 0 5rem;
}

figure { margin: 0; }

.stills img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
}

figcaption { color: var(--dim); margin-top: 0.7rem; }

.machines {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2.4rem;
  align-items: center;
  margin: 0 0 5rem;
}

.machines img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
}

h2 { color: var(--amber); margin: 0 0 0.8rem; }

.machines p { color: var(--dim); margin: 0; }

@media (max-width: 760px) {
  .machines { grid-template-columns: 1fr; }
}

footer {
  border-top: 1px solid var(--line);
  padding: 2.4rem 6vw 3rem;
  text-align: center;
  color: var(--dim);
}

footer p { margin: 0.3rem 0; }

.small { font-size: 0.8rem; opacity: 0.7; }

footer a, footer a:visited { color: var(--dim); }
footer a:hover, footer a:focus-visible { color: var(--amber); }

/* ---- inner pages: the way back ---- */

.crumbs {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  padding: 1.4rem 6vw 0;
  font-size: 0.78rem;
  letter-spacing: var(--wide);
  text-transform: uppercase;
  color: var(--dim);
}

.crumbs a, .crumbs a:visited { color: var(--dim); text-decoration: none; }
.crumbs a:hover, .crumbs a:focus-visible { color: var(--amber); }

/* ---- stories (the cards are written by build/make-story.py) ---- */

.stories { margin: 0 0 5rem; }

.stories-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.stories-head h2 { margin: 0; }

.stories-head a, .stories-head a:visited, .story-card .read {
  color: var(--dim);
  font-size: 0.8rem;
  letter-spacing: var(--wide);
  text-transform: uppercase;
  text-decoration: none;
}

.stories-head a:hover, .stories-head a:focus-visible { color: var(--amber); }

.story-list { display: grid; gap: 1.6rem; }

.story-card, .story-card:visited {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2rem;
  align-items: center;
  color: inherit;
  text-decoration: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.story-card img { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; max-width: 100%; }

.story-card > div { padding: 1.6rem 2rem 1.6rem 0; }

.story-card .kicker { margin-bottom: 0.5rem; }

.story-card h3 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.story-card p { color: var(--dim); margin: 0 0 1.2rem; }

.story-card:hover, .story-card:focus-visible { border-color: var(--amber); }

.story-card:hover .read, .story-card:focus-visible .read { color: var(--amber); }

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

@media (max-width: 760px) {
  .story-card { grid-template-columns: 1fr; gap: 0; }
  .story-card > div { padding: 1.3rem 1.3rem 1.5rem; }
}

/* ---- videos: story-card layout, a still that links out to YouTube ---- */

.videos { margin: 0 0 5rem; }

.video-still { position: relative; display: block; align-self: stretch; }

.video-card .video-still img { aspect-ratio: 16 / 9; height: 100%; }

.video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4.2rem;
  height: 4.2rem;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(13, 16, 22, 0.72);
  border: 2px solid var(--amber);
  transition: background 0.15s;
}

.video-play::after {
  content: "";
  position: absolute;
  left: 54%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 0.8rem 0 0.8rem 1.3rem;
  border-color: transparent transparent transparent var(--amber);
}

.video-card:hover .video-play, .video-card:focus-visible .video-play { background: var(--amber); }
.video-card:hover .video-play::after, .video-card:focus-visible .video-play::after { border-left-color: var(--bg); }

.video-length {
  position: absolute;
  right: 0.7rem;
  bottom: 0.7rem;
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  background: rgba(13, 16, 22, 0.85);
  color: var(--ink);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

/* ---- the dev log on the home page, and its sign-up (build/make-post.py) ---- */

.devlog { margin: 0 0 5rem; }

.log-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
  align-items: start;
}

.log-list { display: grid; gap: 1rem; }

.log-entry, .log-entry:visited {
  display: block;
  padding: 1.3rem 1.6rem;
  color: inherit;
  text-decoration: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.log-entry .kicker { margin-bottom: 0.4rem; }

.log-entry h2, .log-entry h3 {
  margin: 0 0 0.5rem;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1.25;
  letter-spacing: 0.01em;
  text-transform: none;
}

.log-entry p { color: var(--dim); margin: 0; }

.log-entry:hover, .log-entry:focus-visible { border-color: var(--amber); }
.log-entry:hover h2, .log-entry:hover h3 { color: var(--amber); }
.log-entry:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

.empty { color: var(--dim); margin: 0; }

.signup {
  padding: 1.5rem 1.6rem;
  border: 1px solid var(--line);
  border-top: 2px solid var(--amber);
  border-radius: 6px;
  background: var(--panel);
}

.signup label {
  display: block;
  margin-bottom: 0.9rem;
  font-weight: 700;
  font-size: 1.1rem;
}

.signup-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.signup input {
  flex: 1 1 12rem;
  min-width: 0;
  padding: 0.7rem 0.8rem;
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.signup input::placeholder { color: #5f6873; }
.signup input:focus { outline: 2px solid var(--amber); outline-offset: 1px; border-color: transparent; }

.signup button {
  flex: 0 0 auto;
  padding: 0.7rem 1.2rem;
  font: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: var(--wide);
  text-transform: uppercase;
  color: var(--bg);
  background: var(--amber);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}

.signup button:hover, .signup button:focus-visible { background: #ffd08a; }
.signup button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.signup-note { margin: 0.9rem 0 0; color: var(--dim); font-size: 0.85rem; line-height: 1.5; }

/* listmonk's trap for bots: a field people never see. */
.signup-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 760px) {
  .log-layout { grid-template-columns: 1fr; }
}
