/*
Theme Name: ReferenceNull
Theme URI: https://referencenull.com
Author: ReferenceNull LLC
Description: Studio site for ReferenceNull LLC and its game Hatchkeep. The front page is the whole site; any other page (a privacy policy, press kit) uses the same header and footer.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: All rights reserved (theme code). Fonts: SIL Open Font License, see assets/fonts.
Text Domain: referencenull
*/

@font-face {
	font-family: "Rowdies";
	src: url("assets/fonts/Rowdies-Bold.ttf") format("truetype");
	font-weight: 700;
	font-display: swap;
}
@font-face {
	font-family: "Nunito";
	src: url("assets/fonts/Nunito.ttf") format("truetype");
	font-weight: 200 1000;
	font-display: swap;
}

:root {
	--bg: #0a1210;
	--bg-2: #0f1b18;
	--card: #13221e;
	--line: #21362f;
	--text: #e8f2ee;
	--muted: #9fb5ad;
	--mint: #86e8c0;
	--mint-deep: #3fbf8f;
	--gold: #ffd35a;
	--amber: #f39a2b;
	--rose: #ff6f91;
	--radius: 18px;
	--max: 1160px;
	--display: "Rowdies", "Arial Black", system-ui, sans-serif;
	--body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--body);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

/* faint board grid behind everything, like the game's arena */
body::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	background-image:
		linear-gradient(rgba(134, 232, 192, .045) 1px, transparent 1px),
		linear-gradient(90deg, rgba(134, 232, 192, .045) 1px, transparent 1px);
	background-size: 64px 64px;
	mask-image: radial-gradient(ellipse at 50% 20%, #000 30%, transparent 85%);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--mint); }
a:hover { color: #fff; }

.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }

.skip-link {
	position: absolute; left: -9999px; top: 8px;
	background: var(--mint); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip-link:focus { left: 8px; }

/* ---------- header ---------- */

.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(10, 18, 16, .78);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--line);
}
.site-header .wrap {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	min-height: 64px;
}
.brand {
	display: flex; align-items: center; gap: 10px;
	color: var(--text); text-decoration: none;
	font-family: var(--display); font-size: 20px; letter-spacing: .5px;
}
.brand-mark {
	width: 34px; height: 34px; border-radius: 9px;
	display: grid; place-items: center;
	background: linear-gradient(135deg, var(--mint), var(--mint-deep));
	color: var(--bg); font-size: 15px;
}
.brand-mark::before { content: "∅"; font-family: var(--body); font-weight: 900; font-size: 20px; }
.brand span b { color: var(--mint); font-weight: 700; }

.site-nav { display: flex; gap: 22px; }
.site-nav a {
	color: var(--muted); text-decoration: none; font-weight: 700; font-size: 15px;
}
.site-nav a:hover { color: var(--text); }
@media (max-width: 640px) { .site-nav a.hide-sm { display: none; } .site-nav { gap: 16px; } }

/* ---------- hero ---------- */

.hero {
	position: relative;
	padding: 72px 0 96px;
	text-align: center;
	isolation: isolate;
}
.hero-art {
	position: absolute; inset: 0; z-index: -1;
	background: url("assets/img/hero.webp") center 30% / cover no-repeat;
	opacity: .55;
	mask-image: linear-gradient(to bottom, #000 45%, transparent 100%);
	-webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 100%);
}
.hero-art::after {
	content: ""; position: absolute; inset: 0;
	background: radial-gradient(ellipse at 50% 45%, rgba(10,18,16,.25), rgba(10,18,16,.85) 75%);
}
.eyebrow {
	display: inline-block;
	font-weight: 800; font-size: 13px; letter-spacing: 2.5px; text-transform: uppercase;
	color: var(--mint);
	border: 1px solid rgba(134, 232, 192, .35);
	background: rgba(10, 18, 16, .6);
	padding: 6px 14px; border-radius: 999px;
}
.hero-logo {
	width: min(680px, 92%);
	margin: 26px auto 18px;
	filter: drop-shadow(0 10px 40px rgba(63, 191, 143, .35));
}
.hero h1 {
	font-family: var(--display); font-weight: 700;
	font-size: clamp(26px, 4.4vw, 44px); line-height: 1.15;
	margin: 0 auto 14px; max-width: 18ch;
}
.gold {
	background: linear-gradient(180deg, #ffe58a 0%, var(--gold) 40%, var(--amber) 100%);
	-webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lede { color: var(--muted); font-size: 19px; max-width: 46ch; margin: 0 auto 30px; }

.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.btn {
	display: inline-flex; align-items: center; gap: 10px;
	padding: 14px 24px; border-radius: 14px;
	font-weight: 800; font-size: 16px; text-decoration: none;
	transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
	background: linear-gradient(180deg, #ffe07a, var(--amber));
	color: #2a1600;
	box-shadow: 0 8px 28px rgba(243, 154, 43, .35), inset 0 -3px 0 rgba(0,0,0,.18);
}
.btn-primary:hover { color: #2a1600; box-shadow: 0 12px 34px rgba(243, 154, 43, .5), inset 0 -3px 0 rgba(0,0,0,.18); }
.btn-ghost {
	color: var(--text);
	background: rgba(19, 34, 30, .8);
	border: 1px solid var(--line);
}
.btn-ghost:hover { color: #fff; border-color: var(--mint-deep); }
.btn-soon { cursor: default; opacity: .8; }
.btn-soon:hover { transform: none; border-color: var(--line); }
.btn small { font-weight: 700; opacity: .7; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.btn svg { width: 20px; height: 20px; flex: none; }

/* ---------- sections ---------- */

section { padding: 84px 0; }
.section-head { text-align: center; margin-bottom: 44px; }
.section-head .kicker {
	font-weight: 800; font-size: 13px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--mint);
}
.section-head h2 {
	font-family: var(--display); font-weight: 700;
	font-size: clamp(28px, 4vw, 42px); line-height: 1.15;
	margin: 8px 0 12px;
}
.section-head p { color: var(--muted); max-width: 56ch; margin: 0 auto; }

/* how it plays */
.loop {
	display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
	counter-reset: step;
}
.loop article {
	position: relative;
	background: linear-gradient(180deg, var(--card), var(--bg-2));
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 28px 26px 26px;
}
.loop article::before {
	counter-increment: step; content: counter(step);
	position: absolute; top: -16px; left: 24px;
	width: 34px; height: 34px; border-radius: 50%;
	display: grid; place-items: center;
	background: var(--mint); color: var(--bg);
	font-family: var(--display); font-size: 16px;
}
.loop h3 { font-family: var(--display); font-weight: 700; font-size: 22px; margin: 6px 0 8px; }
.loop p { color: var(--muted); margin: 0 0 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span {
	font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
	color: var(--gold); border: 1px solid rgba(255, 211, 90, .3);
	padding: 3px 10px; border-radius: 999px;
}
@media (max-width: 860px) { .loop { grid-template-columns: 1fr; gap: 30px; } }

/* screenshots */
.shots {
	display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.shots figure {
	margin: 0;
	border-radius: 16px; overflow: hidden;
	border: 1px solid var(--line);
	box-shadow: 0 14px 40px rgba(0,0,0,.45);
	transition: transform .2s ease;
	background: var(--card);
}
.shots figure:hover { transform: translateY(-4px) rotate(-.4deg); }
.shots img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; }
@media (max-width: 860px) {
	.shots {
		grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 62%;
		overflow-x: auto; scroll-snap-type: x mandatory;
		padding-bottom: 12px; margin-inline: -16px; padding-inline: 16px;
	}
	.shots figure { scroll-snap-align: center; }
}

/* bodies */
.bodies { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.body-card {
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 22px 18px; text-align: center;
}
.body-card h3 {
	font-family: var(--display); font-weight: 700; font-size: 22px; margin: 0 0 6px;
	text-transform: uppercase; letter-spacing: .5px;
}
.body-card p { color: var(--muted); margin: 0; font-size: 15px; }
.brute h3 { color: #ff8a4c; }
.prowler h3 { color: #7cc8ff; }
.coiler h3 { color: #9be35a; }
.drifter h3 { color: #ffd35a; }
.glob h3 { color: #c79bff; }
@media (max-width: 980px) { .bodies { grid-template-columns: repeat(2, 1fr); } .bodies .glob { grid-column: 1 / -1; } }

/* wilds + deep */
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.mode {
	border-radius: var(--radius); padding: 34px 30px; border: 1px solid var(--line);
	position: relative; overflow: hidden;
}
.mode.wilds { background: radial-gradient(ellipse at 80% 0%, rgba(63,191,143,.28), transparent 60%), var(--card); }
.mode.deep { background: radial-gradient(ellipse at 80% 0%, rgba(255,111,145,.25), transparent 60%), var(--card); }
.mode h3 { font-family: var(--display); font-weight: 700; font-size: 28px; margin: 0 0 10px; }
.mode p { color: var(--muted); margin: 0 0 16px; }
@media (max-width: 860px) { .modes { grid-template-columns: 1fr; } }

/* studio */
.studio {
	display: grid; grid-template-columns: 120px 1fr; gap: 30px; align-items: center;
	background: linear-gradient(135deg, var(--card), var(--bg-2));
	border: 1px solid var(--line); border-radius: 24px; padding: 38px;
}
.studio img { width: 120px; height: 120px; border-radius: 26px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.studio h2 { font-family: var(--display); font-weight: 700; font-size: 30px; margin: 0 0 8px; }
.studio p { color: var(--muted); margin: 0 0 10px; }
.studio p:last-child { margin-bottom: 0; }
@media (max-width: 640px) { .studio { grid-template-columns: 1fr; text-align: center; padding: 28px 22px; } .studio img { margin: 0 auto; } }

/* ---------- plain pages (privacy, press) ---------- */

.page-body { padding: 56px 0 84px; }
.page-body .wrap { max-width: 760px; }
.page-body h1 { font-family: var(--display); font-weight: 700; font-size: clamp(30px, 5vw, 44px); line-height: 1.15; }
.page-body h2, .page-body h3 { font-family: var(--display); font-weight: 700; }
.page-body p, .page-body li { color: #cfe0da; }

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 34px 0 44px; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 28px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer a { color: var(--muted); text-decoration: none; font-weight: 700; }
.site-footer a:hover { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.btn, .shots figure { transition: none; }
}
