/* ============================================================
   ExtraKids — styles
   Design tokens: deep navy + warm orange (from the brand deck),
   clean light canvas, card-based directory layout.
   ============================================================ */

:root {
  --navy:        #16284A;
  --navy-700:    #1F3A66;
  --navy-soft:   #EAF0F8;
  --orange:      #EE7D2B;
  --orange-700:  #D86A1C;
  --orange-soft: #FCEBDA;
  --ink:         #1A2233;
  --muted:       #5B6678;
  --line:        #E5E9F0;
  --bg:          #FFFFFF;
  --bg-soft:     #F6F8FC;
  --ok:          #2E7D57;

  --radius:   14px;
  --radius-sm: 10px;
  --pill:     999px;
  --shadow:   0 1px 2px rgba(22,40,74,.05), 0 8px 24px rgba(22,40,74,.06);
  --shadow-lift: 0 6px 14px rgba(22,40,74,.10), 0 18px 40px rgba(22,40,74,.10);

  --ff-display: "Plus Jakarta Sans", system-ui, sans-serif;
  --ff-body:    "Inter", system-ui, sans-serif;

  --maxw: 1120px;
}

* { box-sizing: border-box; }

/* The hidden attribute must override any display rule below */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--ff-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--ff-display); line-height: 1.15; margin: 0; }

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

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--ff-display); font-weight: 700; font-size: .95rem;
  border: 0; border-radius: var(--pill); padding: 13px 22px;
  cursor: pointer; transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-700); }
.btn-secondary { background: var(--navy); color: #fff; }
.btn-secondary:hover { background: var(--navy-700); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 26px; height: 26px; display: block;
}
.brand-name { font-family: var(--ff-display); font-weight: 800; font-size: 1.3rem; color: var(--navy); letter-spacing: -.01em; }
.brand-accent { color: var(--orange); }
.header-nav { display: flex; gap: 26px; margin-left: auto; font-weight: 500; color: var(--muted); }
.header-nav a:hover { color: var(--navy); }
.header-cta { padding: 10px 18px; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(900px 380px at 82% -8%, var(--orange-soft) 0, transparent 60%),
    linear-gradient(180deg, var(--bg-soft) 0, #fff 100%);
  border-bottom: 1px solid var(--line);
}
.hero-inner { padding: 64px 22px 40px; }
.eyebrow {
  display: inline-block; margin: 0 0 14px;
  font-family: var(--ff-display); font-weight: 700; font-size: .8rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--orange-700);
  background: var(--orange-soft); padding: 5px 12px; border-radius: var(--pill);
}
.hero-title { font-size: clamp(2.1rem, 5vw, 3.5rem); font-weight: 800; color: var(--navy); letter-spacing: -.02em; }
.hero-title .hl { color: var(--orange); }
.hero-sub { max-width: 600px; margin: 18px 0 0; font-size: 1.12rem; color: var(--muted); }

/* ---------- Search bar (signature) ---------- */
.searchbar {
  display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap;
  margin-top: 30px; padding: 14px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 18px; box-shadow: var(--shadow);
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field-grow { flex: 1 1 200px; }
.field label {
  font-family: var(--ff-display); font-size: .72rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-left: 4px;
}
.field input, .field select {
  font-family: var(--ff-body); font-size: .98rem; color: var(--ink);
  border: 1px solid var(--line); background: var(--bg-soft);
  border-radius: var(--radius-sm); padding: 12px 14px; min-width: 150px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
.searchbar-go { flex: 0 0 auto; height: 46px; }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.chip {
  font-family: var(--ff-display); font-weight: 600; font-size: .9rem;
  border: 1px solid var(--line); background: #fff; color: var(--navy);
  border-radius: var(--pill); padding: 8px 16px; cursor: pointer;
  transition: all .14s ease;
}
.chip:hover { border-color: var(--orange); color: var(--orange-700); }
.chip.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ---------- Results bar ---------- */
.results-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 40px 0 18px; }
.results-count { font-size: 1.45rem; font-weight: 700; color: var(--navy); }
.view-toggle { display: flex; align-items: center; gap: 6px; }
.view-btn {
  font-family: var(--ff-display); font-weight: 600; font-size: .88rem;
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  border-radius: var(--pill); padding: 8px 16px; cursor: pointer;
}
.view-btn.is-active { background: var(--navy-soft); border-color: var(--navy-soft); color: var(--navy); }
.link-clear { border: 0; background: none; color: var(--orange-700); font-weight: 600; cursor: pointer; padding: 8px 10px; }

/* ---------- Card grid ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; overflow: hidden; cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: transparent; }
.card-thumb { position: relative; height: 132px; overflow: hidden; background: var(--navy); }
.card-thumb svg,
.card-thumb .card-photo { position: absolute; inset: 0; width: 100%; height: 100%; }
.card-thumb .card-photo { object-fit: cover; }
.card-body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-cat {
  align-self: flex-start; font-family: var(--ff-display); font-weight: 700;
  font-size: .72rem; letter-spacing: .05em; text-transform: uppercase;
  color: var(--navy-700); background: var(--navy-soft);
  padding: 4px 10px; border-radius: var(--pill);
}
.card-name { font-size: 1.1rem; font-weight: 700; color: var(--navy); }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .86rem; color: var(--muted); }
.card-meta .dot::before { content: "•"; margin-right: 6px; color: var(--line); }
.card-rating { color: var(--orange-700); font-weight: 600; }
.card-blurb { font-size: .92rem; color: var(--ink); margin-top: 2px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; }
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .78rem; font-weight: 600; padding: 3px 9px; border-radius: var(--pill);
}
.badge-wwcc { color: var(--ok); background: #E6F4EC; }
.badge-self { color: var(--muted); background: var(--bg-soft); }
.card-link { font-family: var(--ff-display); font-weight: 700; font-size: .85rem; color: var(--orange-700); }

/* ---------- Map ---------- */
.map-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
#map { height: 520px; width: 100%; }
.leaflet-popup-content { font-family: var(--ff-body); }
.popup-name { font-family: var(--ff-display); font-weight: 700; color: var(--navy); margin-bottom: 2px; }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 56px 20px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--bg-soft); }
.empty h3 { color: var(--navy); font-size: 1.3rem; }
.empty p { color: var(--muted); max-width: 460px; margin: 10px auto 22px; }

/* ---------- Bands ---------- */
.band { padding: 64px 0; border-top: 1px solid var(--line); }
.band-accent { background: var(--bg-soft); }
.section-title { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; color: var(--navy); letter-spacing: -.01em; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  font-family: var(--ff-display); font-weight: 800; color: #fff; background: var(--orange);
  margin-bottom: 14px;
}
.step h3 { color: var(--navy); font-size: 1.2rem; margin-bottom: 6px; }
.step p { color: var(--muted); margin: 0; }

/* Forms */
.notify-inner, .missing-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.notify-copy p, .missing-copy p { color: var(--muted); font-size: 1.05rem; margin-top: 12px; max-width: 460px; }
.card-form {
  display: flex; flex-direction: column; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.card-form label { font-family: var(--ff-display); font-size: .78rem; font-weight: 700; letter-spacing: .04em; color: var(--muted); margin-top: 8px; }
.card-form input {
  font-family: var(--ff-body); font-size: 1rem; color: var(--ink);
  border: 1px solid var(--line); background: var(--bg-soft);
  border-radius: var(--radius-sm); padding: 12px 14px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.card-form input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
.card-form .btn { margin-top: 16px; }
.form-status { font-size: .9rem; margin: 6px 0 0; min-height: 1.1em; }
.form-status.ok { color: var(--ok); font-weight: 600; }
.form-status.err { color: #C0392B; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #fff; padding: 48px 0 36px; margin-top: 0; }
.footer-inner { display: flex; flex-direction: column; gap: 18px; }
.site-footer .brand-name { color: #fff; font-size: 1.4rem; }
.disclaimer { color: #B8C4DA; font-size: .92rem; max-width: 720px; margin: 10px 0 0; line-height: 1.6; }
.disclaimer strong { color: #fff; }
.footer-fine { color: #8295B5; font-size: .82rem; margin: 6px 0 0; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(22,40,74,.55); }
.modal-card {
  position: relative; z-index: 1; width: 100%; max-width: 520px;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lift);
  padding: 28px; max-height: 88vh; overflow: auto;
}
.modal-close { position: absolute; top: 12px; right: 14px; border: 0; background: none; font-size: 1.8rem; line-height: 1; color: var(--muted); cursor: pointer; }
.modal-cat { display: inline-block; margin-bottom: 10px; }
.modal-card h2 { color: var(--navy); font-size: 1.6rem; margin-bottom: 6px; }
.modal-meta { color: var(--muted); margin: 4px 0 16px; }
.modal-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.modal-note { font-size: .86rem; color: var(--muted); background: var(--bg-soft); border-radius: var(--radius-sm); padding: 12px 14px; margin-top: 16px; }
.modal-actions { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid, .steps { grid-template-columns: repeat(2,1fr); }
  .notify-inner, .missing-inner { grid-template-columns: 1fr; gap: 24px; }
  .header-nav { display: none; }
}
@media (max-width: 600px) {
  .grid, .steps { grid-template-columns: 1fr; }
  .searchbar { flex-direction: column; align-items: stretch; }
  .field input, .field select { min-width: 0; width: 100%; }
  .searchbar-go { width: 100%; }
  .hero-inner { padding: 44px 22px 32px; }
}

/* ---------- Accessibility ---------- */
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto; } }
