/* PhysiCore landing page: same look as the game's main menu (ui/menu_style.gd, ui/main_menu.gd). */

@font-face { font-family: "Barlow Condensed"; src: url("assets/fonts/BarlowCondensed-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("assets/fonts/Barlow-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("assets/fonts/Barlow-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("assets/fonts/Barlow-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
	/* MenuStyle colors */
	--text: #f5f5f2;
	--text-dim: #c7c9cc;
	--online: #5cd96b;
	--play: #dbdbdb;
	--explore: #e0a629;
	--config: #3bb399;
	--create: #9e73f2;
	--quit: #e04538;
	--blue: #2b78db;
	--beam: #59bfff;
	/* panels */
	--page-fill: rgba(20, 23, 26, 0.94);
	--page-border: rgba(255, 255, 255, 0.22);
	--card: rgba(33, 36, 41, 0.95);
	--card-border: rgba(255, 255, 255, 0.12);
	--pill: rgba(13, 13, 15, 0.55);
	--pill-border: rgba(255, 255, 255, 0.06);
	--bg: #0a0b0d;
	--title: "Barlow Condensed", "Arial Narrow", sans-serif;
	--body: "Barlow", "Segoe UI", sans-serif;
	color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--body);
	font-weight: 500;
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
.shadow-text { text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }

/* ---------- Loader (like the game's loading screen) ---------- */
.loader {
	position: fixed; inset: 0; z-index: 50;
	display: grid; place-items: center;
	background: radial-gradient(ellipse at 50% 40%, #1a1d22 0%, #070809 70%);
	transition: opacity 0.7s ease, visibility 0.7s;
}
.loader.done { opacity: 0; visibility: hidden; }
.loader-inner { width: min(420px, 80vw); text-align: center; }
.loader-inner img { width: 100%; margin: 0 auto 28px; filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.6)); }
.loader-bar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.loader-bar i { display: block; height: 100%; width: 100%; transform: scaleX(0); transform-origin: left; background: linear-gradient(90deg, var(--blue), var(--beam)); box-shadow: 0 0 12px var(--beam); transition: transform 0.25s ease; }
.loader-label { margin-top: 12px; font: 600 13px/1 var(--body); letter-spacing: 0.08em; color: var(--text-dim); text-transform: uppercase; }

/* ---------- Hero: live 3D scene + menu ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 640px; overflow: hidden; background: #111 url("img/warehouse_day.jpg") center / cover no-repeat; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
.hero canvas.can-grab { cursor: grab; }
.hero canvas.grabbing { cursor: grabbing; }
.hero canvas.looking { cursor: move; }
/* Darkens the left side so the menu stays readable over the scene (main_menu.gd shade gradient). */
.hero-shade {
	position: absolute; inset: 0; pointer-events: none;
	background: linear-gradient(90deg, rgba(5, 5, 8, 0.8) 0%, rgba(5, 5, 8, 0.28) 33%, rgba(5, 5, 8, 0) 60%),
		linear-gradient(0deg, rgba(10, 11, 13, 1) 0%, rgba(10, 11, 13, 0) 14%);
}

.menu { position: absolute; left: 42px; top: 36px; width: 330px; display: flex; flex-direction: column; gap: 2px; z-index: 2; }
.menu .logo { width: 300px; height: auto; margin: 0 0 6px -4px; filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.5)); }
.tagline { font: 600 15px/1.35 var(--body); color: var(--text); margin: 0 0 16px 2px; max-width: 300px; }
.tagline b { font-weight: 700; color: #fff; }

.section {
	position: relative; display: flex; gap: 9px; width: 272px;
	padding: 5px 12px 6px 7px; border-radius: 7px; border: 1px solid transparent;
	text-decoration: none; cursor: pointer;
	transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.section:hover, .section:focus-within { background: rgba(255, 255, 255, 0.13); border-color: rgba(255, 255, 255, 0.42); box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25); }
.section .bar { width: 3px; flex: none; border-radius: 1px; background: var(--c); }
.section .col { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.section h2 { margin: 0; font: 700 23px/1.1 var(--title); letter-spacing: 0.01em; color: var(--text); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }
.section .sub { font: 600 12px/1.3 var(--body); color: var(--text); opacity: 0.85; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }
.pills { display: flex; flex-wrap: wrap; gap: 5px; }

.pill {
	display: inline-flex; align-items: center; gap: 5px;
	padding: 2px 7px 3px; border-radius: 5px;
	background: var(--pill); border: 1px solid var(--pill-border);
	color: var(--text); font: 600 12px/1.4 var(--body); text-decoration: none; white-space: nowrap;
	cursor: pointer; transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.pill:hover { background: rgba(51, 51, 56, 0.75); border-color: rgba(255, 255, 255, 0.25); color: #fff; }
.pill.on, .pill:active { background: rgba(242, 242, 242, 0.9); border-color: rgba(255, 255, 255, 0.5); color: #141414; }
.pill svg { width: 13px; height: 13px; flex: none; }
button.pill { appearance: none; }

/* Blue button (main_menu.gd _blue_button) */
.btn-blue {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 6px 16px 5px; border-radius: 5px; border: 0;
	background: var(--blue); color: #fff; text-decoration: none; cursor: pointer;
	font: 700 18px/1.2 var(--title); letter-spacing: 0.03em; text-transform: uppercase;
	box-shadow: 0 4px 18px rgba(43, 120, 219, 0.35);
	transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.btn-blue:hover { background: #4a8fe4; transform: translateY(-1px); box-shadow: 0 6px 24px rgba(43, 120, 219, 0.5); }
.btn-blue:active { background: #2260af; transform: none; }
.btn-blue svg { width: 18px; height: 18px; }
.btn-ghost {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 6px 16px 5px; border-radius: 5px; border: 1px solid rgba(255, 255, 255, 0.18);
	background: rgba(15, 15, 18, 0.82); color: var(--text); text-decoration: none; cursor: pointer;
	font: 700 18px/1.2 var(--title); letter-spacing: 0.03em; text-transform: uppercase;
	transition: background 0.15s, border-color 0.15s;
}
.btn-ghost:hover { background: rgba(46, 46, 51, 0.9); border-color: rgba(255, 255, 255, 0.35); }
.btn-ghost svg { width: 18px; height: 18px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0 2px; }

/* Top bar (profile + Steam square button) */
.topbar { position: absolute; top: 9px; right: 12px; display: flex; gap: 8px; z-index: 3; }
.glass { background: rgba(15, 15, 18, 0.82); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; }
.status { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 8px; font: 600 13px/1 var(--body); }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--online); box-shadow: 0 0 8px var(--online); }
.status .sep { width: 1px; height: 22px; background: rgba(255, 255, 255, 0.14); }
.status button { all: unset; cursor: pointer; padding: 4px 4px; color: var(--text-dim); font: 700 13px/1 var(--body); letter-spacing: 0.04em; }
.status button.on { color: #fff; }
.status button:hover { color: #fff; }
.square { display: grid; place-items: center; width: 36px; height: 36px; color: var(--text); text-decoration: none; transition: background 0.12s, border-color 0.12s; }
.square:hover { background: rgba(46, 46, 51, 0.9); border-color: rgba(255, 255, 255, 0.3); }
.square svg { width: 18px; height: 18px; }

/* Physgun card (news_card.gd look) */
.gun-card {
	position: absolute; left: 44px; bottom: 38px; width: 300px; z-index: 2;
	padding: 12px 14px 12px; border-radius: 8px;
	background: linear-gradient(160deg, rgba(20, 30, 44, 0.9), rgba(10, 11, 14, 0.88));
	border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.kicker { font: 700 11px/1 var(--body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--beam); }
.gun-card h3 { margin: 5px 0 8px; font: 700 15px/1.25 var(--body); }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 5px 9px; margin: 0; font: 500 13px/1.3 var(--body); color: var(--text-dim); align-items: center; }
.keys dt { justify-self: start; }
kbd {
	display: inline-block; min-width: 22px; padding: 1px 6px; border-radius: 4px; text-align: center;
	background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.18); border-bottom-width: 2px;
	font: 700 11px/1.5 var(--body); color: var(--text); white-space: nowrap;
}
.gun-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }

.toast {
	position: absolute; left: 50%; bottom: 34px; transform: translate(-50%, 8px); z-index: 3;
	font: 600 16px/1.2 var(--body); color: var(--text); text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
	opacity: 0; transition: opacity 0.3s, transform 0.3s; pointer-events: none; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.scroll-cue {
	position: absolute; right: 24px; bottom: 30px; z-index: 2; display: flex; align-items: center; gap: 8px;
	font: 700 13px/1 var(--title); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); text-decoration: none;
}
.scroll-cue svg { width: 18px; height: 18px; animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(4px); } }
.crosshair { position: absolute; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5); pointer-events: none; z-index: 2; opacity: 0; transition: opacity 0.2s; }

/* ---------- Content sections ---------- */
.wrap { width: min(1180px, 100% - 32px); margin: 0 auto; }
.block { padding: 90px 0 30px; }
.block-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.eyebrow { display: flex; align-items: center; gap: 10px; font: 700 14px/1 var(--title); letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); }
.eyebrow::before { content: ""; width: 3px; height: 16px; background: var(--c, var(--blue)); }
.block h2.big { margin: 10px 0 0; font: 700 clamp(38px, 5.5vw, 64px)/0.95 var(--title); letter-spacing: 0.005em; text-transform: uppercase; }
.block h2.big em { font-style: normal; color: var(--beam); }
.lead { max-width: 560px; margin: 0; color: var(--text-dim); font-size: 17px; }

.group { margin-top: 34px; }
.group-title { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; font: 700 23px/1 var(--title); letter-spacing: 0.02em; }
.group-title::before { content: ""; width: 3px; height: 22px; background: var(--c); }
.group-title span { font: 600 13px/1 var(--body); color: var(--text-dim); letter-spacing: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }

/* Card (main_menu.gd _card): dark panel, thumbnail with two-color gradient + glyph, text below */
.card {
	display: flex; flex-direction: column; border-radius: 7px; overflow: hidden;
	background: var(--card); border: 1px solid var(--card-border);
	transition: transform 0.2s ease, border-color 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, 0.3); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4); }
.thumb { position: relative; aspect-ratio: 16 / 8; margin: 0; background: linear-gradient(135deg, var(--a), var(--b)); display: grid; place-items: center; overflow: hidden; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.card:hover .thumb img { transform: scale(1.05); }
.thumb svg { width: 40px; height: 40px; color: rgba(255, 255, 255, 0.78); filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35)); }
.thumb .tag { position: absolute; left: 8px; top: 8px; padding: 1px 7px 2px; border-radius: 5px; background: rgba(13, 13, 15, 0.7); font: 600 11px/1.5 var(--body); }
.card-body { padding: 10px 12px 13px; display: flex; flex-direction: column; gap: 4px; }
.card h3 { margin: 0; font: 700 19px/1.15 var(--title); letter-spacing: 0.02em; text-transform: uppercase; }
.card p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--text-dim); }

/* Modding block: page panel look */
.panel {
	background: var(--page-fill); border: 1px solid var(--page-border); border-radius: 8px;
	box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4);
}
.modding { display: grid; grid-template-columns: 1fr 1.15fr; gap: 0; overflow: hidden; }
.modding-text { padding: 30px 30px 32px; display: flex; flex-direction: column; gap: 14px; }
.modding-text h2 { margin: 0; font: 700 clamp(30px, 4vw, 44px)/1 var(--title); text-transform: uppercase; }
.modding-text p { margin: 0; color: var(--text-dim); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 15px; }
.checks li { display: flex; gap: 9px; align-items: baseline; }
.checks li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 2px; background: var(--create); transform: translateY(-1px); }
.doc-links { display: flex; flex-wrap: wrap; gap: 5px; }
.code { position: relative; margin: 0; padding: 0; background: #0c0d10; border-left: 1px solid var(--page-border); display: flex; flex-direction: column; min-width: 0; }
.code-tabs { display: flex; gap: 2px; padding: 8px 10px 0; background: #121418; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.code-tabs span { padding: 6px 12px 7px; border-radius: 6px 6px 0 0; font: 600 12px/1 var(--body); color: var(--text-dim); }
.code-tabs span.on { background: #0c0d10; color: var(--text); box-shadow: inset 0 2px 0 var(--create); }
.code pre { margin: 0; padding: 18px 20px 22px; overflow-x: auto; font: 13.5px/1.65 "Cascadia Code", "JetBrains Mono", Consolas, monospace; color: #d8dade; tab-size: 4; }
.tok-c { color: #6f7680; font-style: italic; }
.tok-k { color: #c49bff; }
.tok-s { color: #9fd88a; }
.tok-n { color: #f0b45a; }
.tok-f { color: #6cc3ff; }

/* Final call to action */
.final { position: relative; margin: 90px 0 0; padding: 110px 0 120px; overflow: hidden; text-align: center; isolation: isolate; }
.final::before { content: ""; position: absolute; inset: 0; z-index: -2; background: url("img/desert_town.jpg") center 40% / cover no-repeat; }
.final::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--bg) 0%, rgba(10, 11, 13, 0.55) 35%, rgba(10, 11, 13, 0.55) 65%, var(--bg) 100%); }
.final h2 { margin: 0 0 10px; font: 700 clamp(40px, 6vw, 76px)/0.95 var(--title); text-transform: uppercase; text-shadow: 0 3px 20px rgba(0, 0, 0, 0.6); }
.final p { margin: 0 auto 26px; max-width: 520px; font-size: 18px; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8); }
.final .cta-row { justify-content: center; margin: 0; }

footer { padding: 26px 0 40px; border-top: 1px solid rgba(255, 255, 255, 0.08); color: var(--text-dim); font-size: 13px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }
footer img { height: 26px; width: auto; opacity: 0.85; }
footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
footer a { text-decoration: none; }
footer a:hover { color: #fff; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

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

@media (max-height: 860px) and (min-width: 641px) {
	.gun-card { left: auto; right: 12px; top: 58px; bottom: auto; width: 270px; }
	.gun-card .keys { display: none; }
}
@media (max-width: 900px) {
	.modding { grid-template-columns: 1fr; }
	.code { border-left: 0; border-top: 1px solid var(--page-border); }
	.gun-card { display: none; }
}
@media (max-width: 640px) {
	.hero { height: auto; min-height: 0; padding: 0 0 24px; display: flex; flex-direction: column; }
	.hero canvas { position: relative; inset: auto; height: 56svh; order: 2; }
	.hero-shade { background: linear-gradient(180deg, rgba(5, 5, 8, 0.85) 0%, rgba(5, 5, 8, 0.25) 100%); bottom: auto; height: 100%; }
	.menu { position: relative; left: auto; top: auto; width: auto; padding: 64px 16px 18px; order: 1; }
	.menu .logo { width: 230px; }
	.section { width: 100%; }
	.topbar { right: 8px; }
	.scroll-cue { display: none; }
	.toast { bottom: 40px; white-space: normal; text-align: center; width: 90%; }
	.mobile-hint { display: block !important; order: 3; padding: 10px 16px 0; color: var(--text-dim); font-size: 13px; }
	.block { padding-top: 60px; }
	.modding-text { padding: 22px 18px; }
}
.mobile-hint { display: none; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.reveal { opacity: 1; transform: none; transition: none; }
	.scroll-cue svg { animation: none; }
}
