/*
 * Styles for the public pages (landing, terms, privacy, ...). Plain CSS on purpose: these pages are
 * generated at build time, need no JavaScript, and must satisfy the strict CSP (no inline styles).
 * Colors match the staff portal: orange is the staff brand; pages with data-theme="company"
 * (the Hidden Bot policy) use HiddenDevs green instead.
 */

@font-face {
	font-family: "Geist Variable";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("./fonts/geist-latin-wght-normal.woff2") format("woff2-variations");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Geist Variable";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("./fonts/geist-latin-ext-wght-normal.woff2") format("woff2-variations");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
	--bg: oklch(0.15 0.008 50);
	--surface: oklch(0.19 0.01 50);
	--fg: oklch(0.96 0.005 80);
	--fg-soft: oklch(0.86 0.008 70);
	--muted: oklch(0.72 0.014 60);
	--border: oklch(1 0 0 / 9%);

	--accent: #ff6a16;
	--accent-light: #ff9a4d;
	--accent-text: #ff8a3d;
	--on-accent: #1a0d02;

	--danger: #f87171;
	--ok: #4ade80;

	--edge: color-mix(in srgb, var(--accent) 32%, transparent);
	--gradient: linear-gradient(in oklch 100deg, var(--accent-light), var(--accent));
	color-scheme: dark;
}

[data-theme="company"] {
	--accent: #44cc55;
	--accent-light: #86efac;
	--accent-text: #5fe070;
	--on-accent: #06210b;
}

@media (prefers-color-scheme: light) {
	:root {
		--bg: oklch(0.985 0.004 80);
		--surface: #ffffff;
		--fg: oklch(0.2 0.012 50);
		--fg-soft: oklch(0.32 0.012 50);
		--muted: oklch(0.45 0.015 50);
		--border: oklch(0.91 0.008 70);
		--accent-text: #c2410c;
		--danger: #b91c1c;
		--ok: #15803d;
		color-scheme: light;
	}

	[data-theme="company"] {
		--accent-text: #15803d;
	}
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
	margin: 0;
	min-height: 100svh;
	display: flex;
	flex-direction: column;
	background: var(--bg);
	color: var(--fg);
	font-family: "Geist Variable", ui-sans-serif, system-ui, sans-serif;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

main { flex: 1; }

a { color: var(--accent-text); }
img { max-width: 100%; height: auto; }

svg {
	width: 1.1em;
	height: 1.1em;
	flex-shrink: 0;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

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

.skip {
	position: absolute;
	left: 12px;
	top: -60px;
	z-index: 50;
	padding: 8px 14px;
	border-radius: 8px;
	background: var(--accent);
	color: var(--on-accent);
	font-weight: 600;
	text-decoration: none;
}
.skip:focus { top: 12px; }

.accent { color: var(--accent-text); }
.accent-gradient {
	background-image: var(--gradient);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.wrap {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

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

.site-header {
	position: sticky;
	top: 0;
	z-index: 20;
	border-bottom: 1px solid var(--border);
	background: color-mix(in srgb, var(--bg) 82%, transparent);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}
.site-header .wrap { height: 60px; }

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--fg);
	font-weight: 700;
	text-decoration: none;
	letter-spacing: -0.01em;
}
.brand img { border-radius: 50%; border: 1px solid var(--border); }

.site-footer {
	margin-top: 40px;
	border-top: 1px solid var(--border);
	background: var(--surface);
	padding: 28px 0;
}
.site-footer .wrap { flex-wrap: wrap; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.footer-links a:hover { color: var(--accent-text); }
.footer-note { margin: 0; color: var(--muted); font-size: 0.85rem; }

/* ---- Buttons ---- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 22px;
	border: 1px solid var(--accent);
	border-radius: 999px;
	background: var(--accent);
	color: var(--on-accent);
	font-weight: 700;
	font-size: 0.95rem;
	text-decoration: none;
	transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -10px var(--accent); background: var(--accent-light); }
.btn-small { padding: 7px 16px; font-size: 0.875rem; }
.btn-large { padding: 14px 32px; font-size: 1.05rem; }
.btn-outline { background: transparent; color: var(--fg); border-color: var(--border); }
.btn-outline:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); border-color: var(--accent); box-shadow: none; }

/* ---- Landing ---- */

.hero {
	position: relative;
	overflow: hidden;
	padding: 88px 20px 80px;
	text-align: center;
	border-bottom: 1px solid var(--edge);
}
.hero::before, .hero::after {
	content: "";
	position: absolute;
	border-radius: 50%;
	pointer-events: none;
	filter: blur(64px);
	animation: float 9s ease-in-out infinite;
}
.hero::before { width: 520px; height: 520px; top: -260px; left: 50%; margin-left: -260px; background: var(--accent); opacity: 0.22; }
.hero::after { width: 320px; height: 320px; bottom: -180px; left: 8%; background: var(--accent-light); opacity: 0.14; animation-delay: -4s; }

.hero-inner { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; }

.hero-logo {
	border-radius: 50%;
	border: 3px solid var(--edge);
	box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 35%, transparent);
	transition: box-shadow 0.4s;
	margin-bottom: 24px;
}
.hero-logo:hover { box-shadow: 0 0 0 12px color-mix(in srgb, var(--accent) 18%, transparent); }

h1 { margin: 0 0 16px; font-size: clamp(2.2rem, 5.5vw, 3.6rem); line-height: 1.1; letter-spacing: -0.03em; }
.lead { margin: 0 auto 36px; max-width: 640px; color: var(--muted); font-size: 1.15rem; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

.section { max-width: 1100px; margin: 0 auto; padding: 72px 20px 0; }
.section-head { text-align: center; margin-bottom: 40px; }
.section-head h2 { margin: 0 0 8px; font-size: clamp(1.6rem, 3.5vw, 2.1rem); letter-spacing: -0.02em; }
.section-head p { margin: 0; color: var(--muted); }

.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.cards-pair { max-width: 820px; margin: 0 auto; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.card {
	padding: 28px;
	border: 1px solid var(--edge);
	border-radius: 20px;
	background: var(--surface);
	text-align: center;
	transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.card:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: 0 18px 30px -14px rgba(0, 0, 0, 0.5); }
.card img { width: 80px; height: 80px; margin-bottom: 14px; border-radius: 22%; }
.card h3 { margin: 0 0 8px; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.card-feature { padding: 40px 32px; }
.card-feature h3 { font-size: 1.3rem; }
.card-feature p { font-size: 1rem; }

.icon-badge {
	display: inline-flex;
	margin-bottom: 20px;
	padding: 16px;
	border-radius: 50%;
	border: 1px solid var(--edge);
	background: color-mix(in srgb, var(--accent) 12%, transparent);
	color: var(--accent-text);
}
.icon-badge svg { width: 2rem; height: 2rem; }

/* ---- Documents (terms, privacy, ...) ---- */

.doc { max-width: 820px; margin: 0 auto; padding: 48px 20px 40px; }
.doc h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); margin-bottom: 10px; }

.doc-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0 0 32px; color: var(--muted); font-size: 0.875rem; }
.doc-meta span { display: inline-flex; align-items: center; gap: 6px; }

.doc h2 {
	margin: 44px 0 14px;
	padding-bottom: 9px;
	border-bottom: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
	color: var(--accent-text);
	font-size: 1.25rem;
	font-weight: 800;
	letter-spacing: -0.005em;
}
.doc h2 .num { display: inline-block; min-width: 2ch; margin-right: 8px; color: var(--muted); font-weight: 700; }
.doc h3 { margin: 24px 0 8px; font-size: 1rem; font-weight: 700; }
.doc p, .doc li { color: var(--fg-soft); }
.doc ul { padding-left: 1.4rem; }
.doc li { margin-bottom: 6px; }
.doc strong { color: var(--fg); }

.toc {
	margin: 0 0 40px;
	padding: 20px;
	border: 1px solid var(--edge);
	border-radius: 14px;
	background: var(--surface);
}
.toc-label { display: block; margin-bottom: 10px; color: var(--fg); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.toc ol { margin: 0; padding-left: 1.4rem; columns: 2; column-gap: 32px; }
.toc li { margin-bottom: 5px; }
.toc a { color: var(--fg-soft); text-decoration: none; border-bottom: 1px dotted transparent; transition: color 0.15s, border-color 0.15s; }
.toc a:hover { color: var(--accent-text); border-bottom-color: var(--accent); }

.callout {
	margin: 20px 0;
	padding: 14px 18px;
	border-left: 3px solid var(--danger);
	border-radius: 8px;
	background: color-mix(in srgb, var(--danger) 9%, transparent);
}
.callout-notice {
	border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent);
	border-left: 3px solid var(--ok);
	border-radius: 12px;
	background: color-mix(in srgb, var(--ok) 7%, transparent);
}
.callout p { margin: 0 0 10px; }
.callout p:last-child { margin-bottom: 0; }

.footnote {
	margin-top: 48px;
	padding-top: 24px;
	border-top: 1px solid var(--border);
	color: var(--muted);
	font-size: 0.9rem;
	text-align: center;
}
.footnote p { margin: 0; color: var(--muted); }

@media (max-width: 720px) {
	.toc ol { columns: 1; }
	.hero { padding: 64px 20px 56px; }
	.brand > span { font-size: 0.95rem; }
}

/* ---- Error and access-denied pages ---- */

.err-stage { max-width: 760px; margin: 0 auto; padding: 88px 20px 40px; text-align: center; }
.err-stage h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); }
.err-stage .lead strong { color: var(--fg); }

.err-code {
	margin: 0 0 8px;
	font-size: clamp(5rem, 18vw, 9rem);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.05em;
	background-image: var(--gradient);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	filter: drop-shadow(0 0 32px color-mix(in srgb, var(--accent) 35%, transparent));
}

.err-status { display: inline-flex; align-items: center; gap: 10px; margin: 32px 0 0; color: var(--muted); font-size: 0.9rem; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); animation: pulse 1.8s ease-in-out infinite; }

.err-ref {
	display: inline-block;
	margin: 20px 0 0;
	padding: 10px 16px;
	border: 1px solid var(--border);
	border-radius: 10px;
	background: var(--surface);
	color: var(--muted);
	font-size: 0.85rem;
}
.err-ref code { color: var(--accent-text); font-weight: 700; user-select: all; }

.quick-jump { max-width: 560px; margin: 44px auto 0; padding: 20px; border: 1px solid var(--edge); border-radius: 16px; background: var(--surface); text-align: left; }
.quick-jump h2 { margin: 0 0 14px; color: var(--muted); font-size: 0.75rem; letter-spacing: 0.1em; text-align: center; text-transform: uppercase; }
.quick-jump ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.quick-jump a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border: 1px solid var(--border);
	border-radius: 10px;
	color: var(--fg-soft);
	font-size: 0.9rem;
	text-decoration: none;
	transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.quick-jump a:hover { border-color: var(--accent); color: var(--accent-text); transform: translateY(-2px); }

.notice-card {
	padding: 40px 32px;
	border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent);
	border-radius: 20px;
	background: var(--surface);
	box-shadow: 0 24px 48px -28px rgba(0, 0, 0, 0.6);
}
.lock-icon { width: 64px; height: 64px; margin-bottom: 16px; fill: var(--danger); stroke: none; }
.danger { color: var(--danger); }
.reasons { margin: 0 auto 28px; padding: 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); text-align: left; }
.reasons-label { display: block; margin-bottom: 12px; color: var(--danger); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.reasons ul { margin: 0; padding-left: 1.2rem; color: var(--muted); font-size: 0.9rem; line-height: 1.8; }
.reasons strong { color: var(--fg); }

@keyframes pulse {
	0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
	50% { box-shadow: 0 0 0 7px transparent; }
}

/* ---- Motion (decoration only) ---- */

@keyframes rise {
	from { opacity: 0; transform: translateY(18px); }
	to { opacity: 1; transform: none; }
}

@keyframes float {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-18px); }
}

.rise { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.rise-2 { animation-delay: 0.1s; }
.rise-3 { animation-delay: 0.2s; }
.rise-4 { animation-delay: 0.3s; }

/* Scroll reveal where the browser supports it; everywhere else the content is simply visible. */
@supports (animation-timeline: view()) {
	.reveal {
		animation: rise linear both;
		animation-timeline: view();
		animation-range: entry 0% cover 28%;
	}
}

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