/* ============================================================
   CIPRB website — custom styles (complements Tailwind CDN)
   Brand palette:
     --navy   #0b2545  (deep brand / headings)
     --teal   #0d7377  (primary)
     --teal-2 #14a6a2  (primary light)
     --amber  #f59e0b  (donate / CTA accent)
     --sky    #2a9fd6  (links / highlights)
   ============================================================ */
:root {
  /* CIPRB brand — sampled from the official logo (#093b82) */
  --navy: #072a5e;        /* deep brand */
  --navy-700: #0b347a;
  --teal: #093b82;        /* PRIMARY brand blue (name kept for compatibility) */
  --teal-2: #1e5cb8;      /* brand blue, lighter */
  --amber: #f59e0b;       /* CTA accent */
  --amber-600: #d97706;
  --sky: #2a6fd0;         /* links / highlights */
  --ink: #1f2937;
  --muted: #5b6676;
  --line: #e4e8ee;
  --bg-soft: #f3f6fb;
}

html { scroll-behavior: smooth; }
body { color: var(--ink); background: #fff; font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }

/* ---- Accessibility: skip link + focus ---- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--navy); color: #fff; padding: .6rem 1rem; border-radius: 0 0 .5rem 0;
}
.skip-link:focus { left: 0; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 3px;
}

/* ---- Brand helpers ---- */
.text-navy { color: var(--navy); }
.text-teal { color: var(--teal); }
.bg-navy { background: var(--navy); }
.bg-teal { background: var(--teal); }
.bg-soft { background: var(--bg-soft); }
.brand-gradient { background: linear-gradient(120deg, var(--navy) 0%, var(--teal) 65%, var(--teal-2) 100%); }
/* hero image band with brand overlay */
.hero-photo { position:absolute; inset:0; background-size:cover; background-position:center; }
.hero-overlay { position:absolute; inset:0; background: linear-gradient(100deg, rgba(7,42,94,.92) 0%, rgba(9,59,130,.72) 45%, rgba(9,59,130,.25) 100%); }
.img-cover { width:100%; height:100%; object-fit:cover; display:block; }
.link-underline { background-image: linear-gradient(var(--sky), var(--sky)); background-size: 0% 2px; background-repeat: no-repeat; background-position: left bottom; transition: background-size .25s; }
.link-underline:hover { background-size: 100% 2px; }

.btn { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; border-radius: .6rem; padding: .7rem 1.25rem; transition: transform .15s, box-shadow .15s, background .2s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--navy); }
.btn-amber { background: var(--amber); color: #27210b; }
.btn-amber:hover { background: var(--amber-600); color: #fff; }
.btn-ghost { background: #fff; color: var(--navy); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }

.card { background: #fff; border: 1px solid var(--line); border-radius: 1rem; box-shadow: 0 1px 2px rgba(16,24,40,.04); transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px -12px rgba(11,37,69,.22); }

.chip { display:inline-block; font-size:.72rem; font-weight:600; letter-spacing:.02em; padding:.2rem .6rem; border-radius:999px; }

/* ---- Header / mega menu ---- */
.nav-link { position: relative; font-weight: 600; color: var(--navy); }
.nav-link.active { color: var(--teal); }
.mega { display: none; }
.has-mega:hover .mega, .has-mega:focus-within .mega { display: block; }
.header-shadow { box-shadow: 0 6px 24px -14px rgba(11,37,69,.35); }

/* ---- Hero gallery animation ---- */
.hero-slide { opacity: 0; transition: opacity 1s ease; position:absolute; inset:0; }
.hero-slide.active { opacity: 1; }
@keyframes kenburns { from { transform: scale(1);} to { transform: scale(1.12);} }
.kenburns { animation: kenburns 9s ease-out forwards; }

/* ---- Count-up stat ---- */
.stat-num { font-variant-numeric: tabular-nums; }

/* ---- Reveal on scroll ---- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---- Map ---- */
.map-district { fill: #cfe0f4; stroke: #fff; stroke-width: 1.2; cursor: pointer; transition: fill .2s; }
.map-district:hover, .map-district.active { fill: var(--teal); }

/* ---- Chatbot ---- */
#chatbot-panel { transform: translateY(16px) scale(.98); opacity: 0; pointer-events: none; transition: all .22s ease; }
#chatbot-panel.open { transform: none; opacity: 1; pointer-events: auto; }
.chat-bubble { max-width: 85%; padding: .6rem .85rem; border-radius: 1rem; line-height: 1.35; }
.chat-bot { background: var(--bg-soft); color: var(--ink); border-bottom-left-radius: .25rem; }
.chat-user { background: var(--teal); color: #fff; margin-left: auto; border-bottom-right-radius: .25rem; }
.chat-quick { border:1px solid var(--line); border-radius:999px; padding:.3rem .7rem; font-size:.8rem; }
.chat-quick:hover { border-color: var(--teal); color: var(--teal); }

/* ---- Prose tweaks ---- */
.prose-ciprb h2 { color: var(--navy); font-weight: 800; }
.prose-ciprb a { color: var(--sky); }

/* ---- Calendar ---- */
.cal-cell { min-height: 92px; border: 1px solid var(--line); padding: .35rem; font-size: .8rem; }
.cal-ev { display:block; border-radius:.35rem; padding:.1rem .35rem; margin-top:.2rem; font-size:.7rem; font-weight:600; color:#fff; }

/* ---- Utility ---- */
.container-x { max-width: 1200px; margin-inline: auto; padding-inline: 1rem; }
.section { padding-block: clamp(2.5rem, 6vw, 5rem); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--teal); }
.demo-flag { background: repeating-linear-gradient(45deg,#fff7ed,#fff7ed 10px,#ffedd5 10px,#ffedd5 20px); border:1px dashed var(--amber-600); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
