/*
 * smoochinton.gg. Same identity as the link page (link.smoochinton.gg): night
 * indigo, lilac stone, one warm accent (the lantern), IM Fell English for display
 * and Atkinson Hyperlegible for reading. The Gate scene is the one big moment:
 * its doors swing open once on load.
 */

@font-face {
	font-family: "Fell";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url(/fonts/fell-400.woff2) format("woff2");
}

@font-face {
	font-family: "Fell";
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url(/fonts/fell-400-italic.woff2) format("woff2");
}

@font-face {
	font-family: "Atkinson";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url(/fonts/atkinson-400.woff2) format("woff2");
}

@font-face {
	font-family: "Atkinson";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url(/fonts/atkinson-700.woff2) format("woff2");
}

:root {
	--night: #1b1a33;
	--dusk: #29274d;
	--stone: #9a94b8;
	--parchment: #f2e8d2;
	--lantern: #ffb84d;
	--muted: #b9b3d1;
	--rule: rgba(154, 148, 184, 0.25);

	--serif: "Fell", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
	--sans: "Atkinson", "Segoe UI", system-ui, sans-serif;

	color-scheme: dark;
}

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

html {
	background: var(--night);
	color: var(--parchment);
	font: 400 1.0625rem/1.6 var(--sans);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	scroll-behavior: smooth;
}

body {
	background: linear-gradient(180deg, var(--night) 0, #201e40 38rem, var(--night) 70rem);
}

a {
	color: var(--lantern);
	text-underline-offset: 0.18em;
}

a:hover {
	color: var(--parchment);
}

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

/* ── Top links ────────────────────────────────────────────────────── */

.top {
	display: flex;
	justify-content: flex-end;
	gap: 1.5rem;
	padding: 1.25rem clamp(1.25rem, 4vw, 2.5rem);
	font-size: 0.9375rem;
}

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

.top a:hover {
	color: var(--parchment);
}

/* ── Hero ─────────────────────────────────────────────────────────── */

.hero {
	text-align: center;
	padding: 0 1.25rem 5rem;
}

.scene {
	display: block;
	width: min(100%, 52rem);
	height: auto;
	margin: 0 auto;
	overflow: visible;
}

.scene .door {
	transform-box: fill-box;
	animation: swing 1.8s cubic-bezier(0.55, 0, 0.2, 1) 0.6s both;
}

.scene .door-left {
	transform-origin: left center;
}

.scene .door-right {
	transform-origin: right center;
}

.scene .spill {
	animation: spill 1.4s ease-out 1.3s both;
}

.scene .glow {
	animation: flicker 5s ease-in-out infinite;
}

@keyframes swing {
	to { transform: scaleX(0.14); }
}

@keyframes spill {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes flicker {
	0%, 100% { opacity: 1; }
	40% { opacity: 0.86; }
	55% { opacity: 0.95; }
	70% { opacity: 0.82; }
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.scene .door,
	.scene .spill,
	.scene .glow {
		animation: none;
	}

	.scene .door {
		transform: scaleX(0.14);
	}
}

h1 {
	font: 400 clamp(3.5rem, 13vw, 7.5rem) / 0.95 var(--serif);
	letter-spacing: -0.01em;
	margin-top: 0.5rem;
}

.tagline {
	max-width: 30rem;
	margin: 1rem auto 0;
	font-size: 1.1875rem;
	color: var(--muted);
	text-wrap: balance;
}

.address {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin-top: 2.25rem;
	padding: 0.4rem 0.4rem 0.4rem 1.1rem;
	background: var(--dusk);
	border: 1px solid #4a4680;
	border-top-color: #12112a;
	border-radius: 8px;
	box-shadow: inset 0 2px 6px rgba(9, 8, 24, 0.5);
}

.address-host {
	font: 700 1.375rem/1 var(--sans);
	letter-spacing: 0.02em;
	user-select: all;
	padding: 0.55rem 0;
}

.address .copy {
	font: 700 0.9375rem/1 var(--sans);
	color: var(--parchment);
	background: transparent;
	border: 1px solid var(--stone);
	border-radius: 5px;
	padding: 0.6rem 0.8rem;
	cursor: pointer;
	min-width: 5rem;
}

.address .copy:hover {
	background: #34315e;
}

.editions {
	margin-top: 0.6rem;
	font-size: 0.9375rem;
	color: var(--muted);
}

.actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 1.25rem 2rem;
	margin-top: 2.25rem;
}

.button {
	display: inline-block;
	font-weight: 700;
	color: var(--night);
	background: var(--lantern);
	text-decoration: none;
	border-radius: 6px;
	padding: 0.95rem 1.5rem;
	box-shadow: 0 0 28px rgba(255, 184, 77, 0.28);
}

.button:hover {
	color: var(--night);
	background: #ffc870;
}

.quiet-link {
	font-weight: 700;
}

/* ── Sections ─────────────────────────────────────────────────────── */

main > section {
	max-width: 38rem;
	margin: 0 auto;
	padding: 4rem 1.5rem;
	border-top: 1px solid var(--rule);
}

h2 {
	font: 400 clamp(2rem, 6vw, 2.75rem) / 1.1 var(--serif);
	margin-bottom: 1.5rem;
}

.more {
	margin-top: 1.75rem;
	font-weight: 700;
}

/* The story is set like a page from the Registry itself. */
.story p:not(.more) {
	font: 400 1.3125rem/1.65 var(--serif);
	max-width: 34rem;
}

.story p + p {
	margin-top: 1rem;
}

.story h2 + p::first-letter {
	float: left;
	font-size: 4.1em;
	line-height: 0.8;
	padding: 0.06em 0.08em 0 0;
	color: var(--lantern);
}

/* Getting in: a real sequence, so it's numbered. */
.steps ol {
	list-style: none;
	counter-reset: step;
}

.steps li {
	counter-increment: step;
	display: grid;
	grid-template-columns: 3rem 1fr;
	column-gap: 1rem;
	padding: 1.25rem 0;
	border-bottom: 1px solid var(--rule);
}

.steps li:first-child {
	padding-top: 0;
}

.steps li::before {
	content: counter(step);
	grid-row: span 2;
	font: 400 2.75rem/1 var(--serif);
	color: var(--lantern);
}

h3 {
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.3;
	margin-bottom: 0.3rem;
}

.steps li p {
	color: var(--muted);
}

.steps strong {
	color: var(--parchment);
}

.aside {
	margin-top: 1.5rem;
	font-size: 0.9375rem;
	color: var(--muted);
}

/* On the other side: term on the left, description on the right. */
.beyond dl div {
	display: grid;
	grid-template-columns: 11rem 1fr;
	gap: 0.25rem 1.5rem;
	padding: 1rem 0;
	border-bottom: 1px solid var(--rule);
}

.beyond dl div:first-child {
	padding-top: 0;
}

.beyond dt {
	font: italic 400 1.3rem/1.35 var(--serif);
}

.beyond dd {
	color: var(--muted);
}

@media (max-width: 34rem) {
	.beyond dl div {
		grid-template-columns: 1fr;
	}
}

/* ── Footer ───────────────────────────────────────────────────────── */

footer {
	text-align: center;
	padding: 3rem 1.5rem 3.5rem;
	border-top: 1px solid var(--rule);
	color: var(--muted);
	font-size: 0.9375rem;
}

footer p + p {
	margin-top: 0.5rem;
	display: flex;
	justify-content: center;
	gap: 1.5rem;
}
