/* =========================================================
   Hephzibah Autism Unit – main stylesheet
   Change the colours and fonts here and the whole site updates.
   ========================================================= */

:root {
  --tea: #1E4D3A;        /* deep tea-green: headers, footer, headings */
  --tea-soft: #E6EEE8;   /* pale green: section backgrounds */
  --maize: #E8B931;      /* maize yellow: Donate button, highlights */
  --ink: #1B2420;        /* body text */
  --muted: #4F5D56;      /* secondary text */
  --white: #FFFFFF;
  --line: #CFDAD2;

  --font-head: "Bricolage Grotesque", "Segoe UI", Arial, sans-serif;
  --font-body: "Atkinson Hyperlegible", "Segoe UI", Arial, sans-serif;

  --wrap: 1120px;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--tea); }
a:hover { color: #123227; }
:focus-visible { outline: 3px solid var(--maize); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--tea);
  line-height: 1.15;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; max-width: 68ch; }

.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.section { padding: 4.5rem 0; }
.section--soft { background: var(--tea-soft); }
.lead { font-size: 1.2rem; color: var(--muted); }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--maize); color: var(--ink); padding: .6rem 1rem; z-index: 100;
}
.skip-link:focus { left: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  text-decoration: none;
  padding: .75rem 1.4rem;
  border-radius: 999px;
  border: 2px solid var(--tea);
  color: var(--tea);
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
}
.btn:hover { background: var(--tea); color: var(--white); }
.btn--donate { background: var(--maize); border-color: var(--maize); color: var(--ink); }
.btn--donate:hover { background: #d4a71f; border-color: #d4a71f; color: var(--ink); }
.btn--solid { background: var(--tea); color: var(--white); }
.btn--solid:hover { background: #123227; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 76px;
}
.brand {
  display: flex; align-items: center; gap: .65rem;
  text-decoration: none; color: var(--tea);
  font-family: var(--font-head); font-weight: 700; line-height: 1.05;
}
.brand img { width: 46px; height: 46px; object-fit: contain; }
.brand span small { display: block; font-weight: 500; font-size: .85rem; color: var(--muted); }

.nav { display: flex; align-items: center; gap: .25rem; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav > ul { display: flex; align-items: center; gap: .1rem; }
.nav a, .nav .sub-toggle {
  display: block;
  padding: .55rem .8rem;
  font-family: var(--font-head);
  font-weight: 500; font-size: 1rem;
  text-decoration: none; color: var(--ink);
  background: none; border: 0; border-radius: 8px; cursor: pointer;
}
.nav a:hover, .nav .sub-toggle:hover { background: var(--tea-soft); color: var(--tea); }
.nav a[aria-current="page"] { color: var(--tea); box-shadow: inset 0 -3px 0 var(--maize); border-radius: 0; }
.sub-toggle::after { content: " ▾"; font-size: .8em; }

.has-sub { position: relative; }
.submenu {
  display: none;
  position: absolute; top: 100%; left: 0; min-width: 220px;
  background: var(--white); border: 1px solid var(--line); border-radius: 10px;
  padding: .4rem; box-shadow: 0 10px 30px rgba(30, 77, 58, .12);
}
.has-sub.open .submenu { display: block; }
@media (hover: hover) and (min-width: 961px) {
  .has-sub:hover .submenu { display: block; }
}

.header-actions { display: flex; align-items: center; gap: .6rem; }
.menu-toggle {
  display: none;
  background: none; border: 2px solid var(--tea); color: var(--tea);
  border-radius: 8px; padding: .45rem .7rem; font: 600 1rem var(--font-head); cursor: pointer;
}

@media (max-width: 960px) {
  .menu-toggle { display: inline-block; }
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--white); border-bottom: 1px solid var(--line);
    padding: .5rem 1.25rem 1.25rem;
  }
  .nav.open { display: block; }
  .nav > ul { flex-direction: column; align-items: stretch; }
  .submenu { position: static; box-shadow: none; border: 0; padding: 0 0 0 1rem; }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--maize); }
}

/* ---------- Page hero ---------- */
.hero { background: var(--tea); color: var(--white); padding: 4rem 0 0; overflow: hidden; }
.hero h1 { color: var(--white); max-width: 17ch; }
.hero p { color: #DCE7E0; font-size: 1.15rem; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: end; }
.hero-text { padding-bottom: 4rem; }
.hero .btn { border-color: var(--white); color: var(--white); }
.hero .btn:hover { background: var(--white); color: var(--tea); }
.hero .btn--donate { border-color: var(--maize); color: var(--ink); }
.hero-img img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: 200px 200px 0 0;  /* arch shape */
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 0; }
  .hero-text { padding-bottom: 2rem; }
  .hero-img img { aspect-ratio: 16 / 10; border-radius: 120px 120px 0 0; }
}

.page-head { background: var(--tea); color: var(--white); padding: 3.5rem 0 3rem; }
.page-head h1 { color: var(--white); }
.page-head p { color: #DCE7E0; font-size: 1.15rem; margin: 0; }

/* ---------- Content blocks ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.5rem; align-items: start; }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.item { border-top: 3px solid var(--maize); padding-top: 1rem; }
.item p { color: var(--muted); margin: 0; }
.item h3 a { text-decoration: none; }

.programme { display: grid; grid-template-columns: 320px 1fr; gap: 2.5rem; padding: 2.5rem 0; border-top: 1px solid var(--line); }
.programme:first-of-type { border-top: 0; }
.programme img { border-radius: var(--radius); aspect-ratio: 1; object-fit: cover; }
.programme dl { margin: 0; }
.programme dt { font-family: var(--font-head); font-weight: 600; color: var(--tea); margin-top: .8rem; }
.programme dd { margin: 0; }
@media (max-width: 760px) { .programme { grid-template-columns: 1fr; } }

.targets { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.targets li { border-left: 3px solid var(--maize); padding-left: 1rem; color: var(--muted); }
.targets strong { display: block; font-family: var(--font-head); font-size: 2.6rem; color: var(--tea); line-height: 1; }
@media (max-width: 860px) { .targets { grid-template-columns: repeat(2, 1fr); } }

.quote { font-family: var(--font-head); font-size: clamp(1.4rem, 3vw, 2rem); color: var(--tea); line-height: 1.3; margin: 0 0 1rem; max-width: 30ch; }
.quote-by { color: var(--muted); }
.rounded { border-radius: var(--radius); }

.people { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.people li { background: var(--tea-soft); border-radius: var(--radius); padding: 1.5rem; }
.people strong { display: block; font-family: var(--font-head); font-size: 1.2rem; color: var(--tea); }
@media (max-width: 760px) { .people { grid-template-columns: 1fr; } }

.faq details { border-bottom: 1px solid var(--line); padding: 1rem 0; }
.faq summary { font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; color: var(--tea); cursor: pointer; }
.faq details p { margin: .75rem 0 0; }

.placeholder { background: #FFF6D6; padding: 0 .3em; border-radius: 4px; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1rem; max-width: 560px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .form .row { grid-template-columns: 1fr; } }
.form label { display: grid; gap: .3rem; font-weight: 700; font-size: .95rem; }
.form input, .form textarea, .form select {
  font: inherit; padding: .7rem .8rem; border: 1.5px solid var(--line); border-radius: 8px; background: var(--white);
}
.form input:focus, .form textarea:focus { border-color: var(--tea); outline: none; box-shadow: 0 0 0 3px rgba(30, 77, 58, .2); }
.form .check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
.form .check input { margin-top: .35rem; }
.form-note { font-size: .9rem; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--tea); color: #DCE7E0; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.3fr 1fr; gap: 2.5rem; padding: 3.5rem 0 2.5rem; }
.site-footer h2 { color: var(--white); font-size: 1.1rem; margin-bottom: .8rem; }
.site-footer a { color: var(--white); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .4rem; }
.site-footer p { margin: 0 0 .8rem; }
.footer-brand { font-family: var(--font-head); font-weight: 700; color: var(--white); font-size: 1.2rem; margin-bottom: .6rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .15); padding: 1.2rem 0 1.6rem; font-size: .9rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; }
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: 1.2rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Policy pages ---------- */
.policy h2 { margin-top: 2.5rem; font-size: 1.5rem; }
.policy table { width: 100%; max-width: 820px; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: .97rem; }
.policy th, .policy td { text-align: left; vertical-align: top; padding: .6rem .8rem; border-bottom: 1px solid var(--line); }
.policy th { background: var(--tea-soft); color: var(--tea); font-family: var(--font-head); }
.policy ul, .policy ol, .section ol { max-width: 68ch; padding-left: 1.2rem; }
