/* ==========================================================================
   MT MediTeam — Reset, typography, accessibility, layout primitives
   Mobile-first: every rule here is the small-screen rule; larger widths
   only add.
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: var(--lh-body);
  color: var(--c-ink-2);
  background: var(--c-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul[class], ol[class] { list-style: none; margin: 0; padding: 0; }

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

input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
address { font-style: normal; }

/* --- Headings ------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--c-ink);
  font-weight: var(--fw-bold);
  line-height: var(--lh-heading);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}

h1 {
  font-size: var(--step-5);
  line-height: var(--lh-tight);
  font-weight: var(--fw-display);
  letter-spacing: var(--tracking-display);
}
h2 {
  font-size: var(--step-4);
  font-weight: var(--fw-display);
  letter-spacing: var(--tracking-display);
}
h3 { font-size: var(--step-2); letter-spacing: var(--tracking-tight); }
h4 { font-size: var(--step-1); letter-spacing: var(--tracking-snug); }

p { text-wrap: pretty; }

a {
  color: var(--c-brand-mid);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color var(--t-fast) var(--ease);
}
a:hover { color: var(--c-brand); }

strong, b { font-weight: 600; color: var(--c-ink); }

/* On dark / brand grounds, emphasis must not fall back to dark ink */
.topbar strong, .topbar b,
.band strong, .band b,
.section--brand strong, .section--brand b,
.site-footer strong, .site-footer b,
.btn strong, .call-bar strong,
.badge--light strong { color: inherit; }

/* --- Accessibility -------------------------------------------------------- */
:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 3px;
  border-radius: 2px;
}
:focus:not(:focus-visible) { outline: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0; left: 50%;
  transform: translate(-50%, -120%);
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--c-brand);
  color: #fff;
  font-weight: 600;
  border-radius: 0 0 var(--r-md) var(--r-md);
  transition: transform var(--t-mid) var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); color: #fff; }

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

.section { padding-block: var(--sp-section); }
.section--warm { background: var(--c-warm); }
.section--tint { background: var(--c-brand-wash); }
.section--brand { background: var(--c-brand); color: #fff; }
.section--brand h2, .section--brand h3 { color: #fff; }

.stack > * + * { margin-top: var(--flow, 1rem); }

.prose { max-width: var(--w-prose); }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.6em; }
.prose ul { padding-left: 1.3em; }
.prose li + li { margin-top: 0.4em; }

/* --- Section headers ------------------------------------------------------ */
.eyebrow {
  display: inline-block;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--c-brand-mid);
  margin-bottom: var(--sp-3);
}
.section--brand .eyebrow { color: var(--c-brand-soft); }

.section-head { max-width: 62ch; margin-bottom: var(--sp-8); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head p {
  margin-top: var(--sp-4);
  font-size: var(--step-1);
  color: var(--c-ink-3);
  line-height: var(--lh-snug);
}
.section--brand .section-head p { color: var(--c-brand-soft); }

.lede {
  font-size: var(--step-1);
  line-height: var(--lh-snug);
  color: var(--c-ink-3);
}

/* Scroll reveals and all entrance choreography live in motion.css */

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

/* --- Print ---------------------------------------------------------------- */
@media print {
  .site-header, .call-bar, .site-footer nav, .drawer { display: none !important; }
  body { color: #000; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}
