/* THE UNBORN SAINT, the placeholder site. The palette is the game's ui_kit.gd. */
@font-face { font-family: "Silkscreen"; src: url("../fonts/silkscreen.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Germania One"; src: url("../fonts/germania.woff2") format("woff2"); font-display: swap; }

:root {
  --ink: #0c070b;      /* near-black */
  --slab: #160d12;
  --deep: #2a0709;
  --blood: #8a0c0e;
  --red: #b72a1f;
  --lit: #de4630;
  --gold: #d9b45a;
  --bone: #d8cfb8;
  --dim: #8e9890;      /* the kit's DIM, lifted a step for contrast on the web */
  --ui: "Silkscreen", "Courier New", monospace;
  --head: "Germania One", "Iowan Old Style", Georgia, serif;
  --body: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--ink); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: var(--bone); font-family: var(--body); font-size: 1.0625rem; line-height: 1.6; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--gold); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
kbd { font: inherit; }

/* ------------------------------------------------------------------ the stage */
.stage { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; background: var(--ink); isolation: isolate; }
/* the 640x360 screen, scaled to cover the viewport; every layer is placed in % of it */
/* the scene is never smaller than the covering size (a 0.93 factor here once left a black frame, owner 11-09); the
   "pulled back" feel comes from the 80 % lockup and the vignette below, not from shrinking the painting */
.scene { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: calc(max(100%, 177.78vh) * 1.01); width: calc(max(100%, 177.78svh) * 1.01); aspect-ratio: 16 / 9; overflow: hidden; }   /* x 1.01: half a percent of bleed past every edge, so rounding can never show a hairline */
.vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 72% 74% at 50% 50%, rgba(12, 7, 11, 0) 46%, rgba(12, 7, 11, 0.45) 78%, rgba(12, 7, 11, 0.92) 100%); }
.scene > * { position: absolute; inset: 0; }

.sky { top: -7.5%; bottom: auto; height: 63.6%; overflow: hidden; }
.sky-roll { position: absolute; top: 0; left: 0; height: 100%; width: 300%; background: url("../img/sky.webp") repeat-x; background-size: 33.3334% 100%; animation: roll 290s linear infinite; will-change: transform; }
@keyframes roll { to { transform: translateX(-33.3334%); } }
.sky-lit { opacity: 0; mix-blend-mode: screen; background: radial-gradient(ellipse 34% 40% at var(--bx, 50%) var(--by, 10%), rgba(140, 170, 255, 0.95), rgba(90, 110, 190, 0.45) 45%, rgba(40, 50, 90, 0) 100%); pointer-events: none; }
.plate img { width: 100%; height: 100%; object-fit: fill; }
.fx { width: 100%; height: 100%; }

/* additive lights: the village fires flicker, the heart-engine pulses, the womb breathes */
.lights { mix-blend-mode: screen; pointer-events: none; }
.lights > span { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); border-radius: 50%; }
.fire { width: 3.2%; aspect-ratio: 1; background: radial-gradient(circle, rgba(255, 140, 40, 0.55), rgba(255, 90, 20, 0.18) 40%, rgba(255, 60, 0, 0) 70%); animation: flicker var(--d, 2s) ease-in-out infinite alternate; }
@keyframes flicker { 0% { opacity: 0.55; transform: translate(-50%, -50%) scale(0.9); } 35% { opacity: 1; } 60% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.08); } 100% { opacity: 0.9; transform: translate(-50%, -50%) scale(1); } }
.heart { --x: 49.8%; --y: 75.7%; width: 9%; aspect-ratio: 1.3; background: radial-gradient(ellipse, rgba(255, 50, 30, 0.6), rgba(200, 20, 20, 0.2) 45%, rgba(120, 0, 0, 0) 72%); opacity: 0.15; }
.womb { --x: 50.1%; --y: 90.8%; width: 8%; aspect-ratio: 1.1; background: radial-gradient(ellipse, rgba(255, 110, 70, 0.7), rgba(220, 50, 30, 0.25) 45%, rgba(140, 10, 0, 0) 72%); animation: breathe 7s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: 0.45; transform: translate(-50%, -50%) scale(0.92); } 50% { opacity: 0.9; transform: translate(-50%, -50%) scale(1.1); } }

/* the fog: the game's 256 px noise, carved into a tinted band by a mask, drifting at the shader's speeds */
.fog { pointer-events: none; background-color: rgb(92, 97, 148); opacity: 0.11;
  -webkit-mask-image: url("../img/fog.webp"), linear-gradient(to bottom, transparent 30%, #000 50%, #000 67%, transparent 85%);
  mask-image: url("../img/fog.webp"), linear-gradient(to bottom, transparent 30%, #000 50%, #000 67%, transparent 85%);
  -webkit-mask-size: 28.6% 50.8%, 100% 100%; mask-size: 28.6% 50.8%, 100% 100%;
  -webkit-mask-repeat: repeat, no-repeat; mask-repeat: repeat, no-repeat;
  -webkit-mask-composite: source-in; mask-composite: intersect;
  animation: fogdrift 95s linear infinite; }
@keyframes fogdrift { to { -webkit-mask-position: 28.6% 5.6%, 0 0; mask-position: 28.6% 5.6%, 0 0; } }
.fog-b { background-color: rgb(107, 56, 51); opacity: 0.13; -webkit-mask-size: 35.7% 63.5%, 100% 100%; mask-size: 35.7% 63.5%, 100% 100%;
  -webkit-mask-image: url("../img/fog.webp"), linear-gradient(to bottom, transparent 66%, #000 86%, #000 100%); mask-image: url("../img/fog.webp"), linear-gradient(to bottom, transparent 66%, #000 86%, #000 100%);
  animation: fogdriftb 70s linear infinite; }
@keyframes fogdriftb { to { -webkit-mask-position: -35.7% 3.2%, 0 0; mask-position: -35.7% 3.2%, 0 0; } }
.fog-h { background-color: rgb(80, 86, 120); opacity: 0.16;
  -webkit-mask-image: url("../img/fog.webp"), linear-gradient(to right, #000 10%, transparent 36%, transparent 64%, #000 90%), linear-gradient(to bottom, transparent 28%, #000 36%, #000 46%, transparent 56%);
  mask-image: url("../img/fog.webp"), linear-gradient(to right, #000 10%, transparent 36%, transparent 64%, #000 90%), linear-gradient(to bottom, transparent 28%, #000 36%, #000 46%, transparent 56%);
  -webkit-mask-size: 40% 71%, 100% 100%, 100% 100%; mask-size: 40% 71%, 100% 100%, 100% 100%;
  -webkit-mask-repeat: repeat, no-repeat, no-repeat; mask-repeat: repeat, no-repeat, no-repeat;
  animation: fogdrifth 160s linear infinite; }
@keyframes fogdrifth { to { -webkit-mask-position: 40% 0, 0 0, 0 0; mask-position: 40% 0, 0 0, 0 0; } }

/* the grade: vignette + a dark halo behind the logo; the menu adds a calm column on the left and darkens the whole */
.dark { background: #000; opacity: 0; pointer-events: none; }
.grade { pointer-events: none; background:
  radial-gradient(ellipse 54% 26% at 50% 38%, rgba(2, 1, 3, 0.4), rgba(2, 1, 3, 0) 100%),
  radial-gradient(ellipse 62% 70% at 50% 50%, rgba(2, 1, 3, 0) 40%, rgba(2, 1, 3, 0.5) 100%); }
/* the resting darkness is the menu's (owner 11-09: "the overall darkness can be like we have on start menu"): the
   27 % the game adds when START opens the menu; the calm column on the left only comes with the menu itself */
.grade-menu { pointer-events: none; opacity: 1; transition: opacity 0.5s ease; background: rgba(2, 1, 3, 0.27); }
body.menu .grade-menu { background:
  radial-gradient(ellipse 18% 28% at 20% 60%, rgba(2, 1, 3, 0.46), rgba(2, 1, 3, 0) 100%),
  rgba(2, 1, 3, 0.27); }

/* ------------------------------------------------------------------ the ui over the stage (viewport-placed) */
.ui { position: absolute; inset: 0; pointer-events: none; font-family: var(--ui); text-transform: uppercase; }
.ui > * { pointer-events: auto; }
/* the lockup's TOP sits at 37 % of the viewport: the painted figures hover in the crown, the lowest of them ending at
   33 % of the scene (a6 at row 119 of 360), and the scene is never shorter than the viewport, so the logo clears them
   at every aspect ratio (owner 11-09: "the logo is overlapping the flying angel") */
/* --lw is the lockup's unit (the logo image's width); everything under it scales with it. Owner 11-09: "-20% scale",
   so every size here is the key-art-derived value x 0.8 */
.title { --lw: calc(82vw * 0.8); position: absolute; left: 50%; top: 37%; transform: translateX(-50%); width: 100%; text-align: center; padding: 0 16px; }
@media (min-width: 720px) { .title { --lw: calc(min(38vw, 720px, 60vh) * 0.8); } }
/* the lockup is one unit scaled by --lw, the logo image's width, with the key art's proportions
   (all_shall_be_slain_thumb.png: logo letters 661 px; the gold rule 474 wide, 50 under the drips, a 12 px diamond;
   the tagline 603 wide, caps 19 tall, 38 under the rule) */
/* owner 11-09: the rule, tagline and SOON up 40 px as a group, measured on a 1440x900 view where --lw is 432 px, so
   40 / 432 = 0.0926 of --lw: the rule's gap under the logo image goes from 0.075 to -0.0176 (into the image's rim pad,
   just under the lowest painted drip); the logo itself stays */
.rule-gold { position: relative; width: calc(var(--lw) * 0.72); height: max(1px, calc(var(--lw) * 0.003)); margin: calc(var(--lw) * (0.075 - 0.0926)) auto 0; background: linear-gradient(to right, rgba(217, 180, 90, 0), rgba(217, 180, 90, 0.9) 22%, #d9b45a 50%, rgba(217, 180, 90, 0.9) 78%, rgba(217, 180, 90, 0)); box-shadow: 0 1px 0 rgba(7, 5, 10, 0.6); }
.rule-gold .diamond { position: absolute; left: 50%; top: 50%; width: calc(var(--lw) * 0.013); height: calc(var(--lw) * 0.013); transform: translate(-50%, -50%) rotate(45deg); background: #d9b45a; box-shadow: 0 0 0 1px rgba(7, 5, 10, 0.5); }
.logo { margin: 0; line-height: 0; }
.logo-wrap { position: relative; display: inline-block; }
.logo img { display: block; width: var(--lw); height: auto; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.6)); }
/* the blood: rare slow drips from the painted runs' tips (title.gd's drips), drawn just under the lockup */
.drips { position: absolute; left: 0; top: 0; pointer-events: none; }
.tagline { margin: calc(var(--lw) * 0.05) 0 0; font-size: calc(var(--lw) * 0.037); line-height: 1; letter-spacing: 0.2em; text-indent: 0.2em; color: var(--bone); text-shadow: 1px 1px 0 #07050a, 0 0 8px rgba(0, 0, 0, 0.8); }
.start { margin: 1.6em auto 0; display: inline-flex; align-items: center; gap: 12px; background: none; border: 0; padding: 10px 6px; cursor: pointer; font-family: var(--ui); text-transform: uppercase; font-size: clamp(0.8rem, 1.8vw, 1rem); letter-spacing: 0.18em; color: var(--gold); text-shadow: 1px 1px 0 #07050a; animation: pulse 1.75s ease-in-out infinite; }
.start .rule { display: inline-block; width: 24px; height: 1px; background: var(--blood); opacity: 0.8; }
@keyframes pulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }
.start:hover, .start:focus-visible { animation: none; opacity: 1; }
body.menu .start { display: none; }
/* SOON: one carved word under the tagline, where PRESS START sits when the menu is on */
.soon { display: none; margin: calc(var(--lw) * 0.06) auto 0; align-items: center; justify-content: center; gap: 12px; font-size: calc(var(--lw) * 0.03); line-height: 1; letter-spacing: 0.3em; color: var(--gold); opacity: 0.78; text-shadow: 1px 1px 0 #07050a, 0 0 6px rgba(0, 0, 0, 0.7); text-indent: 0.3em; }
.soon .rule { display: inline-block; width: 18px; height: 1px; background: var(--blood); opacity: 0.8; }
.teaser .soon { display: flex; }
.teaser .start, .teaser .menu-nav, .teaser main, .teaser .foot-hint { display: none !important; }

/* the menu: the game's left column (MENU_AT 0.20, 0.60), rows slide up one after another; on narrow screens it sits under the logo */
.menu-nav { position: absolute; left: 8.1%; top: 44%; max-width: 44vw; }
.menu-nav ul { list-style: none; margin: 0; padding: 0 0 0 14px; position: relative; }
.menu-nav ul::before { content: ""; position: absolute; left: -12px; top: -16px; width: 150px; height: 1px; background: var(--blood); opacity: 0.55; }
.menu-nav ul::after { content: ""; position: absolute; left: -12px; bottom: -8px; width: 150px; height: 1px; background: var(--blood); opacity: 0.35; }
.menu-nav li { position: relative; opacity: 0; transform: translateY(6px); animation: rowin 0.3s ease-out forwards; animation-delay: calc(var(--i, 0) * 0.05s); }
@keyframes rowin { to { opacity: 1; transform: none; } }
.menu-nav a { display: block; padding: 3px 8px 3px 4px; color: var(--dim); text-decoration: none; font-size: clamp(0.8rem, 1.7vw, 0.95rem); letter-spacing: 0.1em; line-height: 1.6; text-shadow: 1px 1px 0 #07050a; }
.menu-nav a:hover, .menu-nav a:focus-visible, .menu-nav li.sel a { color: var(--gold); outline: none; }
.menu-nav li.sel::before { content: ""; position: absolute; left: -15px; top: 4px; width: 3px; height: 20px; background: var(--blood); box-shadow: 0 -1px 0 var(--lit); }
.menu-nav li.sel::after { content: ""; position: absolute; left: -9px; top: 11px; border: 4px solid transparent; border-left: 6px solid var(--gold); border-right: 0; animation: bob 0.8s steps(2, end) infinite; }
@keyframes bob { 50% { transform: translateX(1px); } }
.menu-nav .info { margin: 10px 0 0 -6px; font-size: clamp(0.62rem, 1.3vw, 0.78rem); letter-spacing: 0.06em; color: var(--bone); opacity: 0.8; text-shadow: 1px 1px 0 #07050a; min-height: 1.4em; max-width: 46ch; }

/* the plaque, top right (the game's standing plaque): the sound control */
.plaque { position: absolute; top: max(10px, env(safe-area-inset-top)); right: max(10px, env(safe-area-inset-right)); display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.snd { display: inline-flex; align-items: center; gap: 8px; background: rgba(5, 0, 3, 0.62); border: 0; border-bottom: 1px solid var(--blood); padding: 7px 12px 6px; color: var(--bone); font-family: var(--ui); text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.12em; cursor: pointer; text-shadow: 1px 1px 0 #07050a; }
.snd[aria-pressed="true"] { color: var(--gold); }
.snd .note { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); box-shadow: 0 0 0 1px #07050a; flex: none; }
.snd[aria-pressed="true"] .note { background: #9ac8f0; box-shadow: 0 0 6px #9ac8f0, 0 0 0 1px #07050a; animation: pulse 1.2s ease-in-out infinite; }
.snd.waiting .note { background: var(--gold); box-shadow: 0 0 0 1px #07050a; animation: pulse 1.2s ease-in-out infinite; }
.modes { display: flex; gap: 2px; }
.modes[hidden] { display: none; }
.modes button { background: rgba(5, 0, 3, 0.62); border: 0; border-bottom: 1px solid transparent; padding: 5px 8px 4px; color: var(--dim); font-family: var(--ui); text-transform: uppercase; font-size: 0.62rem; letter-spacing: 0.1em; cursor: pointer; text-shadow: 1px 1px 0 #07050a; }
.modes button[aria-pressed="true"] { color: var(--gold); border-bottom-color: var(--gold); }
.modes button:hover { color: var(--bone); }

.foot-hint, .foot-chg { position: absolute; bottom: max(8px, env(safe-area-inset-bottom)); margin: 0; font-size: 0.66rem; letter-spacing: 0.1em; color: var(--dim); opacity: 0.7; text-shadow: 1px 1px 0 #07050a; }
.foot-hint { left: 12px; display: none; }
.foot-hint kbd { color: var(--bone); margin-right: 4px; }
.foot-hint kbd + kbd, .foot-hint kbd:nth-of-type(2) { margin-left: 12px; }
body.menu .foot-hint { display: block; }
@media (pointer: coarse) { .foot-hint { display: none !important; } }
.foot-chg { right: 12px; }

@media (max-width: 719px) {
  .title { top: 37%; }
  .menu-nav { left: 50%; top: auto; bottom: 12%; transform: translateX(-50%); max-width: none; width: min(86vw, 360px); }
  .menu-nav ul::before, .menu ul::after { width: 100%; }
  .menu-nav ul { padding-left: 18px; }
}
@media (max-height: 640px) and (min-width: 720px) {
  .title { --lw: calc(min(60vw, 420px, 60vh) * 0.8); }
  .start { margin-top: 1em; }
}

/* ------------------------------------------------------------------ the page under the title */
main { position: relative; background: var(--ink); }
.band { max-width: 1080px; margin: 0 auto; padding: 64px 16px; }
.band + .band { border-top: 1px solid rgba(138, 12, 14, 0.35); }
h2 { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 0 0 28px; font-family: var(--head); font-weight: 400; font-size: clamp(1.9rem, 5vw, 2.8rem); letter-spacing: 0.04em; text-transform: uppercase; color: var(--red); text-shadow: 0 -1px 0 var(--lit), 1px 2px 0 #07050a, -1px 1px 0 #07050a, 0 3px 0 #07050a; text-align: center; }
h2 .rule { display: inline-block; flex: 1 1 24px; max-width: 120px; height: 1px; background: var(--blood); opacity: 0.8; box-shadow: 0 1px 0 #07050a; }
h3 { margin: 14px 0 4px; font-family: var(--ui); font-weight: 400; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); text-shadow: 1px 1px 0 #07050a; }
.prose { max-width: 62ch; margin: 0 auto; }
.prose p { margin: 0 0 1.1em; }
.prose strong { color: var(--gold); font-weight: 600; letter-spacing: 0.02em; }
.prose .small { font-size: 0.9rem; color: var(--dim); }
.lede { text-align: center; color: var(--dim); margin: -12px 0 28px; font-size: 0.95rem; }

.facts { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 28px 0 0; padding: 0; font-family: var(--ui); text-transform: uppercase; }
.facts li { flex: 1 1 120px; max-width: 180px; background: rgba(9, 2, 6, 0.9); border-top: 2px solid var(--blood); border-bottom: 2px solid var(--blood); padding: 12px 8px 10px; text-align: center; box-shadow: 0 0 0 1px #07050a; }
.facts b { display: block; font-family: var(--head); font-weight: 400; font-size: 1.9rem; line-height: 1; color: var(--gold); text-shadow: 1px 1px 0 #07050a; }
.facts span { display: block; margin-top: 6px; font-size: 0.62rem; letter-spacing: 0.12em; color: var(--dim); }

.shots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.shots figure { margin: 0; background: #000; box-shadow: 0 0 0 1px #07050a, 0 0 0 2px rgba(138, 12, 14, 0.5); }
.shots img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.shots figcaption { padding: 8px 10px 7px; font-family: var(--ui); text-transform: uppercase; font-size: 0.66rem; letter-spacing: 0.14em; color: var(--bone); background: rgba(9, 2, 6, 0.95); border-top: 1px solid var(--blood); text-shadow: 1px 1px 0 #07050a; }

.heroes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; text-align: center; }
.heroes li { background: linear-gradient(to bottom, rgba(22, 13, 18, 0.9), rgba(9, 2, 6, 0.95)); box-shadow: 0 0 0 1px #07050a, 0 0 0 2px rgba(138, 12, 14, 0.5); padding: 24px 16px 20px; }
.heroes img { margin: 0 auto; height: 236px; width: auto; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.7)); }
.heroes p { margin: 0; font-size: 0.95rem; color: var(--bone); }

.player { max-width: 62ch; margin: 8px auto 0; padding: 18px; background: rgba(9, 2, 6, 0.9); box-shadow: 0 0 0 1px #07050a, 0 0 0 2px rgba(138, 12, 14, 0.5); display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.player .snd.big { font-size: 0.8rem; padding: 10px 16px 9px; }
.player .modes button { font-size: 0.68rem; padding: 7px 10px 6px; }
.player-note { flex: 1 0 100%; margin: 0; font-family: var(--ui); text-transform: uppercase; font-size: 0.62rem; letter-spacing: 0.1em; color: var(--dim); }

.back { text-align: center; margin: 24px 0 0; font-family: var(--ui); text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.14em; }
.back a { color: var(--dim); text-decoration: none; }
.back a:hover { color: var(--gold); }

/* ------------------------------------------------------------------ reduced motion: the storm stands still */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sky-roll, .fire, .womb, .fog, .start, .snd .note, .menu-nav li.sel::after { animation: none !important; }
  .fog { opacity: 0.08; }
  .menu-nav li { opacity: 1; transform: none; animation: none; }
  .grade-menu { transition: none; }
}
