/* Noto font license notices are distributed in ../fonts/noto/. */
@font-face {
	font-family: "Noto Sans Mono";
	font-style: normal;
	font-weight: 100 900;
	font-stretch: 100%;
	font-display: swap;
	src: url("../fonts/noto/NotoSansMono-Latin-Variable.woff2") format("woff2");
}

@font-face {
	font-family: "Noto Sans TC";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/noto/NotoSansTC-ZheNing-Regular.woff2") format("woff2");
	unicode-range: U+54F2, U+5BE7;
}

:root {
	color-scheme: light;
	--paper: #e9e5da;
	--ink: #282b27;
	--muted: #62675e;
	--line: #8b8e80;
	--accent: #aeb5a0;
}

:root.dark {
	color-scheme: dark;
	--paper: #2e2d2c;
	--ink: #e8e6dc;
	--muted: #b5b9ab;
	--line: #818777;
	--accent: #65715f;
}

* {
	box-sizing: border-box;
}

html,
body {
	background: var(--paper);
}

body {
	margin: 0;
	color: var(--ink);
	font-family: "Noto Sans Mono", "SFMono-Regular", Consolas, monospace;
	font-size: 14px;
	line-height: 1.7;
}

a {
	color: inherit;
	text-underline-offset: 0.25em;
}
a:hover {
	text-decoration-thickness: 2px;
}
button:focus-visible,
a:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 4px;
}

.page {
	max-width: 1440px;
	min-height: 100vh;
	margin: 0 auto;
	padding: 0 clamp(20px, 5vw, 80px);
	display: flex;
	flex-direction: column;
}

.site-header {
	min-height: 88px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid var(--ink);
}

.wordmark {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-decoration: none;
}

.wordmark span {
	color: var(--muted);
}

#theme-toggle {
	width: 38px;
	height: 38px;
	display: grid;
	place-items: center;
	border: 1px solid var(--ink);
	border-radius: 0;
	background: transparent;
	color: var(--ink);
	font: inherit;
	cursor: pointer;
}

#theme-toggle:hover {
	background: var(--accent);
}

.theme-icon {
	width: 19px;
	height: 19px;
}

.theme-icon--sun,
:root.dark .theme-icon--moon {
	display: none;
}

:root.dark .theme-icon--sun {
	display: block;
}

.intro {
	padding: clamp(76px, 10vw, 144px) 0 clamp(90px, 12vw, 160px);
}

.app-number,
.image-index,
.section-heading,
.store-placeholder {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

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

h1 {
	max-width: 12ch;
	margin-bottom: 10px;
	font-size: clamp(52px, 8.5vw, 132px);
	font-weight: 600;
	letter-spacing: -0.025em;
	line-height: 1.05;
}

.intro-note {
	margin: 0;
	color: var(--muted);
	font-size: clamp(14px, 1.6vw, 19px);
}

.hanzi {
	font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

.work {
	border-top: 1px solid var(--ink);
}

.section-heading {
	display: flex;
	justify-content: space-between;
	padding: 20px 0 42px;
}

.section-heading h2 {
	margin: 0;
	font: inherit;
}
.section-heading span {
	color: var(--muted);
}

.app {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
	gap: clamp(48px, 8vw, 120px);
	align-items: stretch;
	padding-bottom: clamp(88px, 10vw, 144px);
}

.app + .app {
	padding-top: 42px;
	border-top: 1px solid var(--line);
}

.app-copy {
	max-width: 590px;
}
.app-number {
	margin-bottom: 36px;
	color: var(--muted);
}

h3 {
	margin-bottom: 10px;
	font-size: clamp(32px, 3.8vw, 58px);
	font-weight: 600;
	letter-spacing: 0.1em;
	line-height: 1.1;
}

.app-tagline {
	margin-bottom: 36px;
	font-size: clamp(15px, 1.5vw, 18px);
	font-weight: 600;
}
.app-description {
	max-width: 54ch;
	color: var(--muted);
}
.app-description p {
	margin-bottom: 1.2em;
}

.store-placeholder {
	display: inline-flex;
	gap: 20px;
	margin: 26px 0 0;
	padding: 13px 0;
	border-top: 1px solid var(--ink);
	border-bottom: 1px solid var(--ink);
}

.store-placeholder span {
	color: var(--muted);
	font-weight: 400;
}

.app-image {
	position: relative;
	min-height: 490px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--ink);
	background: var(--accent);
}

.app-image::before {
	position: absolute;
	inset: 18px;
	border: 1px solid var(--line);
	content: "";
}

.image-index,
.image-corner {
	position: absolute;
	z-index: 1;
}
.image-index {
	top: 33px;
	left: 34px;
}

.image-note {
	font-size: clamp(20px, 2.4vw, 34px);
	font-weight: 600;
	letter-spacing: -0.06em;
	line-height: 1.3;
	text-align: center;
}

.image-corner {
	right: 34px;
	bottom: 25px;
	font-size: 26px;
}

.content-page {
	padding: clamp(72px, 9vw, 128px) 0 clamp(96px, 11vw, 152px);
}

.content-heading {
	max-width: 900px;
	margin-bottom: clamp(72px, 9vw, 120px);
}

.content-index,
.contact-number,
.document-meta p {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.content-index {
	margin-bottom: 30px;
	color: var(--muted);
}

.content-heading h1 {
	max-width: none;
	margin-bottom: 24px;
	font-size: clamp(48px, 7vw, 104px);
}

.content-summary {
	max-width: 58ch;
	margin: 0;
	color: var(--muted);
	font-size: clamp(15px, 1.6vw, 19px);
}

.document-layout {
	display: grid;
	grid-template-columns: minmax(160px, 0.35fr) minmax(0, 1fr);
	gap: clamp(48px, 8vw, 120px);
	padding-top: 24px;
	border-top: 1px solid var(--ink);
}

.document-meta p {
	margin-bottom: 5px;
	color: var(--muted);
}

.document-meta time {
	font-size: 12px;
}

.document-body {
	max-width: 720px;
}

.document-body section + section {
	margin-top: 52px;
}

.document-body h2,
.contact-item h2 {
	margin: 0 0 16px;
	font-size: clamp(18px, 2vw, 24px);
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.35;
}

.document-body p {
	margin-bottom: 1.2em;
	color: var(--muted);
}

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

.document-body a,
.contact-note a {
	color: var(--ink);
}

.contact-list {
	border-top: 1px solid var(--ink);
}

.contact-item {
	display: grid;
	grid-template-columns: minmax(160px, 0.35fr) minmax(0, 1fr);
	gap: clamp(48px, 8vw, 120px);
	padding: 34px 0 54px;
}

.contact-item + .contact-item {
	border-top: 1px solid var(--line);
}

.contact-number {
	margin: 0;
	color: var(--muted);
}

.contact-address {
	display: inline-block;
	font-size: clamp(18px, 2.5vw, 32px);
	font-weight: 600;
	letter-spacing: -0.04em;
}

.contact-note {
	max-width: 72ch;
	margin: 42px 0 0 calc(35% + clamp(48px, 8vw, 120px));
	color: var(--muted);
	font-size: 12px;
}

.site-footer {
	min-height: 112px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-top: auto;
	border-top: 1px solid var(--ink);
	color: var(--muted);
	font-size: 11px;
}

.site-footer p {
	margin: 0;
}
.site-footer nav {
	display: flex;
	gap: 28px;
	white-space: nowrap;
}

@media (max-width: 760px) {
	.site-header {
		min-height: 72px;
	}
	.intro {
		padding: 76px 0 108px;
	}
	.app {
		grid-template-columns: 1fr;
		gap: 48px;
	}
	.app-image {
		min-height: 380px;
	}
	.document-layout,
	.contact-item {
		grid-template-columns: 1fr;
		gap: 22px;
	}
	.document-meta {
		padding-bottom: 24px;
		border-bottom: 1px solid var(--line);
	}
	.contact-note {
		margin-left: 0;
	}
	.site-footer {
		align-items: flex-start;
		flex-direction: column;
		justify-content: center;
		padding: 28px 0;
	}
}

@media (max-width: 420px) {
	.app-image {
		min-height: 320px;
	}
	.image-index {
		left: 30px;
	}
}
