/* reset, type scale (brand §3), layout */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--primary);
  font: 400 16px/1.55 var(--font);
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
a { color: var(--accent-text); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--primary); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--on-accent); }

/* a section set off from the page: one step up from the surface, in either theme */
.ground-raised {
  background: var(--surface-raised);
  border-block: var(--hair) solid var(--line);
}

/* type */
.display { font-size: clamp(48px, 9vw, 84px); line-height: 0.9; font-weight: 700; letter-spacing: -0.02em; }
h1, .h1 { font-size: clamp(38px, 6vw, 56px); line-height: 1; font-weight: 600; letter-spacing: -0.02em; }
h2, .h2 { font-size: clamp(32px, 4.6vw, 44px); line-height: 1; font-weight: 600; letter-spacing: -0.02em; }
h3, .h3 { font-size: clamp(22px, 2.6vw, 28px); line-height: 1.2; font-weight: 500; }
.lead { font-size: clamp(19px, 2vw, 22px); line-height: 1.4; }
.strong { font-size: 18px; line-height: 1.4; font-weight: 600; }
.label {
  font-size: 13px; line-height: 1.5; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted);
}
.muted { color: var(--muted); }
.accent { color: var(--accent-text); }
p + p { margin-top: var(--s2); }
.measure { max-width: 62ch; }

/* layout */
.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--s6) 0; }
.section + .section { border-top: var(--hair) solid var(--line); }
.stack > * + * { margin-top: var(--s3); }
.stack-sm > * + * { margin-top: var(--s2); }
.grid-2 { display: grid; gap: var(--s5); grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; }
.section-head { display: grid; gap: var(--s2); margin-bottom: var(--s5); max-width: 760px; }

@media (max-width: 860px) {
  .section { padding: var(--s5) 0; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
}

/* logos come in on-light/on-dark pairs */
.logo-on-dark { display: none; }
[data-theme="dark"] .logo-on-light { display: none; }
[data-theme="dark"] .logo-on-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-on-light { display: none; }
  :root:not([data-theme="light"]) .logo-on-dark { display: block; }
}

/* reveal on scroll (js adds .in); content is visible without js */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: var(--s2); top: var(--s2); z-index: 100; background: var(--surface); padding: var(--s1) var(--s2); }
