/* ==========================================================================
   KPRS FOODS — BASE / RESET / TYPOGRAPHY
   ========================================================================== */

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

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

body {
  margin: 0;
  position: relative;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--white);
  overflow-x: hidden; /* guard against accidental horizontal scroll */
}

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

a { color: var(--cyan-600); text-decoration: none; }
a:hover { color: var(--cyan-500); }

ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0 0 var(--space-4); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy-900);
  line-height: var(--lh-heading);
  letter-spacing: var(--tracking-tight);
  margin: 0 0 var(--space-4);
  font-weight: 600;
}

h1 {
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
  letter-spacing: -0.022em;
  text-wrap: balance;
}
h2 {
  font-size: var(--fs-h2);
  letter-spacing: -0.018em;
  text-wrap: balance;
  max-width: 30ch;
}
h3 {
  font-size: var(--fs-h3);
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
p { text-wrap: pretty; }

/* Supporting copy sits clearly below the heading in the hierarchy:
   narrower measure, calmer colour, generous line-height. */
.lead {
  font-size: var(--fs-lead);
  color: var(--ink-muted);
  line-height: 1.62;
  max-width: 58ch;
}

small, .text-small { font-size: var(--fs-small); }

/* ---- Visually hidden (accessible skip text) ---- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -60px;
  background: var(--navy-900);
  color: var(--white);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  z-index: 300;
  transition: top var(--duration-fast) var(--ease-standard);
}
.skip-link:focus {
  top: var(--space-4);
  color: var(--white);
}

/* ---- Focus states (global, visible, never suppressed) ---- */
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---- Containers ---- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* Major section rhythm: ~35px baseline separation, scaling gently up on
   large screens. Deliberately NOT applied to fields/cards/buttons, which
   keep their own spacing scale. */
.section {
  padding-block: clamp(2.2rem, 3.2vw, 3rem);
}
.section--tight { padding-block: clamp(1.6rem, 2.4vw, 2.2rem); }
.section--alt { background: var(--neutral-50); }
.section--navy {
  background: var(--navy-900);
  color: var(--on-navy);
}
.section--navy h1, .section--navy h2, .section--navy h3 { color: var(--white); }
.section--navy .lead { color: var(--on-navy-muted); }

/* Section header composition: heading keeps visual priority, supporting
   copy is held to a shorter measure so it never stretches the full width. */
.section-heading {
  max-width: 62ch;
  margin-bottom: var(--space-6);
}
.section-heading h2 { margin-bottom: var(--space-3); }
.section-heading .lead { max-width: 54ch; margin-bottom: 0; }
.section-heading--center {
  margin-inline: auto;
  text-align: center;
}
.section-heading--center .lead { margin-inline: auto; }

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