/* ============================================================
   HEARTHWELL CIC — global stylesheet
   Community Interest Company website · warm, accessible, responsive
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Brand — warm hearth palette */
  --brand-700: #8C3D17;          /* deep ember — hover states        */
  --brand-600: #A84A1F;          /* primary terracotta (on light)    */
  --brand-500: #C2602F;          /* vivid ember — decorative         */
  --teal-700:  #144E47;          /* deep teal — headings on cream    */
  --teal-600:  #1B625A;          /* teal accents                     */
  --ink:       #2A211A;          /* near-black warm brown            */
  --stone:     #6A5F53;          /* secondary text                   */
  --cream:     #FAF5EE;          /* page background                  */
  --paper:     #FFFFFF;          /* cards / surfaces                 */
  --line:      #E9DFD1;          /* hairline borders                 */
  --sand:      #F2E9DC;          /* tinted section background        */

  /* Type */
  --font-body:  "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-head:  "Fraunces", Georgia, "Times New Roman", serif;

  /* Layout */
  --container: 1120px;
  --radius:    16px;
  --radius-sm: 10px;
  --shadow:    0 10px 30px rgba(42, 33, 26, 0.08);
  --shadow-lg: 0 18px 44px rgba(42, 33, 26, 0.14);

  --focus: 0 0 0 3px rgba(27, 98, 90, 0.45);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;          /* 17px — comfortable reading      */
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
}

img, svg { display: block; max-width: 100%; height: auto; }

a { color: var(--brand-600); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-700); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.6em;
  color: var(--teal-700);
}

h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.35rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.08rem; }

p { margin: 0 0 1.1em; }
ul { padding-left: 1.2em; }

:focus-visible { outline: 3px solid var(--teal-600); outline-offset: 2px; border-radius: 4px; }

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--teal-700);
  color: #fff;
  padding: 0.7rem 1.2rem;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
  font-weight: 600;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Layout helpers ---------- */
.container { max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.section { padding: 4.5rem 0; }
.section--tint { background: var(--sand); }
.section--paper { background: var(--paper); }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-600);
  margin-bottom: 0.7rem;
}

.section-head { max-width: 720px; margin-bottom: 2.5rem; }
.section-head p { color: var(--stone); font-size: 1.08rem; }
.section-head--center { margin-inline: auto; text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--brand-600); color: #fff; }
.btn--primary:hover { background: var(--brand-700); color: #fff; box-shadow: 0 6px 18px rgba(168, 74, 31, 0.35); }

.btn--ghost { border-color: var(--brand-600); color: var(--brand-600); background: transparent; }
.btn--ghost:hover { background: var(--brand-600); color: #fff; }

.btn--light { background: #fff; color: var(--brand-700); }
.btn--light:hover { background: var(--sand); color: var(--brand-700); }

.btn--outline-light { border-color: rgba(255,255,255,0.7); color: #fff; background: transparent; }
.btn--outline-light:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* ---------- Header / nav ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 245, 238, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
}

.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.brand__mark { width: 42px; height: 42px; flex: none; }
.brand__name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  color: var(--teal-700);
  line-height: 1.05;
}
.brand__name small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--brand-600);
  text-transform: uppercase;
}

.nav__toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  padding: 10px;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav__toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-links {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  padding: 0.6rem 20px 1.2rem;
  box-shadow: 0 16px 30px rgba(42,33,26,0.08);
}
.nav-links.is-open { display: block; }
.nav-links ul { list-style: none; margin: 0; padding: 0; }
.nav-links li + li { margin-top: 0.2rem; }
.nav-links a {
  display: block;
  padding: 0.6rem 0.5rem;
  text-decoration: none;
  font-weight: 600;
  color: var(--ink);
  border-radius: 8px;
}
.nav-links a:hover { color: var(--brand-600); background: var(--sand); }
.nav-links a[aria-current="page"] { color: var(--brand-600); }
.nav-links .btn { margin: 0.9rem 0.5rem 0.2rem; }

@media (min-width: 900px) {
  .nav__toggle { display: none; }
  .nav-links { position: static; display: block; background: none; box-shadow: none; border: 0; padding: 0; }
  .nav-links ul { display: flex; align-items: center; gap: 0.4rem; }
  .nav-links li + li { margin-top: 0; }
  .nav-links a { padding: 0.5rem 0.9rem; }
  .nav-links .btn { margin: 0 0 0 0.6rem; }
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1000px 420px at 85% -10%, rgba(194, 96, 47, 0.5), transparent 60%),
    radial-gradient(700px 360px at -10% 110%, rgba(27, 98, 90, 0.55), transparent 60%),
    linear-gradient(150deg, #2A211A 0%, #3A2B1E 55%, #452B18 100%);
  color: #F5EFE4;
  padding: 5rem 0 5.5rem;
}
.hero__inner { max-width: 820px; }
.hero .eyebrow { color: #F0A873; }
.hero h1 { color: #FFF8EE; margin-bottom: 0.5em; }
.hero p.lede { font-size: 1.22rem; color: #E9DCCB; margin-bottom: 1.6rem; max-width: 62ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #F0A873;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  margin-bottom: 1.6rem;
}
.hero--short { padding: 3.4rem 0 3.6rem; }
.hero--short .hero__inner { max-width: 760px; }
.hero--short h1 { font-size: clamp(1.9rem, 4.4vw, 2.7rem); }

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 1.3rem;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.7rem 1.6rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.card__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--sand);
  color: var(--brand-600);
  display: grid;
  place-items: center;
  margin-bottom: 1.1rem;
}
.card h3 { margin-bottom: 0.4em; }
.card p { color: var(--stone); font-size: 0.98rem; margin-bottom: 0; }
.card a.card__link { margin-top: auto; padding-top: 0.9rem; font-weight: 600; }

/* ---------- Chips (who we help) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 1.05rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--teal-700);
  box-shadow: var(--shadow);
}
.chip svg { color: var(--brand-600); }

/* ---------- Story / split layout ---------- */
.split {
  display: grid;
  gap: 2.2rem;
  align-items: center;
}
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; } }

/* Photo frame — real photography (previously a placeholder block) */
.photo {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
  background: var(--sand);
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo--tall img { aspect-ratio: 4 / 3; }
.photo--wide img { aspect-ratio: 16 / 10; }
.photo--label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2.2rem 1.3rem 0.9rem;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: linear-gradient(to top, rgba(20, 18, 14, 0.78), transparent);
  margin: 0;
}
@media (max-width: 480px) { .photo--label { display: none; } }

/* ---------- Values ---------- */
.values-grid { display: grid; gap: 1.3rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.value {
  background: var(--paper);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 1.6rem;
  border-top: 4px solid var(--brand-500);
}
.value h3 { margin-bottom: 0.4em; }
.value p { color: var(--stone); font-size: 0.98rem; margin-bottom: 0; }

/* ---------- Team ---------- */
.team-grid { display: grid; gap: 1.3rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.team-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.team-card__avatar {
  width: 74px; height: 74px;
  margin: 0 auto 0.9rem;
  border-radius: 50%;
  background: var(--sand);
  color: var(--teal-700);
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 600;
}
.team-card h3 { margin-bottom: 0.15em; font-size: 1.12rem; }
.team-card .team-card__role { color: var(--brand-600); font-weight: 600; font-size: 0.88rem; margin-bottom: 0.7em; }
.team-card p { color: var(--stone); font-size: 0.92rem; margin-bottom: 0; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background:
    radial-gradient(600px 300px at 90% 10%, rgba(240,168,115,0.4), transparent 60%),
    linear-gradient(150deg, #8C3D17, #A84A1F);
  color: #FDF3E7;
  border-radius: var(--radius);
  padding: 2.6rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.cta-banner h2 { color: #FFF8EE; margin-bottom: 0.35em; }
.cta-banner p { color: #F2DCC5; max-width: 58ch; margin-inline: auto; margin-bottom: 1.5rem; }
.cta-banner__actions { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; }

/* ---------- Programme list ---------- */
.programme {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem 1.7rem;
  display: grid;
  gap: 1.4rem;
  box-shadow: var(--shadow);
}
.programme + .programme { margin-top: 1.3rem; }
.programme__head { display: flex; align-items: flex-start; gap: 1rem; }
.programme__icon {
  width: 54px; height: 54px; flex: none;
  border-radius: 14px;
  background: var(--sand);
  color: var(--brand-600);
  display: grid;
  place-items: center;
}
.programme h3 { margin: 0.15em 0 0.15em; }
.programme .programme__tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-600);
  margin-top: 0.3rem;
}
.programme p { color: var(--stone); font-size: 0.99rem; }
.programme__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.programme__meta li {
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--sand);
  color: var(--teal-700);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
}
@media (min-width: 720px) {
  .programme { grid-template-columns: 1fr; }
}

/* ---------- Steps ---------- */
.steps { display: grid; gap: 1.3rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); counter-reset: step; }
.step {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.6rem 1.6rem;
  box-shadow: var(--shadow);
}
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--brand-500);
}
.step h3 { margin: 0.7em 0 0.35em; }
.step p { color: var(--stone); font-size: 0.97rem; margin-bottom: 0; }

/* ---------- Contact / form ---------- */
.contact-grid { display: grid; gap: 2.4rem; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1fr 1.2fr; } }

.contact-list { list-style: none; margin: 0 0 1.6rem; padding: 0; }
.contact-list li { display: flex; gap: 0.9rem; align-items: flex-start; padding: 0.8rem 0; }
.contact-list li + li { border-top: 1px solid var(--line); }
.contact-list svg { color: var(--brand-600); flex: none; margin-top: 3px; }
.contact-list strong { display: block; font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--stone); }
.contact-list a { font-weight: 600; }

.form-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem 1.6rem;
  box-shadow: var(--shadow);
}
.form-grid { display: grid; gap: 1.1rem; }
@media (min-width: 560px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 0.93rem; }
.field input, .field select, .field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--cream);
  color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--teal-600);
  box-shadow: var(--focus);
}
.field textarea { resize: vertical; min-height: 130px; }
.form-note { grid-column: 1 / -1; font-size: 0.82rem; color: var(--stone); margin: 0; }

.form-success {
  display: none;
  background: #E6F1EC;
  border: 1px solid #BFD8CB;
  color: #144E47;
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  margin-bottom: 1.1rem;
  font-weight: 600;
}
.form-success.is-visible { display: block; }

/* ---------- Footer ---------- */
.footer {
  background: #241C14;
  color: #CBBFA9;
  padding: 3.4rem 0 0;
  margin-top: 2rem;
}
.footer__grid { display: grid; gap: 2rem; padding-bottom: 2.4rem; }
@media (min-width: 760px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer h4 { color: #F5EAD9; font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 1rem; }
.footer p { font-size: 0.94rem; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer ul li + li { margin-top: 0.55rem; }
.footer a { color: #CBBFA9; text-decoration: none; }
.footer a:hover { color: #F0A873; }
.footer .brand__name { color: #F5EAD9; }
.footer__brand { margin-bottom: 1.1rem; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 1.3rem 0;
  font-size: 0.83rem;
  color: #9C8F7A;
}
.footer__bottom .container { display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem; justify-content: space-between; }
.footer__legal { margin: 0.9rem 0 0; font-size: 0.8rem; color: #8A7E6B; line-height: 1.6; }

/* ---------- Reveal-on-scroll (progressive enhancement) ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Small utility ---------- */
.text-center { text-align: center; }
.mt-3 { margin-top: 2.4rem; }
.mb-0 { margin-bottom: 0; }
