/* site.css — www.whitebell.hu. Values from docs/reference/whitebell_brand.md (§2 neutrals, master copper dot).
   Tokens only below :root; a theme overrides token values, never selectors (ui_minimal_elegant.md).
   No data-theme yet (before site.js runs) → the OS preference decides, so there is no flash. */

@font-face {
	font-family: "Phosphor";
	src: url("vendor/Phosphor.woff2") format("woff2");
	font-display: block;
}

:root {
	/* brand values (whitebell_brand.md §2) */
	--wb-white: #ffffff;
	--wb-paper: #f5f1e8;
	--wb-latte: #e9e0d1;
	--wb-muted: #7a6a5f;
	--wb-ink: #3d2e2a;
	--wb-copper: #c98a5e;
	--wb-copper-deep: #9a5f38;
	--wb-night: #1f1a18;
	--wb-night-raised: #2a2421;
	--wb-night-line: #3d3430;
	--wb-night-muted: #b8aa9e;

	/* light theme (default) */
	--bg: var(--wb-paper);
	--surface: var(--wb-white);
	--line: var(--wb-latte);
	--text: var(--wb-ink);
	--muted: var(--wb-muted);
	--accent: var(--wb-copper);        /* fills, marks, glyphs — never body text */
	--accent-text: var(--wb-copper-deep);
	--tip-bg: var(--wb-ink);
	--tip-text: var(--wb-paper);

	--font-sans: system-ui, -apple-system, "Segoe UI", sans-serif;
	--radius-sm: 3px;
	--radius-md: 4px;
	--space-1: 0.5rem;
	--space-2: 1rem;
	--space-3: 1.5rem;
	--space-4: 2.5rem;
	--space-5: 4rem;
	--measure: 68rem;
	--fs-small: 0.875rem;
	--fs-body: 1rem;
	--fs-lead: 1.15rem;
	--fs-h3: 1.05rem;
	--fs-h2: 1.4rem;
	--fs-h1: clamp(1.8rem, 4vw, 2.6rem);
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bg: var(--wb-night);
		--surface: var(--wb-night-raised);
		--line: var(--wb-night-line);
		--text: var(--wb-paper);
		--muted: var(--wb-night-muted);
		--accent-text: var(--wb-copper);
		--tip-bg: var(--wb-paper);
		--tip-text: var(--wb-ink);
	}
}
:root[data-theme="dark"] {
	--bg: var(--wb-night);
	--surface: var(--wb-night-raised);
	--line: var(--wb-night-line);
	--text: var(--wb-paper);
	--muted: var(--wb-night-muted);
	--accent-text: var(--wb-copper);
	--tip-bg: var(--wb-paper);
	--tip-text: var(--wb-ink);
}

* { box-sizing: border-box; }
html { color-scheme: light dark; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: var(--fs-body)/1.6 var(--font-sans);
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

/* --- icons (Phosphor, vendored) --- */
.ph {
	font-family: "Phosphor" !important;
	font-style: normal;
	font-weight: normal;
	line-height: 1;
	speak: never;
	-webkit-font-smoothing: antialiased;
}
.ph-sun::before { content: "\e472"; }
.ph-moon::before { content: "\e330"; }
.ph-translate::before { content: "\e4a2"; }
.ph-scales::before { content: "\e750"; }
.ph-tree-structure::before { content: "\e67c"; }
.ph-gear-six::before { content: "\e272"; }
.ph-stack::before { content: "\e466"; }
.ph-books::before { content: "\e758"; }
.ph-robot::before { content: "\e762"; }
.ph-shield-check::before { content: "\e40c"; }
.ph-check-circle::before { content: "\e184"; }

/* --- logo + mark: strokes follow the text colour, the dot keeps the accent (brand §3) --- */
.ink { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.dot { fill: var(--accent); }
.idot { fill: currentColor; }

/* --- header --- */
.top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-2);
	width: 100%;
	max-width: var(--measure);
	margin: 0 auto;
	padding: var(--space-2) var(--space-2);
}
.brand { color: var(--text); display: inline-flex; }
.logo { height: 2.6rem; width: auto; }
.controls { display: flex; gap: var(--space-1); }

.btn-icon {
	position: relative;
	width: 36px;
	height: 36px;
	display: inline-grid;
	place-items: center;
	background: none;
	border: 0;
	border-radius: var(--radius-sm);
	color: var(--muted);
	font-size: 1.25rem;
	cursor: pointer;
}
.btn-icon:hover, .btn-icon:focus-visible { color: var(--text); }
.btn-icon:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* themed tooltip (ui_tooltips_panes.md: data-tip, never title=) */
[data-tip]::after {
	content: attr(data-tip);
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	padding: 0.25rem 0.5rem;
	border-radius: var(--radius-sm);
	background: var(--tip-bg);
	color: var(--tip-text);
	font: var(--fs-small)/1.3 var(--font-sans);
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity 120ms ease-in;
	z-index: 10;
}
[data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; transition-delay: 300ms; }

/* --- content --- */
main {
	flex: 1;
	width: 100%;
	max-width: var(--measure);
	margin: 0 auto;
	padding: 0 var(--space-2) var(--space-5);
}
section { margin-top: var(--space-5); }
.hero { margin-top: var(--space-4); max-width: 46rem; }
h1 { font-size: var(--fs-h1); line-height: 1.2; font-weight: 600; margin: 0 0 var(--space-3); }
h2 { font-size: var(--fs-h2); font-weight: 600; margin: 0 0 var(--space-3); }
h3 { font-size: var(--fs-h3); font-weight: 600; margin: var(--space-1) 0; }
p { margin: 0 0 var(--space-2); }
.lead { font-size: var(--fs-lead); }
.motto {
	color: var(--accent-text);
	font-weight: 500;
	border-left: 3px solid var(--accent);
	padding-left: var(--space-2);
}

.cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
	gap: var(--space-2);
}
.cards.two { grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr)); }
.card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-md);
	padding: var(--space-3);
}
.card p { color: var(--muted); margin: 0; font-size: 0.95rem; }
.card .ph { font-size: 1.75rem; color: var(--accent); }

.steps {
	list-style: none;
	padding: 0;
	margin: 0 0 var(--space-3);
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-1);
	counter-reset: step;
}
.steps li {
	counter-increment: step;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	padding: 0.35rem 0.75rem;
	font-size: var(--fs-small);
}
.steps li::before { content: counter(step) " "; color: var(--accent-text); font-weight: 600; }
.flow > p { max-width: 46rem; color: var(--muted); }

/* --- footer: starts with the whitebell credit (ui_minimal_elegant.md) --- */
.bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-1);
	width: 100%;
	max-width: var(--measure);
	margin: 0 auto;
	padding: var(--space-3) var(--space-2);
	border-top: 1px solid var(--line);
	color: var(--muted);
	font-size: var(--fs-small);
}
.credit { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--text); }
.mark { height: 1.1rem; width: auto; }
.muted { color: var(--muted); }

@media (max-width: 40rem) {
	.cards.two { grid-template-columns: 1fr; }
	section { margin-top: var(--space-4); }
}

/* --- poiesis.html: the vendor's typeset wordmark (no drawn mark of its own) and a plain text link --- */
.wordmark {
	font-size: 1.6rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-decoration: none;
}
.link { color: var(--accent-text); text-underline-offset: 3px; }
a.credit { text-decoration: none; }
a.credit:hover { color: var(--accent-text); }
