/* Burnt & Toast: "The Toast Room". The base for full Toast Room pages (home and Journal):
   tokens, type, buttons, pills, forms and the shared drawn components (frames, stubs, pins, the
   luggage tag). Loads after chrome.css, which owns the header, newsletter band and footer.
   home.css and journal.css add what their pages need. */

:root {
  /* Keep in step with the scoped token block at the top of chrome.css. */
  --paper: #FBF4E6;
  --paper-2: #F4EAD6;
  --card: #FFFCF5;
  --ink: #2B1D14;
  --ink-soft: #4A382C;
  --muted: #5E4B3E;
  --crust: #7A3E1D;
  --burnt: #B5471B;
  --butter: #F4C95D;
  --marmalade: #E8742C;
  --jam: #C23B3B;
  --hedge: #3C6B47;
  --wire: #9E978D;
  --wire-hi: #E4DFD7;
  --toast-mark: #5A2A10;
  --night: #0D1116;
  --bone: #EDE7DD;
  --gold: #E3C15A;

  --display: "Bricolage Grotesque", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Nothing You Could Do", "Bradley Hand", "Segoe Print", cursive;

  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --wrap: 1320px;
  --gutter: clamp(16px, 4vw, 40px);
  /* One spacing scale for the whole site. --space-section is the gap between sections and the gap
     between a page's last content and the footer (or the newsletter band); --space-head sits under a
     section heading; --card-pad is the inside of every text card. */
  --space-section: clamp(56px, 8vw, 104px);
  --space-head: clamp(20px, 3vw, 36px);
  --card-pad: 20px 22px 22px;
  --radius: 14px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; background: var(--paper); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-optical-sizing: auto;
  overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
figure { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 800; letter-spacing: -0.03em; line-height: 1; text-wrap: balance; }
ul { margin: 0; padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* Buttons, pills, forms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 20px;
  border: 2.5px solid var(--ink); border-radius: 999px;
  background: var(--card); color: var(--ink);
  font-weight: 700; font-size: 1rem; line-height: 1.15; text-decoration: none; text-align: center;
  box-shadow: 0 4px 0 var(--ink);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background-color .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn-primary { background: var(--marmalade); }
.btn-primary:hover { background: #EE8540; }
.btn-butter { background: var(--butter); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.text-link { font-weight: 700; color: var(--crust); text-underline-offset: 4px; text-decoration-thickness: 2px; display: inline-flex; min-height: 44px; align-items: center; }
.text-link:hover { color: var(--burnt); }

.pill {
  display: inline-flex; align-items: center; min-height: 26px; padding: 2px 10px;
  border: 1.5px solid var(--ink); border-radius: 999px;
  font-size: .8125rem; font-weight: 700; line-height: 1.2; background: var(--card); white-space: nowrap;
}
.pill-out { background: var(--hedge); border-color: var(--hedge); color: var(--paper); }
.pill-soon { background: var(--jam); border-color: var(--jam); color: #FFF8EE; }
.pill-dev { background: #18242B; border-color: #18242B; color: #F2E6C9; }

.signup { display: grid; gap: 8px; }
.signup label { font-weight: 700; font-size: .9375rem; }
.signup-row { display: flex; flex-wrap: wrap; gap: 10px; }
.signup input[type=email] {
  flex: 1 1 200px; min-width: 0; min-height: 48px; padding: 10px 18px;
  border: 2.5px solid var(--ink); border-radius: 999px; background: #FFFFFF; color: var(--ink);
}
.signup input[type=email]::placeholder { color: #75675B; }
.signup .small { font-size: .8125rem; color: var(--muted); }
.signup .small a { color: inherit; }

/* Section headings */
.section { padding-block: var(--space-section); }
.section-head { display: grid; gap: 10px; margin-bottom: var(--space-head); max-width: 44rem; }

/* The gap before the footer, the same on every page: <main> ends one section space above it, so a
   page's last block never needs its own bottom padding (and can't forget it). A page that ends on a
   coloured band keeps the band's own padding instead, so no strip of paper shows between the bands. */
main { padding-bottom: var(--space-section); }
main:has(> .j-browse:last-child) { padding-bottom: 0; }
.section-head h2 { font-size: clamp(2.1rem, 5vw, 3.75rem); letter-spacing: -0.04em; }
.section-head p { font-size: 1.125rem; }

/* Drawn frames, shared by the home chapters and the Journal's posters and covers */
.frame { position: relative; width: 100%; border: 3px solid var(--ink); border-radius: 12px; box-shadow: 6px 7px 0 var(--ink); }
.media { position: relative; overflow: hidden; }
.media video, .media img { width: 100%; height: 100%; object-fit: cover; }
.media-wide { aspect-ratio: 16 / 9; }
.media-square { aspect-ratio: 1; }

/* The caption: a ticket stub */
.stub {
  position: relative; max-width: 46ch; margin-left: 10px;
  background: var(--card); border: 2px solid var(--ink); border-left: 2px dashed var(--ink); border-radius: 4px 8px 8px 4px;
  padding: 8px 14px 9px 16px; font-size: .875rem; line-height: 1.45; color: var(--ink-soft);
  transform: rotate(-.6deg);
}

/* An enamel railway poster pinned to the wall */
.f-poster { background: #173F30; padding: 14px; transform: rotate(-.8deg); }
.f-poster .media { border-radius: 4px; outline: 2px solid #E8B44C; outline-offset: 5px; }
.poster-flag { position: absolute; right: 18px; top: 22px; z-index: 3; background: #E8B44C; color: #173F30; font-weight: 800; font-size: .8125rem; padding: 3px 10px; border-radius: 999px; border: 2px solid #173F30; transform: rotate(4deg); }
.pin { position: absolute; top: -9px; z-index: 4; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #F2A3A3, var(--jam) 55%, #8E2222); border: 2px solid var(--ink); }
.pin-l { left: 14px; } .pin-r { right: 14px; }
.tape { position: absolute; left: 50%; top: -14px; z-index: 4; width: 96px; height: 26px; margin-left: -48px; background: rgba(244, 201, 93, .82); border: 1px solid rgba(43, 29, 20, .2); transform: rotate(-3deg); }

/* "Good for you": a buttered luggage tag. Also the Journal's "good to know" tip. */
.good {
  position: relative; margin-left: 16px;
  background: var(--butter); color: var(--ink);
  border: 2.5px solid var(--ink); border-radius: 6px 14px 14px 6px;
  padding: 12px 18px 14px 40px; font-size: 1rem; line-height: 1.5;
  box-shadow: 3px 4px 0 rgba(43, 29, 20, .3); transform: rotate(-.8deg);
}
.good::before { /* the punched hole */
  content: ""; position: absolute; left: 12px; top: 50%; width: 13px; height: 13px; margin-top: -6px;
  border-radius: 50%; background: var(--paper); border: 2.5px solid var(--ink);
}
.good::after { /* the string */
  content: ""; position: absolute; left: -16px; top: calc(50% - 10px); width: 34px; height: 22px;
  border: 2px solid var(--crust); border-color: var(--crust) transparent transparent transparent; border-radius: 50%;
  transform: rotate(-24deg);
}
.good-label { color: var(--crust); font-size: 1.2rem; margin-bottom: 2px; }

/* The highlighted second line of a headline */
.hl { background: linear-gradient(transparent 58%, rgba(244, 201, 93, .85) 58% 92%, transparent 92%); -webkit-box-decoration-break: clone; box-decoration-break: clone; padding-inline: 2px; }

@media (max-width: 480px) {
  .frame { box-shadow: 4px 5px 0 var(--ink); }
}

/* Reduced motion: everything holds still */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* The page /subscribe answers with when JavaScript is off */
.signup-result { display: grid; justify-items: center; text-align: center; gap: 10px; padding-top: clamp(40px, 8vw, 96px); max-width: 40rem; }
.signup-result svg { width: 110px; height: auto; transform: rotate(-6deg); filter: drop-shadow(3px 4px 0 rgba(43, 29, 20, .3)); }
.signup-result-kicker { color: var(--burnt); font-size: 1.4rem; transform: rotate(-2deg); }
.signup-result h1 { font-size: clamp(2.4rem, 8vw, 4.25rem); letter-spacing: -0.045em; line-height: 1; }
.signup-result-text { font-size: 1.125rem; line-height: 1.55; }
.signup-result .btn-row { justify-content: center; margin-top: 8px; }
.signup-result-small { font-size: .9375rem; color: var(--muted); }
.signup-result-small a { color: var(--crust); display: inline-flex; min-height: 44px; align-items: center; }
