/* ==========================================================================
   EreVital FR — base.css
   Reset, tipografia, container, utilitários. Sem componentes.
   « Ordonnance Scellée » — pharmaceutical document aesthetic.
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 78px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-900);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
table { border-collapse: collapse; width: 100%; }

/* --- Tipografia ---------------------------------------------------------- */
h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 600; line-height: 1.2; }

p { text-wrap: pretty; }
p + p { margin-top: 1em; }

strong, b { font-weight: 600; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--t-hover) ease;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--ink-400);
  margin: 0 0 12px;
}

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.num  { font-variant-numeric: tabular-nums; }

.lede { font-size: 1.1875em; color: var(--ink-600); line-height: 1.6; }
.muted { color: var(--ink-600); }
.fine { font-size: 0.9375rem; line-height: 1.7; color: var(--ink-400); }

.t-signal { color: var(--signal); }
.t-clinic { color: var(--clinic); }

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

.section { padding-block: calc(var(--section-gap) / 2); }
.section + .section { padding-top: 0; }
.section-head { max-width: 62ch; margin-bottom: 32px; }

.grid { display: grid; gap: var(--grid-gap); }
@media (min-width: 900px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 600px) and (max-width: 899px) {
  .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

.stack > * + * { margin-top: var(--stack-space, 16px); }
.flow-lg { --stack-space: 24px; }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* --- Utilitários --------------------------------------------------------- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.center { text-align: center; }
.mx-auto { margin-inline: auto; }
.maxw-prose { max-width: 62ch; }

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--clinic);
  outline-offset: 3px;
}

/* --- Movimento ----------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity var(--t-reveal) cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform var(--t-reveal) cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }

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

/* --- Print --------------------------------------------------------------- */
@media print {
  .site-header, .sticky-cta, .announce { display: none !important; }
}
