/* ==========================================================================
   Saimiez — page chrome
   Header, footer, page shell and the one-screen tool layout.
   ========================================================================== */

:root {
	--p-ink: #16150f;
	--p-ink-2: #45433a;
	--p-muted: #7a776c;
	--p-rule: #e2ddd2;
	--p-card: #fdfcf9;
	--p-accent: #2438c8;

	/* Warm paper base — softer than white without going yellow */
	--p-paper: #f2efe7;

	/* Ambient wash — each page retints these three blooms */
	--wash-1: 231 70% 90%;
	--wash-2: 265 62% 92%;
	--wash-3: 40 55% 90%;

	--serif: "Source Serif 4", Georgia, "Times New Roman", serif;
	--sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	--mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

body[data-page="ip"]       { --wash-1: 231 72% 89%; --wash-2: 216 66% 91%; --wash-3: 40 52% 91%; --p-accent: #2438c8; }
body[data-page="speed"]    { --wash-1: 265 66% 90%; --wash-2: 288 58% 92%; --wash-3: 38 52% 91%; --p-accent: #6a2dbd; }
body[data-page="qr"]       { --wash-1: 192 60% 88%; --wash-2: 172 50% 91%; --wash-3: 42 52% 91%; --p-accent: #0f7494; }
body[data-page="units"]    { --wash-1: 32 74% 88%; --wash-2: 18 62% 91%; --wash-3: 48 60% 90%; --p-accent: #ae5c0c; }
body[data-page="timezone"] { --wash-1: 340 66% 91%; --wash-2: 316 56% 92%; --wash-3: 40 52% 91%; --p-accent: #ac2057; }
body[data-page="age"]      { --wash-1: 152 46% 88%; --wash-2: 172 44% 91%; --wash-3: 44 54% 91%; --p-accent: #107a54; }
body[data-page="percent"]  { --wash-1: 300 48% 91%; --wash-2: 322 46% 92%; --wash-3: 42 52% 91%; --p-accent: #8d2a8d; }
body[data-page="quote"]    { --wash-1: 82 44% 88%; --wash-2: 62 46% 90%; --wash-3: 38 54% 91%; --p-accent: #5c6b19; }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	color: var(--p-ink);
	font-family: var(--sans);
	background: var(--p-paper);
	-webkit-font-smoothing: antialiased;
	position: relative;
}

body::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	background:
		radial-gradient(940px 620px at 10% -8%, hsl(var(--wash-1) / .85), transparent 62%),
		radial-gradient(760px 540px at 94% 4%, hsl(var(--wash-2) / .7), transparent 62%),
		radial-gradient(880px 620px at 46% 108%, hsl(var(--wash-3) / .75), transparent 60%),
		var(--p-paper);
	transition: background .55s ease;
}

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; width: 100%; }

/* --------------------------------------------------------------- Page shell */

.shell {
	min-height: 100vh;
	min-height: 100dvh;
	display: grid;
	grid-template-rows: auto 1fr auto;
}

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

.site-head {
	border-bottom: 1px solid hsl(var(--wash-1) / .75);
	background: hsl(44 40% 98% / .6);
	backdrop-filter: saturate(180%) blur(14px);
	-webkit-backdrop-filter: saturate(180%) blur(14px);
	position: sticky;
	top: 0;
	z-index: 40;
}

.site-head__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	min-height: 58px;
	flex-wrap: wrap;
}

.brand {
	font-family: var(--serif);
	font-size: 22px;
	font-weight: 700;
	letter-spacing: -.026em;
	color: var(--p-ink);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	flex: 0 0 auto;
}

/* Lettermark: a geometric S drawn from two arcs, on a per-page gradient tile */
.brand__mark {
	width: 32px;
	height: 32px;
	flex: 0 0 auto;
	border-radius: 9px;
	background:
		radial-gradient(120% 100% at 26% 12%, hsl(0 0% 100% / .38), transparent 58%),
		linear-gradient(145deg, var(--p-accent), color-mix(in srgb, var(--p-accent) 55%, #12100a));
	display: grid;
	place-items: center;
	box-shadow:
		0 3px 10px -3px color-mix(in srgb, var(--p-accent) 62%, transparent),
		inset 0 1px 0 hsl(0 0% 100% / .3);
	transition: background .5s ease, box-shadow .5s ease, transform .25s ease;
}

.brand:hover .brand__mark { transform: rotate(-4deg) scale(1.04); }

.brand__mark svg { width: 20px; height: 20px; display: block; overflow: visible; }

.brand__mark path {
	fill: none;
	stroke: #fff;
	stroke-width: 2.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.brand__mark .dot { fill: #fff; stroke: none; opacity: .85; }

.site-nav { display: flex; gap: 2px; flex-wrap: wrap; }

.site-nav a {
	font-size: 13px;
	font-weight: 500;
	color: var(--p-muted);
	text-decoration: none;
	padding: 7px 10px;
	border-radius: 8px;
	transition: color .15s ease, background .15s ease;
	white-space: nowrap;
}

.site-nav a:hover { color: var(--p-ink); background: hsl(44 40% 99% / .85); }

.site-nav a[aria-current="page"] {
	color: var(--p-accent);
	background: hsl(44 40% 99% / .95);
	font-weight: 600;
}

/* ------------------------------------------------------------------- Footer */

.site-foot {
	border-top: 1px solid hsl(var(--wash-1) / .75);
	padding: 13px 0;
	background: hsl(44 40% 98% / .55);
}

.site-foot__inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	font-size: 12.5px;
	color: var(--p-muted);
}

.site-foot a { color: var(--p-muted); text-decoration: none; }
.site-foot a:hover { color: var(--p-accent); }

/* ---------------------------------------------------- Tool page — one screen */

.tool-page {
	display: grid;
	grid-template-columns: minmax(0, 330px) minmax(0, 1fr);
	gap: 46px;
	align-items: center;
	padding: 24px 0;
	width: 100%;
}

.tool-page__intro { align-self: center; }

.eyebrow {
	font-family: var(--mono);
	font-size: 10.5px;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--p-accent);
	margin: 0 0 13px;
	display: flex;
	align-items: center;
	gap: 9px;
}

.eyebrow::before {
	content: "";
	width: 18px;
	height: 2px;
	border-radius: 2px;
	background: var(--p-accent);
}

.tool-page h1 {
	font-family: var(--serif);
	font-size: clamp(29px, 3.4vw, 42px);
	font-weight: 600;
	line-height: 1.08;
	letter-spacing: -.028em;
	margin: 0 0 13px;
}

.tool-page .lead {
	font-size: 15.5px;
	line-height: 1.6;
	color: var(--p-ink-2);
	margin: 0 0 13px;
}

.tool-page .support {
	font-size: 13.5px;
	line-height: 1.6;
	color: var(--p-muted);
	margin: 0 0 18px;
}

.jump {
	display: flex;
	flex-direction: column;
	gap: 5px;
	padding-top: 15px;
	border-top: 1px solid var(--p-rule);
}

.jump span {
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--p-muted);
	margin-bottom: 2px;
}

.jump a {
	font-size: 13.5px;
	color: var(--p-ink-2);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	transition: color .15s ease, gap .15s ease;
}

.jump a::before { content: "\2192"; color: var(--p-accent); font-size: 12px; }
.jump a:hover { color: var(--p-accent); gap: 10px; }

/* ------------------------------------------------------------ Home / hub page */

.home {
	padding: 26px 0 20px;
	text-align: center;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 100%;
}

.home h1 {
	font-family: var(--serif);
	font-size: clamp(32px, 4.6vw, 50px);
	font-weight: 600;
	line-height: 1.05;
	letter-spacing: -.03em;
	margin: 0 auto 14px;
	max-width: 17ch;
}

.home h1 em {
	font-style: normal;
	background: linear-gradient(100deg, #2438c8, #6a2dbd 26%, #0f7494 48%, #107a54 66%, #ae5c0c 86%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.home .lead {
	font-size: 15.5px;
	line-height: 1.6;
	color: var(--p-ink-2);
	max-width: 58ch;
	margin: 0 auto 24px;
}

.home__hub { text-align: left; }

.home__badge {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--p-ink-2);
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 16px;
	background: hsl(44 40% 99% / .85);
	border: 1px solid var(--p-rule);
	border-radius: 999px;
	margin: 24px auto 0;
}

.home__badge b { color: #107a54; font-weight: 500; }

/* Contact page */
.contact-page { display: grid; place-items: center; padding: 28px 0; width: 100%; }
.contact-card { max-width: 560px; width: 100%; }

.contact-card h1 {
	font-family: var(--serif);
	font-size: clamp(28px, 4vw, 40px);
	font-weight: 600;
	letter-spacing: -.026em;
	margin: 0 0 10px;
}

.contact-card .lead { color: var(--p-ink-2); margin: 0 0 22px; font-size: 15.5px; }

/* Visually hidden — real headings for search engines and screen readers */
.sr-only {
	position: absolute;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ------------------------------------------------------------------- Mobile */

@media (max-width: 1040px) {
	.site-nav a { font-size: 12.5px; padding: 6px 8px; }
}

@media (max-width: 940px) {
	.tool-page { grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; padding: 20px 0; }
	.tool-page__intro { max-width: 62ch; }
	.jump { display: none; }
	.tool-page .support { display: none; }
}

@media (max-width: 640px) {
	.site-head__inner { min-height: 0; padding: 9px 0; }
	.site-nav { width: 100%; overflow-x: auto; padding-bottom: 2px; }
	.site-nav::-webkit-scrollbar { display: none; }
	.shell { min-height: 0; }
	.home { padding: 22px 0 18px; }
	.home__badge { margin-top: 18px; }
}
