/* =========================================================
   Aurafil Health — Base
   Modern reset + typography defaults + layout primitives.
   ========================================================= */

/* ---------- Modern reset ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  letter-spacing: var(--track-body);
  font-feature-settings: 'ss01', 'ss03', 'cv11';  /* Inter's stylistic sets for cleaner numerals */
  overflow-x: hidden;
}

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

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

button {
  background: none;
  border: none;
  cursor: pointer;
}

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

ul, ol {
  list-style: none;
}

/* Selection */
::selection {
  background: var(--cyan-500);
  color: #FFFFFF;
}

/* Focus */
:focus-visible {
  outline: 2px solid var(--cyan-500);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ---------- Typography ---------- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  letter-spacing: var(--track-tight);
  color: var(--text);
  text-wrap: balance;
}

h1 {
  font-size: var(--text-hero);
  line-height: var(--lh-hero);
  letter-spacing: var(--track-hero);
  font-weight: var(--fw-medium);
}

h2 {
  font-size: var(--text-5xl);
  font-weight: var(--fw-medium);
}

h3 {
  font-size: var(--text-3xl);
}

h4 {
  font-size: var(--text-2xl);
}

h5 {
  font-size: var(--text-xl);
}

h6 {
  font-size: var(--text-lg);
}

p {
  max-width: var(--container-text);
  text-wrap: pretty;
}

p + p {
  margin-top: 1em;
}

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

em, i {
  font-style: italic;
}

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

code, kbd, samp {
  font-family: var(--font-mono);
  font-size: 0.95em;
  letter-spacing: var(--track-mono);
}

/* Utility type roles */

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: var(--track-caps);
  color: var(--text-brand);
  margin-bottom: var(--space-4);
}

.mono {
  font-family: var(--font-mono);
  font-feature-settings: 'tnum';
  letter-spacing: var(--track-mono);
}

.tnum {
  font-variant-numeric: tabular-nums;
}

.serif {
  font-family: var(--font-serif);
  font-weight: var(--fw-regular);
  letter-spacing: 0;
}

.lede {
  font-size: var(--text-xl);
  line-height: var(--lh-normal);
  color: var(--text-muted);
  max-width: var(--container-text);
  text-wrap: pretty;
}

/* ---------- Layout primitives ---------- */

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

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

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

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

.stack > * + * {
  margin-top: var(--stack-gap, var(--space-6));
}

.grid {
  display: grid;
  gap: var(--grid-gap, var(--space-6));
}

/* Screen-reader-only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Motion — animation-timeline reveal (gated) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: reveal-in linear;
      animation-timeline: view();
      animation-range: entry 0% entry 60%;
    }

    @keyframes reveal-in {
      from {
        opacity: 0;
        transform: translateY(24px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
  }
}

/* Fallback for non-supporting browsers — just show it */
.reveal {
  opacity: 1;
  transform: none;
}
