/* ==========================================================================
   MIDAP — Base / Reset / Typography
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-base);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background: var(--color-surface);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-text);
  line-height: var(--lh-tight);
  margin: 0 0 var(--space-4);
  font-weight: 700;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 600; }

p { margin: 0 0 var(--space-4); color: var(--color-text-muted); }

a {
  color: var(--color-primary-darker);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}
a:hover { color: var(--color-primary-dark); }

/* Accessible focus ring everywhere */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

ul { margin: 0; padding: 0; list-style: none; }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.section { padding: var(--space-9) 0; }
.section--alt { background: var(--color-surface-alt); }
.section--dark { background: var(--color-surface-dark); color: var(--color-text-invert); }
.section--dark h2, .section--dark h3 { color: var(--color-text-invert); }
.section--dark p { color: rgba(255,255,255,0.72); }

.section-head { max-width: 640px; margin: 0 0 var(--space-7); }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { font-size: 1.0625rem; margin-bottom: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--color-primary-darker);
  background: var(--color-primary-light);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-4);
}

.text-muted { color: var(--color-text-muted); }
.text-center { text-align: center; }

/* Simple fade-up reveal, toggled by main.js via IntersectionObserver */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur-base) var(--ease), transform var(--dur-base) var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 991px) {
  .section { padding: var(--space-8) 0; }
}
@media (max-width: 576px) {
  .container { padding: 0 var(--space-4); }
}
