/* Wakestone -- wakestone.app. One family (Noto Sans, variable width + weight): the poster face is its narrowest, heaviest cut. */
@font-face {
	font-family: "Wake Sans";
	src: url("/fonts/NotoSans-var.woff2") format("woff2-variations"), url("/fonts/NotoSans-var.woff2") format("woff2");
	font-weight: 100 900;
	font-stretch: 62.5% 100%;
	font-display: swap;
}

:root {
	--night: #12182a;
	--slate: #1d2540;
	--stone: #2b3554;
	--bone: #ede6d3;
	--mist: #aab1c6;
	--wake: #6fe0cf;
	--ember: #ff7b3a;
	--measure: 68ch;
	--gutter: clamp(1.25rem, 4vw, 3rem);
	--poster: "Wake Sans", "Hiragino Sans", "PingFang SC", "Apple SD Gothic Neo", "Noto Sans CJK JP", system-ui, sans-serif;
	color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
	margin: 0;
	background: var(--night);
	color: var(--bone);
	font-family: var(--poster);
	font-size: 1.0625rem;
	line-height: 1.6;
	font-stretch: 100%;
	text-rendering: optimizeLegibility;
}
img, video { display: block; max-width: 100%; }
a { color: var(--wake); text-underline-offset: .2em; }
a:hover { color: var(--bone); }
:focus-visible { outline: 3px solid var(--wake); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--wake); color: var(--night); padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }

/* The poster cut. CJK has no narrow width: it keeps its own proportions and a slightly smaller size. */
.poster {
	font-stretch: 62.5%;
	font-weight: 850;
	line-height: .9;
	letter-spacing: -.01em;
	margin: 0;
	text-wrap: balance;
}
:lang(ja) .poster, :lang(ko) .poster, :lang(zh) .poster { line-height: 1.15; font-weight: 800; letter-spacing: 0; }

/* ---------- header ---------- */
.top {
	position: fixed; inset: 0 0 auto 0; z-index: 20;
	display: flex; align-items: center; gap: 1.5rem;
	padding: .9rem var(--gutter);
	background: linear-gradient(to bottom, rgba(18, 24, 42, .85), rgba(18, 24, 42, 0));
	transition: background-color .3s;
}
.top.solid { background: rgba(18, 24, 42, .96); box-shadow: 0 1px 0 var(--stone); }
.wordmark { font-stretch: 62.5%; font-weight: 900; font-size: 1.6rem; color: var(--bone); text-decoration: none; letter-spacing: .02em; }
.wordmark span { color: var(--wake); }
.top nav { display: flex; gap: 1.25rem; margin-left: auto; }
.top nav a { color: var(--bone); text-decoration: none; font-size: .95rem; }
.top nav a:hover { color: var(--wake); }
.lang { position: relative; }
.lang select {
	appearance: none; background: transparent; color: var(--bone); border: 1px solid var(--stone);
	border-radius: 4px; padding: .35rem 1.8rem .35rem .6rem; font: inherit; font-size: .9rem; cursor: pointer;
}
.lang::after { content: ""; position: absolute; right: .7rem; top: 50%; width: .4rem; height: .4rem; border: solid var(--mist);
	border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.lang option { background: var(--night); }
@media (max-width: 820px) { .top nav { display: none; } .lang { margin-left: auto; } }

/* ---------- hero: the game itself, full bleed ---------- */
.stage { position: relative; min-height: 100svh; display: grid; align-items: end; overflow: hidden; isolation: isolate; }
.stage video, .stage .still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.stage::after {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background: linear-gradient(to top, var(--night) 0%, rgba(18, 24, 42, .55) 38%, rgba(18, 24, 42, 0) 70%),
		linear-gradient(to right, rgba(18, 24, 42, .7), rgba(18, 24, 42, 0) 60%);
}
.stage-copy { padding: 0 var(--gutter) clamp(3rem, 9vh, 6rem); max-width: 60rem; }
.stage h1 { font-size: clamp(3.6rem, 12vw, 10rem); }
:lang(ja) .stage h1, :lang(ko) .stage h1, :lang(zh) .stage h1 { font-size: clamp(2.6rem, 8vw, 6.5rem); }
.stage .lede { font-size: clamp(1.1rem, 2vw, 1.35rem); max-width: 40ch; margin: 1.2rem 0 2rem; color: var(--bone); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.play {
	display: inline-flex; align-items: center; gap: .75rem;
	background: var(--wake); color: var(--night); border: 0; border-radius: 999px;
	padding: .85rem 1.6rem .85rem 1.1rem; font: inherit; font-weight: 700; font-size: 1.05rem; cursor: pointer;
}
.play::before { content: ""; width: 0; height: 0; border-left: .8rem solid currentColor; border-top: .5rem solid transparent; border-bottom: .5rem solid transparent; margin-left: .3rem; }
.play:hover { background: var(--bone); }
.platform { color: var(--mist); font-size: .95rem; }

/* The one orchestrated moment: the headline rises out of the footage once. */
@media (prefers-reduced-motion: no-preference) {
	.stage h1 { animation: rise 1.1s cubic-bezier(.2, .7, .1, 1) .2s both; }
	.stage .lede, .stage .actions { animation: rise 1s cubic-bezier(.2, .7, .1, 1) .55s both; }
	@keyframes rise { from { opacity: 0; transform: translateY(1.2rem); clip-path: inset(0 0 100% 0); } to { opacity: 1; transform: none; clip-path: inset(0 0 -20% 0); } }
}

/* ---------- sections ---------- */
section.block { padding: clamp(4rem, 10vw, 8rem) var(--gutter); }
.block h2 { font-size: clamp(2.6rem, 7vw, 5.5rem); max-width: 16ch; }
:lang(ja) .block h2, :lang(ko) .block h2, :lang(zh) .block h2 { font-size: clamp(2rem, 5vw, 3.6rem); }
.intro { max-width: 52ch; color: var(--mist); font-size: 1.15rem; margin: 1.25rem 0 0; }

/* Build / combat: two phases that take turns -- drawn as the turn itself, not as cards. */
.cycle { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 3rem; border-top: 4px solid var(--wake); max-width: 72rem; }
.cycle > div { padding: 1.75rem 2rem 0 0; }
.cycle > div + div { border-top: 4px solid var(--ember); margin-top: -4px; padding-left: 2rem; }
.cycle h3 { font-stretch: 75%; font-weight: 800; font-size: 1.7rem; margin: 0 0 .5rem; line-height: 1.1; }
.cycle .build h3 { color: var(--wake); }
.cycle .fight h3 { color: var(--ember); }
.cycle p { margin: 0; max-width: 42ch; }
.units { margin-top: 2.5rem; color: var(--mist); max-width: 60ch; }
@media (max-width: 720px) {
	.cycle { grid-template-columns: 1fr; border-top: 0; }
	.cycle > div { border-left: 4px solid var(--wake); padding: .25rem 0 0 1.25rem; }
	.cycle > div + div { border-top: 0; border-left-color: var(--ember); margin-top: 2rem; padding-left: 1.25rem; }
}

/* Heroes: four tall frames from the game, side by side. */
.heroes { background: var(--slate); }
.roster { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; margin-top: 3rem; }
.roster figure { margin: 0; position: relative; aspect-ratio: 3 / 4.4; overflow: hidden; background: var(--stone); }
.roster img { width: 100%; height: 100%; object-fit: cover; }
.roster figcaption {
	position: absolute; inset: auto 0 0 0; padding: 4rem 1.25rem 1.25rem;
	background: linear-gradient(to top, rgba(18, 24, 42, .96) 30%, rgba(18, 24, 42, 0));
}
.roster h3 { font-stretch: 62.5%; font-weight: 850; font-size: 2.4rem; margin: 0; line-height: 1; }
.roster .role { color: var(--wake); font-weight: 600; margin: .15rem 0 .5rem; font-size: .95rem; }
.roster figcaption p:last-child { margin: 0; font-size: .95rem; line-height: 1.45; color: var(--bone); }
.progress { margin-top: 2rem; color: var(--mist); }
@media (max-width: 980px) { .roster { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .roster { grid-template-columns: 1fr; } .roster figure { aspect-ratio: 4 / 4.2; } }

/* Modes: co-op large, PvP in its own colour beside it. */
.modes-grid { display: grid; grid-template-columns: 1.5fr 1fr; grid-template-rows: auto auto; gap: 2.5rem 3rem; margin-top: 3rem; }
.mode video, .mode img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--slate); border-radius: 6px; }
.mode h3 { font-stretch: 75%; font-weight: 800; font-size: 1.8rem; margin: 1.1rem 0 .4rem; line-height: 1.1; }
.mode p { margin: 0; max-width: 46ch; }
.mode.coop { grid-row: span 2; }
.mode.pvp h3 { color: var(--ember); }
.mode.coop h3 { color: var(--wake); }
@media (max-width: 860px) { .modes-grid { grid-template-columns: 1fr; } .mode.coop { grid-row: auto; } }

/* Price */
.price { background: var(--slate); }
.offer { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem; margin-top: 3rem; max-width: 76rem; }
.offer h3 { font-stretch: 75%; font-weight: 800; font-size: 1.6rem; margin: 0 0 .75rem; }
.offer ul { margin: 0; padding: 0; list-style: none; }
.offer li { padding: .45rem 0; border-bottom: 1px solid var(--stone); }
.offer p { margin: 0; }
.never { margin-top: 4rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 2.5rem; }
.never h3 { font-size: 1.05rem; font-weight: 600; color: var(--mist); margin: 0; width: 100%; }
.never span { font-stretch: 62.5%; font-weight: 850; font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.1;
	text-decoration: line-through; text-decoration-color: var(--ember); text-decoration-thickness: .12em; color: var(--bone); }
.note { color: var(--mist); margin-top: 2rem; }
@media (max-width: 860px) { .offer { grid-template-columns: 1fr; gap: 2rem; } }

/* FAQ */
.faq dl, .faq .qa { max-width: var(--measure); margin-top: 2.5rem; }
.faq details { border-bottom: 1px solid var(--stone); }
.faq summary { cursor: pointer; padding: 1.1rem 2rem 1.1rem 0; font-weight: 650; font-size: 1.1rem; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .25rem; top: .9rem; font-size: 1.5rem; color: var(--wake); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 1.25rem; color: var(--mist); max-width: 60ch; }

/* Notice (announcement set in the admin panel) */
.notice { position: fixed; z-index: 30; left: 50%; bottom: 1.25rem; transform: translateX(-50%); max-width: min(42rem, calc(100% - 2rem));
	background: var(--bone); color: var(--night); padding: .8rem .6rem .8rem 1.2rem; border-radius: 6px; font-weight: 600; box-shadow: 0 8px 30px rgba(0,0,0,.4);
	display: flex; align-items: center; gap: .8rem; width: max-content; }
.notice p { margin: 0; }
.notice button { flex: none; width: 2rem; height: 2rem; border: 0; border-radius: 999px; background: transparent; color: var(--night); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.notice button:hover { background: rgba(18,24,42,.1); }
.notice[hidden] { display: none; }

/* Footer */
footer { padding: 3rem var(--gutter); border-top: 1px solid var(--stone); color: var(--mist); font-size: .95rem; display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; }
footer nav { display: flex; gap: 1.5rem; }
footer p { margin: 0; }
footer .grow { margin-left: auto; }

/* Trailer dialog */
dialog.trailer { padding: 0; border: 0; background: #000; width: min(96vw, 1280px); max-height: 96vh; border-radius: 6px; }
dialog.trailer::backdrop { background: rgba(6, 8, 15, .9); }
dialog.trailer video { width: 100%; height: auto; max-height: 90vh; }
dialog.trailer button { position: absolute; top: .5rem; right: .5rem; background: rgba(18,24,42,.8); color: var(--bone); border: 0; border-radius: 999px;
	width: 2.5rem; height: 2.5rem; font-size: 1.4rem; cursor: pointer; z-index: 2; }
.sound { position: absolute; right: var(--gutter); bottom: clamp(3rem, 9vh, 6rem); background: rgba(18,24,42,.6); color: var(--bone);
	border: 1px solid var(--stone); border-radius: 999px; padding: .5rem 1rem; font: inherit; font-size: .9rem; cursor: pointer; }
@media (max-width: 720px) { .sound { top: 5rem; bottom: auto; } }

/* Inner pages: support, privacy */
.page { padding: 8rem var(--gutter) 5rem; max-width: 52rem; }
.page h1 { font-size: clamp(3rem, 9vw, 6rem); }
.page h2 { font-stretch: 75%; font-weight: 800; font-size: 1.5rem; margin: 2.5rem 0 .5rem; }
.page p, .page li { max-width: var(--measure); }
.page .updated { color: var(--mist); }
form.contact { display: grid; gap: 1.25rem; margin-top: 2.5rem; max-width: 36rem; }
form.contact label { display: grid; gap: .35rem; font-weight: 600; }
form.contact small { font-weight: 400; color: var(--mist); }
form.contact input, form.contact select, form.contact textarea {
	font: inherit; color: var(--bone); background: var(--slate); border: 1px solid var(--stone); border-radius: 4px; padding: .7rem .8rem; }
form.contact textarea { min-height: 10rem; resize: vertical; }
form.contact .hp { position: absolute; left: -5000px; }
form.contact button { justify-self: start; }
.status { min-height: 1.6em; font-weight: 600; }
.status.ok { color: var(--wake); }
.status.err { color: var(--ember); }
