/* Megasistēma */

@font-face {
	font-family: "IBM Plex Mono";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "IBM Plex Mono";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/ibm-plex-mono-latin-ext-400-normal.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "IBM Plex Mono";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("../fonts/ibm-plex-mono-latin-700-normal.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "IBM Plex Mono";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("../fonts/ibm-plex-mono-latin-ext-700-normal.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
	/* same browns as the kasetes.lv loading screen */
	--wall: #36312a;
	--slot: #2b2722;
	--card: #453e36;
	--paper: #d2cbc0;
	--paper-2: #dad4c9;
	--ink: #24211d;
	--line: #403932;
	--btn: #3e3022;
	--btn-hover: #2d2218;

	--logo-w: min(44vw, 220px);
	--font: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

@media (min-width: 768px) {
	:root { --logo-w: 250px; }
}

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

html {
	background: var(--wall);
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	margin: 0;
	min-height: 100vh;
	min-height: 100dvh;
	background: var(--wall);
	color: var(--paper);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.5;
	letter-spacing: -0.05em;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--paper); color: var(--ink); }

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- buttons and fields (kasetes rules: square, flat, mono, caps) ---------- */

.btn,
button.btn,
input[type="submit"],
.wp-element-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	padding: 10px 16px;
	border: 0;
	border-radius: 0;
	background: var(--btn);
	color: var(--paper);
	font: 700 12px/1.2 var(--font);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
}
.btn:hover,
input[type="submit"]:hover,
.wp-element-button:hover { background: var(--btn-hover); }

.btn--line {
	background: transparent;
	border: 2px solid var(--paper);
	padding: 8px 14px;
}
.btn--line:hover { background: var(--paper); color: var(--ink); }

/* [TEKSTS] style links */
.bracket {
	color: inherit;
	font-weight: 700;
	text-decoration: none;
	text-transform: uppercase;
}
.bracket::before { content: "["; }
.bracket::after { content: "]"; }
.bracket:hover { color: var(--paper-2); }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="search"],
input[type="password"],
select,
textarea {
	width: 100%;
	padding: 10px 12px;
	border: 2px solid var(--line);
	border-radius: 0;
	background: var(--ink);
	color: var(--paper-2);
	font: 400 15px/1.3 var(--font);
	letter-spacing: -0.03em;
	-webkit-appearance: none;
	appearance: none;
}
input:focus,
select:focus,
textarea:focus { outline: 0; border-color: var(--paper); }

:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }

/* ---------- front page ---------- */

.home { overflow: hidden; }

.stage {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	min-height: 100dvh;
	overflow: hidden;
	--lx: 30%;
	--ly: 20%;
}

.cutout {
	position: relative;
	z-index: 1;
	width: var(--logo-w);
	aspect-ratio: 1628.61 / 926.12;
	perspective: 900px;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
	cursor: pointer;
}

.cutout__frame,
.cutout__slot,
.cutout__face {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.cutout__frame { transform-style: preserve-3d; }

.cutout__slot,
.cutout__face {
	display: block;
	overflow: visible;
	will-change: transform;
}

.cutout__slot { fill: var(--slot); }
.cutout__face { fill: var(--card); }

/* Without JS the logo just sits there, lifted. */
.cutout__slot { transform: translate(2.2%, 4%); }
.js .cutout__slot { transform: none; }
.js .cutout__face { clip-path: inset(0 100% 0 0); -webkit-clip-path: inset(0 100% 0 0); }
.js.is-ready .cutout__face { clip-path: none !important; -webkit-clip-path: none !important; }

/* lamp over the set */
.light {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		radial-gradient(circle at var(--lx) var(--ly), rgba(255, 228, 186, 0.06), rgba(255, 228, 186, 0.02) 30%, rgba(255, 228, 186, 0) 70%),
		radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.2) 100%);
	background-size: 100% 100%;
	mix-blend-mode: soft-light;
}

/* film grain, moved one frame at a time */
.grain {
	position: fixed;
	inset: -100px;
	z-index: 50;
	pointer-events: none;
	background: url("../img/grain.png") repeat;
	opacity: 0.06;
	mix-blend-mode: overlay;
	animation: grain 0.6s steps(1) infinite;
}

@keyframes grain {
	0% { transform: translate(0, 0); }
	16% { transform: translate(-37px, 21px); }
	33% { transform: translate(43px, -12px); }
	50% { transform: translate(-18px, -49px); }
	66% { transform: translate(27px, 38px); }
	83% { transform: translate(-51px, 9px); }
}
