/* Orraveld site. Colours come from the game (game/ui/ui_theme.gd) and the
   icon's violet: dark like the game, light when the device asks for it.
   Layout and rhythm follow leetsoul's landing (its landing-ui.tsx and
   landing-page.tsx): one idea per screen, a two-tone heading and one short
   line per section, a pill call to action with its icon in a circle. */

@font-face {
	font-family: "Jersey 15";
	src: url("/fonts/jersey15.woff") format("woff");
	font-display: swap;
}

:root {
	color-scheme: dark light;
	--paper: #14121c;
	--surface: #1d1a28;
	--line: #3a3550;
	--ink: #ece6d6;
	--muted: #a39db5;
	--accent: #e6a34a;
	--on-accent: #14121c;
	--violet: #8c84c8;
	--wash-a: #2e2a55;
	--wash-b: #3e2a2a;
	--display: "Jersey 15", ui-monospace, monospace;
	--body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--gutter: clamp(22px, 6.2vw, 100px);
	--block-space: clamp(64px, 8vw, 128px);
}

@media (prefers-color-scheme: light) {
	:root {
		--paper: #f4efe3;
		--surface: #fffaf0;
		--line: #d8cfbd;
		--ink: #1d1a26;
		--muted: #5b5470;
		--accent: #8a5a1c;
		--on-accent: #fffaf0;
		--violet: #4a4380;
		--wash-a: #e4def4;
		--wash-b: #f6e2c8;
	}
}

* { box-sizing: border-box; }

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

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font: 16px/1.6 var(--body);
	-webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

p a, li > a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

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

h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; text-wrap: balance; }

p, li, dd { text-wrap: pretty; }

h2 > span, h1 .accent { color: var(--accent); }

.page { max-width: 1440px; margin-inline: auto; padding-inline: var(--gutter); }

/* Header and footer */

.site-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 84px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	text-decoration: none;
	font: 1.75rem/1 var(--display);
}

.brand img { width: 36px; height: 36px; }

.site-header nav, .site-footer nav { display: flex; flex-wrap: wrap; gap: 0 22px; }

.site-header nav a, .site-footer nav a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--muted);
	text-decoration: none;
	font-size: 0.9rem;
}

.site-header nav a:hover, .site-footer nav a:hover { color: var(--ink); }

.site-footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 24px;
	margin-top: 32px;
	padding-block: 24px 40px;
	border-top: 1px solid var(--line);
	color: var(--muted);
	font-size: 0.85rem;
}

/* Calls to action: leetsoul's pill with its icon in a circle that nudges forward. */

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.cta {
	display: inline-flex;
	align-items: center;
	gap: 22px;
	min-height: 54px;
	padding: 8px 9px 8px 22px;
	border-radius: 999px;
	background: var(--accent);
	color: var(--on-accent);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.9rem;
}

.cta-icon {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: color-mix(in srgb, var(--on-accent) 16%, transparent);
	transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.cta:hover .cta-icon { transform: translateX(3px); }
a[href^="#"].cta:hover .cta-icon { transform: translateY(3px); }

.pill {
	display: inline-flex;
	align-items: center;
	min-height: 54px;
	padding-inline: 24px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.9rem;
}

.pill:hover { border-color: var(--ink); }

/* Screenshots in a phone frame. */

.phone {
	width: 240px;
	border: 6px solid var(--line);
	border-radius: 22px;
	background: #14121c;
	justify-self: center;
}

/* Hero */

.hero {
	display: grid;
	grid-template-columns: 1fr 1.08fr;
	align-items: center;
	align-content: center;
	gap: 3%;
	min-height: calc(100svh - 84px);
	padding-block: 24px 48px;
}

.logo { width: 318px; margin-bottom: 28px; image-rendering: pixelated; }

.eyebrow { margin: 0 0 18px; color: var(--ink); font-size: 0.95rem; }

.hero h1 { font-size: clamp(42px, 5.4vw, 80px); line-height: 1.02; }

.hero h1 .line { display: block; }

.hero h1 .accent { position: relative; width: fit-content; }

.underline {
	position: absolute;
	left: 0;
	bottom: -0.18em;
	width: 100%;
	height: 0.16em;
	color: var(--violet);
	shape-rendering: crispEdges;
}

.support { max-width: 40ch; margin: 34px 0 26px; color: var(--muted); font-size: 1.05rem; line-height: 1.75; }

.note { margin: 14px 0 0; color: var(--muted); font-size: 0.8rem; }

.hero-art { margin: 0; display: grid; justify-items: center; gap: 12px; }

.hero-art .phone { width: 300px; }

.hero-art figcaption { color: var(--muted); font-size: 0.8rem; }

/* Sections: one idea per screen */

.block {
	min-height: 100svh;
	align-content: center;
	padding-block: var(--block-space);
	border-top: 1px solid var(--line);
}

.block h2 { font-size: clamp(36px, 4.6vw, 64px); line-height: 1.04; max-width: 16ch; }

.line-after { max-width: 46ch; margin: 18px 0 0; color: var(--muted); font-size: clamp(16px, 1.3vw, 18px); line-height: 1.65; }

.block-head { margin-bottom: clamp(36px, 5vw, 64px); }

/* Three ways to play */

.modes { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(28px, 3vw, 40px); }

.mode {
	position: relative;
	isolation: isolate;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: clamp(24px, 5vw, 72px);
	padding: clamp(24px, 4vw, 48px);
	border: 1px solid var(--line);
	border-radius: 28px;
	overflow: hidden;
}

/* leetsoul's card wash: two pale colours from opposite corners. */
.mode::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		radial-gradient(120% 90% at 10% 100%, var(--wash-a), transparent 70%),
		radial-gradient(90% 80% at 95% 10%, var(--wash-b), transparent 75%);
	opacity: 0.55;
}

.mode:nth-child(even) { grid-template-columns: auto minmax(0, 1fr); }
.mode:nth-child(even) .phone { order: -1; }

.tag {
	display: inline-block;
	margin: 0 0 14px;
	padding: 4px 12px;
	border: 1px solid var(--line);
	border-radius: 999px;
	color: var(--accent);
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.mode h3 { font-size: clamp(30px, 3.2vw, 44px); line-height: 1.05; }

.mode p:not(.tag) { max-width: 44ch; margin: 16px 0 0; color: var(--muted); line-height: 1.7; }

/* The loop */

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

.steps li {
	padding: 24px;
	border: 1px solid var(--line);
	border-radius: 20px;
	background: var(--surface);
}

.step-n {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	margin-bottom: 18px;
	border-radius: 50%;
	background: var(--accent);
	color: var(--on-accent);
	font: 1.5rem/1 var(--display);
}

.steps h3 { font-size: 1.6rem; line-height: 1.1; }

.steps p { margin: 10px 0 0; color: var(--muted); font-size: 0.95rem; }

/* Text beside a screenshot */

.split { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(32px, 8%, 120px); }

.story { grid-template-columns: auto minmax(0, 1fr); }

/* Questions */

.faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; gap: clamp(32px, 6vw, 96px); }

.questions { border-top: 1px solid var(--line); }

details { border-bottom: 1px solid var(--line); }

summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 60px;
	cursor: pointer;
	list-style: none;
	font-weight: 600;
}

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

summary::after { content: "+"; color: var(--muted); font: 1.6rem/1 var(--display); }

details[open] summary::after { content: "−"; }

details p { margin: 0 0 20px; max-width: 56ch; color: var(--muted); }

/* Closing invitation */

.closing { display: grid; grid-template-columns: 0.8fr 1fr; align-items: center; gap: 8%; }

.closing-art { width: min(384px, 100%); justify-self: center; image-rendering: pixelated; }

.closing .cta { margin-top: 30px; }

/* Reading pages (privacy, account deletion) */

.reading { padding-block: 24px 0; }

.reading article { max-width: 68ch; }

.reading h1 { font-size: clamp(2.75rem, 7vw, 4rem); line-height: 1.02; margin-bottom: 0.4em; }

.reading h2 { font-size: 2rem; margin-top: 1.6em; }

.reading .updated { color: var(--muted); margin-top: 0; }

.reading li + li { margin-top: 0.4em; }

.steps-list { padding-left: 1.4em; }

.note-box {
	padding: 16px 20px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-left: 4px solid var(--accent);
	border-radius: 8px;
}

/* Below 821px everything stacks, as on leetsoul. */

@media (max-width: 1100px) {
	.steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
	.hero, .split, .story, .faq, .closing { grid-template-columns: minmax(0, 1fr); }
	.hero { min-height: 0; gap: 36px; padding-top: 8px; }
	.hero-art .phone { width: 240px; }
	.mode, .mode:nth-child(even) { grid-template-columns: minmax(0, 1fr); }
	.mode .phone, .mode:nth-child(even) .phone { order: 1; }
	.block { min-height: 0; }
	.story .phone { order: 1; }
	.closing { text-align: center; justify-items: center; }
	.closing .line-after { margin-inline: auto; }
	.closing-art { width: 240px; }
}

@media (max-width: 520px) {
	.steps { grid-template-columns: minmax(0, 1fr); }
	.cta { width: 100%; justify-content: space-between; }
	.pill { width: 100%; justify-content: center; }
}

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