/* WAR4ME download site. One family (Barlow Condensed), HUD-panel look from docs/ART-DIRECTION.md. */

@font-face {
	font-family: "Barlow Condensed";
	src: url("/assets/fonts/barlow-condensed-medium.woff2") format("woff2");
	font-weight: 500;
	font-display: swap;
}
@font-face {
	font-family: "Barlow Condensed";
	src: url("/assets/fonts/barlow-condensed-semibold.woff2") format("woff2");
	font-weight: 600;
	font-display: swap;
}

:root {
	--navy: #101a24;
	--navy-deep: #0a1219;
	--panel: rgba(16, 26, 36, 0.86);
	--line: rgba(214, 226, 238, 0.16);
	--bone: #eef2f5;
	--steel: #9aa9b8;
	--sun: #f2b866;
	--blue: #2f7fe0;
	--blue-deep: #2a73cf; /* CTA fill: white text keeps 4.7:1 */
	--red: #d8332b;

	--gutter: clamp(20px, 5vw, 72px);
	--ease-out: cubic-bezier(0.16, 1, 0.3, 1);
	color-scheme: dark;
}

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

html { background: var(--navy-deep); }

body {
	margin: 0;
	background: var(--navy);
	color: var(--bone);
	font: 500 1.1875rem/1.45 "Barlow Condensed", "Arial Narrow", sans-serif;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
b { font-weight: 600; color: var(--bone); }

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

.visually-hidden {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

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

.hero {
	position: relative;
	min-height: 100svh;
	display: grid;
	align-items: center;
	padding: clamp(48px, 9vh, 120px) var(--gutter);
	isolation: isolate;
	overflow: hidden;
	background:
		radial-gradient(80% 70% at 78% 40%, rgba(242, 184, 102, 0.16), transparent 60%),
		var(--navy);
}

/* Key art: a wide window right of centre that dissolves into the navy at every edge. */
.hero__art {
	position: absolute;
	top: 50%;
	right: -3vw;
	z-index: -2;
	width: min(82vw, 1420px);
	aspect-ratio: 755 / 400;
	transform: translateY(-50%);
	-webkit-mask-image: radial-gradient(ellipse 54% 54% at 52% 50%, #000 55%, transparent 100%);
	mask-image: radial-gradient(ellipse 54% 54% at 52% 50%, #000 55%, transparent 100%);
}
.hero__art-inner {
	position: absolute;
	inset: -3%;
	will-change: transform;
}
.hero__art img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: saturate(1.08) contrast(1.05) brightness(0.96);
	animation: art-in 2.2s var(--ease-out) both, drift 46s ease-in-out 2.2s infinite alternate;
}
/* Warm grade + cool shadow lift over the art, like the in-game LUT. */
.hero__art::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(200deg, rgba(242, 160, 70, 0.14), rgba(16, 40, 64, 0.32));
	mix-blend-mode: multiply;
}

/* Isometric ground grid (2:1 tile, like the game camera), fading in toward the bottom.
   A warm light band sweeps across it; JS only moves the layer for parallax. */
.hero__grid {
	position: absolute;
	inset: -40px;
	z-index: -1;
	pointer-events: none;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='36'%3E%3Cpath d='M0 0 72 36M0 36 72 0' stroke='%239ab4ce' stroke-opacity='.1' fill='none'/%3E%3C/svg%3E") 0 0 / 72px 36px;
	-webkit-mask-image: linear-gradient(180deg, transparent 12%, #000 100%);
	mask-image: linear-gradient(180deg, transparent 12%, #000 100%);
	will-change: transform;
}
.hero__grid-shine {
	position: absolute;
	inset: 0;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='36'%3E%3Cpath d='M0 0 72 36M0 36 72 0' stroke='%23f2b866' stroke-opacity='.35' fill='none'/%3E%3C/svg%3E") 0 0 / 72px 36px;
	-webkit-mask-image: linear-gradient(115deg, transparent 42%, #000 50%, transparent 58%);
	mask-image: linear-gradient(115deg, transparent 42%, #000 50%, transparent 58%);
	-webkit-mask-size: 300% 100%;
	mask-size: 300% 100%;
	animation: shine 9s linear 1.6s infinite both;
}

.hero__fx {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: -1;
	pointer-events: none;
}

.hero__content {
	position: relative;
	max-width: 620px;
}

/* HUD score bar: blue from the left, red from the right, meeting at the 4v4 tag. */
.scorebar {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 12px;
	width: min(100%, 460px);
	margin-bottom: 18px;
}
.scorebar__line {
	height: 4px;
	transform-origin: left;
	animation: bar-in 0.9s var(--ease-out) 0.15s both;
}
.scorebar__line--blue { background: linear-gradient(90deg, rgba(47, 127, 224, 0), var(--blue)); }
.scorebar__line--red {
	background: linear-gradient(90deg, var(--red), rgba(216, 51, 43, 0));
	transform-origin: right;
}
.scorebar__tag {
	padding: 2px 10px;
	border: 1px solid var(--line);
	background: var(--panel);
	font-weight: 600;
	font-size: 0.95rem;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	font-variant-numeric: lining-nums;
	animation: fade-in 0.6s ease 0.55s both;
}

.wordmark {
	margin: 0;
	display: flex;
	font-weight: 600;
	font-size: clamp(5.5rem, 15vw, 13.5rem);
	line-height: 0.82;
	letter-spacing: 0.035em;
	text-transform: uppercase;
	text-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}
.wordmark__mask {
	display: block;
	/* Clip only vertically so glyphs that overhang their advance (the R leg) stay whole. */
	clip-path: inset(0 -0.3em);
	padding: 0.04em 0 0.02em;
}
.wordmark__mask > span {
	display: block;
	animation: rise 1.1s var(--ease-out) both;
}
.wordmark__mask:nth-child(1) > span { animation-delay: 0.35s; }
.wordmark__mask:nth-child(2) > span { animation-delay: 0.47s; }
.wordmark__mask:nth-child(3) > span { animation-delay: 0.59s; }
/* The 4 carries both team colours: four against four. */
.wordmark__four {
	background: linear-gradient(90deg, var(--blue) 0 50%, var(--red) 50% 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	text-shadow: none;
	filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.45));
}

.tagline {
	max-width: 30ch;
	margin: 26px 0 34px;
	color: #c9d3dd;
	font-size: clamp(1.25rem, 1.6vw, 1.5rem);
	line-height: 1.35;
	animation: up-in 0.9s var(--ease-out) 0.95s both;
}

/* ---------------------------------------------------------------- download */

.get {
	animation: up-in 0.9s var(--ease-out) 1.1s both;
}

.cta {
	--fill: 0;
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 16px;
	min-height: 68px;
	padding: 0 34px 0 26px;
	background: var(--blue-deep);
	color: #fff;
	font-weight: 600;
	font-size: 1.5rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none;
	isolation: isolate;
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14) inset, 0 18px 50px -18px rgba(47, 127, 224, 0.8);
	transition: box-shadow 0.35s ease, transform 0.35s var(--ease-out);
}
/* Hover fill sweeps across like a progress bar. */
.cta__fill {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(90deg, var(--blue-deep), var(--blue));
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.55s var(--ease-out);
}
.cta__icon { width: 22px; height: 22px; fill: currentColor; flex: none; }
/* Reticle brackets sit off the corners and close in on hover. */
.cta__corner {
	position: absolute;
	width: 14px;
	height: 14px;
	border: 2px solid var(--sun);
	transition: transform 0.4s var(--ease-out), opacity 0.4s ease;
	opacity: 0.85;
}
.cta__corner--tl { top: -9px; left: -9px; border-right: 0; border-bottom: 0; }
.cta__corner--br { bottom: -9px; right: -9px; border-left: 0; border-top: 0; }

.cta:hover .cta__fill,
.cta:focus-visible .cta__fill { transform: scaleX(1); }
.cta:hover,
.cta:focus-visible {
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3) inset, 0 22px 60px -14px rgba(75, 149, 240, 0.95), 0 0 0 6px rgba(47, 127, 224, 0.16);
}
.cta:hover .cta__corner--tl,
.cta:focus-visible .cta__corner--tl { transform: translate(5px, 5px); opacity: 1; }
.cta:hover .cta__corner--br,
.cta:focus-visible .cta__corner--br { transform: translate(-5px, -5px); opacity: 1; }
.cta:active { transform: translateY(1px); }

.cta[aria-disabled="true"] {
	cursor: progress;
	background: #2a4566;
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}
.cta[aria-disabled="true"] .cta__fill,
.cta[aria-disabled="true"] .cta__corner { display: none; }
.cta.is-down { cursor: not-allowed; }

.get__meta {
	margin: 18px 0 0;
	color: var(--steel);
	font-size: 1.05rem;
	letter-spacing: 0.04em;
	font-variant-numeric: tabular-nums lining-nums;
}
.get__meta strong { color: var(--bone); font-weight: 600; }
.get__meta .sep {
	display: inline-block;
	width: 1px;
	height: 0.9em;
	margin: 0 12px;
	vertical-align: -0.1em;
	background: var(--line);
}
.retry {
	margin-left: 10px;
	padding: 2px 12px;
	border: 1px solid var(--line);
	background: transparent;
	color: var(--bone);
	font: inherit;
	letter-spacing: 0.08em;
	cursor: pointer;
}
.retry:hover { border-color: var(--bone); }

.sha {
	margin-top: 8px;
	max-width: 520px;
	color: var(--steel);
	font-size: 1rem;
}
.sha summary {
	cursor: pointer;
	width: fit-content;
	list-style: none;
	text-decoration: underline;
	text-decoration-color: var(--line);
	text-underline-offset: 4px;
}
.sha summary::-webkit-details-marker { display: none; }
.sha summary:hover { color: var(--bone); }
.sha code {
	display: block;
	margin-top: 10px;
	padding: 10px 14px;
	border: 1px solid var(--line);
	background: var(--panel);
	color: var(--bone);
	font: 500 0.95rem/1.4 ui-monospace, "Cascadia Mono", Consolas, monospace;
	word-break: break-all;
	user-select: all;
}
.sha[open] code { animation: fade-in 0.3s ease both; }

.get__alt { margin: 10px 0 0; color: var(--steel); font-size: 1.05rem; }
.get__alt a { text-underline-offset: 4px; text-decoration-color: var(--line); }
.get__alt a:hover { color: var(--bone); }

.get__mobile { display: none; }

/* Scroll cue: a thin line that breathes at the bottom edge. */
.hero__scroll {
	position: absolute;
	left: 50%;
	bottom: 26px;
	width: 1px;
	height: 46px;
	background: linear-gradient(var(--bone), transparent);
	opacity: 0.45;
	animation: fade-in 1s ease 1.8s both, breathe 2.6s ease-in-out 2.8s infinite;
}

/* ---------------------------------------------------------------- field */

.field {
	padding: clamp(64px, 10vw, 120px) var(--gutter) clamp(56px, 8vw, 100px);
	background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
}
.field__list {
	list-style: none;
	margin: 0 auto;
	padding: 0;
	max-width: 1240px;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(20px, 2.6vw, 36px);
}
.field__item h3 {
	margin: 18px 0 6px;
	font-weight: 600;
	font-size: 1.35rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}
.field__item p {
	margin: 0;
	max-width: 34ch;
	color: var(--steel);
	font-size: 1.1rem;
	line-height: 1.4;
}

.frame {
	position: relative;
	margin: 0;
	aspect-ratio: 25 / 17.8;
	overflow: hidden;
	border: 1px solid var(--line);
	background: var(--navy);
}
.frame img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: saturate(0.9) brightness(0.9);
	transition: transform 0.8s var(--ease-out), filter 0.5s ease;
}
.frame::before,
.frame::after {
	content: "";
	position: absolute;
	z-index: 1;
	width: 10px;
	height: 10px;
	border: 2px solid var(--sun);
	opacity: 0.7;
}
.frame::before { top: 6px; left: 6px; border-right: 0; border-bottom: 0; }
.frame::after { bottom: 6px; right: 6px; border-left: 0; border-top: 0; }
.field__item:hover .frame img { transform: scale(1.06); filter: saturate(1.05) brightness(1); }

/* ---------------------------------------------------------------- install */

.install {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	align-items: center;
	gap: clamp(32px, 5vw, 80px);
	padding: clamp(56px, 8vw, 110px) var(--gutter);
	max-width: calc(1240px + 2 * var(--gutter));
	margin: 0 auto;
}
.install__art { max-width: 420px; width: 100%; justify-self: center; aspect-ratio: 298 / 292; }
.install__art img { filter: saturate(0.95) brightness(0.92); }
.install h2 {
	margin: 0 0 22px;
	font-weight: 600;
	font-size: 2.6rem;
	line-height: 1;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}
.steps {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 18px;
}
.steps li {
	display: grid;
	grid-template-columns: 44px 1fr;
	gap: 16px;
	align-items: start;
}
.steps p { margin: 6px 0 0; color: #c9d3dd; max-width: 44ch; }
.steps__n {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border: 1px solid var(--line);
	background: var(--panel);
	font-weight: 600;
	font-size: 1.3rem;
	color: var(--sun);
}
.install__req { margin: 24px 0 0; color: var(--steel); }

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

.foot {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 10px 32px;
	padding: 28px var(--gutter) 36px;
	border-top: 1px solid var(--line);
	background: var(--navy-deep);
	color: var(--steel);
	font-size: 1rem;
	letter-spacing: 0.04em;
}
.foot__mark { color: var(--bone); font-weight: 600; letter-spacing: 0.2em; }
.foot a { text-underline-offset: 4px; text-decoration-color: var(--line); }
.foot a:hover { color: var(--bone); }

/* ---------------------------------------------------------------- motion */

@keyframes art-in {
	from { opacity: 0; transform: scale(1.1); }
	to { opacity: 1; transform: scale(1.02); }
}
@keyframes drift {
	from { transform: scale(1.02) translate3d(0, 0, 0); }
	to { transform: scale(1.08) translate3d(-1.5%, -1%, 0); }
}
@keyframes shine {
	from { -webkit-mask-position: 100% 0; mask-position: 100% 0; }
	to { -webkit-mask-position: 0% 0; mask-position: 0% 0; }
}
@keyframes bar-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes rise { from { transform: translateY(105%); } to { transform: translateY(0); } }
@keyframes up-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes breathe { 0%, 100% { transform: scaleY(0.6); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } }

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-delay: 0s !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
	.hero__art img { animation: none; transform: scale(1.02); }
	.hero__grid-shine { display: none; }
}

/* ---------------------------------------------------------------- small screens */

@media (max-width: 980px) {
	.field__list { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 44px; }
	.install { grid-template-columns: 1fr; }
	.install__art { order: 2; }
}

@media (max-width: 720px) {
	.hero {
		align-items: end;
		min-height: auto;
		padding-top: 0;
		padding-bottom: 56px;
	}
	.hero__art {
		top: 0;
		right: auto;
		left: -30vw;
		width: 160vw;
		transform: none;
		-webkit-mask-image: linear-gradient(0deg, transparent 4%, #000 48%);
		mask-image: linear-gradient(0deg, transparent 4%, #000 48%);
	}
	.hero__content { padding-top: 64vw; }
	.wordmark { font-size: clamp(4.6rem, 25vw, 7.5rem); }
	.tagline { margin: 18px 0 26px; }
	.cta { display: flex; justify-content: center; width: 100%; font-size: 1.25rem; padding: 0 18px; }
	.get__mobile {
		display: block;
		margin: 14px 0 0;
		padding: 10px 14px;
		border-left: 2px solid var(--sun);
		background: var(--panel);
		color: #c9d3dd;
		font-size: 1.05rem;
	}
	.hero__scroll { display: none; }
	.field__list { grid-template-columns: 1fr; row-gap: 28px; }
	.field__item {
		display: grid;
		grid-template-columns: 128px 1fr;
		column-gap: 16px;
		align-items: start;
	}
	.field__item .frame { grid-row: span 2; }
	.field__item h3 { margin: 0 0 4px; font-size: 1.15rem; }
	.field__item p { max-width: none; font-size: 1.02rem; }
	.install__art { display: none; }
	.foot { flex-direction: column; gap: 6px; }
}
