/*
Theme Name: Infinite Forge
Theme URI: https://github.com/infiniteforgegames/InfiniteForgeGames_Website
Author: Infinite Forge Games
Author URI: https://infiniteforgegames.com
Description: Minimal hand-written theme for infiniteforgegames.com. Deep-sea look, no JavaScript, no external requests, comments off.
Version: 1.0.2
Requires at least: 6.4
Requires PHP: 7.4
License: Proprietary (code); Lora font under SIL OFL 1.1 (assets/fonts/OFL.txt)
Text Domain: infiniteforge
*/

/* ---------- Fonts (self-hosted, latin subset) ---------- */
@font-face {
	font-family: "Lora";
	src: url("assets/fonts/lora-latin-wght-normal.woff2") format("woff2");
	font-weight: 400 700;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Lora";
	src: url("assets/fonts/lora-latin-wght-italic.woff2") format("woff2");
	font-weight: 400 700;
	font-style: italic;
	font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
	--sea-top: #0d4553;
	--sea-mid: #062530;
	--sea-deep: #010507;
	--panel: #071d27;
	--panel-edge: rgba(127, 232, 214, 0.14);
	--ink: #e2f0f2;
	--muted: #96b2ba;
	--accent: #7fe8d6;
	--warm: #ffb860;
	--serif: "Lora", Georgia, "Times New Roman", serif;
	--sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--radius: 14px;
	--gutter: 16px;
	color-scheme: dark;
}

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

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

body {
	position: relative;
	isolation: isolate;
	margin: 0;
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	background: linear-gradient(180deg, var(--sea-top) 0, var(--sea-mid) min(70vh, 900px), var(--sea-deep) 100%) no-repeat;
	color: var(--ink);
	font: 400 1.0625rem/1.65 var(--sans);
	overflow-x: hidden;
}

h1, h2, h3 {
	font-family: var(--serif);
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.01em;
	margin: 0 0 0.5em;
	text-wrap: balance;
}
h1 { font-size: clamp(2rem, 7vw, 3.25rem); }
h2 { font-size: clamp(1.4rem, 4.5vw, 1.85rem); }
h3 { font-size: 1.35rem; }

p, ul, ol { margin: 0 0 1em; }
img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--warm); outline-offset: 3px; border-radius: 4px; }

strong { color: #fff; font-weight: 600; }
code { font-size: 0.92em; color: var(--accent); overflow-wrap: anywhere; }

.skip-link {
	position: absolute;
	left: var(--gutter);
	top: -100px;
	z-index: 10;
	padding: 10px 16px;
	background: var(--panel);
	color: var(--ink);
	border-radius: 8px;
}
.skip-link:focus { top: 12px; }

.wrap {
	width: 100%;
	max-width: 1040px;
	margin: 0 auto;
	padding: 0 var(--gutter);
}
@media (min-width: 640px) { :root { --gutter: 24px; } }

.site-main { flex: 1 0 auto; padding-bottom: 72px; }

/* ---------- The sea: light shafts and marine snow (CSS only) ---------- */
.sea {
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	overflow: hidden;
}
.sea__shafts {
	position: absolute;
	top: -20vh;
	left: -30%;
	width: 160%;
	height: 110vh;
	background:
		linear-gradient(104deg, transparent 0 14%, rgba(127, 232, 214, 0.05) 16% 19%, transparent 23% 100%),
		linear-gradient(98deg, transparent 0 38%, rgba(226, 240, 242, 0.035) 40% 45%, transparent 49% 100%),
		linear-gradient(108deg, transparent 0 58%, rgba(127, 232, 214, 0.04) 60% 62%, transparent 65% 100%),
		linear-gradient(101deg, transparent 0 76%, rgba(226, 240, 242, 0.03) 78% 82%, transparent 86% 100%);
	-webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.5) 45%, transparent 85%);
	mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.5) 45%, transparent 85%);
	transform-origin: 50% 0;
	animation: sway 22s ease-in-out infinite alternate;
	will-change: transform;
}
.sea__snow {
	position: absolute;
	left: 0;
	right: 0;
	top: -480px;
	bottom: 0;
	background-repeat: repeat;
	will-change: transform;
}
.sea__snow--far {
	background-size: 240px 240px;
	background-image:
		radial-gradient(1px 1px at 18px 32px, rgba(226, 240, 242, 0.35), transparent),
		radial-gradient(1px 1px at 92px 140px, rgba(226, 240, 242, 0.28), transparent),
		radial-gradient(1px 1px at 160px 60px, rgba(127, 232, 214, 0.3), transparent),
		radial-gradient(1px 1px at 210px 190px, rgba(226, 240, 242, 0.25), transparent),
		radial-gradient(1px 1px at 52px 210px, rgba(226, 240, 242, 0.3), transparent),
		radial-gradient(1px 1px at 130px 18px, rgba(226, 240, 242, 0.22), transparent);
	animation: drift-far 80s linear infinite;
	opacity: 0.8;
}
.sea__snow--near {
	background-size: 480px 480px;
	background-image:
		radial-gradient(1.6px 1.6px at 40px 70px, rgba(226, 240, 242, 0.45), transparent),
		radial-gradient(2px 2px at 300px 120px, rgba(226, 240, 242, 0.35), transparent),
		radial-gradient(1.4px 1.4px at 420px 330px, rgba(127, 232, 214, 0.4), transparent),
		radial-gradient(1.8px 1.8px at 170px 400px, rgba(226, 240, 242, 0.3), transparent),
		radial-gradient(1.5px 1.5px at 250px 260px, rgba(226, 240, 242, 0.4), transparent);
	animation: drift-near 60s linear infinite;
	opacity: 0.7;
}
@keyframes drift-far { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-20px, 480px, 0); } }
@keyframes drift-near { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(24px, 480px, 0); } }
@keyframes sway { from { transform: skewX(-2deg); } to { transform: skewX(3deg) translateX(1.5%); } }

@media (prefers-reduced-motion: reduce) {
	.sea__shafts, .sea__snow { animation: none; }
}

/* ---------- Header ---------- */
.site-header { padding: 14px 0; }
.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}
.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--ink);
	text-decoration: none;
	font-family: var(--serif);
	font-size: 1.05rem;
	font-weight: 500;
	min-height: 44px;
}
.brand__mark { border-radius: 9px; box-shadow: 0 0 0 1px var(--panel-edge), 0 0 18px rgba(127, 232, 214, 0.18); }
.site-nav { display: flex; gap: 4px; }
.site-nav a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 12px;
	color: var(--muted);
	text-decoration: none;
	font-size: 0.95rem;
	letter-spacing: 0.04em;
	border-radius: 999px;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); background: rgba(127, 232, 214, 0.08); }

/* ---------- Shared pieces ---------- */
.section { padding-top: 40px; }
.section--narrow { max-width: 760px; }
.section__label {
	font-family: var(--sans);
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--muted);
	margin-bottom: 14px;
}
.eyebrow {
	color: var(--accent);
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	margin-bottom: 10px;
}
.lede { font-size: 1.15rem; color: var(--ink); }
.muted, .meta { color: var(--muted); }
.meta { font-size: 0.92rem; }
.tagline {
	font-family: var(--serif);
	font-style: italic;
	font-size: 1.25rem;
	color: var(--muted);
	margin-bottom: 0.6em;
}

.panel {
	background: linear-gradient(180deg, rgba(7, 29, 39, 0.92), rgba(7, 29, 39, 0.82));
	border: 1px solid var(--panel-edge);
	border-radius: var(--radius);
	padding: 24px var(--gutter);
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
@media (min-width: 640px) { .panel { padding: 32px 36px; } }

.actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 16px;
	margin: 20px 0 16px;
}
.actions--center { justify-content: center; }

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 22px;
	border-radius: 999px;
	background: var(--accent);
	color: #032026;
	font-weight: 600;
	text-decoration: none;
	box-shadow: 0 0 24px rgba(127, 232, 214, 0.25);
	overflow-wrap: anywhere;
	text-align: center;
}
.button:hover { background: #a6f3e6; }
.button--ghost {
	background: transparent;
	color: var(--accent);
	border: 1px solid rgba(127, 232, 214, 0.45);
	box-shadow: none;
}
.button--ghost:hover { background: rgba(127, 232, 214, 0.1); }

.coming-soon {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 48px;
	margin: 0;
	padding: 0 18px;
	border-radius: 999px;
	border: 1px solid rgba(255, 184, 96, 0.4);
	color: var(--warm);
	font-weight: 600;
	font-size: 0.95rem;
}
.coming-soon__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--warm);
	box-shadow: 0 0 10px var(--warm);
}
.play-badge { display: inline-block; line-height: 0; }
.play-badge img { width: 200px; height: auto; margin: -12px -12px; }

/* ---------- Studio home ---------- */
.hero--studio { padding: 48px 0 8px; }
.hero__title { font-size: clamp(2.3rem, 9vw, 4rem); margin-bottom: 0.3em; }
.hero__lede { font-size: 1.2rem; color: var(--muted); max-width: 34em; }

.game-card {
	overflow: hidden;
	border-radius: var(--radius);
	background: var(--panel);
	border: 1px solid var(--panel-edge);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 60px rgba(127, 232, 214, 0.06);
}
.game-card__art img { width: 100%; aspect-ratio: 1024 / 500; object-fit: cover; }
.game-card__body { padding: 22px var(--gutter) 24px; }
@media (min-width: 640px) { .game-card__body { padding: 28px 36px 32px; } }
.game-card__title { font-size: clamp(1.8rem, 6vw, 2.4rem); letter-spacing: 0.22em; margin-bottom: 0.15em; }
.game-card__title a { color: var(--ink); text-decoration: none; }
.game-card__title a:hover { color: var(--accent); }

/* ---------- Game page ---------- */
.game-hero { padding-top: 16px; }
.game-hero__art {
	margin: 0 0 24px;
	border-radius: var(--radius);
	overflow: hidden;
	border: 1px solid var(--panel-edge);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 80px rgba(127, 232, 214, 0.08);
}
.game-hero__art img { width: 100%; aspect-ratio: 1024 / 500; }
.game-hero__text { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.game-hero__icon {
	width: 72px;
	height: 72px;
	border-radius: 18px;
	box-shadow: 0 0 0 1px var(--panel-edge), 0 0 30px rgba(127, 232, 214, 0.2);
	flex-shrink: 0;
}
.game-hero__title { letter-spacing: 0.24em; margin: 0; }
.game-hero__text .tagline { margin: 0; }

.shots {
	display: flex;
	gap: 14px;
	list-style: none;
	margin: 0 calc(-1 * var(--gutter));
	padding: 4px var(--gutter) 14px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding: 0 var(--gutter);
	scrollbar-width: thin;
	scrollbar-color: rgba(127, 232, 214, 0.35) transparent;
}
.shots__item { flex: 0 0 min(62vw, 230px); scroll-snap-align: start; }
.shots__item img {
	width: 100%;
	aspect-ratio: 540 / 960;
	border-radius: 12px;
	border: 1px solid var(--panel-edge);
	background: var(--panel);
}
@media (min-width: 900px) {
	.shots { display: grid; grid-template-columns: repeat(5, 1fr); overflow: visible; margin: 0; padding: 4px 0 0; }
}

.prose { max-width: 760px; padding-top: 32px; }
.prose h2 { margin-top: 1.8em; color: var(--accent); }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.45em; }
.prose li::marker { color: var(--accent); }
.story {
	font-family: var(--serif);
	font-style: italic;
	font-size: 1.3rem;
	line-height: 1.55;
	border-left: 2px solid var(--warm);
	padding-left: 18px;
}
.signoff { font-family: var(--serif); font-size: 1.2rem; text-align: center; margin-top: 2em; }

.related { display: grid; gap: 14px; margin-top: 40px; }
@media (min-width: 640px) { .related { grid-template-columns: repeat(3, 1fr); } }
.related__link {
	display: block;
	padding: 18px 20px;
	border-radius: var(--radius);
	background: rgba(7, 29, 39, 0.85);
	border: 1px solid var(--panel-edge);
	text-decoration: none;
	color: var(--ink);
}
.related__link:hover { border-color: rgba(127, 232, 214, 0.5); }
.related__title { display: block; font-family: var(--serif); font-size: 1.2rem; color: var(--accent); }
.related__desc { display: block; color: var(--muted); font-size: 0.95rem; }

/* ---------- Privacy policy (text included verbatim) ---------- */
.crumbs { padding: 12px 0 16px; font-size: 0.92rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.policy { max-width: 820px; margin: 0 auto; }
.policy h1 { font-size: clamp(1.8rem, 6vw, 2.4rem); }
.policy .date { color: var(--muted); margin-bottom: 28px; }
.policy h2 { color: var(--accent); margin-top: 1.8em; font-size: 1.35rem; }
.policy ul { padding-left: 1.2em; }
.policy li { margin-bottom: 0.5em; }
.policy table {
	display: block;
	overflow-x: auto;
	width: 100%;
	border-collapse: collapse;
	margin: 12px 0 18px;
	font-size: 0.95rem;
}
.policy th, .policy td {
	text-align: left;
	vertical-align: top;
	padding: 10px 12px 10px 0;
	border-bottom: 1px solid #16343f;
	min-width: 8.5em;
}
.policy th { color: var(--muted); font-weight: 400; }
.policy footer { margin-top: 40px; color: var(--muted); font-size: 0.9rem; }
.policy a { overflow-wrap: anywhere; }

/* ---------- Support ---------- */
.page-head { padding: 32px 0 8px; }
.contact h2, .faq h2 { font-size: 1.4rem; }
.contact .button { max-width: 100%; }
.faq__item {
	border-bottom: 1px solid #16343f;
}
.faq__item summary {
	cursor: pointer;
	list-style: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	min-height: 56px;
	padding: 12px 0;
	font-family: var(--serif);
	font-size: 1.12rem;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
	content: "+";
	color: var(--accent);
	font-family: var(--sans);
	font-size: 1.4rem;
	line-height: 1;
	transition: transform 0.2s ease;
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__answer { padding: 0 0 12px; color: var(--ink); }

/* ---------- 404 ---------- */
.lost { text-align: center; padding-top: 64px; }
.lost__depth {
	font-family: var(--serif);
	font-size: clamp(3.5rem, 18vw, 7rem);
	line-height: 1;
	margin-bottom: 0.15em;
	color: transparent;
	-webkit-text-stroke: 1px rgba(127, 232, 214, 0.55);
	text-shadow: 0 0 40px rgba(127, 232, 214, 0.25);
}

/* ---------- Footer ---------- */
.site-footer {
	padding: 32px 0 40px;
	border-top: 1px solid rgba(127, 232, 214, 0.1);
	background: rgba(1, 5, 7, 0.6);
	color: var(--muted);
	font-size: 0.92rem;
}
.footer-nav { display: flex; flex-wrap: wrap; gap: 0 20px; margin-bottom: 10px; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; }
.footer-nav a:hover { color: var(--accent); }
.site-footer__contact { margin-bottom: 8px; }
.site-footer__small { margin: 0; font-size: 0.85rem; }

/* Admin bar spacing when logged in */
.admin-bar .sea { top: 46px; }
@media (min-width: 783px) { .admin-bar .sea { top: 32px; } }
