/*
  Ally4Inclusion — Fresh, Accessible Theme
  -------------------------------------------------
  This file updates your existing CSS for better responsiveness.
*/

/* =========================
   1) Design Tokens
   ========================= */
:root {
  /* Core palette — soft, inclusive pastels with a modern accent */
  --accent: #0ea5a4;         /* teal */
  --accent-ink: #094c4b;
  --accent-2: #7c3aed;       /* violet accent for subtle highlights */

  --ink: #1f2933;            /* primary text */
  --ink-dim: #3e4c59;        /* secondary text */
  --paper: #f7fafc;          /* page background */

  /* Surfaces */
  --surface: #ffffff;        /* cards, nav */
  --surface-muted: #f1f5f9;  /* soft sections */
  --surface-elev: #ffffff;

  --blush: #f8bbd0;
  --sky: #b3e5fc;

  /* Section tints (very light) */
  --tint-sky: #eef7ff;
  --tint-mint: #ecfbf7;
  --tint-blush: #fff0f6;
  --tint-lav: #f6f1ff;
  --tint-sun: #fff8e7;

  /* Borders & shadows */
  --line: #e6e8eb;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 1px rgba(16, 24, 40, 0.04);
  --shadow-2: 0 8px 24px rgba(16, 24, 40, 0.08);

  /* Radii & spacing */
  --r-card: 16px;
  --r-pill: 999px;
  --r-btn: 12px;
  --space-1: .5rem;
  --space-2: .75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;

  /* Typography scale */
  --font-sans: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  --fs-xs: .82rem;
  --fs-sm: .92rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.4rem;
  --fs-2xl: 1.9rem;
  --fs-3xl: 2.5rem;
}

/* Dark Mode (optional) — enable by setting <html data-theme="dark"> */
html[data-theme="dark"] {
  --paper: #0b1220;
  --surface: #0f172a;
  --surface-muted: #0b1220;
  --surface-elev: #111827;
  --ink: #e5e7eb;
  --ink-dim: #cbd5e1;
  --line: #1f2937;
  --tint-sky: #0e1a2b;
  --tint-mint: #0f1f1d;
  --tint-blush: #231821;
  --tint-lav: #1a1326;
  --tint-sun: #231e12;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, 0.45);
}

/* =========================
   2) Base & Layout
   ========================= */
html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.6;
}

/* Make images naturally responsive */
img { max-width: 100%; height: auto; display: block; }

main {
  max-width: 1120px; /* a bit wider for modern feel */
  margin: 0 auto;
  padding: var(--space-5) var(--space-3);
}

/* Tighten horizontal padding on very small screens */
@media (max-width: 420px) {
  main { padding: var(--space-4) var(--space-2); }
}

section { margin: var(--space-6) 0; }

/* =========================
   3) Header — soft gradient + subtle glass card
   ========================= */
header {
  position: relative;
  overflow: hidden;
  padding: var(--space-5) var(--space-3) calc(var(--space-5) - .5rem);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(120deg, var(--sky), var(--blush));
}

.header-content {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--space-4);
}

header .logo {
  height: 100px;
  width: auto;
  border-radius: 12px;
  box-shadow: var(--shadow-1);
}

/* Scale header elements on smaller screens */
@media (max-width: 720px) {
  .header-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  header .logo {
    height: 72px;
    margin-inline: auto;
  }
}

.header-text { text-align: left; }
header h1 { margin: 0 0 .25rem; font-size: var(--fs-3xl); letter-spacing: .2px; }
header p { margin: 0; font-size: var(--fs-lg); color: var(--ink-dim); }

/* Center text on mobile */
@media (max-width: 720px) {
  .header-text { text-align: center; }
  header h1 { font-size: 2rem; }
  header p { font-size: 1rem; }
}

/* =========================
   4) Navigation — sticky with scroll shadow
   ========================= */
nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.1) blur(6px);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: .8rem 1rem;

  /* Mobile: allow horizontal scroll instead of wrapping */
  overflow-x: auto;
  scrollbar-width: thin;
}

/* Prevent cramped wrapping on phones */
.nav-inner a { white-space: nowrap; }

nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--fs-sm);
  padding: .45rem .75rem;
  border-radius: 8px;
}
nav a:hover { background: var(--surface-muted); }
nav a:focus-visible { outline: 3px solid color-mix(in oklab, var(--accent) 45%, white); outline-offset: 2px; }

/* Adds subtle shadow when scrolled (class toggled by script) */
nav.is-scrolled { box-shadow: var(--shadow-1); }


/* ===== Off-canvas (Slide-in Drawer) Menu ===== */

/* Stop old horizontal nav scrolling */
.nav-inner { overflow: visible; }

/* Toggle button */
.nav-toggle {
  display: none;
  align-items: center;
  gap: .5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .5rem .7rem;
  font-weight: 700;
  cursor: pointer;
}
.nav-toggle-text { font-size: var(--fs-sm); }

/* Desktop links layout */
.nav-links { display: flex; gap: 1rem; }

/* Show hamburger, hide desktop links on mobile */
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-links { display: none; }
}

/* Drawer panel */
.mobile-drawer {
  position: fixed;
  top: 0; left: 0;
  height: 100dvh;
  width: 78%;
  max-width: 320px;
  background: var(--surface);
  box-shadow: var(--shadow-2);
  border-right: 1px solid var(--line);
  transform: translateX(-100%);
  transition: transform .28s ease;
  z-index: 200;
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0.75rem 1rem;
}

/* Drawer header */
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .5rem .25rem .5rem .25rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: .25rem;
}
.drawer-header strong { font-size: 1.05rem; }

.drawer-close {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  padding: .35rem;
  cursor: pointer;
}

/* Drawer links */
.drawer-links {
  display: grid;
  gap: .25rem;
  padding: .5rem .25rem;
}
.drawer-links a {
  display: block;
  padding: .75rem .65rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
}
.drawer-links a:hover { background: var(--surface-muted); }

/* Overlay */
.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  opacity: 0; pointer-events: none;
  transition: opacity .28s ease;
  z-index: 150;
}

/* Open state */
.site-nav.menu-open .mobile-drawer {
  transform: translateX(0);
}
.site-nav.menu-open .drawer-overlay {
  opacity: 1; pointer-events: all;
}

/* Prevent body scroll when menu is open */
@media (max-width: 860px) {
  body.menu-lock { overflow: hidden; }
}

/* Ensure nav itself never scrolls vertically */
.site-nav { overflow: visible; }


/* =========================
   5) Cards & Utilities
   ========================= */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: var(--space-4);
  box-shadow: var(--shadow-1);
}
.card:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); transition: box-shadow .2s ease, transform .2s ease; }

.grid { display: grid; gap: var(--space-4); }
/* Desktop: two columns where requested */
@media (min-width: 860px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
/* Mobile: stack grids */
@media (max-width: 859.98px) { .grid-2 { grid-template-columns: 1fr; } }

.pill {
  display: inline-flex; align-items: center; gap: .5ch;
  background: color-mix(in oklab, var(--accent) 12%, white);
  color: var(--accent-ink);
  padding: .35rem .7rem; border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: 600;
}

.kicker {
  font-size: var(--fs-xs);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

h2 { color: var(--accent-ink); font-size: var(--fs-2xl); margin: 0 0 .6rem; }

/* So text doesn't look too large on small devices */
@media (max-width: 420px) {
  h2 { font-size: 1.5rem; }
}

.list { margin: .25rem 0 0; padding-left: 1.1rem; }
.list li { margin: .45rem 0; }

/* Stats: 4 → 2 → 1 columns responsively */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); margin-top: .8rem; }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .stats { grid-template-columns: 1fr; } }

.stat {
  background: var(--surface);
  border: 1px dashed color-mix(in oklab, var(--accent) 28%, white);
  border-radius: var(--r-card);
  padding: .9rem .8rem; text-align: center; font-weight: 700;
}

/* Buttons — larger tap targets */
.btn { display: inline-block; border: none; cursor: pointer; font-weight: 700; text-decoration: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #35cbc9 100%);
  color: #fff; /* always white */
  padding: .85rem 1.1rem;
  border-radius: var(--r-btn);
  box-shadow: 0 10px 24px rgba(14,165,164,.25);
  transition: all .2s ease;
  min-height: 44px; /* mobile tap size */
}
.btn-primary:hover {
  background: linear-gradient(135deg, #0fbbb9 0%, #3dd6d4 100%);
  color: #fff; /* keep text white */
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(14,165,164,.35);
}
.btn-quiet {
  background: color-mix(in oklab, var(--accent) 12%, white);
  color: var(--accent-ink); padding: .65rem 1rem; border-radius: var(--r-btn);
  min-height: 44px;
}

/* Links */
a { color: color-mix(in oklab, var(--accent), black 8%); }
a:hover { color: var(--accent); }

/* =========================
   6) Section Treatments (fresh look)
   ========================= */
/* Why Inclusion — airy sky */
#why {
  background: linear-gradient(135deg, var(--tint-sky), #ffffff 60%);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: var(--space-5) var(--space-4);
}
#why .card { background: var(--surface-elev); }

/* About — warm sun */
#about {
  background: linear-gradient(135deg, var(--tint-sun), #ffffff 60%);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: var(--space-5) var(--space-4);
}

/* Programs — mint growth */
#programs {
  background: radial-gradient(900px 320px at 10% -10%, rgba(14,165,164,.08), transparent 55%),
              linear-gradient(135deg, var(--tint-mint), #ffffff 60%);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: var(--space-5) var(--space-4);
}

/* Impact — lavender empathy */
#impact {
  background: linear-gradient(135deg, var(--tint-lav), #ffffff 60%);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: var(--space-5) var(--space-4);
}

/* Contact — soft blush */
#contact {
  background: linear-gradient(135deg, var(--tint-blush), #ffffff 60%);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: var(--space-5) var(--space-4);
}

/* Make the contact block behave nicely on mobile
   (your HTML currently has inline styles; these will override them) */
#contact {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
#contact img {
  width: 185px;
  height: 200px;
  object-fit: cover;
  border-radius: 10%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  flex-shrink: 0;
}
@media (max-width: 640px) {
  #contact { flex-direction: column; align-items: flex-start; }
  #contact img {
    width: 100%;
    height: auto;
    border-radius: 14px;
  }
}

/* =========================
   7) Footer
   ========================= */
footer {
  background: linear-gradient(180deg, color-mix(in oklab, var(--accent) 14%, black), #0b0f14);
  color: #fff;
  text-align: center;
  padding: var(--space-5) var(--space-3);
  margin-top: var(--space-6);
}
footer p { margin: 0; opacity: .9; }

/* =========================
   8) Accessibility & Polish
   ========================= */
:focus-visible { outline: 3px solid color-mix(in oklab, var(--accent) 45%, white); outline-offset: 3px; }

/* Motion safety */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Print */
@media print {
  nav, footer { display: none !important; }
  main { max-width: 100%; padding: 0; }
  .card, #why, #about, #programs, #impact, #contact { box-shadow: none; border: 1px solid #ccc; }
}



/* Slider Base */
.slider {
  position: relative;
  max-width: 800px;
  margin: 1.5rem auto;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.slides {
  display: flex;
  transition: transform 0.6s ease;
}

.slides img {
  width: 100%;
  height: auto; /* adjusts to image ratio */
  object-fit: scale-down;
}

/* Slider Controls */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  padding: 0.8rem 1rem;
  cursor: pointer;
  border-radius: 50%;
  font-size: 1.5rem;
  transition: background 0.3s ease;
  z-index: 10;
}

.slider-btn:hover {
  background: rgba(0,0,0,0.8);
}

.slider-btn.prev {
  left: 10px;
}

.slider-btn.next {
  right: 10px;
}


/* =========================
   9) Optional tiny enhancements
   ========================= */
/* Sticky-nav shadow on scroll — this CSS expects a 6-line script:
<script>
  addEventListener('scroll', () => {
    const n = document.querySelector('nav');
    if (!n) return; n.classList.toggle('is-scrolled', scrollY > 2);
  });
</script>
*/

/* If you want nav links centered within a container, keep:
<nav><div class="nav-inner"> ... links ... </div></nav>
*/

/* If you want the CTA style on a link, use:
<a class="btn btn-primary" href="...">Get a Proposal</a>
*/
