/* ============================================================
   2-base.css — reset, typography, layout primitives
   (container, .section variants, .section-head, .eyebrow),
   accessibility utilities. Depends on 1-tokens.
   ============================================================ */

/* -------------------- Reset & Base -------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary-dark); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--primary); }

h1, h2, h3, h4 {
  font-family: var(--serif-display);
  color: var(--heading);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
}
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* -------------------- Layout primitives -------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}
@media (min-width: 768px) {
  .container { padding: 0 1.75rem; }
}

.section {
  padding: 5rem 0;
}
.section--cream {
  background:
    radial-gradient(circle at 18% 0%, rgba(45, 212, 191, 0.06) 0%, transparent 55%),
    radial-gradient(circle at 88% 100%, rgba(15, 118, 110, 0.05) 0%, transparent 55%),
    var(--surface-cream);
}
/* Tight variant — for short overview/summary sections that don't need the
   full vertical breathing room of a primary content section. */
.section--tight { padding: 3.25rem 0; }
@media (max-width: 767px) {
  .section--tight { padding: 2.5rem 0; }
}
.section--tint { background: linear-gradient(180deg, var(--tint-soft) 0%, var(--surface) 100%); }
.section--dark {
  background: var(--black);
  color: var(--on-dark-text);
  position: relative;
  overflow: hidden;
}
.section--dark::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, #000 30%, transparent 80%);
          mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, #000 30%, transparent 80%);
  pointer-events: none;
}
.section--dark > .container { position: relative; z-index: 1; }
.section--dark h2, .section--dark h3, .section--dark h4 { color: var(--on-dark-heading); }
.section--dark p { color: var(--on-dark-muted); }
.section--dark .section-head p { color: var(--on-dark-muted); }
.section--dark a { color: var(--primary-glow); }
.section--dark a:hover { color: var(--tint); }

.section--dark-glow {
  background: var(--black);
  color: var(--on-dark-text);
  position: relative;
  overflow: hidden;
}
.section--dark-glow::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(800px 400px at 80% 0%, rgba(20, 184, 166, 0.18) 0%, transparent 60%),
    radial-gradient(600px 300px at 0% 100%, rgba(15, 118, 110, 0.12) 0%, transparent 60%);
  pointer-events: none;
}
.section--dark-glow > .container { position: relative; z-index: 1; }
.section--dark-glow h2, .section--dark-glow h3, .section--dark-glow h4 { color: var(--on-dark-heading); }
.section--dark-glow p { color: var(--on-dark-muted); }

@media (max-width: 767px) {
  .section { padding: 3.5rem 0; }
}

.section-head { max-width: 760px; margin: 0 auto 3.5rem; text-align: center; }
@media (max-width: 767px) {
  .section-head { margin: 0 auto 2.25rem; }
}
/* Compact variant — for tighter sections where the head is just a label,
   not a full intro paragraph. Smaller bottom margin + smaller h2. */
.section-head--compact { margin-bottom: 2rem; }
.section-head--compact h2 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  margin-bottom: 0;
}
.section-head--left { margin-left: 0; text-align: left; }
.section-head .eyebrow { margin-bottom: 1rem; }
.section-head h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.section-head p {
  font-size: 1.0625rem;
  color: var(--muted-strong);
  line-height: 1.65;
}
.section--dark .section-head .eyebrow,
.section--dark-glow .section-head .eyebrow {
  background: rgba(45, 212, 191, 0.12);
  color: var(--primary-glow);
  border: 1px solid rgba(45, 212, 191, 0.3);
}

/* -------------------- Pills / Eyebrow -------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--tint);
  color: var(--primary-darker);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.eyebrow--on-dark { background: rgba(204, 251, 241, 0.18); color: #ECFDF5; }

/* -------------------- Accessibility & utilities -------------------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Compatibility: main.js may add .reveal-on-scroll — keep visible */
.reveal-on-scroll { opacity: 1; transform: none; }
