/* ==========================================================================
   Poppie — Modern Reset + Base Typography
   ========================================================================== */

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

* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-loose);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}

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

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

ul, ol { list-style: none; }

/* ----- Headings ---------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variation-settings: "SOFT" 50, "opsz" 144;
}

h1 {
  font-size: var(--fs-4xl);
  line-height: var(--lh-tight);
  font-weight: var(--fw-bold);
  letter-spacing: -0.03em;
}

h2 {
  font-size: var(--fs-3xl);
  line-height: var(--lh-snug);
  font-weight: var(--fw-bold);
  letter-spacing: -0.025em;
}

h3 {
  font-size: var(--fs-xl);
  line-height: var(--lh-normal);
}

h4 {
  font-size: var(--fs-lg);
  line-height: var(--lh-normal);
}

p {
  line-height: var(--lh-loose);
  color: var(--ink-soft);
}

p + p { margin-top: var(--space-4); }

strong, b { font-weight: var(--fw-semibold); color: var(--ink); }

small { font-size: var(--fs-sm); }

code, kbd, pre {
  font-family: var(--font-mono);
  font-size: 0.925em;
}

code {
  background: var(--bg-alt);
  padding: 0.15em 0.4em;
  border-radius: 6px;
  color: var(--primary-ink);
  font-weight: var(--fw-medium);
}

pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  overflow-x: auto;
  line-height: var(--lh-relaxed);
}

pre code {
  background: none;
  padding: 0;
  color: var(--ink);
}

blockquote {
  border-left: 4px solid var(--primary);
  padding-left: var(--space-5);
  margin: var(--space-6) 0;
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-style: italic;
  color: var(--ink);
  line-height: var(--lh-relaxed);
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: var(--space-7) 0;
}

/* ----- Selection --------------------------------------------------------- */

::selection {
  background: var(--primary);
  color: #FFFBF5;
}

/* ----- Focus ring — global baseline ------------------------------------- */

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
}

:focus:not(:focus-visible) { outline: none; }

/* ----- Skip link --------------------------------------------------------- */

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  background: var(--ink);
  color: var(--bg);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  font-weight: var(--fw-semibold);
  z-index: var(--z-toast);
  transition: top var(--dur-base) var(--ease-out);
}

.skip-link:focus {
  top: var(--space-4);
}

/* ----- Layout helpers ---------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter-mobile);
}

@media (min-width: 768px) {
  .container { padding-inline: var(--gutter-tablet); }
}

@media (min-width: 1024px) {
  .container { padding-inline: var(--gutter-desktop); }
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-block: var(--section-y);
  position: relative;
}

@media (min-width: 1024px) {
  .section { padding-block: var(--section-y-lg); }
}

.section--alt { background: var(--bg-alt); }

.section__header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto var(--space-7);
}

.section__eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-ink);
  margin-bottom: var(--space-3);
  padding: var(--space-2) var(--space-4);
  background: var(--primary-soft);
  border-radius: var(--radius-full);
}

.section__title {
  margin-bottom: var(--space-4);
}

.section__lede {
  font-size: var(--fs-md);
  color: var(--ink-soft);
  line-height: var(--lh-relaxed);
}

/* ----- Screen-reader only ------------------------------------------------ */

.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;
}

/* ----- Reduced motion ---------------------------------------------------- */

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