/* =========================================================
   NOURISH HABIT — RESET & BASE
   ========================================================= */

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

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

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

body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
}

ul, ol { padding: 0; list-style: none; }

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

img { height: auto; }

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

button { cursor: pointer; }

a { color: inherit; text-decoration: none; }

table { border-collapse: collapse; }

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  font-feature-settings: "liga" 1, "kern" 1;
  -webkit-font-smoothing: antialiased;
}

/* ---- Headings ---- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-ink);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
}

h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-md); }

@media (max-width: 720px) {
  h1 { font-size: var(--fs-3xl); }
  h2 { font-size: var(--fs-xl); }
  h3 { font-size: var(--fs-lg); }
}

p { color: var(--color-text-muted); }

/* ---- Focus states (accessibility) ---- */
:focus-visible {
  outline: 2.5px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: 3px;
}

a:focus-visible, button:focus-visible {
  outline: 2.5px solid var(--color-focus);
  outline-offset: 2px;
}

/* ---- Selection ---- */
::selection {
  background: var(--color-sage);
  color: var(--color-white);
}

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--color-ink);
  color: var(--color-paper);
  padding: var(--space-xs) var(--space-md);
  border-radius: 0 0 var(--radius-sm) 0;
  font-size: var(--fs-sm);
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
}

/* ---- Container ---- */
.container {
  width: 100%;
  max-width: var(--maxw-page);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

@media (min-width: 1000px) {
  .container { padding-inline: var(--space-xl); }
}

/* ---- Visually hidden (for screen readers) ---- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Main content area: ensure last section never touches the footer */
main {
  padding-bottom: var(--space-2xl);
}

/* ---- Section rhythm ---- */
.section {
  padding-block: var(--space-2xl);
}

@media (max-width: 720px) {
  .section { padding-block: var(--space-xl); }
}

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

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.section-head__title {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--color-accent-deep);
  font-weight: 600;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-cta);
  flex-shrink: 0;
}

.section-link {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-accent-deep);
  white-space: nowrap;
  border-bottom: 1.5px solid transparent;
  transition: border-color var(--dur-base) var(--ease-standard);
}

.section-link:hover { border-color: var(--color-accent-deep); }
