/* ============================================================
   GME2027 — theme styles
   Design system: editorial serif display + grotesque body +
   mono data labels. Cream / deep navy / gold / leaf green.
   ============================================================ */

:root {
	--cream: #FAF8F4;
	--parchment: #F1EDE3;
	--navy: #1E3A5C;
	--navy-deep: #13293F;
	--navy-ink: #0D1E31;
	--gold: #C9A227;
	--gold-soft: #DCC267;
	--leaf: #5E7F1E;
	--leaf-deep: #42591A;
	--ink: #2B2A25;
	--font-serif: "Fraunces", Georgia, "Noto Serif SC", serif;
	--font-sans: "Archivo", system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
	--font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
}

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

html { scroll-behavior: smooth; }

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

img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; }
li { list-style: none; }
a { text-decoration: none; color: inherit; }
button { font: inherit; background: none; border: 0; padding: 0; }

::selection { background: var(--gold); color: var(--navy-ink); }

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

/* ---------- shared utilities ---------- */

.container-x {
	margin: 0 auto;
	width: 100%;
	max-width: 1440px;
	padding-left: 20px;
	padding-right: 20px;
}
@media (min-width: 768px) {
	.container-x { padding-left: 40px; padding-right: 40px; }
}
@media (min-width: 1024px) {
	.container-x { padding-left: 64px; padding-right: 64px; }
}

.mono-label {
	font-family: var(--font-mono);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.22em;
}
@media (min-width: 768px) { .mono-label { font-size: 12px; } }

.text-cream { color: var(--cream); }
.text-gold { color: var(--gold); }
.text-leaf { color: var(--leaf); }

.rule { height: 1px; width: 100%; background: rgba(30, 58, 92, 0.15); margin-top: 16px; }

.btn-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border-radius: 999px;
	border: 1px solid var(--navy);
	padding: 12px 24px;
	font-family: var(--font-sans);
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.btn-pill:active { transform: scale(0.98); }
.btn-pill-solid { background: var(--navy); color: var(--cream); }
.btn-pill-solid:hover { background: transparent; color: var(--navy); }
.btn-pill-outline { background: transparent; color: var(--navy); }
.btn-pill-outline:hover { background: var(--navy); color: var(--cream); }
.btn-pill-gold { border-color: var(--gold); background: var(--gold); color: var(--navy-ink); }
.btn-pill-gold:hover { background: transparent; color: var(--gold); }

.section-title {
	font-family: var(--font-serif);
	font-weight: 300;
	color: var(--navy);
	font-size: clamp(1.9rem, 4vw, 3.4rem);
	line-height: 1.08;
	max-width: 640px;
}

.section-kicker { color: rgba(30, 58, 92, 0.55); }
.section-kicker + .section-title { margin-top: 20px; }

/* ---------- header ---------- */

.site-header {
	position: fixed;
	top: 0; left: 0; right: 0;
	z-index: 50;
	border-bottom: 1px solid transparent;
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.25s ease, border-color 0.25s ease;
}
.site-header.is-solid {
	background: rgba(250, 248, 244, 0.95);
	backdrop-filter: blur(8px);
	border-bottom-color: rgba(30, 58, 92, 0.1);
}
.site-header.is-hidden { transform: translateY(-100%); }

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 64px;
}
@media (min-width: 768px) { .header-inner { height: 80px; } }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { height: 36px; width: auto; }
@media (min-width: 768px) { .brand-logo { height: 44px; } }
.brand-text { display: none; line-height: 1.25; }
@media (min-width: 640px) { .brand-text { display: block; } }
.brand-name { display: block; font-family: var(--font-serif); font-size: 18px; color: var(--navy); }
.brand-sub { display: block; font-size: 10px; color: rgba(30, 58, 92, 0.6); }

.nav-desktop { display: none; align-items: center; gap: 32px; }
@media (min-width: 900px) { .nav-desktop { display: flex; } }
.nav-desktop .nav-link,
.nav-desktop a:not(.btn-pill) {
	font-family: var(--font-mono);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.22em;
	color: rgba(30, 58, 92, 0.7);
	padding: 8px 0;
	transition: color 0.2s ease;
	display: inline-block;
}
.nav-desktop .nav-link:hover,
.nav-desktop a:not(.btn-pill):hover { color: var(--navy); }
.nav-desktop li { display: inline-block; margin-right: 32px; }
.btn-nav { padding: 10px 20px; font-size: 12px; }

.menu-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 44px; width: 44px;
	border: 1px solid rgba(30, 58, 92, 0.25);
	border-radius: 999px;
	color: var(--navy);
	cursor: pointer;
}
@media (min-width: 900px) { .menu-toggle { display: none; } }

.mobile-menu {
	position: fixed;
	inset: 0;
	z-index: 40;
	background: var(--cream);
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 96px 32px 32px;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu-nav { display: flex; flex-direction: column; }
.mobile-menu-nav a {
	border-bottom: 1px solid rgba(30, 58, 92, 0.1);
	padding: 16px 0;
	font-family: var(--font-serif);
	font-size: 36px;
	color: var(--navy);
	transition: color 0.2s ease;
}
.mobile-menu-nav a:hover { color: var(--leaf-deep); }
.mobile-menu-tag { margin-top: 40px; color: rgba(30, 58, 92, 0.5); }

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

.word-mask {
	display: inline-block;
	overflow: hidden;
	vertical-align: bottom;
	padding-bottom: 0.08em;
	margin-bottom: -0.08em;
}
.word-reveal {
	display: inline-block;
	transform: translateY(110%);
	opacity: 0;
	animation: gme-word-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
	animation-delay: var(--wd, 0s);
	will-change: transform, opacity;
}
@keyframes gme-word-rise {
	to { transform: translateY(0); opacity: 1; }
}

.reveal {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
	transition-delay: var(--rd, 0s);
	will-change: transform, opacity;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal.reveal-done { will-change: auto; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.word-reveal, .reveal, .marquee-track, .marker-pulse, .site-header {
		animation: none !important;
		transition: none !important;
		transform: none !important;
		opacity: 1 !important;
	}
}

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

.hero {
	position: relative;
	overflow: hidden;
	background: var(--cream);
	padding-top: 112px;
}
@media (min-width: 768px) { .hero { padding-top: 160px; } }

.hero-grid-bg {
	position: absolute;
	inset: 0;
	pointer-events: none;
	opacity: 0.5;
	background-image:
		linear-gradient(to right, rgba(30, 58, 92, 0.05) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(30, 58, 92, 0.05) 1px, transparent 1px);
	background-size: 72px 72px;
}

.hero-meta {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px;
}
.hero-meta-item { color: rgba(30, 58, 92, 0.6); }
.hero-meta-right { display: none; }
@media (min-width: 768px) { .hero-meta-right { display: block; } }

.hero-title {
	position: relative;
	margin-top: 32px;
	max-width: 1024px;
	font-family: var(--font-serif);
	font-weight: 300;
	color: var(--navy);
	font-size: clamp(2.6rem, 9vw, 5.6rem);
	line-height: 0.98;
	letter-spacing: -0.01em;
}
@media (min-width: 768px) { .hero-title { margin-top: 48px; } }
.hero-line { display: block; }

.hero-bottom {
	position: relative;
	margin-top: 48px;
	padding-bottom: 64px;
	display: grid;
	gap: 40px;
	align-items: end;
}
@media (min-width: 768px) { .hero-bottom { margin-top: 80px; padding-bottom: 96px; } }
.hero-copy { order: 2; }
.hero-figure { order: 1; margin: 0; }
@media (min-width: 1024px) {
	.hero-bottom { grid-template-columns: repeat(12, 1fr); gap: 32px; }
	.hero-copy { grid-column: span 5; order: 1; }
	.hero-figure { grid-column: span 7; order: 2; }
}

.hero-lead { font-size: 18px; color: rgba(43, 42, 37, 0.85); max-width: 62ch; }
.hero-sub { margin-top: 20px; color: rgba(43, 42, 37, 0.7); max-width: 62ch; }
.hero-cta { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 16px; }

.hero-figure img {
	width: 100%;
	border: 1px solid rgba(30, 58, 92, 0.15);
	object-fit: cover;
	aspect-ratio: 16 / 9;
}
.hero-figcap {
	margin-top: 12px;
	display: flex;
	justify-content: space-between;
	color: rgba(30, 58, 92, 0.55);
}

/* ---------- stats ---------- */

.stats { background: var(--navy-deep); color: var(--cream); }

.marquee {
	overflow: hidden;
	border-bottom: 1px solid rgba(250, 248, 244, 0.1);
	padding: 16px 0;
}
.marquee-track {
	display: flex;
	width: max-content;
	white-space: nowrap;
	animation: gme-marquee 32s linear infinite;
}
@keyframes gme-marquee {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}
.marquee-item { margin: 0 24px; color: rgba(250, 248, 244, 0.5); }
.marquee-dot { margin-left: 24px; color: rgba(201, 162, 39, 0.7); }

.stats-body { padding: 64px 0; }
@media (min-width: 768px) { .stats-body { padding: 96px 0; } }

.stats-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
}
.stats-note { color: rgba(250, 248, 244, 0.5); }

.stats-grid {
	margin-top: 56px;
	display: grid;
	gap: 48px 32px;
	grid-template-columns: 1fr;
}
@media (min-width: 640px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }

.stat { border-left: 1px solid rgba(250, 248, 244, 0.2); padding-left: 20px; }
@media (min-width: 768px) { .stat { padding-left: 28px; } }
.stat-number {
	font-family: var(--font-serif);
	font-weight: 300;
	font-size: clamp(3.4rem, 6vw, 4.5rem);
	line-height: 1;
	color: var(--cream);
}
.stat-label { margin-top: 16px; color: var(--gold); }
.stat-note { margin-top: 8px; font-size: 14px; color: rgba(250, 248, 244, 0.6); max-width: 26ch; }

/* ---------- about ---------- */

.about { background: var(--cream); scroll-margin-top: 96px; }
.about > .container-x { padding-top: 80px; padding-bottom: 80px; }
@media (min-width: 768px) { .about > .container-x { padding-top: 128px; padding-bottom: 128px; } }

.about-grid { display: grid; gap: 40px; }
@media (min-width: 1024px) {
	.about-grid { grid-template-columns: repeat(12, 1fr); }
	.about-side { grid-column: span 3; }
	.about-main { grid-column: span 9; }
}

.about-lede {
	font-family: var(--font-serif);
	font-weight: 300;
	font-size: clamp(1.6rem, 3.4vw, 2.9rem);
	line-height: 1.18;
	color: var(--navy);
	max-width: 56rem;
}

.about-cols {
	margin-top: 48px;
	display: grid;
	gap: 40px;
}
@media (min-width: 768px) { .about-cols { grid-template-columns: 1fr 1fr; } }
.about-col-title { color: var(--leaf-deep); }
.about-col-title + p { margin-top: 16px; color: rgba(43, 42, 37, 0.8); }

.about-quote {
	margin: 56px 0 0;
	border-left: 2px solid var(--gold);
	padding-left: 24px;
}
@media (min-width: 768px) { .about-quote { padding-left: 32px; } }
.about-quote p:first-child {
	font-family: var(--font-serif);
	font-weight: 300;
	font-size: clamp(1.4rem, 2.6vw, 1.9rem);
	line-height: 1.3;
	color: var(--navy);
}
.about-quote-zh { margin-top: 12px; font-size: 18px; color: rgba(43, 42, 37, 0.6); }

/* ---------- global reach ---------- */

.reach { background: var(--navy-ink); color: var(--cream); scroll-margin-top: 96px; }
.reach > .container-x { padding-top: 80px; padding-bottom: 80px; }
@media (min-width: 768px) { .reach > .container-x { padding-top: 128px; padding-bottom: 128px; } }

.reach-head { display: grid; gap: 40px; align-items: end; }
@media (min-width: 1024px) {
	.reach-head { grid-template-columns: repeat(12, 1fr); }
	.reach-head > div { grid-column: span 7; }
	.reach-intro { grid-column: span 5; justify-self: end; }
}
.reach-intro { color: rgba(250, 248, 244, 0.7); max-width: 28rem; }

.map-frame {
	margin-top: 56px;
	border: 1px solid rgba(250, 248, 244, 0.15);
	padding: 16px;
}
@media (min-width: 768px) { .map-frame { margin-top: 80px; padding: 32px; } }

.dot-map { position: relative; width: 100%; }
.dot-map canvas { display: block; width: 100%; height: auto; }
.dot-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }

.marker-pulse {
	animation: gme-marker-ping 2.6s cubic-bezier(0, 0, 0.2, 1) infinite;
	transform-origin: center;
	transform-box: fill-box;
}
@keyframes gme-marker-ping {
	0% { transform: scale(1); opacity: 0.8; }
	75%, 100% { transform: scale(3.2); opacity: 0; }
}

.map-legend {
	margin-top: 24px;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 12px;
	color: rgba(250, 248, 244, 0.45);
}

.region-grid {
	margin-top: 56px;
	display: grid;
	gap: 32px 40px;
	grid-template-columns: 1fr;
}
@media (min-width: 640px) { .region-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .region-grid { grid-template-columns: repeat(3, 1fr); } }

.region { border-top: 1px solid rgba(250, 248, 244, 0.15); padding-top: 20px; }
.region-name { font-family: var(--font-serif); font-size: 20px; color: var(--cream); }
.region-detail { margin-top: 8px; font-size: 14px; color: rgba(250, 248, 244, 0.6); }

/* ---------- principles ---------- */

.principles { background: var(--cream); scroll-margin-top: 96px; }
.principles > .container-x { padding-top: 80px; padding-bottom: 80px; }
@media (min-width: 768px) { .principles > .container-x { padding-top: 128px; padding-bottom: 128px; } }

.principle-list { margin-top: 56px; list-style: none; }
@media (min-width: 768px) { .principle-list { margin-top: 80px; } }

.principle {
	display: grid;
	gap: 16px;
	border-top: 1px solid rgba(30, 58, 92, 0.15);
	padding: 32px 0;
	align-items: baseline;
}
.principle:last-child { border-bottom: 1px solid rgba(30, 58, 92, 0.15); }
@media (min-width: 768px) {
	.principle { grid-template-columns: repeat(12, 1fr); padding: 40px 0; }
	.principle-num { grid-column: span 2; }
	.principle-title { grid-column: span 4; }
	.principle-body { grid-column: span 6; }
}

.principle-num {
	font-family: var(--font-serif);
	font-weight: 300;
	font-size: clamp(3rem, 6vw, 4.5rem);
	line-height: 1;
	color: var(--gold);
}
.principle-title { font-family: var(--font-serif); font-size: clamp(1.4rem, 2.4vw, 1.9rem); color: var(--navy); }
.principle-body { color: rgba(43, 42, 37, 0.75); max-width: 58ch; }

/* ---------- contact ---------- */

.contact { background: var(--parchment); scroll-margin-top: 96px; }
.contact > .container-x { padding-top: 80px; padding-bottom: 80px; }
@media (min-width: 768px) { .contact > .container-x { padding-top: 128px; padding-bottom: 128px; } }

.contact-grid { display: grid; gap: 56px; }
@media (min-width: 1024px) {
	.contact-grid { grid-template-columns: repeat(12, 1fr); }
	.contact-intro { grid-column: span 5; }
	.contact-form { grid-column: span 7; padding-left: 40px; }
}

.contact-copy { margin-top: 24px; max-width: 52ch; color: rgba(43, 42, 37, 0.75); }
.contact-email {
	display: inline-block;
	margin-top: 40px;
	font-family: var(--font-serif);
	font-size: clamp(1.2rem, 2.2vw, 1.5rem);
	color: var(--navy);
	text-decoration: underline;
	text-decoration-color: var(--gold);
	text-decoration-thickness: 2px;
	text-underline-offset: 8px;
	transition: color 0.2s ease;
}
.contact-email:hover { color: var(--leaf-deep); }

.form-row { display: grid; gap: 32px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.form-field { margin-bottom: 32px; }
.form-field label { display: block; color: rgba(30, 58, 92, 0.6); margin-bottom: 4px; }
.form-field input,
.form-field textarea {
	width: 100%;
	border: 0;
	border-bottom: 1px solid rgba(30, 58, 92, 0.25);
	background: transparent;
	padding: 12px 0;
	font-family: var(--font-sans);
	font-size: 18px;
	color: var(--navy);
	transition: border-color 0.2s ease;
	border-radius: 0;
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: rgba(30, 58, 92, 0.35); }
.form-field input:focus,
.form-field textarea:focus { outline: none; border-bottom-color: var(--gold); }
.form-field textarea { resize: vertical; min-height: 128px; }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.form-hint { font-size: 14px; color: rgba(43, 42, 37, 0.55); }

.form-status { margin-top: 20px; min-height: 24px; font-size: 14px; font-weight: 500; }
.form-status.is-error { color: #B91C1C; }
.form-status.is-ok { color: var(--leaf-deep); }

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

.site-footer { background: var(--navy-ink); color: var(--cream); }
.site-footer > .container-x { padding-top: 56px; padding-bottom: 56px; }
@media (min-width: 768px) { .site-footer > .container-x { padding-top: 80px; padding-bottom: 80px; } }

.footer-grid { display: grid; gap: 40px; }
@media (min-width: 768px) {
	.footer-grid { grid-template-columns: repeat(12, 1fr); }
	.footer-brand { grid-column: span 5; }
	.footer-nav { grid-column: span 4; }
	.footer-office { grid-column: span 3; }
}

.footer-brand-row { display: flex; align-items: center; gap: 12px; }
.footer-name { font-family: var(--font-serif); font-size: 20px; }
.footer-blurb { margin-top: 20px; max-width: 46ch; font-size: 14px; color: rgba(250, 248, 244, 0.6); }

.footer-heading { color: var(--gold); }
.footer-nav ul { margin-top: 16px; }
.footer-nav li { padding: 5px 0; }
.footer-nav a { font-size: 14px; color: rgba(250, 248, 244, 0.7); transition: color 0.2s ease; }
.footer-nav a:hover { color: var(--gold); }

.footer-office address { margin-top: 16px; font-style: normal; font-size: 14px; color: rgba(250, 248, 244, 0.7); line-height: 1.7; }
.footer-office a { transition: color 0.2s ease; }
.footer-office a:hover { color: var(--gold); }

.footer-bottom {
	margin-top: 56px;
	border-top: 1px solid rgba(250, 248, 244, 0.15);
	padding-top: 24px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}
.footer-bottom p { font-size: 12px; color: rgba(250, 248, 244, 0.45); }

/* ---------- generic page (index.php / page.php) ---------- */

.generic-page { padding-top: 112px; padding-bottom: 96px; min-height: 60vh; }
@media (min-width: 768px) { .generic-page { padding-top: 160px; } }
.generic-article { max-width: 720px; }
.generic-content { margin-top: 32px; color: rgba(43, 42, 37, 0.85); }
.generic-content p { margin-bottom: 16px; }
.generic-content a { color: var(--navy); text-decoration: underline; text-decoration-color: var(--gold); }
