/* ==========================================================
   Higher than Hope (HtH) – shared stylesheet
   1. Tokens  2. Base  3. Header/Nav  4. Hero  5. Sections
   6. Cards/Grids  7. Buttons  8. Footer  9. Responsive
   ========================================================== */

/* 1. TOKENS – colours taken from the HtH logo */
:root{
  --brand:#0A5C9C;      /* deep blue from the logo swoosh */
  --brand-dark:#06314D; /* footer / dark areas */
  --sky-blue:#3DBBEE;   /* the bird's sky blue */
  --accent:#9DC83C;     /* lime green from the logo swoosh – buttons & highlights */
  --green:#5E9E3A;      /* darker green for ticks / growth */
  --sky:#E8F6FD;        /* soft section background */
  --ink:#1D2B36;        /* body text */
  --muted:#5B6B77;
  --white:#fff;
  --radius:14px;
  --font-head:'Bricolage Grotesque',Georgia,sans-serif;
  --font-body:'Source Sans 3',system-ui,sans-serif;
}

/* 2. BASE */
*{box-sizing:border-box;margin:0}
html{scroll-behavior:smooth}
body{font-family:var(--font-body);color:var(--ink);line-height:1.65;font-size:1.05rem}
h1,h2,h3{font-family:var(--font-head);line-height:1.15;color:var(--brand)}
h1{font-size:clamp(2.2rem,5vw,3.8rem)} h2{font-size:clamp(1.7rem,3.2vw,2.4rem);margin-bottom:.6rem} h3{font-size:1.25rem;margin-bottom:.4rem}
p{margin-bottom:1rem;max-width:68ch} img{max-width:100%;display:block}
a{color:var(--brand)} :focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.wrap{width:min(1120px,92%);margin-inline:auto}

/* 3. HEADER / NAV */
.site-header{position:sticky;top:0;z-index:50;background:var(--white);box-shadow:0 1px 0 #e3ebf0}
.nav{display:flex;align-items:center;justify-content:space-between;padding:.7rem 0}
.brand{display:flex;align-items:center;gap:.6rem;text-decoration:none;font-family:var(--font-head);font-weight:700;color:var(--brand);font-size:1.2rem}
.brand img{height:48px;width:auto}
.nav ul{display:flex;gap:1.6rem;list-style:none;padding:0;align-items:center}
.nav a.link{text-decoration:none;color:var(--ink);font-weight:600}
.nav a.link:hover,.nav a.active{color:var(--brand);border-bottom:3px solid var(--accent)}
.menu-btn{display:none;background:none;border:2px solid var(--brand);border-radius:8px;padding:.3rem .7rem;font-size:1.2rem;color:var(--brand);cursor:pointer}

/* 4. HERO – photo goes in images/ ; gradient shows until it is added */
.hero{position:relative;color:var(--white);background:linear-gradient(120deg,var(--brand-dark),var(--brand) 55%,var(--sky-blue));overflow:hidden}
.hero img.bg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.35}
.hero .wrap{position:relative;padding:clamp(4rem,10vw,8rem) 0}
.hero h1{color:var(--white);max-width:16ch} .hero p{font-size:1.25rem;max-width:52ch;margin:1.2rem 0 1.8rem}
.hero.small .wrap{padding:3.5rem 0}
.hero.small h1{max-width:none;font-size:clamp(2rem,4vw,3rem)}

/* 5. SECTIONS */
section{padding:clamp(3rem,7vw,5.5rem) 0}
.tint{background:var(--sky)}
.split{display:grid;grid-template-columns:1fr 1fr;gap:3rem;align-items:center}
.photo{aspect-ratio:4/3;border-radius:var(--radius);background:linear-gradient(135deg,var(--sky),#cfe5f2);overflow:hidden}
.photo img{width:100%;height:100%;object-fit:cover}
.lead{font-size:1.2rem;color:var(--muted)}
.quote{font-family:var(--font-head);font-size:clamp(1.4rem,3vw,2rem);color:var(--brand);border-left:6px solid var(--accent);padding-left:1.2rem;max-width:30ch}

/* 6. CARDS / GRIDS */
.grid{display:grid;gap:1.5rem;grid-template-columns:repeat(auto-fit,minmax(250px,1fr))}
.card{background:var(--white);border-radius:var(--radius);padding:1.6rem;border-top:5px solid var(--accent);box-shadow:0 6px 18px rgba(11,60,93,.08)}
.card.green{border-top-color:var(--green)} .card.blue{border-top-color:var(--brand)}
.tag{display:inline-block;background:var(--sky);color:var(--brand);font-weight:700;font-size:.85rem;padding:.2rem .7rem;border-radius:99px;margin-bottom:.7rem}
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:1rem;text-align:center}
.stats strong{display:block;font-family:var(--font-head);font-size:2.6rem;color:var(--brand)}
.people{display:grid;gap:1.5rem;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));text-align:center}
.people .avatar{aspect-ratio:1;border-radius:50%;background:var(--sky);margin:0 auto .8rem;width:150px;overflow:hidden}
.people .avatar img{width:100%;height:100%;object-fit:cover}
.people small{color:var(--muted)}
ul.ticks{list-style:none;padding:0} ul.ticks li{padding-left:1.8rem;position:relative;margin-bottom:.5rem}
ul.ticks li::before{content:"✓";position:absolute;left:0;color:var(--green);font-weight:700}

/* 7. BUTTONS */
.btn{display:inline-block;background:var(--accent);color:var(--brand-dark);font-weight:700;padding:.8rem 1.6rem;border-radius:99px;text-decoration:none;transition:transform .15s}
.btn:hover{transform:translateY(-2px)} .btn.outline{background:none;border:2px solid currentColor;color:var(--white)}
.cta{background:var(--brand);color:var(--white);text-align:center} .cta h2{color:var(--white)} .cta p{margin-inline:auto}

/* 8. FOOTER */
.site-footer{background:var(--brand-dark);color:#c9d8e2;padding:3rem 0 1.5rem;font-size:.95rem}
.site-footer h3{color:var(--white)} .site-footer a{color:#c9d8e2}
.foot-grid{display:grid;gap:2rem;grid-template-columns:2fr 1fr 1fr}
.copy{border-top:1px solid #1f4660;margin-top:2rem;padding-top:1rem;font-size:.85rem}

/* 9. RESPONSIVE */
@media(max-width:820px){
  .split,.foot-grid{grid-template-columns:1fr}
  .menu-btn{display:block}
  .nav ul{display:none;position:absolute;top:100%;left:0;right:0;background:var(--white);flex-direction:column;padding:1rem;gap:1rem;box-shadow:0 8px 12px rgba(0,0,0,.1)}
  .nav ul.open{display:flex}
}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

/* ==========================================================
   10. LIVELY ENHANCEMENTS
   ========================================================== */

/* Headings get the logo's swoosh as an underline */
h2::after{content:"";display:block;width:70px;height:6px;border-radius:99px;margin-top:.6rem;
  background:linear-gradient(90deg,var(--accent),var(--sky-blue),var(--brand))}
.cta h2::after,.hero h1::after{margin-inline:auto}
.hero h2::after,.hero h1::after{display:none}

/* Hero: bird watermark + curved bottom edge */
.hero::before{content:"";position:absolute;right:-4%;top:50%;width:min(46vw,520px);aspect-ratio:1;
  transform:translateY(-50%);background:url(../images/logo-mark.png) center/contain no-repeat;opacity:.13;
  filter:brightness(0) invert(1)}
.hero::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:70px;z-index:2;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 70' preserveAspectRatio='none'%3E%3Cpath d='M0 70V30C240 0 480 0 720 25s480 35 720 5v40z' fill='%23fff'/%3E%3C/svg%3E") center/100% 100% no-repeat}
.hero .wrap{z-index:1}
.hero:not(.small) .wrap{padding-bottom:clamp(6rem,12vw,9rem)}
.hero.small .wrap{padding-bottom:5.5rem}
/* One orchestrated page-load moment */
.hero h1,.hero p,.hero .btn{animation:rise .8s both}
.hero p{animation-delay:.15s}.hero .btn{animation-delay:.3s}
@keyframes rise{from{opacity:0;transform:translateY(24px)}to{opacity:1;transform:none}}

/* Photos: offset colour frame, gentle zoom, bird watermark while empty */
.photo{position:relative;box-shadow:14px 14px 0 var(--accent);
  background:url(../images/logo-mark.png) center/32% no-repeat,linear-gradient(135deg,var(--sky),#cfeaf8)}
.tint .photo{box-shadow:14px 14px 0 var(--sky-blue)}
.photo img{transition:transform .6s}.photo:hover img{transform:scale(1.06)}
.split>.photo:first-child{box-shadow:-14px 14px 0 var(--sky-blue)}

/* Cards lift on hover (answers the person's pointer) */
.card{transition:transform .25s,box-shadow .25s}
.card:hover{transform:translateY(-6px);box-shadow:0 14px 28px rgba(10,92,156,.16)}

/* Impact band */
.band{background:linear-gradient(120deg,var(--brand-dark),var(--brand) 60%,var(--sky-blue));color:var(--white)}
.band .stats strong{color:var(--white);font-size:3.2rem}

/* Photo gallery strip (home) */
.gallery{display:grid;gap:1rem;grid-template-columns:2fr 1fr 1fr;grid-auto-rows:220px}
.gallery .photo{aspect-ratio:auto;box-shadow:none;height:100%}
.gallery .photo:first-child{grid-row:span 2}

/* Header gets a shadow once scrolled */
.site-header.scrolled{box-shadow:0 6px 20px rgba(6,49,77,.12)}

/* Scroll reveal (added by main.js; skipped for reduced motion) */
.reveal{opacity:0;transform:translateY(28px);transition:opacity .7s,transform .7s}
.reveal.in{opacity:1;transform:none}
@media(prefers-reduced-motion:reduce){.reveal{opacity:1;transform:none}.hero h1,.hero p,.hero .btn{animation:none}}
@media(max-width:820px){.gallery{grid-template-columns:1fr 1fr}.gallery .photo:first-child{grid-column:span 2;grid-row:auto}
  .split>.photo:first-child{box-shadow:14px 14px 0 var(--sky-blue)}}

/* ==========================================================
   11. CONTACT PAGE & FORM
   ========================================================== */
.contact-grid{display:grid;grid-template-columns:1fr 1.4fr;gap:3rem;align-items:start}
.contact-info .item{display:flex;gap:1rem;margin-bottom:1.4rem}
.contact-info .icon{flex:none;width:46px;height:46px;border-radius:50%;display:grid;place-items:center;
  background:var(--sky);font-size:1.2rem}
.contact-info strong{display:block;color:var(--brand)}
.form-card{background:var(--white);border-radius:var(--radius);padding:2rem;border-top:5px solid var(--accent);
  box-shadow:0 10px 30px rgba(10,92,156,.12)}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
.field{margin-bottom:1.1rem}
.field label{display:block;font-weight:700;margin-bottom:.3rem;color:var(--brand)}
.field input,.field select,.field textarea{width:100%;font:inherit;padding:.75rem .9rem;border:2px solid #d5e3ec;
  border-radius:10px;background:#fbfdff;transition:border-color .2s,box-shadow .2s}
.field input:focus,.field select:focus,.field textarea:focus{outline:none;border-color:var(--sky-blue);
  box-shadow:0 0 0 4px rgba(61,187,238,.25)}
.field textarea{min-height:150px;resize:vertical}
.field .req{color:#c0392b}
.hp{position:absolute;left:-9999px}              /* honeypot: hidden from people, catches spam bots */
.form-note{font-size:.9rem;color:var(--muted)}
.form-status{margin-top:1rem;padding:.9rem 1rem;border-radius:10px;display:none;font-weight:600}
.form-status.ok{display:block;background:#e6f5d6;color:#2d5a14}
.form-status.err{display:block;background:#fde8e6;color:#8a2a1f}
button.btn{border:0;cursor:pointer;font:inherit;font-weight:700}
@media(max-width:820px){.contact-grid,.form-row{grid-template-columns:1fr}}
