/* ==========================================================================
   Podunk OS: tokens, reset, type, shared controls.
   Breakpoint: the desktop OS runs from 900px wide; below that it is the phone.
   ========================================================================== */

:root {
	/* Palette pulled from the band's pixel icons. */
	--red: #ff4545;
	--red-hot: #ff6b6b;
	--red-mid: #b33131;
	--red-deep: #7e2323;
	--red-ink: #2b0909;
	--red-night: #120303;
	--pink: #fe9393;
	--blush: #ffd3d3;
	--white: #fff;
	--black: #000;
	--panel: #060101;
	--line: rgb(255 69 69 / 0.55);
	--line-soft: rgb(255 69 69 / 0.2);

	/* Glow scales with the BIOS "Glow intensity" setting. */
	--glow-k: 1;
	--glow: 0 0 6px rgb(255 69 69 / calc(0.9 * var(--glow-k))), 0 0 24px rgb(255 69 69 / calc(0.42 * var(--glow-k)));
	--glow-strong: 0 0 10px rgb(255 69 69 / calc(1 * var(--glow-k))), 0 0 40px rgb(255 69 69 / calc(0.6 * var(--glow-k)));
	--text-glow: 0 0 6px rgb(255 69 69 / calc(0.85 * var(--glow-k))), 0 0 20px rgb(255 69 69 / calc(0.45 * var(--glow-k)));
	--text-glow-white: 0 0 4px rgb(255 255 255 / calc(0.5 * var(--glow-k))), 0 0 18px rgb(255 69 69 / calc(0.7 * var(--glow-k)));

	--f-display: 'Cruiser', 'Orbitron', system-ui, sans-serif;
	--f-sys: 'VT323', ui-monospace, 'SFMono-Regular', monospace;
	--f-num: 'Orbitron', system-ui, sans-serif;

	--taskbar-h: 60px;
	--ease-out: cubic-bezier(0.16, 1, 0.3, 1);
	--ease-in: cubic-bezier(0.7, 0, 0.84, 0);
	--ease-snap: cubic-bezier(0.2, 0.9, 0.1, 1.25);
	--safe-b: env(safe-area-inset-bottom, 0px);
	--safe-t: env(safe-area-inset-top, 0px);
}

:root[data-glow='low'] { --glow-k: 0.45; }
:root[data-glow='off'] { --glow-k: 0; }

*,
*::before,
*::after { box-sizing: border-box; }

html {
	background: var(--black);
	color: var(--white);
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scrollbar-color: var(--red) var(--red-night);
}

body {
	margin: 0;
	min-height: 100dvh;
	background: var(--black);
	color: var(--white);
	font-family: var(--f-sys);
	font-size: 21px;
	line-height: 1.25;
	-webkit-font-smoothing: antialiased;
	cursor: var(--cursor);
	overflow-x: hidden;
}

@media (min-width: 900px) {
	.js body { overflow: hidden; height: 100dvh; }
}

a,
button,
[role='button'],
label,
summary,
select,
input[type='radio'],
input[type='checkbox'],
input[type='range'] { cursor: var(--cursor-hover); }

input,
textarea { cursor: text; }

img,
svg,
video,
canvas { display: block; max-width: 100%; }

a { color: var(--pink); text-underline-offset: 3px; }
a:hover { color: var(--white); }

button,
input,
select,
textarea { font: inherit; color: inherit; }

button {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	-webkit-tap-highlight-color: transparent;
}

a { -webkit-tap-highlight-color: transparent; }

::selection { background: var(--red); color: var(--black); }

:focus-visible {
	outline: 2px dashed var(--blush);
	outline-offset: 2px;
}

h1,
h2,
h3,
p { margin: 0; }

.pd-icon {
	width: 48px;
	height: auto;
	aspect-ratio: 1;
	object-fit: contain;
	image-rendering: pixelated;
	user-select: none;
	-webkit-user-drag: none;
}

.pd-glyph { width: 1em; height: 1em; flex: none; }

.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;
}

/* WordPress and WooCommerce use this class for screen-reader-only text. */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 100000;
	padding: 10px 16px;
	background: var(--red);
	color: var(--black);
	font-family: var(--f-display);
	text-decoration: none;
	transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --------------------------------------------------------------------------
   Shared controls
   -------------------------------------------------------------------------- */

.btn {
	--btn-bg: transparent;
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 46px;
	padding: 8px 20px;
	border: 2px solid var(--red);
	border-radius: 2px;
	background: var(--btn-bg);
	color: var(--white);
	font-family: var(--f-display);
	font-size: 15px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	box-shadow: var(--glow);
	overflow: hidden;
	isolation: isolate;
	transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.12s;
}

/* The light sweep from the original site's buttons. */
.btn::before {
	content: '';
	position: absolute;
	inset: 0 auto 0 -120%;
	width: 120%;
	z-index: -1;
	background: linear-gradient(115deg, transparent 20%, rgb(255 255 255 / 0.35) 50%, transparent 80%);
	transition: left 0.55s var(--ease-out);
}
.btn:hover::before { left: 120%; }
.btn:hover { box-shadow: var(--glow-strong); color: var(--white); }
.btn:active { transform: translateY(1px) scale(0.985); }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.btn .pd-glyph { width: 18px; height: 18px; }
.btn__icon { width: 26px; }

.btn--hot {
	--btn-bg: linear-gradient(100deg, var(--red) 0%, #c22a2a 45%, #3a0606 100%);
	text-shadow: 0 1px 0 rgb(0 0 0 / 0.4);
}

.btn--ghost { --btn-bg: rgb(255 69 69 / 0.06); font-size: 13px; min-height: 40px; padding: 6px 14px; }
.btn--ghost:hover { --btn-bg: rgb(255 69 69 / 0.18); }

.badge {
	display: inline-grid;
	place-items: center;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	background: var(--red);
	color: var(--black);
	font-family: var(--f-num);
	font-size: 11px;
	font-weight: 800;
	line-height: 1;
	box-shadow: var(--glow);
}
.badge[hidden] { display: none; }
.badge.is-bumped { animation: badge-bump 0.5s var(--ease-snap); }
@keyframes badge-bump { 0% { transform: scale(1); } 40% { transform: scale(1.6); } 100% { transform: scale(1); } }

.range {
	--fill: 0%;
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	height: 22px;
	margin: 0;
	background: transparent;
}
.range::-webkit-slider-runnable-track {
	height: 6px;
	background: linear-gradient(90deg, var(--red) var(--fill), var(--red-ink) var(--fill));
	border: 1px solid var(--red-deep);
}
.range::-moz-range-track {
	height: 6px;
	background: linear-gradient(90deg, var(--red) var(--fill), var(--red-ink) var(--fill));
	border: 1px solid var(--red-deep);
}
.range::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 12px;
	height: 18px;
	margin-top: -7px;
	background: var(--white);
	border: 2px solid var(--red);
	box-shadow: var(--glow);
}
.range::-moz-range-thumb {
	width: 10px;
	height: 16px;
	border-radius: 0;
	background: var(--white);
	border: 2px solid var(--red);
	box-shadow: var(--glow);
}

.field { display: grid; gap: 4px; }
.field__label {
	font-family: var(--f-display);
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--pink);
}
.field input,
.field textarea,
.entry input:not([type='checkbox']):not([type='radio']):not([type='submit']),
.entry select,
.entry textarea {
	width: 100%;
	min-height: 42px;
	padding: 6px 10px;
	border: 1.5px solid var(--red-deep);
	border-radius: 0;
	background: #0b0202;
	color: var(--white);
	font-family: var(--f-sys);
	font-size: 21px;
	line-height: 1.2;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus,
.field textarea:focus,
.entry input:focus,
.entry select:focus,
.entry textarea:focus {
	outline: none;
	border-color: var(--red);
	box-shadow: var(--glow);
}
.field textarea { resize: vertical; min-height: 84px; }

.statusbar {
	display: flex;
	gap: 0;
	margin: 0;
	border-top: 1.5px solid var(--red-deep);
	background: #050000;
	color: var(--pink);
	font-size: 17px;
	line-height: 1;
}
.statusbar > span {
	padding: 6px 12px;
	border-right: 1.5px solid var(--red-deep);
	white-space: nowrap;
}
.statusbar > span:last-child { flex: 1; border-right: 0; text-align: right; }

.appbar {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 48px;
	padding: 6px 10px;
	border-bottom: 1.5px solid var(--red-deep);
	background: #050000;
}
.appbar__path {
	flex: 1;
	min-width: 0;
	padding: 4px 10px;
	border: 1.5px inset var(--red-deep);
	background: #000;
	color: var(--blush);
	font-size: 19px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.appbar__count { color: var(--pink); font-size: 18px; white-space: nowrap; }
.appbar__btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 36px;
	padding: 4px 12px;
	border: 1.5px solid var(--red);
	color: var(--white);
	font-family: var(--f-display);
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background 0.15s;
}
.appbar__btn:hover { background: rgb(255 69 69 / 0.2); color: var(--white); }
.appbar__btn .pd-icon { width: 24px; }
.appbar__btn .pd-glyph { width: 16px; height: 16px; }
.appbar__btn[hidden] { display: none; }

/* --------------------------------------------------------------------------
   Layout shell
   -------------------------------------------------------------------------- */

.os { position: relative; outline: none; }

.js .os__library { display: none; }

/* No JavaScript: the app sections read as a plain, stacked page. */
.no-js .os__library {
	position: relative;
	z-index: 2;
	display: grid;
	gap: 40px;
	padding: 24px 16px 120px;
	background: rgb(0 0 0 / 0.85);
}
.no-js .app { border: 2px solid var(--red); background: var(--panel); }
.no-js .boot,
.no-js .taskbar,
.no-js .startmenu { display: none; }

.os__windows {
	position: fixed;
	inset: 0 0 var(--taskbar-h) 0;
	z-index: 20;
	pointer-events: none;
}

.os__sheets {
	position: fixed;
	inset: 0;
	z-index: 60;
	pointer-events: none;
}

@media (max-width: 899px) {
	.os__windows { display: none; }
}

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

/* BIOS "Reduce motion: On" overrides the system setting. */
[data-motion='reduce'] *,
[data-motion='reduce'] *::before,
[data-motion='reduce'] *::after {
	animation-duration: 0.01ms !important;
	animation-iteration-count: 1 !important;
	transition-duration: 0.01ms !important;
}

html.has-sheet body { overflow: hidden; }

/* --------------------------------------------------------------------------
   The logo, live (template-parts/os/logo.php + os/logo3d.js).
   Proportions follow the logo artwork: the wordmark overlaps the square.
   -------------------------------------------------------------------------- */

.logo3d {
	--box: 96px;
	display: inline-flex;
	align-items: center;
	color: var(--white);
	text-decoration: none;
	vertical-align: middle;
}
.logo3d__word {
	position: relative;
	z-index: 1;
	margin-right: calc(var(--box) * -0.78);
	font-family: var(--f-display);
	font-size: calc(var(--box) * 0.27);
	line-height: 1;
	letter-spacing: 0.06em;
	color: var(--white);
	text-shadow: 0 0 6px rgb(0 0 0 / 0.9), 0 0 14px rgb(255 69 69 / calc(0.5 * var(--glow-k)));
	white-space: nowrap;
}
.logo3d__box {
	position: relative;
	flex: none;
	width: var(--box);
	height: calc(var(--box) * 1.024);
	border: 1px solid var(--red);
	box-shadow: 0 0 10px rgb(255 69 69 / calc(0.35 * var(--glow-k)));
	overflow: hidden;
}
.logo3d__flat,
.logo3d__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.logo3d.is-live .logo3d__flat { display: none; }

.logo3d--desk { --box: 92px; }
.logo3d--boot { --box: clamp(64px, 6vw, 104px); }
.logo3d--phone { --box: min(30vw, 128px); }
