/* ===================================================================
   Base — reset, typography primitives, layout helpers
   =================================================================== */

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

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

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}

img, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--azure);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}
a:hover { color: var(--azure-deep); }
a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

ul, ol { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 650;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
  font-variation-settings: 'opsz' 36, 'SOFT' 50;
}

h1 { font-size: var(--text-hero); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); font-weight: 600; }

p { color: var(--ink-soft); line-height: var(--leading-normal); }

::selection {
  background: var(--gold-soft);
  color: var(--ink);
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}
.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
  position: relative;
}
.section--tight { padding-top: var(--space-16); padding-bottom: var(--space-16); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: var(--space-4);
}
.eyebrow::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--mist-strong);
  display: inline-block;
}

.lead {
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
  color: var(--ink);
  max-width: 56ch;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 4px 10px;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid var(--mist-strong);
  border-radius: var(--radius-pill);
  background: var(--paper);
  color: var(--ink-soft);
}
.tag--emerald { color: var(--emerald-deep); border-color: var(--emerald-soft); background: var(--emerald-soft); }
.tag--azure { color: var(--azure-deep); border-color: var(--azure-soft); background: var(--azure-soft); }
.tag--gold { color: var(--gold-deep); border-color: var(--gold-soft); background: var(--gold-soft); }
.tag--terracotta { color: var(--terracotta-deep); border-color: var(--terracotta-soft); background: var(--terracotta-soft); }
.tag--closed { color: var(--ink); border-color: var(--ink); background: transparent; font-weight: 600; }

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: var(--space-3) var(--space-4);
  background: var(--ink);
  color: var(--cream);
  border-radius: 0 0 var(--radius-md) 0;
}
.skip-link:focus { left: 0; }

/* Visually hidden */
.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;
}

/* Scroll-reveal initial state */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
