/* ApeWars 官网样式：单一静态样式表，无构建步骤 */
:root {
	--ink: #07130f;
	--ink-soft: #0d2019;
	--card: #122a20;
	--card-soft: #16342a;
	--line: rgba(255, 255, 255, 0.12);
	--leaf: #3ddc84;
	--leaf-deep: #16844a;
	--gold: #ffc53d;
	--sun: #ff8a3d;
	--cream: #fff8e9;
	--muted: #a9c3b6;
	--radius: 22px;
	--shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.08);
	--font-title: "Fredoka", "Nunito", ui-rounded, "Segoe UI", system-ui, sans-serif;
	--font-body: "Nunito", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--ink);
	color: var(--cream);
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

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

a {
	color: var(--leaf);
	text-decoration-color: rgba(61, 220, 132, 0.4);
	text-underline-offset: 3px;
}

a:hover {
	color: #7bf0ae;
}

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

h1,
h2,
h3 {
	font-family: var(--font-title);
	font-weight: 600;
	line-height: 1.15;
	margin: 0 0 0.5em;
	letter-spacing: -0.01em;
}

h1 {
	font-size: clamp(2.2rem, 5.5vw, 3.6rem);
}

h2 {
	font-size: clamp(1.6rem, 3.4vw, 2.3rem);
}

h3 {
	font-size: 1.15rem;
}

p {
	margin: 0 0 1em;
}

.wrap {
	width: min(1140px, 100% - 2.5rem);
	margin-inline: auto;
}

.skip {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--gold);
	color: #201200;
	padding: 0.6rem 1rem;
	border-radius: 0 0 12px 0;
	z-index: 100;
}

.skip:focus {
	left: 0;
}

/* ---------- header ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(7, 19, 15, 0.82);
	backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--line);
}

.site-header .bar {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	padding: 0.7rem 0;
}

.brand {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-family: var(--font-title);
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--cream);
	text-decoration: none;
}

.brand img {
	width: 38px;
	height: 38px;
	border-radius: 12px;
}

.nav {
	display: flex;
	gap: 1.5rem;
	margin-left: auto;
	font-size: 0.95rem;
	font-weight: 600;
}

.nav a {
	color: var(--cream);
	text-decoration: none;
	opacity: 0.78;
	transition: opacity 0.2s ease;
}

.nav a:hover {
	opacity: 1;
}

/* ---------- buttons ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.85rem 1.4rem;
	border-radius: 999px;
	border: 0;
	font-family: var(--font-title);
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition:
		transform 0.18s ease,
		box-shadow 0.18s ease,
		background 0.18s ease;
}

.btn-primary {
	background: linear-gradient(180deg, #4ee88f, var(--leaf-deep));
	color: #04180d;
	box-shadow: 0 10px 24px -10px rgba(61, 220, 132, 0.9);
}

.btn-primary:hover {
	color: #04180d;
	transform: translateY(-2px);
}

.btn-ghost {
	background: rgba(255, 255, 255, 0.08);
	color: var(--cream);
	box-shadow: inset 0 0 0 1px var(--line);
}

.btn-ghost:hover {
	color: var(--cream);
	background: rgba(255, 255, 255, 0.14);
	transform: translateY(-2px);
}

.btn-sm {
	padding: 0.6rem 1.1rem;
	font-size: 0.9rem;
}

/* ---------- hero ---------- */
.hero {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3rem, 6vw, 4.5rem);
}

.hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: url("assets/jungle.jpg");
	background-size: cover;
	background-position: center 40%;
	filter: saturate(1.05);
	z-index: -2;
}

.hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgba(7, 19, 15, 0.86) 0%, rgba(7, 19, 15, 0.62) 45%, var(--ink) 100%),
		radial-gradient(120% 80% at 80% 10%, rgba(255, 138, 61, 0.22), transparent 60%);
	z-index: -1;
}

.hero-grid {
	display: grid;
	grid-template-columns: 1.15fr 0.85fr;
	gap: clamp(1.5rem, 4vw, 3rem);
	align-items: center;
}

.chip {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.35rem 0.85rem;
	border-radius: 999px;
	background: rgba(61, 220, 132, 0.14);
	box-shadow: inset 0 0 0 1px rgba(61, 220, 132, 0.45);
	color: #b6f7cf;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	margin-bottom: 1.1rem;
}

.lead {
	font-size: clamp(1.02rem, 2vw, 1.2rem);
	color: #d9e8df;
	max-width: 34em;
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.8rem;
	margin: 1.6rem 0 1rem;
}

.hero-note {
	font-size: 0.86rem;
	color: var(--muted);
	margin: 0;
}

.hero-art {
	position: relative;
	justify-self: center;
	width: min(400px, 100%);
}

.hero-art img.logo {
	width: 100%;
	border-radius: 34px;
	box-shadow:
		0 30px 60px -24px rgba(0, 0, 0, 0.9),
		0 0 0 1px rgba(255, 255, 255, 0.14),
		0 0 0 10px rgba(255, 255, 255, 0.04);
	animation: bob 5s ease-in-out infinite;
}

.hero-art .spr {
	position: absolute;
	image-rendering: pixelated;
	filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.55));
}

.spr-coin {
	width: 54px;
	top: -14px;
	right: 8%;
	animation: bob 3.4s ease-in-out infinite;
}

.spr-bomb {
	width: 60px;
	bottom: 4%;
	left: -22px;
	animation: bob 4.2s ease-in-out 0.4s infinite;
}

@keyframes bob {
	0%,
	100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-10px);
	}
}

/* ---------- sections ---------- */
section {
	padding: clamp(2.6rem, 6vw, 4.5rem) 0;
	/* 锚点跳转留出 sticky header 高度 */
	scroll-margin-top: 84px;
}

.section-head {
	max-width: 46rem;
	margin-bottom: 2rem;
}

.eyebrow {
	font-family: var(--font-title);
	font-size: 0.82rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--gold);
	margin-bottom: 0.5rem;
}

.stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0.9rem;
	margin-top: 2.5rem;
}

.stat {
	background: linear-gradient(180deg, var(--card-soft), var(--card));
	border-radius: 18px;
	padding: 1.1rem 1.2rem;
	box-shadow: var(--shadow);
}

.stat b {
	display: block;
	font-family: var(--font-title);
	font-size: 1.5rem;
	color: var(--gold);
}

.stat span {
	font-size: 0.86rem;
	color: var(--muted);
}

.cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 1.1rem;
}

.card {
	background: linear-gradient(180deg, var(--card-soft), var(--card));
	border-radius: var(--radius);
	padding: 1.5rem;
	box-shadow: var(--shadow);
}

.card p {
	color: #cfe3d7;
	margin: 0;
	font-size: 0.96rem;
}

.card .step {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--gold);
	color: #241800;
	font-family: var(--font-title);
	font-weight: 600;
	margin-bottom: 0.8rem;
}

.card img.spr {
	image-rendering: pixelated;
	width: 46px;
	margin-bottom: 0.8rem;
}

/* ---------- rewards ---------- */
.rewards {
	background:
		radial-gradient(90% 60% at 50% 0%, rgba(255, 197, 61, 0.1), transparent 70%), var(--ink-soft);
	border-block: 1px solid var(--line);
}

.reward-layout {
	display: grid;
	grid-template-columns: 1.2fr 0.8fr;
	gap: 1.4rem;
	align-items: start;
}

.table-wrap {
	overflow-x: auto;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	background: var(--card);
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.94rem;
}

th,
td {
	padding: 0.75rem 1rem;
	text-align: left;
	border-bottom: 1px solid var(--line);
	white-space: nowrap;
}

thead th {
	font-family: var(--font-title);
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--gold);
	background: rgba(255, 255, 255, 0.04);
}

tbody tr:last-child td {
	border-bottom: 0;
}

td b {
	color: var(--cream);
}

.threshold {
	background: linear-gradient(180deg, #1d4030, var(--card));
	border-radius: var(--radius);
	padding: 1.5rem;
	box-shadow: var(--shadow);
}

.threshold .big {
	font-family: var(--font-title);
	font-size: 2.4rem;
	color: var(--gold);
	line-height: 1;
	margin-bottom: 0.3rem;
}

.fineprint {
	font-size: 0.82rem;
	color: var(--muted);
	line-height: 1.6;
}

/* ---------- faq ---------- */
.faq details {
	background: var(--card);
	border-radius: 16px;
	padding: 1rem 1.25rem;
	margin-bottom: 0.7rem;
	box-shadow: inset 0 0 0 1px var(--line);
}

.faq summary {
	font-family: var(--font-title);
	font-weight: 600;
	cursor: pointer;
	list-style: none;
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	align-items: center;
}

.faq summary::-webkit-details-marker {
	display: none;
}

.faq summary::after {
	content: "+";
	color: var(--leaf);
	font-size: 1.4rem;
	line-height: 1;
}

.faq details[open] summary::after {
	content: "–";
}

.faq p {
	margin: 0.75rem 0 0;
	color: #cfe3d7;
	font-size: 0.96rem;
}

/* ---------- footer ---------- */
.site-footer {
	border-top: 1px solid var(--line);
	background: #050f0c;
	padding: 2.5rem 0 2rem;
	font-size: 0.9rem;
	color: var(--muted);
}

.footer-grid {
	display: grid;
	grid-template-columns: 1.4fr repeat(2, 1fr);
	gap: 2rem;
}

.site-footer h3 {
	font-size: 0.82rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--cream);
	opacity: 0.7;
}

.site-footer ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	gap: 0.5rem;
}

.site-footer a {
	color: var(--muted);
	text-decoration: none;
}

.site-footer a:hover {
	color: var(--cream);
	text-decoration: underline;
}

.legal {
	margin-top: 2rem;
	padding-top: 1.2rem;
	border-top: 1px solid var(--line);
	font-size: 0.8rem;
	line-height: 1.7;
}

/* ---------- legal pages ---------- */
.legal-page {
	padding: clamp(2rem, 5vw, 3.5rem) 0 4rem;
}

.legal-page .wrap {
	max-width: 780px;
}

.legal-page h2 {
	margin-top: 2.2rem;
	font-size: 1.35rem;
}

.legal-page h3 {
	margin-top: 1.4rem;
	font-size: 1.02rem;
	color: var(--gold);
}

.legal-page ul,
.legal-page ol {
	padding-left: 1.3rem;
	color: #d5e6dc;
}

.legal-page li {
	margin-bottom: 0.45rem;
}

.meta {
	color: var(--muted);
	font-size: 0.88rem;
	margin-bottom: 1.8rem;
}

.callout {
	background: var(--card);
	border-left: 4px solid var(--leaf);
	border-radius: 12px;
	padding: 1rem 1.2rem;
	margin: 1.5rem 0;
}

.callout p:last-child {
	margin-bottom: 0;
}

.back {
	display: inline-block;
	margin-bottom: 1.5rem;
	font-size: 0.9rem;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
	.hero-grid,
	.reward-layout,
	.footer-grid {
		grid-template-columns: 1fr;
	}
	.hero-art {
		order: -1;
		width: min(260px, 70%);
	}
	.stats {
		grid-template-columns: repeat(2, 1fr);
	}
	.nav {
		display: none;
	}
}

@media (max-width: 560px) {
	body {
		font-size: 16px;
	}
	.hero-actions .btn {
		width: 100%;
		justify-content: center;
	}
	.stats {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
	}
}
