/* Nova9 marketing site. Brand from design/nova9-logo-v1-prompts.md: ground #0F1419,
   ivory #F5EEDB, amber #F3A321; Rajdhani is the game's HUD face (client/ui/fonts). */

@font-face { font-family: "Rajdhani"; font-weight: 500; font-display: swap; src: url("assets/fonts/rajdhani-medium.woff2") format("woff2"); }
@font-face { font-family: "Rajdhani"; font-weight: 600; font-display: swap; src: url("assets/fonts/rajdhani-semibold.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400 600; font-display: swap; src: url("assets/fonts/ibm-plex-sans.woff2") format("woff2"); }
@font-face { font-family: "Rajdhani"; font-weight: 700; font-display: swap; src: url("assets/fonts/rajdhani-bold.woff2") format("woff2"); }

:root {
	--ground: #0F1419;
	--panel: #161D24;
	--ivory: #F5EEDB;
	--amber: #F3A321;
	--steel: #A3ACB5;
	--rule: rgba(245, 238, 219, 0.14);

	--gutter: clamp(16px, 5vw, 72px);
	--measure: 62ch;
	--bracket: clamp(18px, 2.4vw, 34px);
	/* Plex for reading, Rajdhani (the HUD face) for headings and controls. TASK-0234. */
	--text: "IBM Plex Sans", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--hud: "Rajdhani", "Arial Narrow", sans-serif;
	--body-ivory: #E6E0CF;
	--wide: 1760px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 64px; }

body {
	margin: 0;
	background: var(--ground);
	color: var(--ivory);
	font-family: var(--text);
	font-weight: 400;
	font-size: clamp(17px, 0.25vw + 15.5px, 19px);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

img, video { display: block; max-width: 100%; height: auto; }

a { color: var(--amber); text-underline-offset: 0.18em; }

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

.skip {
	position: absolute; left: 16px; top: -100px; z-index: 20;
	background: var(--amber); color: var(--ground); padding: 8px 14px; font-weight: 700;
}
.skip:focus { top: 12px; }

/* Buttons: the amber of the 9, chamfered like the logo's corners. */
.button {
	display: inline-block;
	padding: 0.7em 1.5em 0.6em;
	background: var(--amber);
	color: var(--ground);
	font-weight: 700;
	font-size: 1rem;
	letter-spacing: 0.04em;
	text-decoration: none;
	clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
	transition: background-color 120ms ease;
}
.button:hover { background: #FFB847; }
.button-quiet { background: rgba(15, 20, 25, 0.62); color: var(--ivory); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.button-quiet:hover { background: rgba(15, 20, 25, 0.82); }
.button-small { padding: 0.45em 1.1em 0.4em; font-size: 0.85rem; }

/* Nav */
.nav {
	position: fixed; inset: 0 0 auto 0; z-index: 10;
	display: flex; align-items: center; gap: 32px;
	padding: 12px var(--gutter);
	background: linear-gradient(rgba(15, 20, 25, 0.92), rgba(15, 20, 25, 0));
	transition: background-color 200ms ease;
}
.nav.is-solid { background: rgba(15, 20, 25, 0.94); box-shadow: 0 1px 0 var(--rule); }
.nav-mark img { width: 104px; height: auto; }
.nav nav { margin-left: auto; }
.nav ul { display: flex; gap: 28px; margin: 0; padding: 0; list-style: none; }
.nav nav a { color: var(--ivory); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.nav nav a:hover { color: var(--amber); }

/* Hero: the trailer's end card, live. */
.hero {
	position: relative;
	min-height: 100svh;
	display: grid;
	justify-items: center;
	align-content: start;
	overflow: hidden;
	text-align: center;
}
.hero-video {
	position: absolute; inset: 0;
	width: 100%; height: 100%;
	object-fit: cover;
	object-position: 50% 62%;
}
.hero::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(rgba(15, 20, 25, 0.35), rgba(15, 20, 25, 0) 40%, rgba(15, 20, 25, 0) 75%, var(--ground));
}
.hero-body {
	position: relative; z-index: 1;
	padding: max(96px, 13vh) var(--gutter) 30vh;
	max-width: 960px;
}
.hero-logo { margin: 0; }
.hero-logo img { width: min(760px, 86vw); height: auto; margin: 0 auto; }
.hero-tagline {
	margin: 0.6em 0 0;
	font-weight: 600;
	font-size: clamp(1rem, 1.6vw, 1.35rem);
	letter-spacing: 0.42em;
	text-transform: uppercase;
	padding-left: 0.42em;
}
.hero-lede {
	margin: 1.6em auto 0;
	max-width: 36em;
	color: var(--ivory);
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.8);
}
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 2em; }

.hero-logo, .hero-tagline, .hero-lede, .hero-actions {
	animation: rise 1400ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hero-tagline { animation-delay: 500ms; }
.hero-lede { animation-delay: 800ms; }
.hero-actions { animation-delay: 1000ms; }
@keyframes rise {
	from { opacity: 0; transform: translateY(14px); filter: blur(4px); }
	to { opacity: 1; transform: none; filter: none; }
}

.plate-loop { width: 100%; height: 100%; object-fit: cover; }
/* The loop sits on its still and shows only once frames are flowing. */
.plate-loop { position: absolute; inset: 0; opacity: 0; transition: opacity 600ms ease; }
.plate-loop.is-playing { opacity: 1; }

.plate-line {
	position: absolute; z-index: 1;
	left: calc(var(--gutter) + 8px); right: var(--gutter);
	bottom: clamp(34px, 6vw, 80px);
	margin: 0;
	font-weight: 700;
	font-size: clamp(1.6rem, 4.6vw, 4.4rem);
	line-height: 1;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
}

/* Trailer and gallery */
.section-title {
	margin: 0 0 0.8em;
	font-weight: 700;
	font-size: clamp(1.6rem, 3vw, 2.4rem);
	letter-spacing: 0.02em;
}

.trailer-frame { max-width: 1280px; background: #000; }
.trailer-frame video { width: 100%; aspect-ratio: 16 / 9; }

.gallery { padding: clamp(72px, 10vw, 140px) var(--gutter); }
.gallery-note { margin: -0.6em 0 1.6em; color: var(--steel); }
.gallery-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	margin: 0; padding: 0; list-style: none;
}
.gallery-grid a { display: block; background: #000; }
.gallery-grid img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: opacity 150ms ease; }
.gallery-grid a:hover img { opacity: 0.82; }

/* Viewer: the trailer and the gallery, full screen. */
.viewer {
	width: 100vw; height: 100vh; max-width: none; max-height: none;
	margin: 0; padding: 0; border: 0;
	background: rgba(8, 10, 13, 0.96);
	color: var(--ivory);
}
.viewer::backdrop { background: rgba(8, 10, 13, 0.6); }
.viewer[open] { display: grid; place-items: center; }
.viewer-stage { width: min(92vw, calc(84vh * 16 / 9)); }
.viewer-stage video, .viewer-stage img { width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; }
.viewer-caption {
	position: absolute; left: 0; right: 0; bottom: 3vh;
	margin: 0; padding: 0 72px; text-align: center; color: var(--steel); font-size: 0.95rem;
}
.viewer-button {
	position: absolute;
	width: 48px; height: 48px;
	display: grid; place-items: center;
	padding: 0; border: 0; background: rgba(245, 238, 219, 0.08);
	color: var(--ivory); cursor: pointer;
}
.viewer-button:hover { background: rgba(245, 238, 219, 0.18); color: var(--amber); }
.viewer-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }
.viewer-close { top: 16px; right: 16px; }
.viewer-prev, .viewer-next { top: 50%; transform: translateY(-50%); }
.viewer-prev { left: 16px; }
.viewer-next { right: 16px; }
.viewer[data-mode="video"] .viewer-prev,
.viewer[data-mode="video"] .viewer-next { display: none; }
@media (max-width: 700px) {
	.viewer-prev, .viewer-next { top: auto; bottom: 10px; transform: none; }
}

/* Closing call */
.playtest {
	position: relative;
	min-height: 78vh;
	display: grid;
	align-items: end;
	overflow: hidden;
}
.playtest-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; }
.playtest::before {
	content: ""; position: absolute; inset: 0; z-index: 1;
	background: linear-gradient(var(--ground), rgba(15, 20, 25, 0) 35%, rgba(15, 20, 25, 0) 55%, rgba(15, 20, 25, 0.9));
}
.playtest-body { position: relative; z-index: 2; padding: 0 var(--gutter) clamp(56px, 9vw, 120px); }
.playtest-body .plate-line { position: static; }
.playtest-body p { margin: 1em 0 1.6em; max-width: var(--measure); }

.footer {
	display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px;
	padding: 32px var(--gutter) 40px;
	border-top: 1px solid var(--rule);
	color: var(--steel);
	font-size: 0.85rem;
}
.footer img { width: 88px; height: auto; }

/* Home page: trailer first, four feature rows, the playtest lists. TASK-0234. */

/* Rajdhani stays on headings, nav, buttons and labels. */
h1, h2, h3,
.nav, .button, .skip,
.hero-tagline, .home-latest, .feature-inset figcaption,
.release-date {
	font-family: var(--hud);
}

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

/* The chamfer clips an outside outline, so the focus ring sits inside the button. */
.button:focus-visible { outline: 2px solid currentColor; outline-offset: -6px; }

.hero-lede { font-size: 1.05em; max-width: 30em; }

/* Trailer: centred under the hero, the one place the viewfinder corners appear. */
.home-trailer { padding: clamp(8px, 2vw, 32px) var(--gutter) 0; }
.home-trailer .trailer-frame {
	position: relative;
	margin: 0 auto;
	max-width: 1280px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.home-trailer .trailer-frame::after {
	--b: clamp(16px, 2vw, 30px); --t: 2px; --c: rgba(243, 163, 33, 0.9);
	content: ""; position: absolute; inset: calc(-1 * clamp(8px, 1.2vw, 16px)); pointer-events: none;
	background:
		linear-gradient(var(--c), var(--c)) top left / var(--b) var(--t),
		linear-gradient(var(--c), var(--c)) top left / var(--t) var(--b),
		linear-gradient(var(--c), var(--c)) top right / var(--b) var(--t),
		linear-gradient(var(--c), var(--c)) top right / var(--t) var(--b),
		linear-gradient(var(--c), var(--c)) bottom left / var(--b) var(--t),
		linear-gradient(var(--c), var(--c)) bottom left / var(--t) var(--b),
		linear-gradient(var(--c), var(--c)) bottom right / var(--b) var(--t),
		linear-gradient(var(--c), var(--c)) bottom right / var(--t) var(--b);
	background-repeat: no-repeat;
}

/* Statement */
.home-statement {
	padding: clamp(80px, 10vw, 152px) var(--gutter);
	text-align: center;
}
.home-statement-line {
	margin: 0 auto;
	max-width: 24em;
	text-wrap: balance;
	font-family: var(--hud);
	font-weight: 600;
	font-size: clamp(1.8rem, 3.8vw, 3.3rem);
	line-height: 1.1;
}
.home-statement-line span { display: block; }
.home-statement-text {
	margin: 1.4em auto 0;
	max-width: 30em;
	color: var(--steel);
	font-size: clamp(1.05rem, 0.6vw + 0.9rem, 1.25rem);
}

/* Feature rows: the image takes three fifths, sides alternate, one DOM order. */
.home-features {
	display: grid;
	gap: clamp(80px, 10vw, 160px);
	max-width: var(--wide);
	margin: 0 auto;
	padding: 0 var(--gutter);
}
.feature {
	display: grid;
	grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
	gap: clamp(32px, 5vw, 96px);
	align-items: center;
}
.feature:nth-child(even) { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
.feature:nth-child(even) > .feature-shot { grid-column: 2; grid-row: 1; }
.feature:nth-child(even) > .feature-body { grid-column: 1; grid-row: 1; }

.feature-shot {
	position: relative;
	margin: 0;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #000;
}
.feature-shot img { width: 100%; height: 100%; object-fit: cover; }

.feature-body h2 {
	margin: 0 0 0.45em;
	font-weight: 700;
	font-size: clamp(2rem, 3.4vw, 3.2rem);
	line-height: 1.02;
	letter-spacing: 0.01em;
}
.feature-body h2::before {
	content: ""; display: block;
	width: 44px; height: 2px; margin-bottom: 0.55em;
	background: var(--amber);
}
.feature-body p { margin: 0; max-width: 30em; color: var(--body-ivory); }

.feature-inset { margin-top: clamp(24px, 3vw, 40px); max-width: 30em; }
.feature-inset::before {
	content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
	background: linear-gradient(rgba(15, 20, 25, 0) 55%, rgba(15, 20, 25, 0.85));
}
.feature-inset figcaption {
	position: absolute; z-index: 2; left: 14px; bottom: 8px;
	font-size: 0.85rem; font-weight: 600; letter-spacing: 0.02em;
	color: rgba(245, 238, 219, 0.85);
}

/* Playtest lists: secondary, two columns under one rule each. */
.home-status {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(32px, 5vw, 80px);
	max-width: 1180px;
	margin: clamp(112px, 13vw, 200px) auto 0;
	padding: 0 var(--gutter);
}
.home-status-list { border-top: 2px solid var(--amber); padding-top: 18px; }
.home-status-list:last-child { border-top-color: rgba(163, 172, 181, 0.6); }
.home-status h2 { margin: 0 0 0.6em; font-weight: 700; font-size: clamp(1.45rem, 2vw, 1.8rem); letter-spacing: 0.02em; }
.home-status ul { margin: 0; padding: 0; list-style: none; }
.home-status li {
	position: relative;
	padding: 0.6em 0 0.55em 1.5em;
	border-bottom: 1px solid var(--rule);
}
.home-status li::before {
	content: ""; position: absolute; left: 0.1em; top: 1.25em;
	width: 7px; height: 7px;
}
.is-now li::before { background: var(--amber); }
.is-later li { color: var(--steel); }
.is-later li::before { border: 1.5px solid var(--steel); }

/* Gallery, on the same width as the rows. */
.home-gallery { max-width: var(--wide); margin: 0 auto; }
.gallery-note { margin-top: -0.4em; }

/* Closing call */
.home-join-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.home-latest {
	color: var(--ivory);
	font-weight: 600;
	font-size: 1.05rem;
	text-decoration-color: rgba(245, 238, 219, 0.4);
	text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8);
}
.home-latest:hover { color: var(--amber); text-decoration-color: currentColor; }
.playtest-body p { max-width: 30em; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.8); }

/* Narrow screens: image first, then the text. */
@media (max-width: 880px) {
	.feature, .feature:nth-child(even) { grid-template-columns: minmax(0, 1fr); gap: 24px; }
	.feature:nth-child(even) > .feature-shot,
	.feature:nth-child(even) > .feature-body { grid-column: auto; grid-row: auto; }
	.feature-inset { max-width: none; }
}
@media (max-width: 720px) {
	.home-status { grid-template-columns: minmax(0, 1fr); }
}

/* Patch notes: the date in a left rail, the release beside it. TASK-0234. */
.notes { padding: clamp(104px, 12vw, 152px) var(--gutter) clamp(72px, 10vw, 140px); max-width: 1320px; }
.notes-head h1 { margin: 0; font-weight: 700; font-size: clamp(2.2rem, 5vw, 4.4rem); line-height: 1; letter-spacing: 0.06em; text-transform: uppercase; }
.notes-head p { margin: 0.8em 0 0; color: var(--steel); }
.release {
	display: grid;
	grid-template-columns: 11em minmax(0, 1fr);
	gap: 0 clamp(32px, 5vw, 80px);
	margin-top: clamp(56px, 7vw, 96px);
	padding-top: 22px;
	border-top: 1px solid var(--rule);
	scroll-margin-top: 80px;
}
.release-date { margin: 0.35em 0 0; position: sticky; top: 84px; align-self: start; font-weight: 600; font-variant-numeric: tabular-nums; }
.release-date a { color: var(--amber); text-decoration: none; }
.release-date a:hover { text-decoration: underline; }
.release-body { max-width: 56em; }
.release h2 { margin: 0; font-weight: 700; font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1.1; letter-spacing: 0.02em; }
.release-summary { margin: 0.5em 0 0; max-width: var(--measure); font-size: 1.1em; color: var(--ivory); }
.release-shot { margin: 1.6em 0 0.4em; background: #000; }
.release-shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.release h3 { margin: 1.7em 0 0.5em; font-size: 1rem; font-weight: 700; color: var(--steel); }
.release ul { margin: 0; padding: 0; list-style: none; max-width: var(--measure); border-top: 1px solid var(--rule); }
.release li { padding: 0.55em 0 0.5em; border-bottom: 1px solid var(--rule); }
@media (max-width: 880px) {
	.release { grid-template-columns: minmax(0, 1fr); }
	.release-date { position: static; margin: 0 0 0.4em; }
}
.nav nav a[aria-current="page"] { color: var(--amber); }
.footer p { margin: 0; }

/* Narrow screens */
@media (max-width: 880px) {
	.nav nav { display: none; }
	.nav { justify-content: space-between; }
	
	.gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
	
	
	.plate-line { left: 32px; right: 32px; }
	.hero-tagline { letter-spacing: 0.28em; padding-left: 0.28em; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.hero-logo, .hero-tagline, .hero-lede, .hero-actions { animation: none; }
	.plate-loop { display: none; }
}
