/* braddraculagame.com. The brand's three colors (brand/README.md) and its one idea: ruled off twice in red, like a ledger's total. */
@font-face { font-family: "BD Display"; src: url(fonts/bd-display.woff?v=5d0764b6) format("woff"); font-display: swap; }
@font-face { font-family: "BD Text"; src: url(fonts/bd-text.woff?v=f33300b8) format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "BD Text"; src: url(fonts/bd-text-bold.woff?v=813804cc) format("woff"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: dark;
  --night: #030616;
  --paper: #f2ead8;
  --red: #c8202f;
  --dim: #b8b4a9;
  --gutter: clamp(20px, 5vw, 72px);
  --display: "BD Display", "Abril Fatface", Didot, "Bodoni MT", Georgia, serif;
  --text: "BD Text", Carlito, Calibri, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--night); }
body { margin: 0; background: var(--night); color: var(--paper); font: 400 clamp(1.19rem, 1rem + 0.45vw, 1.38rem)/1.45 var(--text); overflow-wrap: break-word; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.16em; text-decoration-thickness: 1px; }
a:hover { color: #fff; text-decoration-color: var(--red); }
h1, h2 { margin: 0; font-weight: 400; }
h2 { font: 400 clamp(2.1rem, 1.5rem + 2.1vw, 3.2rem)/1.06 var(--display); letter-spacing: 0.005em; text-wrap: balance; }
p { margin: 0 0 0.85em; }
p:last-child { margin-bottom: 0; }
.keep { white-space: nowrap; }

/* The top: Brad on the right, the name on his sky, the whole of it ruled off. */
.hero { position: relative; }
.art { display: block; position: relative; height: clamp(30rem, 52.2vw, 100svh); overflow: hidden; }
.art img { width: 100%; height: 100%; object-fit: cover; object-position: 100% 30%; }
.art::after { content: ""; position: absolute; inset: auto 0 0; height: clamp(9px, 1vw, 15px); background: linear-gradient(var(--red) 0 33.4%, var(--night) 33.4% 66.6%, var(--red) 66.6%); }
.words { position: absolute; left: var(--gutter); top: 50%; transform: translateY(-50%); width: min(42vw, 60rem); }
h1 img { width: 100%; }
.pitch { margin: 1.1em 0 0.7em; font-size: clamp(1.25rem, 0.8rem + 1.1vw, 2.3rem); line-height: 1.25; text-shadow: 0 1px 12px var(--night); }
.steam { margin: 0; font-weight: 700; color: var(--paper); }
.steam span { display: inline-block; font-weight: 400; color: var(--dim); }
.wishlist { display: inline-block; margin-right: 0.6em; padding: 0.42em 0.9em 0.46em; background: var(--red); color: #fff; font-weight: 700; text-decoration: none; }
.wishlist:hover { background: #dc3140; }
.date { margin: 0.8em 0 0; text-shadow: 0 1px 12px var(--night); }

/* The entries: a clip with Brad talking beside it. Sides swap, and a phone stacks them: heading, clip, words. */
main { display: block; }
.entry { display: grid; max-width: 1320px; margin: clamp(4.5rem, 9vw, 8rem) auto; padding: 0 var(--gutter); grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: auto 1fr; grid-template-areas: "clip head" "clip say"; column-gap: clamp(2rem, 4.5vw, 4.5rem); }
.entry:nth-of-type(even) { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "head clip" "say clip"; }
.entry h2 { grid-area: head; margin-bottom: 0.5em; padding-bottom: 0.42em; border-bottom: 6px double var(--red); }
.entry > .say { grid-area: say; }
.entry:first-of-type { grid-template-rows: 1fr; grid-template-areas: "clip say"; align-items: center; }
/* A second clip under the heading before it (the store's Play alone. Or bring a friend.): no heading, and nearer. */
.entry:has(+ .more) { margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.entry.more { grid-template-rows: 1fr; grid-template-areas: "clip say"; align-items: center; margin-top: clamp(2.5rem, 5vw, 4.5rem); }
.entry.more:nth-of-type(even) { grid-template-areas: "say clip"; }
.clip { grid-area: clip; align-self: start; margin: 0; background: #000; line-height: 0; }
.clip video { width: 100%; }
.byline img { float: left; width: 3.6em; height: 3.6em; margin: 0.2em 0.8em 0.2em 0; border-radius: 50%; }
.byline::after { content: ""; display: block; clear: both; }

/* Linda's caption. Her noises are only ever these. */
.linda { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6em 1em; margin: 1.2em 0; }
.linda img { flex: none; width: 170px; }
.linda p { margin: 0; font: 400 1.05em/1.3 var(--display); word-spacing: 0.1em; }
.linda span { display: block; white-space: nowrap; }
.linda b { display: block; margin-bottom: 0.2em; font: 700 0.72em/1 var(--text); letter-spacing: 0.1em; color: var(--dim); }

/* The void's whispers, in italics as on the store, and quieter than Brad. */
.whispers { margin: 0 0 1.1em; }
.whispers p { margin: 0 0 0.5em; font-style: italic; color: var(--dim); }

/* NEWS 4's facts, on a page out of the ledger: its red margin, its blue lines, its total ruled off twice. */
.news .clip { align-self: center; }
.sheet { grid-area: head / head / say / say; padding: clamp(1.3rem, 2.6vw, 2.1rem) clamp(1.2rem, 2.6vw, 2.1rem) clamp(1.3rem, 2.6vw, 2.1rem) clamp(2.5rem, 4.4vw, 3.6rem); color: #1b1a26; background: linear-gradient(90deg, transparent calc(clamp(2.5rem, 4.4vw, 3.6rem) - 0.9rem), var(--red) 0 calc(clamp(2.5rem, 4.4vw, 3.6rem) - 0.9rem + 1px), transparent 0), var(--paper); }
.news.entry { grid-template-rows: auto; grid-template-areas: "clip sheet"; }
.news.entry:nth-of-type(even) { grid-template-areas: "sheet clip"; }
.news .sheet { grid-area: sheet; }
.sheet h2 { font-size: clamp(1.75rem, 1.3rem + 1.3vw, 2.4rem); margin: 0 0 0.45em; }
.sheet ul { list-style: none; margin: 0; padding: 0; line-height: 1.28; }
.sheet li { padding: 0.42em 0; border-bottom: 1px solid #a9bfd2; }
.sheet li:last-child { padding-bottom: 0.55em; border-bottom: 6px double var(--red); }
.total { margin: 0.95em 0 0; font-weight: 700; }

/* The bottom line. */
footer { padding: clamp(1rem, 4vw, 3rem) var(--gutter) 3rem; text-align: center; }
.bye { margin: 0 0 0.5em; font: 400 clamp(2.5rem, 1.3rem + 5vw, 5.4rem)/1.05 var(--display); }
/* The last "day.", taken back as on the trailer's end card: VOID stamped on it in red (make/trailer/render.py draws it),
   hanging off the word's end as there, with the word dimmed under it, so VOID reads first (the word is as big as the
   stamp's letters, where the trailer's is small and thin). On a phone the word gets its own line and the stamp sits on
   its middle, as there's no room past its end. It's simply there, unless site.js holds it up to bring it down once the
   word's been on screen a second. */
.bye br { display: none; }
.void { position: relative; display: inline-block; color: #77736b; }
.void.held { color: inherit; }
.thud .void { transition: color 0.1s 0.1s; }
.void img { position: absolute; left: 0.1em; top: 50%; width: 3.2em; max-width: none; margin-top: -0.88em; pointer-events: none; }
.void img.up { visibility: hidden; }
.void img.down { animation: stamp 0.14s ease-out both; }
.bye.thud { animation: thud 0.3s ease-out 0.14s; }
@keyframes stamp { from { opacity: 0.45; transform: scale(1.7); } }
@keyframes thud { 25% { transform: translateY(0.06em); } 60% { transform: translateY(-0.02em); } }
.small { margin: clamp(3rem, 7vw, 5rem) 0 0; font-size: 0.86em; color: var(--dim); }
.small span { display: inline-block; margin: 0 0.8em; }
.small .mail:empty { display: none; }
.small button { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 0.16em; text-decoration-thickness: 1px; cursor: pointer; }
.small button:hover { color: #fff; text-decoration-color: var(--red); }

/* The 404. */
.lost main { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100svh; padding: 2rem var(--gutter); text-align: center; }
.lost main > img { width: 7rem; height: 7rem; margin-bottom: 1.2rem; border-radius: 50%; }
.lost h1 { margin-bottom: 0.3em; font: 400 clamp(2.6rem, 1.8rem + 4vw, 4.4rem)/1.05 var(--display); }
.lost .bye { margin: 1em 0 0; font-size: clamp(1.7rem, 1.3rem + 2vw, 2.6rem); }

/* A phone: the picture on its own with the name on its sky, then the pitch under it. Clips go edge to edge. */
@media (max-width: 640px) {
  .art { height: auto; }
  .art img { height: auto; }
  .words { position: static; transform: none; width: auto; padding: 1.15rem var(--gutter) 0; }
  .hero h1 { position: absolute; top: 5.5vw; left: 8vw; right: 8vw; }
  .pitch { margin-top: 0; }
  .entry, .entry:nth-of-type(even), .entry:first-of-type, .news.entry { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "head" "clip" "say"; margin: 3.6rem 0; }
  .entry:first-of-type { grid-template-areas: "clip" "say"; margin-top: 2.4rem; }
  .entry.more, .entry.more:nth-of-type(even) { grid-template-rows: none; grid-template-areas: "clip" "say"; margin-top: 2.4rem; }
  .entry:has(+ .more) { margin-bottom: 2.4rem; }
  .news.entry, .news.entry:nth-of-type(even) { grid-template-areas: "clip" "sheet"; }
  .linda img { width: 110px; }
  .linda p { font-size: min(5vw, 1.3em); }
  .clip { margin: 0 calc(var(--gutter) * -1) 1.1rem; }
  .news .clip { margin-bottom: 0; }
  .news .sheet { margin: 0 calc(var(--gutter) * -1); }
  .bye br { display: inline; }
  .void img { left: 50%; margin-left: -1.6em; }
}

/* Side by side, a clip stays in sight while the words beside it run on (the void's are three times its height). */
@media (min-width: 641px) {
  .clip { position: sticky; top: clamp(1rem, 4vh, 2.5rem); }
  /* Up to 919 wide the picture is 30rem tall and pinned to the right, so Brad's hair starts 23.3rem from the right edge
     (373 px of 480, measured), and the words end at 47vw. Under about 764 wide they'd run into his head, so the picture
     slides right, off the edge, and keeps 2rem between them. Wider, this is 0 and changes nothing. */
  .art img { object-position: calc(100% + max(0px, 25.3rem - 53vw)) 30%; }
}

/* A very wide screen: the hero's words come in from the edge and grow with it. */
@media (min-width: 1321px) {
  .words { left: 7vw; }
}
@media (min-width: 1700px) {
  .steam, .date { font-size: 1.6rem; }
}
