/* ==========================================================================
   HiggyGames — site styles
   Palette pulled from the Disc-yphus screenshots: twilight-blue backdrop,
   watermelon-red accent, meadow-green secondary.
   ========================================================================== */

:root {
	--bg: #0d1726;
	--bg-alt: #111d30;
	--surface: #172741;
	--line: rgba(255, 255, 255, 0.09);
	--text: #f4f7fb;
	--muted: #a9b6c8;
	--accent: #ff5470;
	--accent-strong: #ff2f52;
	--accent-2: #8fd14f;
	--sky: #5fc4ff;

	--font-display: "Fredoka", "Nunito", system-ui, sans-serif;
	--font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;

	--radius: 14px;
	--radius-lg: 22px;
	--shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
	--topbar-h: 68px;
	--max: 1120px;
	--ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.6;
	overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button, input, textarea { font: inherit; color: inherit; }

.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;
}
.skip-link {
	position: absolute; top: -100px; left: 16px; z-index: 200;
	padding: 10px 14px; background: var(--accent); color: #fff; border-radius: 8px;
	text-decoration: none; font-weight: 700;
}
.skip-link:focus { top: 12px; }

/* ---------- Top bar ---------- */
.topbar {
	position: fixed; inset: 0 0 auto 0; z-index: 100;
	height: var(--topbar-h);
	transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease), backdrop-filter 0.35s;
}
.topbar.is-solid {
	background: rgba(13, 23, 38, 0.82);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	box-shadow: 0 1px 0 var(--line);
}
.topbar__inner {
	max-width: var(--max); height: 100%; margin: 0 auto; padding: 0 24px;
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.wordmark {
	display: inline-flex; align-items: center; gap: 10px;
	font-family: var(--font-display); font-weight: 700; font-size: 1.35rem;
	text-decoration: none; letter-spacing: 0.01em;
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}
.wordmark__disc { width: 32px; height: 32px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4)); }

.nav { display: flex; gap: 6px; }
.nav a {
	padding: 8px 14px; border-radius: 999px;
	text-decoration: none; font-weight: 700; font-size: 0.95rem;
	color: rgba(255, 255, 255, 0.85);
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
	transition: background 0.2s, color 0.2s;
}
.nav a:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.nav a.is-active { color: #fff; background: rgba(255, 84, 112, 0.22); }

.nav-toggle {
	display: none; flex-direction: column; justify-content: center; gap: 5px;
	width: 44px; height: 44px; padding: 0; border: 0; border-radius: 10px;
	background: rgba(255, 255, 255, 0.08); cursor: pointer;
}
.nav-toggle span {
	display: block; width: 22px; height: 2px; margin: 0 auto; background: #fff; border-radius: 2px;
	transition: transform 0.25s var(--ease), opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 50px; padding: 0 26px; border-radius: 999px;
	font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; letter-spacing: 0.01em;
	text-decoration: none; cursor: pointer; border: 2px solid transparent;
	transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.btn svg { width: 22px; height: 22px; fill: currentColor; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary {
	background: var(--accent); color: #fff;
	box-shadow: 0 10px 30px rgba(255, 84, 112, 0.35);
}
.btn--primary:hover { background: var(--accent-strong); box-shadow: 0 14px 34px rgba(255, 84, 112, 0.45); }
.btn--ghost {
	background: rgba(255, 255, 255, 0.08); color: #fff;
	border-color: rgba(255, 255, 255, 0.28);
	backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.5); }

.icon-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 46px; height: 46px; border-radius: 50%;
	background: #fff; color: var(--bg);
	transition: transform 0.2s var(--ease), background 0.2s;
}
.icon-btn svg { width: 24px; height: 24px; fill: currentColor; }
.icon-btn:hover { transform: scale(1.08); background: var(--accent-2); }

/* ---------- Hero ---------- */
.hero {
	position: relative; isolation: isolate;
	min-height: 100vh; min-height: 100svh;
	display: grid; place-items: center;
	padding: calc(var(--topbar-h) + 40px) 24px 96px;
	text-align: center; overflow: hidden;
}
.hero__media {
	position: absolute; inset: 0; z-index: -2;
	background: var(--bg) url("../assets/images/hero.jpg") center 45% / cover no-repeat;
	animation: hero-drift 28s ease-in-out infinite alternate;
	transform-origin: 45% 60%;
}
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after {
	/* Legibility overlay: darkens the top for the nav, fades into the page colour at the bottom. */
	content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background:
		linear-gradient(to bottom, rgba(13, 23, 38, 0.55) 0%, rgba(13, 23, 38, 0.05) 30%, rgba(13, 23, 38, 0.15) 60%, var(--bg) 100%),
		radial-gradient(60% 50% at 50% 55%, rgba(0, 0, 0, 0.35), transparent 70%);
}
@keyframes hero-drift {
	from { transform: scale(1); }
	to   { transform: scale(1.08); }
}

.hero__content { max-width: 820px; }
.hero__eyebrow {
	display: inline-block; margin-bottom: 18px; padding: 6px 14px; border-radius: 999px;
	background: rgba(13, 23, 38, 0.55); border: 1px solid rgba(255, 255, 255, 0.2);
	font-weight: 700; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
	backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.hero__title {
	font-size: clamp(3.4rem, 11vw, 7.5rem); font-weight: 700; letter-spacing: -0.03em;
	color: #fff; text-shadow: 0 4px 0 rgba(0, 0, 0, 0.12), 0 12px 40px rgba(0, 0, 0, 0.55);
}
.hero__tagline {
	margin-top: 14px; font-size: clamp(1.1rem, 2.4vw, 1.45rem); font-weight: 600;
	color: rgba(255, 255, 255, 0.95); text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
}
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 34px; }

.hero__scroll {
	position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
	width: 28px; height: 46px; border: 2px solid rgba(255, 255, 255, 0.55); border-radius: 999px;
	display: grid; justify-content: center; align-content: start; padding-top: 8px;
}
.hero__scroll span {
	width: 4px; height: 8px; border-radius: 2px; background: #fff;
	animation: scroll-hint 1.8s ease-in-out infinite;
}
@keyframes scroll-hint {
	0%   { transform: translateY(0); opacity: 1; }
	70%  { transform: translateY(16px); opacity: 0; }
	100% { transform: translateY(0); opacity: 0; }
}

/* ---------- Sections ---------- */
.section { padding: 96px 24px; scroll-margin-top: var(--topbar-h); }
.section--alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__inner { max-width: var(--max); margin: 0 auto; }
.section__inner--narrow { max-width: 720px; }
.section__head { text-align: center; margin-bottom: 48px; }
.section__head h2 {
	font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 700;
	position: relative; display: inline-block; padding-bottom: 14px;
}
.section__head h2::after {
	content: ""; position: absolute; left: 50%; bottom: 0; width: 56px; height: 4px; border-radius: 2px;
	transform: translateX(-50%);
	background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.section__head p { margin-top: 12px; color: var(--muted); font-size: 1.1rem; }

/* ---------- Games ---------- */
.games { display: grid; gap: 32px; }
.game {
	display: grid; grid-template-columns: 1.15fr 1fr; gap: 0;
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
	overflow: hidden; box-shadow: var(--shadow);
}
.game__media { display: block; position: relative; overflow: hidden; background: #000; }
.game__media img {
	width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 9;
	transition: transform 0.6s var(--ease);
}
.game__media:hover img { transform: scale(1.04); }
.game__body { padding: 36px; display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.game__title { font-size: 2rem; font-weight: 700; }
.game__meta { color: var(--accent-2); font-weight: 700; font-size: 0.9rem; letter-spacing: 0.04em; text-transform: uppercase; }
.game__desc { color: var(--muted); }
.game__pills { display: flex; flex-wrap: wrap; gap: 8px; }
.game__pills li {
	padding: 6px 12px; border-radius: 999px; font-size: 0.85rem; font-weight: 700;
	background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line);
}
.game__links { display: flex; gap: 12px; margin-top: 6px; }

/* ---------- About ---------- */
.about__blurb {
	max-width: 640px; margin: -16px auto 48px; text-align: center;
	font-size: 1.15rem; color: var(--muted);
}
.team { display: flex; flex-wrap: wrap; justify-content: center; gap: 40px; }
.member { text-align: center; width: 260px; }
.member__photo {
	width: 200px; height: 200px; margin: 0 auto 18px; border-radius: 50%; object-fit: cover;
	border: 4px solid var(--surface); box-shadow: 0 0 0 3px var(--accent), var(--shadow);
}
.member__name { font-size: 1.4rem; font-weight: 600; }
.member__role { color: var(--muted); margin-top: 4px; font-weight: 600; }

/* ---------- Contact ---------- */
.contact__email { text-align: center; margin: -16px 0 36px; }
.form { display: grid; gap: 14px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form input, .form textarea {
	width: 100%; padding: 14px 16px; border-radius: var(--radius);
	background: var(--surface); border: 1px solid var(--line); color: var(--text);
	transition: border-color 0.2s, box-shadow 0.2s;
}
.form textarea { resize: vertical; min-height: 150px; }
.form input::placeholder, .form textarea::placeholder { color: rgba(169, 182, 200, 0.8); }
.form input:focus, .form textarea:focus {
	outline: none; border-color: var(--accent);
	box-shadow: 0 0 0 4px rgba(255, 84, 112, 0.2);
}
.form__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 4px; }
.form__status { color: var(--muted); font-weight: 600; min-height: 1.5em; }
.form__status.is-ok { color: var(--accent-2); }
.form__status.is-error { color: var(--accent); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 48px 24px 40px; background: var(--bg-alt); }
.footer__inner { max-width: var(--max); margin: 0 auto; text-align: center; }
.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.socials a {
	display: inline-flex; align-items: center; justify-content: center;
	width: 52px; height: 52px; border-radius: 50%;
	background: #fff; color: var(--bg);
	transition: transform 0.2s var(--ease), background 0.2s, color 0.2s;
}
.socials a svg { width: 24px; height: 24px; fill: currentColor; }
.socials a:hover { transform: translateY(-3px) scale(1.06); background: var(--accent); color: #fff; }
.socials li[hidden] { display: none; }
.footer__copy { margin-top: 26px; color: var(--muted); font-size: 0.9rem; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Focus ---------- */
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.game { grid-template-columns: 1fr; }
	.game__body { padding: 28px; }
}

@media (max-width: 720px) {
	body { font-size: 16px; }
	.hero__media { background-image: url("../assets/images/hero-mobile.jpg"); background-position: center; }
	.section { padding: 72px 20px; }
	.form__row { grid-template-columns: 1fr; }

	.nav-toggle { display: flex; }
	.nav {
		position: fixed; top: var(--topbar-h); right: 16px; left: 16px;
		flex-direction: column; gap: 4px; padding: 10px;
		background: rgba(13, 23, 38, 0.96); border: 1px solid var(--line); border-radius: var(--radius);
		box-shadow: var(--shadow);
		transform: translateY(-8px); opacity: 0; visibility: hidden;
		transition: transform 0.25s var(--ease), opacity 0.25s, visibility 0.25s;
	}
	.nav.is-open { transform: none; opacity: 1; visibility: visible; }
	.nav a { padding: 14px 16px; text-align: center; font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.hero__media, .hero__scroll span { animation: none; }
	.reveal { opacity: 1; transform: none; transition: none; }
	.btn, .icon-btn, .socials a, .game__media img { transition: none; }
}
