/* Reset, element defaults, typography, layout primitives, utilities. */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + var(--s-4)); }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: var(--fs-body); line-height: var(--lh-body); font-weight: var(--wt-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  min-height: 100dvh; overflow-x: hidden;
}
body.has-pocbar { padding-bottom: var(--pocbar-h); }
img, svg, canvas, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
table { border-collapse: collapse; width: 100%; }
::selection { background: var(--accent); color: var(--on-accent); }

/* ---- Typography: Gloock for the big voice, Albert Sans for everything said plainly ---- */
h1, h2, .h1, .h2, .display {
  font-family: var(--font-display); font-weight: var(--wt-head);
  letter-spacing: var(--tracking-heading); line-height: var(--lh-snug);
  text-transform: var(--case-head); text-wrap: balance;
}
h3, h4, h5, .h3, .h4 { font-family: var(--font-body); font-weight: var(--wt-ui-head); line-height: 1.3; text-wrap: balance; }
.display { font-size: var(--fs-display); line-height: var(--lh-tight); letter-spacing: var(--tracking-display); }
h1, .h1 { font-size: var(--fs-h1); line-height: 1.02; }
h2, .h2 { font-size: var(--fs-h2); line-height: 1.06; }
h3, .h3 { font-size: var(--t-18); }
h4, .h4 { font-size: var(--t-16); }
.display em, h1 em, h2 em { font-family: var(--font-body); font-style: italic; font-weight: 300; letter-spacing: -0.04em; }
p { text-wrap: pretty; max-width: var(--measure); }
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--ink-2); }
.small { font-size: var(--fs-small); }
.xs { font-size: var(--fs-xs); }
.muted { color: var(--muted); }
.num, td.num, .tabular { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-size: 0.86em; }
.kicker { font-size: var(--t-13); font-weight: 600; letter-spacing: 0.01em; color: inherit; opacity: 0.85; }

/* Product register: page titles stay Gloock, but fixed sizes */
.app h1 { font-size: var(--t-40); }
.app h2 { font-size: var(--t-28); }

/* ---- Layout primitives ---- */
.wrap { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-wide { max-width: var(--container-wide); }
.wrap-narrow { max-width: var(--container-narrow); }
.stack > * + * { margin-top: var(--stack, var(--s-4)); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--cluster, var(--s-3)); align-items: center; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap-grid); }
.split-7-5 { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gap-grid); }
.split-4-8 { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--gap-grid); }
.auto-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min, 260px)), 1fr)); gap: var(--gap-grid); }
.spacer { flex: 1; }

/* ---- Bands: the Sheet archetype. Colour divides the page, not boxes. ---- */
.band { position: relative; padding-block: var(--section); }
.band-tight { padding-block: var(--section-tight); }
.band-aare  { background: var(--aare);  color: var(--on-aare); }
.band-mist  { background: var(--bg);    color: var(--ink); }
.band-white { background: var(--surface); color: var(--ink); }
.band-night { background: var(--drench); color: var(--on-drench); }
.band-aare .muted  { color: var(--on-aare-muted); }
.band-night .muted { color: var(--on-drench-muted); }
.band-night .lead  { color: var(--on-drench-muted); }
.band-aare .lead   { color: var(--on-aare-muted); }
.band-sun { background: var(--accent); color: var(--on-accent); }

.sec-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 26rem); gap: var(--s-6); align-items: end; margin-bottom: clamp(var(--s-6), 4vw, var(--s-8)); }
.sec-head p { color: var(--muted); }
.band-night .sec-head p { color: var(--on-drench-muted); }
.band-aare .sec-head p { color: var(--on-aare-muted); }

/* ---- Utilities ---- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hide { display: none !important; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.mt-2 { margin-top: var(--s-2); } .mt-4 { margin-top: var(--s-4); } .mt-6 { margin-top: var(--s-6); } .mt-8 { margin-top: var(--s-8); }

@media (max-width: 900px) {
  .split, .split-7-5, .split-4-8, .sec-head { grid-template-columns: 1fr; }
  .hide-md { display: none !important; }
}
@media (max-width: 600px) { .hide-sm { display: none !important; } }
input[type="range"] { width: 100%; accent-color: var(--primary); height: 32px; }
