/* Jacob Church Creative — desktop-first. Mobile gets a stacked fallback (see @media at bottom). */

:root {
  --ink: #171714;
  --paper: #f2f0e9;
  --signal: #ff4d00;
  --muted: #8b887e;
  --rule: #d6d2c6;

  --sans: "Helvetica Neue", Helvetica, Arial, "Segoe UI", system-ui, sans-serif;
  --mono: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;

  --rail: 30vw;
  --pad: 40px;
}

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

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ---------- shared type ---------- */

.label {
  margin: 0;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.rule {
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: 0;
}

/* ---------- home: two columns, full bleed, no page scroll ---------- */

.home {
  display: grid;
  grid-template-columns: minmax(320px, var(--rail)) 1fr;
  height: 100svh;
  overflow: hidden;
}

.rail {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: var(--pad);
  border-right: 1px solid var(--rule);
  overflow-y: auto;
}

.identity h1 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.012em;
}

.identity p {
  margin: 2px 0 0;
  font-size: 15px;
  color: var(--muted);
}

.section { display: flex; flex-direction: column; gap: 12px; }

.section .label { margin-bottom: 2px; }

.list { display: flex; flex-direction: column; gap: 3px; }

.list a {
  position: relative;
  width: fit-content;
  padding: 2px 0;
  font-size: 17px;
  font-weight: 450;
  letter-spacing: -0.015em;
  transition: color 120ms ease, transform 160ms cubic-bezier(.2,.7,.3,1);
}

.list a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 3px;
  height: 1px;
  background: var(--signal);
  transition: right 200ms cubic-bezier(.2,.7,.3,1);
}

.list a:hover { color: var(--signal); transform: translateX(5px); }
.list a:hover::after { right: 0; }

.rail footer { margin-top: auto; padding-top: 24px; }
.rail footer .label { text-transform: none; letter-spacing: 0.02em; }

/* ---------- home: the game side ---------- */

.play {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--pad);
  min-width: 0;
}

.play-head { display: flex; align-items: baseline; gap: 10px; }

.hint {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--signal);
  transition: opacity 500ms ease;
}

.hint.is-playing { opacity: 0; }

/* the field: canvas draws the snake, DOM draws the idea so type stays crisp */
.field {
  position: relative;
  flex: 1;
  margin-top: 20px;
  min-height: 0;
}

.field canvas { display: block; width: 100%; height: 100%; }

.idea {
  position: absolute;
  top: 0; left: 0;
  white-space: nowrap;
  font-size: 21px;
  font-weight: 450;
  letter-spacing: -0.02em;
  pointer-events: none;
  opacity: 0;
  transition: opacity 260ms ease;
}

.idea.is-live { opacity: 1; }
.idea.align-left { transform: translateX(-100%); }

.tally {
  position: absolute;
  right: 0; bottom: 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  transition: opacity 400ms ease;
}

.tally.is-live { opacity: 1; }

/* ---------- campaign + about pages ---------- */

.page {
  max-width: 1000px;
  margin: 0 auto;
  padding: var(--pad) var(--pad) 120px;
}

.back {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 120ms ease;
}

.back:hover { color: var(--signal); }

.page-head { margin: 56px 0 16px; }

.page-head h1 {
  margin: 0;
  font-size: 46px;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.page-head .blurb {
  margin: 14px 0 0;
  max-width: 52ch;
  font-size: 18px;
  color: var(--ink);
}

.credits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.credits li { font-family: var(--mono); font-size: 10px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.credits b { color: var(--ink); font-weight: 500; }

.block { margin-top: 64px; }
.block > .label { margin-bottom: 18px; }

.stack { display: flex; flex-direction: column; gap: 20px; }

.embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #e7e4da;
  border: 1px solid var(--rule);
}

.embed.is-vertical { padding-top: 177.78%; max-width: 420px; }

.embed iframe, .embed video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid.is-tight { grid-template-columns: repeat(3, 1fr); }
.grid img, .grid video { display: block; width: 100%; height: auto; border: 1px solid var(--rule); }

.spots { display: flex; flex-direction: column; gap: 20px; }

.spot { display: flex; flex-direction: column; gap: 8px; }
.spot h3 { margin: 0; font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }
.spot audio { width: 100%; max-width: 520px; }

.prose { max-width: 56ch; }
.prose p { font-size: 18px; line-height: 1.55; }

.next {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  margin-top: 96px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}

.next a { font-size: 17px; letter-spacing: -0.015em; transition: color 120ms ease; }
.next a:hover { color: var(--signal); }

/* ---------- mobile fallback (proper adaptation is a later pass) ---------- */

@media (max-width: 860px) {
  :root { --pad: 24px; }

  .home { grid-template-columns: 1fr; height: auto; overflow: visible; }
  .rail { border-right: 0; border-bottom: 1px solid var(--rule); overflow: visible; }
  .play { min-height: 50svh; }
  .field { display: none; }
  .hint { text-transform: none; letter-spacing: 0.02em; color: var(--muted); }

  .page-head h1 { font-size: 32px; }
  .page-head .blurb { font-size: 16px; }
  .grid, .grid.is-tight { grid-template-columns: 1fr; }
  .embed.is-vertical { max-width: none; }
}

/* film captions */
.film { margin: 0; }
.film figcaption {
  margin-top: 9px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}
.stack .film + .film { margin-top: 12px; }
