/* ETHRIS auxiliary pages (404.html, privacy.html, festival-game/): static documents, independent of the journey runtime (no script needed; festival-game/ loads only the analytics loader).
   The same identity as site.css (tokens copied, not imported: site.css carries the whole cinematic layout).
   Type: Cormorant Garamond (display, text) + IBM Plex Mono (labels), as on the main page. */
:root {
  --paper: #f6efe1;
  --amber: #f2b45c;
  --night: #0b0a16;
  --dim: rgba(246, 239, 225, .72);
  --serif: 'Cormorant Garamond', 'Cormorant', Georgia, 'Times New Roman', serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --edge: clamp(20px, 4.2vw, 76px);
  --top: clamp(18px, 3.4vh, 40px);
}
* { box-sizing: border-box; }
html { background: var(--night); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--night); color: var(--paper); font: 400 19px/1.55 var(--serif); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
:focus-visible { outline: 1px solid var(--amber); outline-offset: 4px; }
.label { font: 500 11px/1.2 var(--mono); letter-spacing: .2em; text-transform: uppercase; }

/* the wordmark, as in the page header */
.mark { position: absolute; left: var(--edge); top: var(--top); z-index: 2; font: 500 17px/1 var(--serif); letter-spacing: .44em; text-decoration: none; }

/* the way back: the menu's selector (an amber cursor) in front of a mono label */
.back { display: inline-flex; align-items: center; gap: 14px; padding: 10px 0; text-decoration: none; }
.back::before { content: ''; width: 0; height: 0; border-top: 4px solid transparent; border-bottom: 4px solid transparent; border-left: 6px solid var(--amber); }
.back:hover, .back:focus-visible { color: var(--amber); }

/* 404: the North Road (the opening frame, the existing poster) out of reach under the night */
.edge { position: relative; min-height: 100vh; min-height: 100dvh; overflow: hidden; display: flex; align-items: flex-end; }
.edge .plate { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; image-rendering: crisp-edges; opacity: .34; filter: saturate(.55); }
.edge::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 10, 22, .55) 0%, rgba(11, 10, 22, .35) 38%, rgba(11, 10, 22, .9) 78%, #0b0a16 100%); }
.edge main { position: relative; z-index: 1; padding: 0 var(--edge) clamp(40px, 11vh, 120px); max-width: 60rem; }
.edge h1 { margin: 0 0 clamp(22px, 4vh, 40px); font: italic 400 clamp(44px, 7vw, 112px)/.95 var(--serif); letter-spacing: -.01em; }
.edge .meta { margin: 0 0 18px; color: var(--dim); }

/* privacy: a readable column */
.doc main { max-width: 36em; margin: 0 auto; padding: calc(var(--top) + 72px) var(--edge) 72px; }
.doc .back { margin-left: -2px; }
.doc h1 { margin: 22px 0 28px; font: italic 400 clamp(40px, 6vw, 72px)/1 var(--serif); }
.doc h2 { margin: 34px 0 8px; color: var(--amber); }
.doc p { margin: 0 0 14px; }
.doc code { font: 400 .78em/1 var(--mono); letter-spacing: .02em; }
.doc .updated { margin-top: 40px; color: var(--dim); }
.doc footer { margin-top: 30px; padding-top: 18px; border-top: 1px solid rgba(246, 239, 225, .16); }
@media (max-width: 520px) { body { font-size: 18px; } .doc main { padding-top: calc(var(--top) + 56px); } }

/* festival game (coming soon): Festival night, the existing release still, a little dimmed (the stall is not open yet).
   Wide screens: the picture fills the page and the words sit low on the left under the night, as on the 404.
   Phones: the stalls and the wheel above, the words below them on the night (nothing covers the crowd). */
.fair { position: relative; min-height: 100vh; min-height: 100dvh; overflow-x: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
.fair .plate img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; image-rendering: pixelated; image-rendering: crisp-edges; opacity: .62; filter: saturate(.9); }
.fair::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(11, 10, 22, .5) 0%, rgba(11, 10, 22, 0) 22%, rgba(11, 10, 22, .15) 52%, rgba(11, 10, 22, .86) 82%, #0b0a16 100%); }
.fair main, .fair footer { position: relative; z-index: 1; padding: 0 var(--edge); }
.fair main { max-width: 60rem; text-shadow: 0 1px 0 rgba(8, 6, 18, .7), 0 0 18px rgba(8, 6, 18, .75); }
.fair .plate::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 55% at 0% 82%, rgba(11, 10, 22, .62), rgba(11, 10, 22, 0)); }
.fair h1 { margin: 0 0 clamp(16px, 2.6vh, 26px); font: italic 400 clamp(46px, 7vw, 112px)/.95 var(--serif); letter-spacing: -.01em; }
.fair .meta { margin: 0 0 16px; color: var(--amber); }
.fair .closed { margin: 0 0 8px; }
.fair .line { margin: 0 0 clamp(22px, 4vh, 36px); font: italic 400 clamp(20px, 1.7vw, 26px)/1.35 var(--serif); color: var(--dim); }
.fair footer { padding-top: clamp(26px, 6vh, 64px); padding-bottom: calc(clamp(22px, 4vh, 40px) + env(safe-area-inset-bottom, 0px)); color: rgba(246, 239, 225, .55); }
.fair footer a { text-decoration: none; }
.fair footer a:hover, .fair footer a:focus-visible { color: var(--amber); }
@media (max-aspect-ratio: 4/5) {
  .fair .plate { display: block; position: relative; height: 60vh; height: 60svh; margin-bottom: -3vh; }
  .fair .plate img { object-position: 50% 88%; opacity: .9; -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent); mask-image: linear-gradient(180deg, #000 78%, transparent); }
  .fair::after { background: linear-gradient(180deg, rgba(11, 10, 22, .55) 0%, rgba(11, 10, 22, 0) 16%); }
  .fair { justify-content: flex-start; }
  .fair .mark { top: calc(var(--top) + env(safe-area-inset-top, 0px)); }
  .fair footer { margin-top: auto; }
}
