/* Shared baseline for the case library concepts: reset, reveal motion and
   the case-study layout. Every colour, font and radius comes from the
   concept's own tokens, declared on :root in its assets/styles.css:

   --bg --surface --ink --muted --line --accent --on-accent
   --font-display --font-body --radius --display-weight --display-tracking */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

[data-reveal] {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0ms), transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }

.wrap { width: min(1240px, 100% - 48px); margin-inline: auto; }
@media (max-width: 640px) { .wrap { width: calc(100% - 32px); } }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* — case study (project.html) ————————————————————————————————————— */

.cs-bar {
	position: sticky; top: 0; z-index: 20;
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	padding: 16px max(24px, calc((100% - 1240px) / 2));
	background: color-mix(in srgb, var(--bg) 86%, transparent);
	backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--line);
	font-size: 14px;
}
.cs-bar strong { font-family: var(--font-display); font-weight: var(--display-weight, 600); font-size: 18px; letter-spacing: var(--display-tracking, 0); }
.cs-bar nav { display: flex; gap: 22px; }
.cs-bar nav a { text-decoration: none; color: var(--muted); transition: color 0.2s; }
.cs-bar nav a:hover, .cs-bar nav a[aria-current] { color: var(--ink); }
@media (max-width: 560px) { .cs-bar nav a:not(:last-child) { display: none; } }

.cs-head { padding: clamp(56px, 10vw, 120px) 0 clamp(36px, 6vw, 64px); }
.cs-kicker { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin: 0 0 20px; font-weight: 600; }
.cs-title {
	font-family: var(--font-display);
	font-weight: var(--display-weight, 600);
	letter-spacing: var(--display-tracking, -0.02em);
	font-size: clamp(40px, 7vw, 92px);
	line-height: 1.02;
	margin: 0;
	max-width: 14ch;
	text-wrap: balance;
}
.cs-lede { font-size: clamp(18px, 2vw, 22px); color: var(--muted); max-width: 46ch; margin: 28px 0 0; text-wrap: pretty; }

.cs-shot {
	margin: 0;
	border-radius: var(--radius);
	overflow: hidden;
	border: 1px solid var(--line);
	box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.45);
	background: var(--surface);
}
.cs-shot img { width: 100%; }

.cs-facts {
	display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
	margin: clamp(40px, 6vw, 72px) 0 0; padding: 28px 0; border-block: 1px solid var(--line);
}
.cs-facts dt { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.cs-facts dd { margin: 0; font-size: 15px; }
@media (max-width: 820px) { .cs-facts { grid-template-columns: repeat(2, 1fr); } }

.cs-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(24px, 5vw, 80px); padding: clamp(48px, 7vw, 96px) 0; border-bottom: 1px solid var(--line); }
.cs-section h2 { font-family: var(--font-display); font-weight: var(--display-weight, 600); letter-spacing: var(--display-tracking, -0.01em); font-size: clamp(26px, 3vw, 36px); line-height: 1.1; margin: 0; }
.cs-section h2 span { display: block; font-family: var(--font-body); font-size: 13px; letter-spacing: 0.14em; color: var(--accent); margin-bottom: 14px; font-weight: 600; }
.cs-section p { margin: 0 0 18px; font-size: clamp(17px, 1.6vw, 19px); max-width: 60ch; text-wrap: pretty; }
.cs-section p:last-child { margin-bottom: 0; }
@media (max-width: 820px) { .cs-section { grid-template-columns: 1fr; } }

.cs-decisions { list-style: none; margin: 0; padding: 0; counter-reset: d; }
.cs-decisions li { counter-increment: d; display: grid; grid-template-columns: 48px 1fr; gap: 12px; padding: 22px 0; border-top: 1px solid var(--line); font-size: clamp(16px, 1.5vw, 18px); }
.cs-decisions li:first-child { border-top: 0; padding-top: 0; }
.cs-decisions li::before { content: counter(d, decimal-leading-zero); font-family: var(--font-display); color: var(--accent); font-size: 15px; padding-top: 3px; }

.cs-specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: clamp(48px, 7vw, 96px) 0; }
.cs-specs div { padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.cs-specs strong { display: block; font-family: var(--font-display); font-weight: var(--display-weight, 600); font-size: clamp(44px, 6vw, 72px); line-height: 1; color: var(--accent); letter-spacing: -0.02em; }
.cs-specs span { display: block; margin-top: 18px; font-weight: 600; }
.cs-specs small { display: block; margin-top: 6px; color: var(--muted); font-size: 14px; }
@media (max-width: 820px) { .cs-specs { grid-template-columns: 1fr; } }

.cs-note { color: var(--muted); font-size: 13px; max-width: 70ch; margin: 0 0 clamp(48px, 7vw, 96px); }

.cs-end {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
	padding: clamp(40px, 6vw, 72px); margin-bottom: clamp(48px, 7vw, 96px);
	border-radius: var(--radius); background: var(--ink); color: var(--bg);
}
.cs-end h2 { font-family: var(--font-display); font-weight: var(--display-weight, 600); letter-spacing: var(--display-tracking, -0.01em); font-size: clamp(28px, 3.4vw, 44px); line-height: 1.05; margin: 0; max-width: 18ch; }
.cs-end a { display: inline-flex; align-items: center; gap: 10px; padding: 16px 26px; border-radius: 999px; background: var(--accent); color: var(--on-accent); text-decoration: none; font-weight: 600; transition: transform 0.2s; }
.cs-end a:hover { transform: translateY(-2px); }

.cs-foot { padding: 28px 0 40px; color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cs-foot a { color: inherit; }
