/* ============================================================
   Give Me a Chance NJ — shared design system
   Single stylesheet, linked identically on every page, so the
   site reads as one system instead of five one-off pages.
   ============================================================ */

/* ---- Tokens ---- */
:root {
  --sea-fog: #F1F6F5;
  --sea-fog-deep: #E4EEEC;
  --harbor-ink: #1F2D3D;
  --pine: #2F6E5C;
  --pine-dark: #234F43;
  --pine-light: #E3EFEA;
  --rose: #C65C7C;
  --rose-light: #F9E9EE;
  --gold: #E8AA3D;
  --gold-light: #FCF1DD;
  --blue: #3E7CB1;
  --blue-light: #E7F0F7;
  --white: #FFFFFF;
  --muted: #5B6B72;
  --border: #DCE6E3;

  --font-display: 'Fraunces', 'Iowan Old Style', serif;
  --font-body: 'Karla', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 4px 18px rgba(31, 45, 61, 0.08);
  --shadow-hover: 0 10px 30px rgba(31, 45, 61, 0.14);
  --max: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--sea-fog);
  color: var(--harbor-ink);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--harbor-ink);
  line-height: 1.2;
}

.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;
}

.icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  flex-shrink: 0;
}

/* ---- Focus visibility (never rely on the browser default) ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Skip link ---- */
.skip-link {
  position: absolute; top: -40px; left: 8px;
  background: var(--pine); color: var(--white);
  padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; text-decoration: none;
  z-index: 999; transition: top 0.15s;
}
.skip-link:focus { top: 8px; }

/* ---- Nav ---- */
nav.site-nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex; justify-content: space-between; align-items: center;
  position: sticky; top: 0; z-index: 100;
}
.nav-logo {
  font-family: var(--font-display); font-weight: 600; font-size: 18px;
  color: var(--harbor-ink); text-decoration: none; line-height: 1.2;
  display: flex; align-items: center; gap: 10px;
}
.nav-logo .icon { width: 24px; height: 24px; color: var(--pine); }
.nav-logo span {
  display: block; font-family: var(--font-mono); font-size: 10.5px;
  font-weight: 500; color: var(--muted); letter-spacing: 0.04em;
  text-transform: uppercase; margin-top: 2px;
}
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a {
  font-size: 14px; color: var(--muted); text-decoration: none;
  font-weight: 600; transition: color 0.2s;
}
.nav-links a:hover { color: var(--pine); }
.nav-cta {
  background: var(--pine); color: var(--white) !important;
  padding: 9px 18px; border-radius: 50px;
  font-size: 13.5px; font-weight: 700 !important;
  text-decoration: none; transition: background 0.2s;
  display: inline-flex; align-items: center; gap: 6px;
}
.nav-cta:hover { background: var(--pine-dark); }
.nav-menu-btn {
  display: none; background: none; border: none; cursor: pointer;
  color: var(--harbor-ink); padding: 4px;
}
.nav-menu-btn .icon { width: 24px; height: 24px; }

/* ---- Buttons & links ---- */
.btn-primary {
  background: var(--pine); color: var(--white);
  padding: 14px 26px; border-radius: 50px;
  text-decoration: none; font-weight: 700; font-size: 15px;
  border: none; cursor: pointer; transition: all 0.2s;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 4px 14px rgba(47,110,92,0.28);
}
.btn-primary:hover { background: var(--pine-dark); transform: translateY(-1px); }
.btn-primary .icon { width: 18px; height: 18px; }

.text-link {
  color: var(--pine); text-decoration: none; font-weight: 700;
  font-size: 14.5px; display: inline-flex; align-items: center; gap: 5px;
  border-bottom: 1px solid transparent; transition: border-color 0.15s;
}
.text-link:hover { border-color: var(--pine); }

/* ---- Section rhythm ---- */
.section { padding: 76px 24px; }
.section-inner { max-width: var(--max); margin: 0 auto; }
.eyebrow {
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--pine);
  margin-bottom: 10px;
}
.section h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  margin-bottom: 14px;
}
.section-sub {
  color: var(--muted); max-width: 580px; font-size: 1.02rem; line-height: 1.7;
}

/* ---- Inner-page hero (activities/resources/how-to-teach/contact) ---- */
.hero {
  background: linear-gradient(135deg, var(--pine) 0%, var(--pine-dark) 100%);
  color: var(--white); padding: 52px 32px 44px; text-align: center;
}
.hero h1 { font-size: clamp(26px, 5vw, 40px); color: var(--white); margin-bottom: 12px; }
.hero p { font-size: 16px; opacity: 0.92; max-width: 620px; margin: 0 auto; line-height: 1.6; }

/* ---- Filters ---- */
.filters { max-width: var(--max); margin: -22px auto 0; padding: 0 24px; position: relative; z-index: 10; }
.filter-bar {
  background: var(--white); border-radius: var(--radius);
  padding: 16px 20px; box-shadow: var(--shadow-hover);
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
}
.filter-bar .label {
  font-family: var(--font-mono); font-size: 12px; color: var(--muted);
  font-weight: 600; margin-right: 4px; text-transform: uppercase; letter-spacing: 0.05em;
}
.chip {
  padding: 7px 15px; border-radius: 50px; font-size: 13px;
  border: 1px solid var(--border); background: var(--white);
  cursor: pointer; transition: all 0.15s; font-weight: 600;
  color: var(--muted); font-family: var(--font-body);
  -webkit-appearance: none; appearance: none; line-height: 1.4;
}
.chip:hover { border-color: var(--pine); color: var(--pine); }
.chip.active { background: var(--pine); color: var(--white); border-color: var(--pine); }

.sensory-badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px;
  border-radius: 12px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.sensory-yes { background: var(--pine-light); color: var(--pine-dark); }
.sensory-partial { background: var(--gold-light); color: #8a5c14; }

/* ---- Container / section titles / card grids ---- */
.container { max-width: var(--max); margin: 28px auto; padding: 0 24px 56px; }
.section-title {
  font-family: var(--font-display); font-size: 21px; font-weight: 600;
  color: var(--harbor-ink); margin: 40px 0 18px;
  display: flex; align-items: center; gap: 12px;
}
.section-title:first-child { margin-top: 0; }
.section-title .icon-badge {
  width: 34px; height: 34px; background: var(--pine-light); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.section-title .icon-badge .icon { width: 18px; height: 18px; color: var(--pine-dark); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.card {
  background: var(--white); border-radius: var(--radius);
  padding: 22px; border: 1px solid var(--border);
  transition: all 0.2s; position: relative;
}
.card:hover { box-shadow: var(--shadow-hover); border-color: var(--pine); transform: translateY(-2px); }
.card .card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.card h3 { font-size: 16px; font-weight: 700; color: var(--pine-dark); font-family: var(--font-body); line-height: 1.3; }
.card .category-tag {
  font-family: var(--font-mono); font-size: 10.5px; background: var(--pine-light);
  color: var(--pine-dark); padding: 3px 9px; border-radius: 6px;
  white-space: nowrap; font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em;
}
.card .description { font-size: 13.5px; color: var(--muted); line-height: 1.65; margin-bottom: 12px; }
.card .address {
  font-size: 12.5px; color: var(--muted); display: flex; align-items: flex-start;
  gap: 6px; margin-bottom: 10px;
}
.card .address .icon { width: 14px; height: 14px; color: #94a3b8; margin-top: 1px; }
.card .card-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border);
}
.card .visit-link {
  font-size: 13px; color: var(--pine); font-weight: 700; text-decoration: none;
  display: flex; align-items: center; gap: 4px;
}
.card .visit-link:hover { text-decoration: underline; }
.card .visit-link .icon { width: 14px; height: 14px; }

/* ---- Accordions (details/summary, e.g. how-to-teach step lists) ---- */
details summary {
  cursor: pointer; font-weight: 700; color: var(--pine);
  padding: 6px 0; list-style: none; display: flex; align-items: center; gap: 6px;
}
details summary::-webkit-details-marker { display: none; }
details summary::before {
  content: ''; width: 8px; height: 8px; border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform 0.15s;
}
details[open] summary::before { transform: rotate(45deg); }
details summary:hover { text-decoration: underline; }
details[open] summary { margin-bottom: 10px; }

/* ---- Footer ---- */
footer.site-footer {
  background: var(--harbor-ink); color: rgba(255,255,255,0.72);
  padding: 44px 24px; text-align: center; margin-top: 60px;
}
.footer-inner { max-width: var(--max); margin: 0 auto; }
.footer-logo {
  font-family: var(--font-display); font-size: 19px; color: var(--white);
  font-weight: 600; margin-bottom: 8px;
}
.footer-tagline { font-size: 13.5px; max-width: 460px; margin: 0 auto 20px; line-height: 1.6; }
.footer-links { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.footer-links a { color: rgba(255,255,255,0.65); text-decoration: none; font-size: 13.5px; font-weight: 600; transition: color 0.2s; }
.footer-links a:hover { color: var(--gold); }
.footer-copy { font-size: 12px; opacity: 0.5; }

/* ---- Chat FAB ---- */
.chat-fab {
  position: fixed; bottom: 24px; right: 24px; width: 56px; height: 56px;
  background: var(--pine); color: var(--white); border: none; border-radius: 50%;
  box-shadow: 0 6px 20px rgba(47,110,92,0.4); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.chat-fab:hover { transform: scale(1.08); background: var(--pine-dark); }
.chat-fab .icon { width: 24px; height: 24px; }

/* ---- Contact form ---- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 700; color: var(--harbor-ink); margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; color: var(--harbor-ink); font-family: inherit; transition: border-color 0.15s;
  background: var(--white);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.submit-btn {
  padding: 13px 32px; background: var(--pine); color: var(--white); border: none;
  border-radius: 50px; font-size: 15px; font-weight: 700; cursor: pointer; transition: background 0.15s;
}
.submit-btn:hover { background: var(--pine-dark); }
.submit-btn:disabled { background: var(--muted); cursor: not-allowed; }
.form-status { margin-top: 14px; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; display: none; }
.form-status.success { display: block; background: var(--pine-light); color: var(--pine-dark); }
.form-status.error { display: block; background: var(--rose-light); color: #8a1f3a; }

/* ---- Margin note (signature-element reinforcement) ---- */
.margin-note {
  font-family: var(--font-mono); font-size: 13px; line-height: 1.7; color: var(--harbor-ink);
  background: var(--gold-light); border: 1px solid #f0dcae; border-radius: var(--radius-sm);
  padding: 16px 18px; transform: rotate(-1deg); max-width: 320px;
}

/* ---- Homepage-specific sections ---- */
.home-hero {
  background: var(--sea-fog-deep);
  padding: 64px 24px 56px;
}
.home-hero-inner {
  max-width: var(--max); margin: 0 auto; display: grid;
  grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center;
}
.home-hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  color: var(--pine-dark); background: var(--pine-light);
  padding: 6px 14px; border-radius: 50px; margin-bottom: 18px;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.home-hero h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.2rem); margin-bottom: 18px;
}
.home-hero h1 em { color: var(--pine); font-style: normal; }
.home-hero-sub { font-size: 1.08rem; color: var(--muted); margin-bottom: 28px; line-height: 1.7; max-width: 480px; }
.home-hero-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.home-hero-stat {
  font-family: var(--font-mono); font-size: 13px; color: var(--muted);
}
.home-hero-stat strong { color: var(--harbor-ink); font-weight: 700; }
.home-illustration { width: 100%; height: auto; }

.offer-grid {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px;
}
.offer-featured {
  background: var(--harbor-ink); color: var(--white);
  border-radius: var(--radius-lg); padding: 34px; display: flex; flex-direction: column;
  justify-content: space-between; gap: 24px;
}
.offer-featured .icon-badge {
  width: 44px; height: 44px; background: rgba(255,255,255,0.12); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
}
.offer-featured .icon-badge .icon { width: 24px; height: 24px; color: var(--gold); }
.offer-featured h3 { color: var(--white); font-size: 1.4rem; margin-bottom: 10px; }
.offer-featured p { color: rgba(255,255,255,0.75); font-size: 0.95rem; line-height: 1.7; }
.offer-chat-demo { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.14); border-radius: var(--radius-sm); padding: 16px; }
.offer-chat-line { font-size: 12.5px; line-height: 1.5; margin-bottom: 8px; padding: 8px 12px; border-radius: 10px; max-width: 92%; }
.offer-chat-line.user { background: var(--gold); color: var(--harbor-ink); font-weight: 600; margin-left: auto; }
.offer-chat-line.ai { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.9); }

.offer-side { display: flex; flex-direction: column; gap: 20px; }
.offer-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; display: flex; gap: 16px; align-items: flex-start; text-decoration: none;
  color: var(--harbor-ink); flex: 1; transition: all 0.2s;
}
.offer-card:hover { border-color: var(--pine); box-shadow: var(--shadow); transform: translateY(-2px); }
.offer-card .icon-badge {
  width: 40px; height: 40px; background: var(--pine-light); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.offer-card .icon-badge .icon { width: 21px; height: 21px; color: var(--pine-dark); }
.offer-card h4 { font-size: 15.5px; font-weight: 700; margin-bottom: 5px; font-family: var(--font-body); }
.offer-card p { font-size: 13px; color: var(--muted); line-height: 1.55; }

.voice-section { background: var(--white); }
.voice-grid { display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: start; }
.voice-text p { color: var(--muted); line-height: 1.8; margin-bottom: 16px; font-size: 1.02rem; }
.voice-quote {
  border-left: 3px solid var(--gold); padding-left: 18px; font-family: var(--font-display);
  font-style: italic; color: var(--harbor-ink); font-size: 1.15rem; margin: 22px 0;
}

.explore-section { background: var(--sea-fog-deep); }
.explore-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.explore-pill {
  display: inline-flex; align-items: center; gap: 8px; background: var(--white);
  border: 1px solid var(--border); border-radius: 50px; padding: 9px 16px 9px 10px;
  text-decoration: none; color: var(--harbor-ink); font-size: 13.5px; font-weight: 600;
  transition: all 0.15s;
}
.explore-pill:hover { border-color: var(--pine); color: var(--pine-dark); }
.explore-pill .icon-badge {
  width: 26px; height: 26px; background: var(--pine-light); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.explore-pill .icon-badge .icon { width: 14px; height: 14px; color: var(--pine-dark); }

.divider-illustration { display: block; width: 100%; height: auto; opacity: 0.9; margin: 0 auto; }

/* ---- How-to-teach step cards ---- */
.howto-sensory { margin-bottom: 10px; padding: 8px 12px; background: var(--gold-light); border-radius: var(--radius-sm); border: 1px solid #f0dcae; }
.howto-sensory .label { font-family: var(--font-mono); font-size: 11px; color: #8a5c14; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 3px; }
.howto-sensory .value { font-size: 13px; color: var(--muted); }
.howto-materials { margin-top: 10px; }
.howto-materials .label { font-size: 12px; font-weight: 700; color: var(--harbor-ink); margin-bottom: 4px; }
.howto-materials .value { font-size: 13px; color: var(--muted); }
.howto-tip { margin-top: 8px; font-size: 13px; color: var(--muted); font-style: italic; }
.howto-recommend { margin-top: 10px; padding: 10px 14px; background: var(--pine-light); border-radius: var(--radius-sm); border: 1px solid var(--border); }
.howto-recommend .label { font-family: var(--font-mono); font-size: 11px; color: var(--pine-dark); font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 3px; }
.howto-recommend a, .howto-recommend .plain { font-size: 12.5px; color: var(--pine-dark); word-break: break-word; }
.howto-recommend .plain { font-style: italic; opacity: 0.85; }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .home-hero-inner { grid-template-columns: 1fr; }
  .home-illustration { max-width: 380px; margin: 0 auto; }
  .offer-grid { grid-template-columns: 1fr; }
  .voice-grid { grid-template-columns: 1fr; }
  .voice-grid .margin-note { max-width: 100%; transform: none; }
}
@media (max-width: 640px) {
  .hero h1 { font-size: 24px; }
  .cards { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-links.open { display: flex; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); flex-direction: column; padding: 16px 24px; gap: 16px; border-bottom: 1px solid var(--border); }
  .nav-menu-btn { display: block; }
}
