/* Spectraform Studios: the studio's logo in every game published on spectraformstudios.se (user, 2026-10-28).
   The same lockup as the site's header: the six-band hexagon, "Spectraform" bold, "Studios" lighter. Inlined into <head>
   by shared/build/finish.py --brand, with brand.js (which fills every empty .sf-brand). A game themes it with
   --sf-brand-ink and --sf-brand-muted (dark ink by default, for the light pages of the games). */
.sf-brand { display: inline-flex; align-items: center; gap: 0.55em; font-family: 'SFA Lexend', 'Lexend', system-ui, sans-serif; font-size: 1.05rem; line-height: 1; letter-spacing: -0.01em; white-space: nowrap; color: var(--sf-brand-ink, #1b1830); text-decoration: none; }
.sf-brand, .sf-brand * { letter-spacing: -0.01em !important; word-spacing: normal !important; }   /* a logo: no game's spacing rules apply */
.sf-brand .sf-brand-mark { flex: none; width: 1.8em; height: 1.8em; }
.sf-brand .sf-brand-mark svg { display: block; width: 100%; height: 100%; }
.sf-brand b { font-weight: 700; }
.sf-brand span.sf-brand-studios { font-weight: 400; color: var(--sf-brand-muted, #5a5470); }

/* SugarCube's loading screen: the logo on the site's own dark background, no spinning ring */
#init-screen { background-color: #0d0b1a; font-family: 'SFA Lexend', 'Lexend', system-ui, sans-serif; }
#init-screen > #init-loading { -webkit-animation: none; animation: none; border: 0; border-radius: 0; width: auto; height: auto; top: 50%; transform: translateY(-50%);
	display: flex; flex-direction: column; align-items: center; gap: 1.2rem; }
html[data-init=loading] #init-screen > #init-loading { display: flex; }
#init-loading > div.sf-brand { text-indent: 0; overflow: visible; }
#init-loading > div.sf-laddar { text-indent: 0; overflow: visible; font-size: 0.9rem; font-weight: 400; color: #aaa4c6; letter-spacing: 0.02em; }
#init-loading .sf-brand { font-size: 1.6rem; --sf-brand-ink: #ece9f6; --sf-brand-muted: #aaa4c6; }

/* ---- the studio's splash: the same as Greedy Pig's (user, 2026-10-28) ---- */
/* The dark screen with the logo, "PRESENTS" in the player's language and the engine at the foot ("Powered by
   SugarCube"; Mattemums has none). finish.py --splash puts it first in <body>; once a visit. Screen readers skip it
   (aria-hidden): the game is already there. The timing is Celestial Frontiers' (addons/spectraform_splash, 2026-10-28;
   the user: the same in every game, and the fades are never shortened, so no skip): the logo and the engine fade in
   over 2.5 s, PRESENTS from 1.0 s over 1.5 s, all ease-in sine; then everything fades out together over 2.5 s (held
   while the page is still loading) on a background that stays opaque; then the background fades over 0.8 s into the game. */
/* the splash's own Lexend, shown only once loaded (font-display: block): it never swaps in mid-splash (finish.py preloads it) */
@font-face { font-family: 'SFA Splash'; font-weight: 400; font-display: block; src: url(fonts/lexend-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'SFA Splash'; font-weight: 700; font-display: block; src: url(fonts/lexend-latin-700-normal.woff2) format('woff2'); }
#sf-splash { position: fixed; inset: 0; z-index: 2147483000; overflow: hidden; background: #0d0b1a; color: #aaa4c6; font-family: 'SFA Splash', 'SFA Lexend', system-ui, sans-serif; cursor: default; }
/* the content sits in a box of the small viewport (svw, svh: the screen with every browser bar showing), which never
   changes while the page loads: a phone's toolbars settling can neither move nor resize it, and nothing falls below
   the visible screen (user, 2026-10-28: it started low and jumped up; measured in px at the start it sat too low on an
   iPhone, its foot off the screen) */
#sf-splash { --sf-w: 100vw; --sf-h: 100vh; }
@supports (height: 100svh) { #sf-splash { --sf-w: 100svw; --sf-h: 100svh; } }
#sf-splash .sf-splash-mitt { position: absolute; left: 0; top: 0; width: var(--sf-w); height: var(--sf-h);
	display: flex; flex-direction: column; align-items: center; justify-content: center; --sf-kort: min(var(--sf-w), var(--sf-h)); }
.sf-splash-mitt > * { opacity: 0; }
/* the fades start once the typeface is in (brand.js: .sf-splash-go) */
#sf-splash.sf-splash-go .sf-splash-mitt > * { animation: sf-splash-in 2.5s cubic-bezier(0.12, 0, 0.39, 0) forwards; }   /* ease-in sine, as Godot's TRANS_SINE + EASE_IN */
#sf-splash.sf-splash-go .sf-splash-mitt > .sf-splash-presenterar { animation-duration: 1.5s; animation-delay: 1s; }
#sf-splash.sf-splash-ut .sf-splash-mitt > * { opacity: 1; animation: sf-splash-out 2.5s cubic-bezier(0.12, 0, 0.39, 0) forwards; }
/* then the splash's own dark fades away over 0.8 s and the game shows through it (as Greedy Pig hands over to its menu) */
#sf-splash.sf-splash-borta { opacity: 0; transition: opacity 0.8s ease; pointer-events: none; }
@keyframes sf-splash-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes sf-splash-out { from { opacity: 1; } to { opacity: 0; } }
html[data-a11y-motion="reduce"] #sf-splash.sf-splash-go .sf-splash-mitt > *, html[data-a11y-motion="reduce"] #sf-splash.sf-splash-ut .sf-splash-mitt > * { opacity: 1; animation: none; }   /* Less motion: the same time, without the fades */
html.sf-splash-sett #sf-splash { display: none; }
/* until the splash lifts the page itself is the splash's dark, so a game's own colour never shows first */
html.sf-splash-pa, html.sf-splash-pa body { background: #0d0b1a !important; }
/* sizes from the measured box only (px), never from the root size or the live viewport */
#sf-splash .sf-brand { font-family: inherit; font-size: clamp(26px, calc(var(--sf-w) * 0.055), 52px); --sf-brand-ink: #ece9f6; --sf-brand-muted: #aaa4c6; }
#sf-splash .sf-splash-presenterar { margin: 1.4em 0 0; padding-left: 0.4em; font-size: clamp(13px, calc(var(--sf-w) * 0.018), 18px); font-weight: 400; line-height: 1.2; letter-spacing: 0.4em; }
/* bottom right (user, 2026-10-28), as Greedy Pig's: the icon in the corner, 4.5 % of the screen's short side (at least
   24 px) with half an icon's margin, the text to its left */
#sf-splash .sf-splash-motor { position: absolute; right: max(12px, calc(var(--sf-kort) * 0.0225), env(safe-area-inset-right)); bottom: max(12px, calc(var(--sf-kort) * 0.0225), env(safe-area-inset-bottom)); margin: 0;
	display: flex; align-items: center; gap: 0.6em; font-size: clamp(13px, calc(var(--sf-w) * 0.016), 16px); line-height: 1.2; }
#sf-splash .sf-splash-motor svg { flex: none; width: max(24px, calc(var(--sf-kort) * 0.045)); height: max(24px, calc(var(--sf-kort) * 0.045)); }

/* ---- the studio's foot on every start screen, below the game's own panel (user, 2026-10-28) ---- */
/* An empty <div class="sf-studio"> becomes the logo, a link to the site in its own tab; the support address, the
   credits and the copyright are in About in the ☰ menu (shared/a11y). A game sets --sf-studio-ink and
   --sf-studio-muted for its background (dark ink by default); data-links="no" leaves the logo unlinked. */
/* The same in every game, in px so no game's own root size changes it (user, 2026-10-28: "all games need to match
   exactly", Math Hunt's spacing): the logo 18 px, its bottom edge 24 px above the bottom of the screen (19 px here plus
   the link's 5 px). A game's start screen puts nothing of its own below the foot. */
.sf-studio { display: flex; justify-content: center; margin: 0 auto; padding: 12px 16px 19px; color: var(--sf-studio-ink, #1b1830);
	--sf-brand-ink: var(--sf-studio-ink, #1b1830); --sf-brand-muted: var(--sf-studio-muted, #5a5470); }
.sf-studio .sf-brand { color: var(--sf-studio-ink, #1b1830); font-size: 18px !important; padding: 5px 6px !important; border-radius: 5px; }
a.sf-brand { text-decoration: none !important; }   /* a logo, never underlined, whatever a game does to its links */
a.sf-brand::after { content: none !important; }   /* no ↗ after the logo: not SugarCube's glyph on external links, nor one of ours (user, 2026-10-28) */
.sf-studio a:focus-visible { outline: 3px solid currentColor; outline-offset: 2px; }
