/* ==========================================================================
   Phaos Interactive — modern, minimal, monochrome
   ========================================================================== */

:root {
	--bg: #09090b;
	--bg-raised: #0e0e11;
	--surface: #121215;
	--border: rgba(255, 255, 255, 0.08);
	--border-strong: rgba(255, 255, 255, 0.14);

	--text: #fafafa;
	--text-muted: #a1a1aa;
	--text-subtle: #71717a;

	--live: #4ade80;

	--font-sans: 'Geist', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

	--radius: 16px;
	--radius-sm: 10px;
	--container: 1160px;
	--nav-h: 68px;
	--ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Reset ------------------------------------------------------------------ */

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

html {
	scroll-behavior: smooth;
	scroll-padding-top: var(--nav-h);
	-webkit-text-size-adjust: 100%;
}

body {
	font-family: var(--font-sans);
	font-size: 1rem;
	line-height: 1.6;
	color: var(--text);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

body.menu-open {
	overflow: hidden;
}

img,
svg {
	display: block;
}

a {
	color: inherit;
	text-decoration: none;
}

ul {
	list-style: none;
}

button {
	font: inherit;
	color: inherit;
	background: none;
	border: 0;
	cursor: pointer;
}

::selection {
	background: var(--text);
	color: var(--bg);
}

:focus-visible {
	outline: 2px solid var(--text);
	outline-offset: 3px;
	border-radius: 6px;
}

.svg-sprite {
	position: absolute;
	width: 0;
	height: 0;
	overflow: hidden;
}

.container {
	width: 100%;
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 clamp(1.25rem, 4vw, 2rem);
}

.skip-link {
	position: absolute;
	left: 1rem;
	top: -100px;
	z-index: 2000;
	padding: 0.6rem 1rem;
	background: var(--text);
	color: var(--bg);
	font-weight: 500;
	border-radius: var(--radius-sm);
}

.skip-link:focus {
	top: 1rem;
}

/* Typography ------------------------------------------------------------- */

.label {
	font-family: var(--font-mono);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--text-subtle);
	margin-bottom: 1rem;
}

.section-title {
	font-size: clamp(2rem, 4.2vw, 3rem);
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: -0.035em;
	text-wrap: balance;
}

.section-lede {
	max-width: 34rem;
	margin-top: 1rem;
	color: var(--text-muted);
	font-size: 1.0625rem;
}

/* Buttons ---------------------------------------------------------------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	height: 44px;
	padding: 0 1.25rem;
	border-radius: 999px;
	font-size: 0.9375rem;
	font-weight: 500;
	white-space: nowrap;
	transition:
		background-color 0.2s,
		border-color 0.2s,
		color 0.2s,
		opacity 0.2s,
		transform 0.2s var(--ease);
}

.btn i {
	font-size: 0.8em;
}

.btn:active {
	transform: scale(0.98);
}

.btn-primary {
	background: var(--text);
	color: var(--bg);
}

.btn-primary:hover {
	background: #d4d4d8;
}

.btn-secondary {
	border: 1px solid var(--border-strong);
	color: var(--text);
	background: rgba(255, 255, 255, 0.02);
}

.btn-secondary:hover {
	background: rgba(255, 255, 255, 0.06);
	border-color: rgba(255, 255, 255, 0.22);
}

.btn-small {
	height: 36px;
	padding: 0 1rem;
	font-size: 0.875rem;
}

/* Navigation ------------------------------------------------------------- */

.navbar {
	position: fixed;
	inset: 0 0 auto 0;
	z-index: 1000;
	height: var(--nav-h);
}

/* blur lives on a pseudo-element: backdrop-filter on .navbar itself would
   become the containing block for the fixed mobile menu overlay */
.navbar::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(9, 9, 11, 0.72);
	border-bottom: 1px solid var(--border);
	-webkit-backdrop-filter: blur(16px) saturate(160%);
	backdrop-filter: blur(16px) saturate(160%);
	opacity: 0;
	transition: opacity 0.3s;
}

.navbar.scrolled::before {
	opacity: 1;
}

.nav-container {
	height: 100%;
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 clamp(1.25rem, 4vw, 2rem);
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 0.65rem;
}

.brand-mark {
	width: 24px;
	height: 28px;
	fill: var(--text);
}

.brand-name {
	font-size: 0.975rem;
	font-weight: 600;
	letter-spacing: -0.01em;
}

.nav-menu {
	display: flex;
	align-items: center;
	gap: 2rem;
}

.nav-link {
	font-size: 0.9rem;
	color: var(--text-muted);
	transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
	color: var(--text);
}

.hamburger {
	display: none;
	position: relative;
	z-index: 1002;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid var(--border-strong);
}

.hamburger .bar {
	position: absolute;
	left: 50%;
	width: 16px;
	height: 1.5px;
	background: var(--text);
	transition: transform 0.3s var(--ease);
}

.hamburger .bar:nth-child(1) {
	transform: translate(-50%, -3.5px);
}

.hamburger .bar:nth-child(2) {
	transform: translate(-50%, 3.5px);
}

.hamburger.active .bar:nth-child(1) {
	transform: translate(-50%, 0) rotate(45deg);
}

.hamburger.active .bar:nth-child(2) {
	transform: translate(-50%, 0) rotate(-45deg);
}

/* Hero ------------------------------------------------------------------- */

.hero {
	position: relative;
	padding: calc(var(--nav-h) + clamp(4rem, 12vh, 8rem)) 0 clamp(4rem, 8vw, 6rem);
	overflow: hidden;
	isolation: isolate;
	--mx: 50%;
	--my: 30%;
}

.hero-bg {
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
}

.hero-grid {
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
	background-size: 64px 64px;
	background-position: center top;
	-webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
	mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
}

.hero-glow {
	position: absolute;
	left: 50%;
	top: -30%;
	width: min(1100px, 140vw);
	aspect-ratio: 2 / 1;
	transform: translateX(-50%);
	background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.09), transparent 65%);
}

.hero-spotlight {
	position: absolute;
	inset: 0;
	opacity: 0;
	background: radial-gradient(500px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.05), transparent 60%);
	transition: opacity 0.4s;
}

.hero:hover .hero-spotlight {
	opacity: 1;
}

.hero-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.announce {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.4rem 0.9rem 0.4rem 0.75rem;
	margin-bottom: 2rem;
	border: 1px solid var(--border-strong);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.03);
	font-size: 0.8125rem;
	color: var(--text-muted);
	transition:
		border-color 0.2s,
		color 0.2s;
}

.announce:hover {
	border-color: rgba(255, 255, 255, 0.24);
	color: var(--text);
}

.announce i {
	font-size: 0.7rem;
	transition: transform 0.2s var(--ease);
}

.announce:hover i {
	transform: translateX(2px);
}

.announce-dot,
.status-live .dot {
	position: relative;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--live);
}

.announce-dot::after,
.status-live .dot::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: var(--live);
	animation: ping 2s ease-out infinite;
}

@keyframes ping {
	to {
		transform: scale(3);
		opacity: 0;
	}
}

.hero-title {
	max-width: 15ch;
	font-size: clamp(2.6rem, 7vw, 5.25rem);
	font-weight: 600;
	line-height: 1.02;
	letter-spacing: -0.045em;
	text-wrap: balance;
}

.hero-title .muted {
	color: var(--text-subtle);
}

.hero-lede {
	max-width: 36rem;
	margin-top: 1.5rem;
	font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
	color: var(--text-muted);
}

.hero-cta {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem;
	margin-top: 2.25rem;
}

/* Sections --------------------------------------------------------------- */

.section {
	padding: clamp(5rem, 10vw, 7.5rem) 0;
	border-top: 1px solid var(--border);
}

.section-header {
	margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

/* Cards ------------------------------------------------------------------ */

.card {
	position: relative;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01));
	overflow: hidden;
	transition: border-color 0.3s;
}

/* soft light that follows the pointer (set by script.js) */
.card::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	opacity: 0;
	background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.06), transparent 50%);
	transition: opacity 0.3s;
}

.card:hover {
	border-color: var(--border-strong);
}

.card:hover::before {
	opacity: 1;
}

.card > * {
	position: relative;
	z-index: 1;
}

/* Games ------------------------------------------------------------------ */

.games-grid {
	display: grid;
	grid-template-columns: 1.6fr 1fr;
	gap: 1.25rem;
}

.game-card {
	display: flex;
	flex-direction: column;
}

.game-media {
	position: relative;
	height: clamp(220px, 24vw, 280px);
	border-bottom: 1px solid var(--border);
	background:
		radial-gradient(ellipse 60% 80% at 50% 100%, rgba(255, 255, 255, 0.07), transparent 70%),
		var(--bg-raised);
	overflow: hidden;
}

.game-cover {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s var(--ease);
}

.game-card:hover .game-cover {
	transform: scale(1.04);
}

.teaser {
	display: grid;
	place-items: center;
}

.teaser-mark {
	width: 34%;
	height: 56%;
	fill: rgba(255, 255, 255, 0.07);
	transition: fill 0.4s;
}

.game-card:hover .teaser-mark {
	fill: rgba(255, 255, 255, 0.12);
}

.game-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: clamp(1.5rem, 3vw, 2rem);
}

.game-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem 0.9rem;
	margin-bottom: 1rem;
	font-family: var(--font-mono);
	font-size: 0.72rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--text-subtle);
}

.status {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.2rem 0.6rem;
	border: 1px solid var(--border-strong);
	border-radius: 999px;
	color: var(--text-muted);
}

.status-live {
	color: var(--live);
	border-color: rgba(74, 222, 128, 0.3);
}

.meta-item + .meta-item::before {
	content: '·';
	margin-right: 0.9rem;
}

.game-title {
	font-size: clamp(1.5rem, 2.5vw, 1.875rem);
	font-weight: 600;
	letter-spacing: -0.03em;
	line-height: 1.2;
}

.game-desc {
	margin-top: 0.6rem;
	max-width: 32rem;
	color: var(--text-muted);
}

.game-footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-top: auto;
	padding-top: 1.75rem;
}

.platforms {
	display: flex;
	gap: 0.85rem;
	color: var(--text-subtle);
	font-size: 1.05rem;
}

.platforms li {
	transition: color 0.2s;
}

.game-card:hover .platforms li {
	color: var(--text-muted);
}

.game-note {
	margin-top: auto;
	padding-top: 1.75rem;
	font-size: 0.9rem;
	color: var(--text-subtle);
}

.game-note a {
	color: var(--text);
	font-weight: 500;
}

.game-note a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Contact ---------------------------------------------------------------- */

.contact-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(2.5rem, 6vw, 5rem);
	align-items: center;
}

.channels {
	display: grid;
	gap: 0.75rem;
}

.channel {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 0.9rem 1.1rem;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	transition:
		border-color 0.2s,
		background-color 0.2s;
}

.channel:hover {
	border-color: var(--border-strong);
	background: rgba(255, 255, 255, 0.03);
}

.channel-icon {
	display: grid;
	place-items: center;
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.06);
	font-size: 1rem;
}

.channel-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
	line-height: 1.4;
}

.channel-text strong {
	font-weight: 500;
}

.channel-text span {
	color: var(--text-subtle);
	font-size: 0.875rem;
	overflow-wrap: anywhere;
}

.channel-arrow {
	margin-left: auto;
	font-size: 0.8rem;
	color: var(--text-subtle);
	transition:
		color 0.2s,
		transform 0.2s var(--ease);
}

.channel:hover .channel-arrow {
	color: var(--text);
	transform: translateX(3px);
}

/* Footer ----------------------------------------------------------------- */

.footer {
	padding: 2.5rem 0;
	border-top: 1px solid var(--border);
}

.footer-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.25rem 2rem;
}

.footer-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.75rem;
}

.footer-links a {
	font-size: 0.875rem;
	color: var(--text-muted);
	transition: color 0.2s;
}

.footer-links a:hover {
	color: var(--text);
}

.footer-copy {
	width: 100%;
	font-size: 0.8125rem;
	color: var(--text-subtle);
}

.back-to-top {
	position: fixed;
	right: 1.5rem;
	bottom: 1.5rem;
	z-index: 900;
	width: 40px;
	height: 40px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	border: 1px solid var(--border-strong);
	background: rgba(18, 18, 21, 0.8);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	font-size: 0.8rem;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition:
		opacity 0.3s,
		visibility 0.3s,
		transform 0.3s var(--ease),
		border-color 0.2s;
}

.back-to-top.show {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.back-to-top:hover {
	border-color: rgba(255, 255, 255, 0.3);
}

/* Reveal on scroll (only hides content when JS is running) ---------------- */

.js .reveal {
	opacity: 0;
	transform: translateY(16px);
	transition:
		opacity 0.8s var(--ease),
		transform 0.8s var(--ease),
		border-color 0.3s;
	transition-delay: var(--delay, 0s), var(--delay, 0s), 0s;
}

.js .reveal.in {
	opacity: 1;
	transform: none;
}

/* Responsive ------------------------------------------------------------- */

@media (max-width: 960px) {
	.games-grid,
	.contact-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 760px) {
	:root {
		--nav-h: 60px;
	}

	.hamburger {
		display: block;
	}

	.nav-menu {
		position: fixed;
		inset: 0;
		z-index: 1001;
		flex-direction: column;
		justify-content: center;
		gap: 1.5rem;
		background: rgba(9, 9, 11, 0.98);
		opacity: 0;
		visibility: hidden;
		transition:
			opacity 0.3s,
			visibility 0.3s;
	}

	.nav-menu.active {
		opacity: 1;
		visibility: visible;
	}

	.nav-link {
		font-size: 1.75rem;
		font-weight: 600;
		letter-spacing: -0.03em;
		color: var(--text);
	}

	.nav-cta-item {
		margin-top: 0.75rem;
	}
}

@media (max-width: 480px) {
	.hero-cta {
		width: 100%;
		flex-direction: column;
	}

	.game-footer .btn {
		width: 100%;
	}

	.back-to-top {
		right: 1rem;
		bottom: 1rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}

	.js .reveal {
		opacity: 1;
		transform: none;
	}
}
