/* ============================================================
   Little Lives Big Impact — DEV (multi-page redesign)
   Blends the live site's content with the client's new
   logo, imagery and teal/sand/gold palette.
   ============================================================ */

:root {
  /* New blended palette */
  --teal:        #2d6b7a;   /* primary (matches new logo) */
  --teal-dark:   #1f5260;   /* deep teal for headings / footer */
  --teal-darker: #173f4a;
  --sage:        #7a9b8e;   /* secondary green */
  --sage-light:  #a8c4b5;
  --gold:        #e0a93f;   /* warm gold accent / CTA */
  --gold-dark:   #c4901f;
  --gold-text:   #8a640d;   /* gold dark enough for text on white (WCAG AA) */
  --gold-edge:   #b5851a;   /* gold button border vs white (AA non-text) */
  --sand:        #e8e5dc;   /* page background */
  --cream:       #fdf9f2;   /* card / soft background */
  --ink:         #1f3a42;   /* body text */
  --muted:       #4f6068;   /* secondary text (darkened for AA on sand bg) */
  --card:        #ffffff;
  --border:      #ded8c9;
  --shadow:      0 10px 30px rgba(31, 82, 96, 0.10);
  --shadow-sm:   0 4px 14px rgba(31, 82, 96, 0.08);
  --radius:      18px;
  --radius-sm:   12px;
  --maxw:        1140px;
  --font: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-head: 'Poppins', 'Inter', 'Segoe UI', sans-serif; /* client's heading font (Manus design) */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(180deg, var(--sand) 0%, #f1eee6 100%);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; display: block; }

/* Headings use Poppins (matches the client's Manus design); body stays Inter */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); }

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-dark); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 600; cursor: pointer;
  padding: .85rem 1.6rem; border-radius: 999px; border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  text-align: center;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--gold); color: #3a2c06; border-color: var(--gold-edge); box-shadow: 0 6px 16px rgba(224,169,63,.35); }
.btn-primary:hover { background: var(--gold-dark); color: #fff; }
.btn-secondary { background: var(--teal); color: #fff; }
.btn-secondary:hover { background: var(--teal-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--teal); border-color: var(--teal); }
.btn-ghost:hover { background: var(--teal); color: #fff; }

/* ---------- Header / Nav ---------- */
/* Default (top of page): lighter bar, links centred, no logo.
   On scroll (.scrolled): solid bar, small logo grows in the middle. */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.65);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: background .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.site-header.scrolled {
  background: rgba(255,255,255,.95);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.nav {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  gap: 1rem; padding: .6rem 1.25rem; max-width: var(--maxw); margin: 0 auto;
}
/* Side brand — only used on mobile */
.brand { display: none; align-items: center; gap: .65rem; }
.brand img { height: 46px; width: auto; }

.nav-links { display: flex; align-items: center; gap: .25rem; flex-wrap: nowrap; }

/* Centre logo that grows in between Services and Contact on scroll */
.nav-links a.nav-logo {
  display: flex; align-items: center; overflow: hidden;
  max-width: 0; opacity: 0; padding: 0 !important; margin: 0;
  /* scrolling UP = exact time-reverse of the .7s forward timeline:
     [0–.4s] logo fades + springs out  ->  [.3–.7s] gap closes.
     delays/easings are the forward ones mirrored in time */
  transition: opacity .3s cubic-bezier(.75,0,.75,.9) .1s,
              max-width .4s cubic-bezier(.8,0,.6,1) .3s,
              margin .4s cubic-bezier(.8,0,.6,1) .3s;
}
.nav-logo img {
  height: 40px; width: auto; max-width: none;
  /* reversed spring = anticipation (the mirror of cubic-bezier(.34,1.56,.64,1)) */
  transform: scale(.75); transition: transform .4s cubic-bezier(.36,0,.66,-.56);
}
.nav-logo:hover { background: none !important; }
/* scrolling DOWN (forward timeline, total .7s):
   [0–.4s] gap opens  ->  [.3–.7s] logo fades + springs in */
.site-header.scrolled .nav-logo {
  max-width: 80px; opacity: 1; margin: 0 .4rem;
  transition: max-width .4s cubic-bezier(.4,0,.2,1),
              margin .4s cubic-bezier(.4,0,.2,1),
              opacity .3s ease .3s;
}
.site-header.scrolled .nav-logo img { transform: scale(1); transition: transform .4s cubic-bezier(.34,1.56,.64,1) .3s; }
.nav-links a, .nav-links button {
  font: inherit; font-weight: 600; color: var(--ink); background: none; border: none; cursor: pointer;
  padding: .5rem .85rem; border-radius: 999px; transition: background .15s, color .15s;
}
.nav-links a:hover, .nav-links button:hover { background: var(--sand); color: var(--teal); }
.nav-links a.active { background: var(--teal); color: #fff; }
.nav-links .nav-cta { background: var(--gold); color: #3a2c06; border: 1.5px solid var(--gold-edge); }
.nav-links .nav-cta:hover { background: var(--gold-dark); color: #fff; }

.nav-toggle { display: none; font-size: 1.6rem; background: none; border: none; color: var(--teal); cursor: pointer; }

@media (max-width: 992px) {
  .nav-toggle { display: block; }
  .nav { justify-content: space-between; }
  .brand { display: flex; }
  .nav-links a.nav-logo { display: none; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: .15rem;
    background: #fff; border-bottom: 1px solid var(--border); padding: .75rem 1rem 1rem;
    box-shadow: var(--shadow-sm);
  }
  .nav-links.open { display: flex; }
  .nav-links a, .nav-links button { padding: .75rem 1rem; border-radius: var(--radius-sm); text-align: left; }
}

/* ---------- Page header band ---------- */
.page-band {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
  color: #fff; padding: 3rem 0 2.6rem; text-align: center;
}
.page-band h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: .5rem; }
.page-band p { color: #d7ecef; max-width: 640px; margin: 0 auto; }

/* ---------- Sections ---------- */
main { flex: 1; }
.section { padding: 3.5rem 0; }
.section.alt { background: var(--cream); }
.section h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); color: var(--teal-dark); text-align: center; margin-bottom: .6rem; }
.section .lead { text-align: center; color: var(--muted); max-width: 720px; margin: 0 auto 2.2rem; font-size: 1.05rem; }
.section h3 { color: var(--teal-dark); }

/* ---------- Hero (home) — centered single column ---------- */
.hero { padding: 3rem 0 1rem; }
.hero-center { max-width: 820px; margin: 0 auto; text-align: center; }
.hero-logo { width: min(420px, 100%); height: auto; margin: 0 auto 1.25rem; }
.hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); color: var(--teal-dark); line-height: 1.1; margin-bottom: 1rem; }
.hero .tagline { font-size: 1.15rem; color: var(--ink); margin: 0 auto 1rem; max-width: 640px; }
.hero .location { display: inline-block; background: var(--sage-light); color: var(--teal-darker); font-weight: 600; padding: .4rem 1rem; border-radius: 999px; font-size: .92rem; margin-bottom: 1.6rem; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; justify-content: center; }
.hero-image { border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; max-width: 760px; margin: 2.4rem auto 0; }
.hero-image img { width: 100%; height: auto; display: block; }

/* Full-width banner image (branded illustrations) */
.banner { max-width: 760px; margin: 0 auto 2rem; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.banner img { width: 100%; height: auto; display: block; }

/* ---------- Feature / card grids ---------- */
.grid { display: grid; gap: 1.25rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .icon { font-size: 2rem; margin-bottom: .6rem; display: block; }
.card h3, .card h4 { color: var(--teal-dark); margin-bottom: .45rem; }
.card p, .card li { color: var(--ink); }
.card ul { margin: .5rem 0 0 1.1rem; }
.card ul li { margin-bottom: .35rem; }

/* service card accent */
.service-card { border-top: 4px solid var(--gold); }
.service-card .num { color: var(--gold-text); font-weight: 800; }

/* ---------- RN highlight banner ---------- */
.highlight {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
  color: #fff; border-radius: var(--radius); padding: 2.2rem; text-align: center;
  box-shadow: var(--shadow);
}
.highlight h2 { color: #fff; }
.highlight p { color: #eaf5f3; max-width: 760px; margin: .5rem auto 0; }

/* ---------- Values / mission ---------- */
.mv-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.25rem; }
@media (max-width: 860px){ .mv-grid { grid-template-columns: 1fr; } }
.mv-card { background: var(--cream); border-left: 5px solid var(--gold); border-radius: var(--radius-sm); padding: 1.4rem; }
.mv-card h3 { margin-bottom: .4rem; }

/* ---------- Contact methods ---------- */
.contact-methods { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.25rem; margin-bottom: 2.2rem; }
@media (max-width: 860px){ .contact-methods { grid-template-columns: 1fr; } }
.contact-item { background: var(--card); border:1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; text-align: center; box-shadow: var(--shadow-sm); color: var(--ink); }
.contact-item .icon { font-size: 1.8rem; }
.contact-item h3 { color: var(--teal-dark); margin: .4rem 0; }
a.contact-item:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

/* ---------- Forms ---------- */
.form-card { background: var(--card); border:1px solid var(--border); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow-sm); max-width: 820px; margin: 0 auto; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px){ .form-row { grid-template-columns: 1fr; } }
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: .35rem; color: var(--teal-dark); font-size: .92rem; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; font: inherit; padding: .7rem .85rem; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); background: #fff; color: var(--ink);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(45,107,122,.15);
}
.form-footer { margin-top: 1rem; color: var(--muted); }
.form-footer-link { background:none;border:none;color:var(--teal);font:inherit;cursor:pointer;text-decoration:underline;padding:0; }
.form-message { padding: .9rem 1.1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-weight: 600; }
.form-message.success { background:#d4edda;color:#155724;border:1px solid #c3e6cb; }
.form-message.error { background:#f8d7da;color:#721c24;border:1px solid #f5c6cb; }

/* ---------- Steps (complaints) ---------- */
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.25rem; margin: 1.5rem 0 2.5rem; }
@media (max-width: 860px){ .steps { grid-template-columns: 1fr; } }
.step { background: var(--cream); border-radius: var(--radius-sm); padding: 1.4rem; text-align: center; }
.step .step-number { width: 42px;height:42px;border-radius:50%;background:var(--teal);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800;margin:0 auto .7rem; }

/* ---------- CTA strip ---------- */
.cta-strip { text-align: center; }
.cta-strip .btn { margin: .35rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--teal-darker); color: #cfe3e6; margin-top: 2rem; }
.footer-content { display: grid; grid-template-columns: repeat(3,1fr); gap: 2.5rem; padding: 2.8rem 1.5rem; max-width: var(--maxw); margin: 0 auto; }
.footer-content > div { text-align: center; }
@media (max-width: 760px){ .footer-content { grid-template-columns: 1fr; gap: 2rem; } }
.site-footer h4 { color: #fff; margin-bottom: .7rem; }
.site-footer a, .site-footer button { color: #cfe3e6; background:none;border:none;font:inherit;cursor:pointer;padding:0; }
.site-footer a:hover, .site-footer button:hover { color: var(--gold); }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: .4rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); text-align: center; padding: 1.1rem; font-size: .85rem; color: #9fbdc2; }

/* ---------- Modal (Splose signup) ---------- */
.modal { display: none; position: fixed; inset: 0; z-index: 100; background: rgba(23,63,74,.6); padding: 2rem 1rem; }
.modal.show { display: flex; align-items: flex-start; justify-content: center; }
.modal-content { background:#fff; border-radius: var(--radius); width: 100%; max-width: 760px; max-height: 90vh; display:flex; flex-direction:column; overflow:hidden; box-shadow: var(--shadow); }
.modal-header { display:flex; align-items:center; justify-content:space-between; padding: 1rem 1.4rem; background: var(--teal); color:#fff; }
.modal-header h3 { color:#fff; }
.modal-close { background:none;border:none;color:#fff;font-size:1.8rem;line-height:1;cursor:pointer; }
.modal-body { flex:1; overflow:auto; }
.modal-iframe { width:100%; height:70vh; border:0; }

.dev-banner { background: var(--gold); color:#3a2c06; text-align:center; font-weight:600; font-size:.88rem; padding:.4rem 1rem; }

/* ---------- Accessibility ---------- */
/* Visible keyboard focus (dark by default; light on dark backgrounds) */
:focus-visible { outline: 3px solid var(--teal-dark); outline-offset: 2px; }
.site-footer :focus-visible, .modal-header :focus-visible, .page-band :focus-visible { outline-color: #fff; }

/* Skip-to-content link — hidden until focused */
.skip-link {
  position: absolute; left: 8px; top: -56px; z-index: 200;
  background: var(--teal-dark); color: #fff; padding: .65rem 1.1rem;
  border-radius: 8px; font-weight: 600; transition: top .2s ease;
}
.skip-link:focus { top: 8px; }

/* Screen-reader-only (visually hidden but announced) */
.sr-only {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

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