/* =========================================================================
   BASE — Reset + Typography + Layout Primitives
   ========================================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  color-scheme: light dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  font-feature-settings: 'ss01', 'ss02', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Display headlines */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 460;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
  font-variation-settings: 'opsz' 144, 'SOFT' 0, 'WONK' 0;
}
h1 { font-size: var(--step-6); font-weight: 420; letter-spacing: -0.035em; }
h2 { font-size: var(--step-4); font-weight: 440; }
h3 { font-size: var(--step-2); font-weight: 500; line-height: 1.15; }
h4 { font-size: var(--step-1); font-weight: 540; line-height: 1.25; }

p {
  margin: 0 0 1em;
  text-wrap: pretty;
  max-width: 65ch;
}

a {
  color: inherit;
  text-decoration-color: color-mix(in oklch, currentColor 35%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: text-decoration-color var(--dur-s) var(--ease-out-quart),
              color var(--dur-s);
}
a:hover { text-decoration-color: currentColor; }

/* Focus */
:focus-visible {
  outline: 2px solid var(--accent-warm);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--ember-300); color: var(--ink-900); }

/* Utility — editorial eyebrow */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--step--2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent-warm);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before {
  content: '';
  width: 1.5em;
  height: 1px;
  background: currentColor;
}

/* Container queries-ready shell */
.shell {
  max-width: var(--col-full);
  margin-inline: auto;
  padding-inline: var(--edge-x);
  container-type: inline-size;
}
.shell--wide    { max-width: var(--col-wide); }
.shell--regular { max-width: var(--col-regular); }
.shell--narrow  { max-width: var(--col-narrow); }

/* Section rhythm */
section {
  padding-block: clamp(4rem, 8vw, 8rem);
  position: relative;
}
section + section { border-top: 1px solid var(--border); }

/* Grid */
.grid {
  display: grid;
  gap: clamp(1.25rem, 2.5vw, 2rem);
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr)); }

/* Number markers — editorial */
.numeral {
  font-family: var(--font-display);
  font-weight: 380;
  font-size: var(--step-5);
  color: var(--accent);
  line-height: 0.9;
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
  font-feature-settings: 'lnum';
}

/* Card */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
  transition: transform var(--dur-m) var(--ease-out-expo),
              border-color var(--dur-m),
              box-shadow var(--dur-m);
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-mid);
}

/* Rule */
.rule {
  height: 1px;
  background: var(--border);
  margin-block: 2rem;
}
.rule--accent {
  height: 2px;
  background: var(--accent-warm);
  width: 3rem;
  margin-block: 1.25rem 1.5rem;
}
