/* =========================================================
   Kreyòl Pou Tout Moun — shared design system
   Palette: Caribbean warm (mango, sea, hibiscus, sun, palm on cream)
   Type: Bowlby One (display) · Caveat Brush (accent script) · DM Sans (body)
   ========================================================= */
:root {
  /* Brand */
  --cream: #FFF6E8;
  --sand: #F6E6C8;
  --sand-deep: #EBD3A8;
  --ink: #22160F;
  --ink-soft: #5A4636;
  --sea: #0E6B66;
  --sea-deep: #083F3C;
  --sea-light: #D3EEEA;
  --mango: #FFA51F;
  --mango-deep: #E8860A;
  --hibiscus: #E0402A;
  --hibiscus-deep: #B32E1B;
  --sun: #FFD23F;
  --palm: #2E8B4E;
  --palm-light: #DDF1E2;
  --white: #FFFFFF;
  --haiti-blue: #00209F;
  --haiti-red: #D21034;

  /* Semantic */
  --bg: var(--cream);
  --surface: var(--white);
  --muted: var(--sand);
  --text: var(--ink);
  --text-soft: var(--ink-soft);
  --line: var(--ink);
  --primary: var(--mango);
  --on-primary: var(--ink);
  --success: var(--palm);
  --success-bg: var(--palm-light);
  --error: #C42B1C;
  --error-bg: #FDE3DE;

  /* Type */
  --font-display: 'Bowlby One', 'Arial Black', Impact, sans-serif;
  --font-script: 'Caveat Brush', 'Comic Sans MS', cursive;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;

  /* Shape + depth */
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --border: 2.5px solid var(--line);
  --shadow-hard: 0 4px 0 var(--ink);
  --shadow-hard-lg: 0 8px 0 var(--ink);

  /* Motion */
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-back: cubic-bezier(.34, 1.56, .64, 1);
  --t-fast: 150ms;
  --t: 260ms;

  /* Layout */
  --gutter: 16px;
  --max: 1180px;

  color-scheme: light;
}
@media (min-width: 768px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img, video, iframe, svg { max-width: 100%; display: block; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.05; text-wrap: balance; }
p { margin: 0; }

.display { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .01em; font-weight: 400; }
.script { font-family: var(--font-script); text-transform: none; font-weight: 400; letter-spacing: 0; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 2000;
  background: var(--ink); color: var(--cream); padding: 10px 16px; border-radius: 10px; text-decoration: none; font-weight: 700;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--sea); outline-offset: 3px; border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--primary);
  --btn-fg: var(--on-primary);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 10px 14px 10px 22px;
  background: var(--btn-bg); color: var(--btn-fg);
  border: var(--border); border-radius: 14px;
  box-shadow: var(--shadow-hard);
  font-family: var(--font-display); font-size: 15px; text-transform: uppercase; letter-spacing: .02em;
  text-decoration: none; cursor: pointer; touch-action: manipulation;
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out), background var(--t-fast);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn .btn-dot {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--hibiscus); color: var(--white); border: 2px solid var(--ink); flex: none;
}
.btn .btn-dot svg { width: 14px; height: 14px; }
.btn.no-dot { padding-right: 22px; }
.btn-sea { --btn-bg: var(--sea); --btn-fg: var(--white); }
.btn-cream { --btn-bg: var(--cream); --btn-fg: var(--ink); }
.btn-ink { --btn-bg: var(--ink); --btn-fg: var(--cream); }
.btn-lg { min-height: 58px; font-size: 18px; padding-left: 28px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: var(--shadow-hard); }

/* ---------- Sticker badge ---------- */
.sticker {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--sun);
  padding: 6px 14px 6px 8px; border-radius: 10px;
  font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase;
  transform: rotate(-2deg);
}
.sticker .sticker-icon {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--sun); color: var(--ink); border: 2px solid var(--ink);
  outline: 2px dashed var(--sun); outline-offset: 1px;
}
.sticker .sticker-icon svg { width: 14px; height: 14px; }
.sticker-red {
  display: inline-block; background: var(--hibiscus); color: var(--white);
  font-family: var(--font-display); font-size: 13px; text-transform: uppercase; letter-spacing: .04em;
  padding: 6px 14px; border-radius: 8px; transform: rotate(-3deg);
  box-shadow: 0 0 0 3px var(--white), 0 0 0 5px var(--hibiscus);
}

/* ---------- Scalloped edges ---------- */
.scallop-top { position: relative; }
.scallop-top::before {
  content: ''; position: absolute; left: 0; right: 0; top: -15px; height: 16px;
  background: radial-gradient(circle at 16px 16px, var(--scallop, var(--sand)) 15.5px, transparent 16px) 0 0 / 32px 32px repeat-x;
  pointer-events: none;
}
.scallop-bottom { position: relative; }
.scallop-bottom::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -15px; height: 16px;
  background: radial-gradient(circle at 16px 0, var(--scallop-b, var(--sand)) 15.5px, transparent 16px) 0 0 / 32px 32px repeat-x;
  pointer-events: none; z-index: 2;
}

.dot-grid {
  background-image: radial-gradient(rgba(34,22,15,.13) 1.3px, transparent 1.6px);
  background-size: 22px 22px;
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
}

/* ---------- Icons ---------- */
.icon { width: 24px; height: 24px; flex: none; }
.icon-sm { width: 18px; height: 18px; }
.icon-lg { width: 32px; height: 32px; }

/* ---------- Mascot ---------- */
.mascot { display: inline-block; }
.mascot svg { width: 100%; height: auto; overflow: visible; }
.mascot .m-brow-l, .mascot .m-brow-r { transform-box: fill-box; transform-origin: center; }
.mascot.wiggle svg { animation: wiggle 3.6s var(--ease-out) infinite; transform-origin: 50% 90%; }
@keyframes wiggle {
  0%, 82%, 100% { transform: rotate(0); }
  86% { transform: rotate(-8deg); }
  90% { transform: rotate(6deg); }
  94% { transform: rotate(-3deg); }
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 1500;
  transform: translate(-50%, 160%);
  background: var(--ink); color: var(--cream); border-radius: 14px;
  padding: 14px 20px; font-weight: 600; max-width: calc(100vw - 32px);
  box-shadow: 0 6px 0 var(--mango);
  transition: transform 400ms var(--ease-back);
}
.toast.show { transform: translate(-50%, 0); }

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