/* ───────── 覓谷資訊 · MeetGood — field-notebook / topographic map ───────── */

:root {
	--paper: #ece6d9;
	--paper-2: #e3dccb;
	--ink: #1b1e19;
	--ink-2: #4a4c44;
	--moss: #3f5235;
	--line: rgba(27, 30, 25, 0.18);
	--seal: #b23a26;
	--night: #171a16;
	--night-ink: #e9e3d4;

	--font-display: "Noto Serif TC", serif;
	--font-body: "Noto Sans TC", system-ui, sans-serif;
	--font-mono: "IBM Plex Mono", ui-monospace, monospace;

	--gutter: clamp(16px, 4vw, 56px);
	--max: 1360px;
}

html[data-lang="en"] {
	--font-display: "Newsreader", "Noto Serif TC", serif;
	--font-body: "IBM Plex Sans", system-ui, sans-serif;
}

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

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

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.75;
	overflow-x: hidden;
}

/* 紙張顆粒 */
body::before {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 100;
	opacity: 0.35;
	mix-blend-mode: multiply;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .1 0 0 0 0 .1 0 0 0 0 .08 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
	color: inherit;
}

::selection {
	background: var(--seal);
	color: var(--paper);
}

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

h1,
h2,
h3,
p {
	margin: 0;
}

/* ───────── header ───────── */

.top {
	position: sticky;
	top: 0;
	z-index: 50;
	display: flex;
	align-items: center;
	gap: 32px;
	padding: 14px var(--gutter);
	background: color-mix(in srgb, var(--paper) 88%, transparent);
	backdrop-filter: blur(6px);
	border-bottom: 1px solid var(--line);
}

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	margin-right: auto;
}

.brand__mark {
	width: 30px;
	height: 30px;
	color: var(--ink);
}

.brand__zh {
	font-family: "Noto Serif TC", serif;
	font-weight: 900;
	font-size: 20px;
	letter-spacing: 0.08em;
}

.brand__en {
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--ink-2);
	padding-left: 10px;
	border-left: 1px solid var(--line);
}

.nav {
	display: flex;
	gap: 28px;
	font-family: var(--font-mono);
	font-size: 13px;
	letter-spacing: 0.08em;
}

.nav a,
.lang a {
	text-decoration: none;
	position: relative;
}

.nav a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 100%;
	bottom: -2px;
	height: 1px;
	background: currentColor;
	transition: right 0.3s ease;
}

.nav a:hover::after {
	right: 0;
}

.lang {
	display: flex;
	align-items: center;
	gap: 8px;
	font-family: var(--font-mono);
	font-size: 13px;
	color: var(--ink-2);
}

.lang a[aria-current] {
	color: var(--ink);
	font-weight: 500;
	text-decoration: underline;
	text-decoration-color: var(--seal);
	text-decoration-thickness: 2px;
	text-underline-offset: 5px;
}

.lang--mobile {
	display: none;
}

/* ───────── shared ───────── */

.kicker,
.section__index {
	font-family: var(--font-mono);
	font-size: 12px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--moss);
}

.section {
	position: relative;
	padding: clamp(88px, 12vw, 168px) var(--gutter);
	max-width: var(--max);
	margin: 0 auto;
}

.section__head {
	display: grid;
	grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr);
	gap: 24px;
	align-items: baseline;
	padding-bottom: 40px;
	border-bottom: 1px solid var(--ink);
	margin-bottom: 56px;
}

.section__title {
	font-family: var(--font-display);
	font-weight: 500;
	font-size: clamp(34px, 4.6vw, 64px);
	line-height: 1.15;
	letter-spacing: 0.01em;
}

html[data-lang="zh"] .section__title {
	letter-spacing: 0.06em;
}

.section__intro {
	color: var(--ink-2);
	max-width: 34em;
	justify-self: end;
}

.cta {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	margin-top: 40px;
	padding: 14px 0;
	font-family: var(--font-mono);
	font-size: 14px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: none;
	border-bottom: 1px solid var(--ink);
}

.cta__arrow {
	display: inline-block;
	color: var(--seal);
	transition: transform 0.3s ease;
}

.cta:hover .cta__arrow {
	transform: translateX(6px);
}

/* ───────── topo canvas ───────── */

.topo {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
	pointer-events: none;
}

/* ───────── hero ───────── */

.hero {
	position: relative;
	min-height: min(calc(100svh - 61px), 940px);
	display: grid;
	align-content: center;
	padding: 96px var(--gutter) 140px;
	overflow: hidden;
	border-bottom: 1px solid var(--line);
}

.hero__inner {
	position: relative;
	max-width: var(--max);
	width: 100%;
	margin: 0 auto;
}

.hero__title {
	margin: 28px 0 32px;
	font-family: var(--font-display);
	font-weight: 900;
	font-size: clamp(44px, 8.4vw, 132px);
	line-height: 1.08;
	letter-spacing: 0.02em;
	max-width: 11em;
}

html[data-lang="en"] .hero__title {
	font-weight: 400;
	letter-spacing: -0.02em;
	line-height: 1;
}

.hero__lede {
	max-width: 30em;
	font-size: clamp(16px, 1.4vw, 19px);
	color: var(--ink-2);
	padding-left: 20px;
	border-left: 2px solid var(--seal);
}

.legend {
	position: absolute;
	right: var(--gutter);
	bottom: 36px;
	width: 220px;
	padding: 16px 18px;
	background: var(--paper);
	border: 1px solid var(--ink);
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.06em;
	box-shadow: 6px 6px 0 var(--paper-2);
}

.legend__title {
	padding-bottom: 8px;
	margin-bottom: 10px;
	border-bottom: 1px solid var(--line);
	color: var(--ink-2);
}

.legend ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 6px;
}

.legend li {
	display: flex;
	align-items: center;
	gap: 12px;
}

.legend svg {
	width: 36px;
	height: 8px;
	flex: none;
}

.scale {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	height: 6px;
	margin-top: 14px;
	border: 1px solid var(--ink);
}

.scale span:nth-child(odd) {
	background: var(--ink);
}

.scale__label {
	margin-top: 4px;
	color: var(--ink-2);
}

.north {
	position: absolute;
	top: 36px;
	right: var(--gutter);
	display: grid;
	justify-items: center;
	gap: 4px;
	font-family: var(--font-mono);
	font-size: 12px;
}

.north svg {
	width: 12px;
	height: 28px;
}

/* ───────── services ───────── */

.stations {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.station {
	padding: 8px 32px 24px;
	border-left: 1px solid var(--line);
}

.station:first-child {
	padding-left: 0;
	border-left: 0;
}

.station__meta {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: var(--font-mono);
	font-size: 12px;
	letter-spacing: 0.12em;
	color: var(--moss);
}

.station__icon {
	width: 18px;
	height: 16px;
	color: var(--seal);
}

.station__code {
	margin-left: auto;
	color: var(--ink-2);
	opacity: 0.7;
}

.station__title {
	margin: 36px 0 16px;
	font-family: var(--font-display);
	font-weight: 500;
	font-size: clamp(24px, 2.2vw, 32px);
	line-height: 1.3;
}

.station__body {
	color: var(--ink-2);
}

.tags {
	list-style: none;
	margin: 28px 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.tags li {
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.08em;
	padding: 3px 10px;
	border: 1px solid var(--line);
	border-radius: 999px;
}

/* ───────── approach ───────── */

.trail {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 32px;
	position: relative;
}

.trail::before {
	content: "";
	position: absolute;
	top: 47px;
	left: 0;
	right: 0;
	border-top: 2px dashed var(--seal);
	opacity: 0.7;
}

.waypoint {
	position: relative;
	transition-delay: calc(var(--i) * 120ms) !important;
}

.waypoint__no {
	display: block;
	font-family: var(--font-mono);
	font-size: 12px;
	letter-spacing: 0.16em;
	color: var(--ink-2);
	margin-bottom: 18px;
}

.waypoint__dot {
	position: relative;
	display: block;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--paper);
	border: 2px solid var(--ink);
}

.waypoint:last-child .waypoint__dot {
	background: var(--seal);
	border-color: var(--seal);
	box-shadow: 0 0 0 6px color-mix(in srgb, var(--seal) 18%, transparent);
}

.waypoint__title {
	margin: 28px 0 10px;
	font-family: var(--font-display);
	font-weight: 500;
	font-size: clamp(26px, 2.4vw, 36px);
	letter-spacing: 0.04em;
}

.waypoint__body {
	color: var(--ink-2);
	max-width: 18em;
}

/* ───────── name (dark band) ───────── */

.name {
	max-width: none;
	background: var(--night);
	color: var(--night-ink);
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	gap: clamp(32px, 6vw, 96px);
	align-items: center;
	overflow: hidden;
}

.name > * {
	position: relative;
}

.name .topo {
	position: absolute;
}

.name__glyphs {
	display: flex;
	gap: clamp(8px, 2vw, 32px);
	justify-content: center;
}

.glyph {
	margin: 0;
	display: grid;
	justify-items: center;
}

.glyph__char {
	font-family: "Noto Serif TC", serif;
	font-weight: 900;
	font-size: clamp(120px, 19vw, 300px);
	line-height: 1;
}

.glyph:last-child .glyph__char {
	color: transparent;
	-webkit-text-stroke: 1.5px var(--night-ink);
	transform: translateY(18%);
}

.glyph figcaption {
	margin-top: 18px;
	font-family: var(--font-mono);
	font-size: 12px;
	letter-spacing: 0.16em;
	opacity: 0.7;
}

.glyph:last-child figcaption {
	transform: translateY(calc(18% + 50px));
}

.name__text {
	max-width: 34em;
}

.name__text .section__index {
	color: #9fb38f;
}

.name__text .section__title {
	margin: 16px 0 32px;
}

.name__text p + p {
	margin-top: 20px;
}

.name__text p:not(.section__title) {
	color: color-mix(in srgb, var(--night-ink) 78%, transparent);
}

/* ───────── contact ───────── */

.contact {
	display: grid;
	justify-items: start;
}

.contact__title {
	margin: 20px 0 24px;
	font-family: var(--font-display);
	font-weight: 900;
	font-size: clamp(40px, 6.6vw, 104px);
	line-height: 1.1;
	max-width: 12em;
}

html[data-lang="en"] .contact__title {
	font-weight: 400;
	letter-spacing: -0.02em;
}

.contact__body {
	color: var(--ink-2);
	max-width: 30em;
}

.contact__mail {
	margin-top: 48px;
	display: inline-flex;
	align-items: baseline;
	gap: 14px;
	font-family: var(--font-mono);
	font-size: clamp(20px, 3.4vw, 48px);
	letter-spacing: -0.01em;
	text-decoration: none;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--ink);
	overflow-wrap: anywhere;
	transition: color 0.2s ease, border-color 0.2s ease;
}

.contact__mail span {
	color: var(--seal);
	font-size: 0.7em;
}

.contact__mail:hover {
	color: var(--seal);
	border-color: var(--seal);
}

/* 印章 */
.seal {
	display: inline-grid;
	grid-template-rows: 1fr 1fr;
	place-items: center;
	background: var(--seal);
	color: var(--paper);
	font-family: "Noto Serif TC", serif;
	font-weight: 900;
	line-height: 1;
	border-radius: 4px;
	box-shadow: inset 0 0 0 3px var(--seal), inset 0 0 0 4px color-mix(in srgb, var(--paper) 70%, transparent);
}

.seal--lg {
	position: absolute;
	right: var(--gutter);
	bottom: clamp(88px, 12vw, 168px);
	width: 72px;
	height: 128px;
	padding: 12px 0;
	font-size: 38px;
	transform: rotate(-6deg);
}

.seal--sm {
	width: 30px;
	height: 52px;
	padding: 5px 0;
	font-size: 16px;
	flex: none;
}

/* ───────── footer ───────── */

.foot {
	display: flex;
	align-items: center;
	gap: 24px;
	flex-wrap: wrap;
	padding: 32px var(--gutter);
	border-top: 1px solid var(--ink);
	font-family: var(--font-mono);
	font-size: 12px;
	letter-spacing: 0.06em;
	color: var(--ink-2);
}

.foot__brand {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-right: auto;
}

.foot__brand p:first-child {
	color: var(--ink);
}

.foot__top {
	text-decoration: none;
}

/* ───────── 404 ───────── */

.lost {
	position: relative;
	min-height: 70svh;
	padding: 120px var(--gutter);
	overflow: hidden;
}

.lost > :not(canvas) {
	position: relative;
}

/* ───────── reveal ───────── */

.js .reveal {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js .reveal.is-in {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	.js .reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* ───────── responsive ───────── */

@media (max-width: 960px) {
	.nav,
	.lang {
		display: none;
	}

	.lang--mobile {
		display: inline-block;
		font-family: var(--font-mono);
		font-size: 13px;
		text-decoration: none;
		padding: 6px 12px;
		border: 1px solid var(--ink);
	}

	.section__head {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.section__intro {
		justify-self: start;
	}

	.stations {
		grid-template-columns: 1fr;
	}

	.station,
	.station:first-child {
		padding: 32px 0;
		border-left: 0;
		border-top: 1px solid var(--line);
	}

	.station:first-child {
		border-top: 0;
		padding-top: 0;
	}

	.trail {
		grid-template-columns: 1fr;
		gap: 40px;
		padding-left: 40px;
	}

	.trail::before {
		top: 0;
		bottom: 0;
		left: 8px;
		right: auto;
		border-top: 0;
		border-left: 2px dashed var(--seal);
	}

	.waypoint__dot {
		position: absolute;
		left: -40px;
		top: 4px;
	}

	.waypoint__title {
		margin-top: 0;
	}

	.name {
		grid-template-columns: 1fr;
	}

	.legend {
		position: relative;
		right: auto;
		bottom: auto;
		margin-top: 56px;
	}

	.hero {
		padding-bottom: 64px;
	}

	.seal--lg {
		position: static;
		margin-top: 56px;
	}
}

@media (max-width: 520px) {
	.brand__en {
		display: none;
	}
}

.hero__title,
.section__title,
.contact__title {
	text-wrap: balance;
}
