/* ═══════════════════════════════════════════════════════════
   main.css — Cabinet de l'Amandolier
   Variables · Reset · Base typography · Layout · Animations
   ═══════════════════════════════════════════════════════════ */

/* ─── Brand tokens ───────────────────────────────────────── */
:root {
  /* Palette — Medicare guidelines + WCAG AA adjustments
     --color-blue       : decorative / icons / large headings (3.4:1 — passes for large text ≥24px)
     --color-blue-btn   : buttons / interactive text (4.68:1 on white — passes AA)
     --color-navy       : footer / emphasis (14:1 on white — passes AAA)
     --color-urgent     : emergency red (contrast 5.8:1 white text — passes AA)
  */
  --color-blue:         #2490EB;
  --color-blue-hover:   #1A7ACC;
  --color-blue-btn:     #1570C4;
  --color-blue-pale:    #EBF5FD;
  --color-navy:         #14457B;
  --color-navy-dark:    #0D3260;
  --color-near-black:   #18100F;
  --color-grey-dark:    #333333;
  --color-grey-mid:     #666666;  /* 5.74:1 on white — passes AA */
  --color-grey-light:   #F4F6F9;
  --color-white:        #FFFFFF;
  --color-urgent:       #C91F1F;  /* 5.8:1 with white text — passes AA */

  /* Typography */
  --font-body:    'Quicksand', sans-serif;
  --font-heading: 'Quicksand', sans-serif;

  /* Spacing */
  --section-padding: 4rem;       /* mobile default */
  --container-max:   1400px;
  --container-pad:   1rem;

  /* Components */
  --radius:  5px;
  --shadow:  0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.14);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition: 0.25s var(--ease-out);
}

/* Larger section padding on desktop */
@media (min-width: 768px) {
  :root {
    --section-padding: 5rem;
    --container-pad:   15px;
  }
}

@media (min-width: 1024px) {
  :root {
    --section-padding: 6.25rem; /* 100px */
  }
}

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

html {
  scroll-behavior: smooth;
  /* Prevent font size inflation on iOS */
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;           /* 16px base */
  line-height: 1.65;
  color: var(--color-near-black);
  background: var(--color-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid var(--color-blue-btn);
  outline-offset: 3px;
  border-radius: 2px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

button:focus-visible {
  outline: 2px solid var(--color-blue-btn);
  outline-offset: 3px;
}

/* ─── Base typography ─────────────────────────────────────── */
h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.25rem, 6vw, 4.5rem); /* 36px → 72px */
  font-weight: 600;
  line-height: 1.11;
  color: var(--color-near-black);
}

h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 3.5rem); /* 28px → 56px */
  font-weight: 600;
  line-height: 1.14;
  color: var(--color-near-black);
}

h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem; /* 20px */
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-near-black);
}

h4 {
  font-family: var(--font-heading);
  font-size: 2rem; /* 32px */
  font-weight: 600;
  line-height: 1.25;
}

p {
  color: var(--color-grey-mid);
  font-size: 1rem;
  line-height: 1.7;
}

/* ─── Layout utilities ───────────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.section {
  padding: var(--section-padding) 0;
}

.section--grey  { background: var(--color-grey-light); }
.section--white { background: var(--color-white); }
.section--navy  { background: var(--color-navy); }

/* ─── Eyebrow label ──────────────────────────────────────── */
/* WCAG: --color-navy (#14457B) on --color-blue-pale (#EBF5FD) = 12:1 ✅ */
.eyebrow {
  display: inline-block;
  font-size: 0.875rem;    /* 14px */
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-navy);           /* navy on pale-blue: 12:1 ✅ */
  padding: 8px 12px;
  background: var(--color-blue-pale);
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

/* ─── Scroll reveal ───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.reveal-d1 { transition-delay: 0.10s; }
.reveal-d2 { transition-delay: 0.20s; }
.reveal-d3 { transition-delay: 0.30s; }
.reveal-d4 { transition-delay: 0.40s; }
.reveal-d5 { transition-delay: 0.50s; }

/* ─── Animations ─────────────────────────────────────────── */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.75); }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
