/* ==========================================================================
   BASE — reset, typography, shared layout helpers
   ========================================================================== */

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

html { scroll-behavior: smooth; }

/* Keep anchored sections clear of the floating nav bar */
section[id] { scroll-margin-top: 90px; }

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  /* Soft accent washes so the page never feels flat */
  background-image:
    radial-gradient(1200px 700px at 85% -10%, color-mix(in srgb, var(--c10) 18%, transparent), transparent 60%),
    radial-gradient(900px 600px at -10% 40%, color-mix(in srgb, var(--c10) 10%, transparent), transparent 60%),
    radial-gradient(1000px 700px at 110% 90%, color-mix(in srgb, var(--c30) 7%, transparent), transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.5s, color 0.5s;
}

::selection { background: var(--c10); color: var(--c60); }

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

/* Section wrapper */
.sw {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(80px, 11vw, 130px) var(--gutter);
}

.section-head { margin-bottom: clamp(36px, 6vw, 64px); }

.section-label {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.section-label::before { content: ""; width: 28px; height: 1px; background: var(--accent); }

.section-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.5rem, 6.4vw, 4.8rem);
  line-height: 1.02;
  text-wrap: balance;
}
.section-title em { font-style: italic; color: var(--accent); }

.section-intro { max-width: 560px; color: var(--muted); margin-top: 16px; }

.divider {
  height: 1px;
  max-width: var(--max-width);
  margin: 0 auto;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}

.muted { color: var(--muted); }

/* Accessibility */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 10000;
  background: var(--accent); color: var(--on-accent);
  padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 16px; }

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

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