/* v20 Front Page: newsprint, ink, one red. Tokens + the parts every page shares (masthead, kicker, flag, buttons). */
:root {
  --paper: #f2ecdf;
  --paper-2: #e8e0cf;
  --paper-3: #ddd3bf;
  --ink: #161412;
  --ink-2: #3b3732;
  --ink-3: #6e675d;
  --rule: rgba(22, 20, 18, .9);
  --hair: rgba(22, 20, 18, .22);
  --red: #c8102e;
  --red-2: #a10c24;
  --green: #1d6b3c;
  --room: #1b1916;
  --mast: "Big Caslon", "Bodoni 72", "Didot", "Times New Roman", serif;
  --head: "Bodoni 72", "Didot", "Big Caslon", "Times New Roman", Georgia, serif;
  --body: Charter, "Iowan Old Style", Georgia, "Times New Roman", serif;
  --cond: "DIN Condensed", "Avenir Next Condensed", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --snap: cubic-bezier(.3, 1.4, .5, 1);
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--paper); color: var(--ink); }
body { font: 17px/1.45 var(--body); -webkit-font-smoothing: antialiased; overflow: hidden; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
h1, h2, h3, p, figure, ol, ul, blockquote { margin: 0; padding: 0; }
ol, ul { list-style: none; }
em { font-style: italic; }

/* ---- the stage (the engine's canvas lives here) ---- */
.stage { position: fixed; inset: 0; z-index: 1; }
.stage.is-off { visibility: hidden; }
.stage > .pt-canvas { transition: filter .7s ease; }
.stage.is-photo > .pt-canvas { filter: grayscale(1) contrast(1.18) brightness(1.04); }
body.is-soft .stage.is-photo > .pt-canvas { filter: grayscale(1) contrast(1.15); }

/* ---- every page ---- */
.screen { position: fixed; inset: 0; z-index: 10; overflow-x: clip; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.screen.is-empty { pointer-events: none; }
.page { min-height: 100%; position: relative; overflow-x: clip; animation: page-in .32s var(--ease) both; }
.page.is-leaving { animation: page-out .26s ease both; }
.page.is-paper { background: var(--paper); }
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes page-out { to { opacity: 0; } }
.sheet { position: relative; margin: 0 auto; padding: calc(var(--sat) + 14px) calc(16px + var(--sar)) calc(var(--sab) + 22px) calc(16px + var(--sal)); }

/* entrances: opacity + a short rise (no scale on tap targets) */
.in { animation: rise .42s var(--ease) both; animation-delay: calc(var(--d, 0) * 1ms); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---- the masthead ---- */
.mast { position: relative; text-align: center; border-bottom: 3px double var(--rule); padding-bottom: 6px; }
.mast__name { font: 700 clamp(30px, 8.6vw, 76px)/1 var(--mast); letter-spacing: -.01em; white-space: nowrap; padding: 4px 0 8px; }
.mast__line { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--rule); padding-top: 5px;
  font: 600 12px/1.2 var(--cond); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.mast__line span:nth-child(2) { text-align: center; }
.mast__line span:last-child { text-align: right; }
.mast--sm .mast__name { font-size: clamp(22px, 6.2vw, 40px); padding: 0 0 6px; }
.mast--sm .mast__line { font-size: 11px; }

/* ---- small type parts ---- */
.kicker { font: 600 13px/1.2 var(--cond); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.flag { display: inline-block; background: var(--ink); color: var(--paper); padding: 4px 7px 2px; font: 700 12px/1.1 var(--cond); letter-spacing: .14em; text-transform: uppercase; }
.flag.is-good { background: var(--green); }
.flag.is-miss, .flag.is-late { background: var(--red); }

/* ---- the one forward button ---- */
.cta { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 58px; width: 100%;
  padding: 14px 22px 12px; border: 0; border-radius: 2px; background: var(--ink); color: var(--paper); cursor: pointer;
  font: 700 22px/1 var(--cond); letter-spacing: .08em; text-transform: uppercase;
  box-shadow: 0 0 0 1px var(--ink), 5px 5px 0 0 var(--red); transition: transform .12s ease, box-shadow .12s ease, opacity .3s ease, background .2s; }
.cta:active, .cta.is-tapped { transform: translate(4px, 4px); box-shadow: 0 0 0 1px var(--ink), 1px 1px 0 0 var(--red); }
.cta:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; }
.cta[disabled] { cursor: default; background: #8d867a; box-shadow: 0 0 0 1px #8d867a, 5px 5px 0 0 var(--paper-3); }
.cta.is-arming[disabled] { background: #6f695f; box-shadow: 0 0 0 1px var(--ink), 5px 5px 0 0 var(--red); overflow: hidden; isolation: isolate; }
.cta.is-arming[disabled]::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--ink); transform-origin: left center; animation: ink var(--arm, .9s) linear both; }
.cta--red.is-arming[disabled] { background: #b86b6f; }
.cta--red.is-arming[disabled]::before { background: var(--red); }
@keyframes ink { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.cta.is-pulse { animation: nudge 1.4s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { box-shadow: 0 0 0 1px var(--ink), 5px 5px 0 0 var(--red); } 50% { box-shadow: 0 0 0 1px var(--ink), 8px 8px 0 0 var(--red); } }
.cta--red { background: var(--red); box-shadow: 0 0 0 1px var(--red-2), 5px 5px 0 0 var(--ink); }
.cta--red:active, .cta--red.is-tapped { box-shadow: 0 0 0 1px var(--red-2), 1px 1px 0 0 var(--ink); }
.cta.is-booked { background: var(--green); box-shadow: 0 0 0 1px var(--green), 5px 5px 0 0 var(--ink); }
.cta__dots { display: none; width: 22px; height: 22px; border-radius: 50%; border: 3px solid currentColor; border-right-color: transparent; animation: spin-l .8s linear infinite; }
.cta[disabled] .cta__dots { display: inline-block; }
@keyframes spin-l { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
