/* =========================================================================
   ATBC 2026 — Base: reset, typography, layout primitives
   ========================================================================= */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, var(--bg-grad-1), transparent 60%),
    radial-gradient(1000px 500px at 0% 0%, var(--bg-grad-2), transparent 55%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

img { display: block; max-width: 100%; }
/* Inline icons get a sane default size; components override with explicit px. */
svg { width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.18em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: var(--lh-tight); font-weight: 700; color: var(--text); letter-spacing: -.01em; }
h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
p { line-height: var(--lh-normal); }

::selection { background: var(--green-200); color: var(--ink-900); }
[data-theme="dark"] ::selection { background: var(--green-800); color: var(--green-50); }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-xs); }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
*::-webkit-scrollbar { height: 10px; width: 10px; }
*::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--r-full); border: 2px solid var(--bg); }
*::-webkit-scrollbar-track { background: transparent; }

/* ---------------------------- Layout ------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--sp-5); }
.container--wide { max-width: 1400px; }

.page { padding-block: var(--sp-8) var(--sp-16); animation: fade-up .35s ease both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.section { margin-block: var(--sp-10); }
.stack > * + * { margin-top: var(--sp-4); }
.row { display: flex; gap: var(--sp-3); align-items: center; }
.row--wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.hide { display: none !important; }

.eyebrow {
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--primary);
}
.muted { color: var(--muted); }
.soft { color: var(--text-soft); }
.center { text-align: center; }
.lead { font-size: var(--fs-lg); color: var(--text-soft); line-height: var(--lh-snug); }

.page-head { margin-bottom: var(--sp-6); }
.page-head h1 { font-size: var(--fs-3xl); margin-top: var(--sp-1); }
.page-head .lead { margin-top: var(--sp-2); max-width: 60ch; }

/* Utility text */
.mono { font-family: var(--font-mono); font-size: .92em; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

@media (max-width: 640px) {
  h1 { font-size: var(--fs-2xl); }
  .container { padding-inline: var(--sp-4); }
  .page { padding-block: var(--sp-6) var(--sp-12); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
