/* Equal Roots — equalroots.org.uk
   Hand-coded static site. Palette and layout follow the original site. */

:root {
  --gold: #c9962e;
  --gold-dark: #a87b22;
  --green: #2f6f5e;
  --emerald: #0b6e4f;
  --ink: #16211d;
  --body: #3f4a45;
  --sage: #eaf0ee;
  --white: #fff;
  --shadow: 0 4px 16px rgba(22, 33, 29, .16);
  --wrap: 1320px;
  --radius-card: 30px;
}

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--body);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 18px;
  line-height: 1.75;
}

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

a { color: var(--emerald); }
a:hover, a:focus-visible { color: var(--gold-dark); }

h1, h2, h3, h4, h5, h6 { color: var(--ink); margin: 0 0 .6em; line-height: 1.25; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.wrap { width: 88%; max-width: var(--wrap); margin-inline: auto; }

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Header ---------- */

.top-bar { background: var(--green); color: var(--white); font-size: .875rem; }
.top-bar .wrap {
  display: flex; justify-content: flex-end; align-items: center;
  gap: .6rem; min-height: 44px; flex-wrap: wrap;
}
.top-bar p { margin: 0; }
.top-bar img { width: 17px; }
.top-bar a { color: var(--white); text-decoration: underline; }
.top-bar a:hover, .top-bar a:focus-visible { color: #ffe9b8; }

.site-header { background: var(--white); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding: 14px 0;
}
.brand img { width: 175px; height: auto; }

.nav-toggle {
  display: none; background: none; border: 0; padding: .4rem;
  color: var(--ink); cursor: pointer; line-height: 0;
}
.nav-toggle svg { width: 28px; height: 28px; fill: currentColor; }

.site-nav ul {
  list-style: none; display: flex; gap: 2.2rem; margin: 0; padding: 0;
}
.site-nav a {
  color: var(--ink); text-decoration: none; font-size: 1rem; font-weight: 500;
  padding: .3rem 0; border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a:focus-visible { color: var(--gold-dark); border-bottom-color: var(--gold); }
.site-nav a[aria-current="page"] { color: var(--gold-dark); border-bottom-color: var(--gold); }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 600; text-decoration: none; border-radius: 30px;
  padding: .7rem 1.5rem; border: 1px solid transparent; cursor: pointer;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.btn-outline { background: var(--white); color: var(--ink); border-color: var(--gold); font-size: .95rem; }
.btn-outline:hover, .btn-outline:focus-visible { background: var(--gold); color: var(--white); }
.btn-primary { background: var(--gold); color: var(--white); }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--gold-dark); color: var(--white); }
.btn .heart { color: var(--gold); }
.btn-outline:hover .heart, .btn-outline:focus-visible .heart { color: var(--white); }

/* ---------- Home hero ---------- */

.hero {
  position: relative;
  background: #2a2a22 url("../img/hero-roots.jpg") center/cover no-repeat;
  height: 670px;
}
.hero .wrap { position: relative; height: 100%; display: flex; align-items: center; }
.hero-title {
  position: relative; z-index: 3;
  color: var(--white);
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  font-weight: 500;
  line-height: 1.45;
  text-transform: capitalize;
  max-width: 46%;
  margin: 0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .5);
}
.hero-title .mark {
  background: linear-gradient(to bottom, transparent 52%, var(--gold) 52%);
  text-shadow: none;
}

/* The leaf image overhangs the bottom of the hero and crosses the gold wave,
   as it does on the original site. */
.round-img {
  position: absolute; z-index: 3; top: 70px; right: 0;
  width: 430px; height: 650px;
}
.round-img::after {
  content: ""; position: absolute; inset: 0 -14px 0 14px;
  background: var(--gold); border-radius: 316px; z-index: -1;
}
.round-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 316px; }

.wave {
  position: absolute; z-index: 1; left: 0; right: 0; bottom: -1px;
  width: 100%; height: 110px; display: block;
}

/* ---------- Inner page banner ---------- */

.page-banner {
  position: relative;
  background: #2a2a22 url("../img/hero-roots.jpg") center/cover no-repeat;
  min-height: 430px;
  display: grid; place-items: center;
  padding: 40px 20px;
  text-align: center;
}
.page-banner::before { content: ""; position: absolute; inset: 0; background: #000; opacity: .4; }
.page-banner h1 {
  position: relative; color: var(--white); font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 2.7rem); margin: 0;
}

/* ---------- Sections ---------- */

.section { padding: 70px 0; }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 3rem; }
.eyebrow {
  color: var(--gold); font-weight: 700; font-size: 1.05rem;
  text-transform: capitalize; margin: 0 0 .4rem;
}
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); font-weight: 700; }
.section-head p { margin: 0; font-size: 1.05rem; }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

.card {
  background: var(--gold);
  border-radius: var(--radius-card);
  padding: 36px 26px 40px;
  transition: background-color .5s ease, box-shadow .5s ease;
}
.card-icon {
  width: 68px; height: 68px; border-radius: 50%;
  background: var(--white); display: grid; place-items: center;
  margin-bottom: 1.4rem; position: relative;
  transition: background-color .5s ease;
}
.card-icon img { position: absolute; transition: opacity .4s ease; max-width: 28px; }
.card-icon .icon-hover { opacity: 0; }

.card h3 { color: var(--white); font-size: 1.15rem; font-weight: 700; margin-bottom: .9rem; transition: color .5s ease; }
.card ul { margin: 0; padding-left: 1.1rem; }
.card li {
  color: var(--emerald); font-size: .95rem; line-height: 1.6;
  margin-bottom: .9rem; transition: color .5s ease;
}
.card li:last-child { margin-bottom: 0; }
.card li strong { color: var(--white); transition: color .5s ease; }

.card:hover, .card:focus-within { background: var(--white); box-shadow: var(--shadow); }
.card:hover .card-icon, .card:focus-within .card-icon { background: var(--gold); }
.card:hover .icon-base, .card:focus-within .icon-base { opacity: 0; }
.card:hover .icon-hover, .card:focus-within .icon-hover { opacity: 1; }
.card:hover h3, .card:focus-within h3,
.card:hover li strong, .card:focus-within li strong { color: var(--ink); }
.card:hover li, .card:focus-within li { color: var(--body); }

.section-cta { text-align: center; margin-top: 3rem; }

/* ---------- Prose pages ---------- */

.prose { padding: 60px 0 70px; }
.prose .wrap { max-width: 860px; }
.prose h2 { font-size: 1.45rem; margin-top: 2.2rem; }
.prose h2:first-child, .prose h3:first-child, .prose > .wrap > *:first-child { margin-top: 0; }
.prose h3 { font-size: 1.2rem; margin-top: 2rem; color: var(--emerald); }
.prose p { margin: 0 0 1.1rem; font-size: 1.1rem; }
.prose ul { margin: 0 0 1.4rem; padding-left: 1.3rem; }
.prose li { margin-bottom: .55rem; font-size: 1.1rem; }
.prose .lead { font-size: 1.15rem; }
.prose .note { color: var(--body); font-size: .98rem; }

.link-group { margin-bottom: 2.2rem; }

/* ---------- Footer ---------- */

.site-footer-top { background: var(--sage); padding: 55px 0; }
.footer-cols {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem;
}
.footer-cols h2 { color: var(--gold); font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; }
.footer-cols li { margin-bottom: .5rem; }
.footer-cols a { color: var(--body); text-decoration: none; font-size: 1rem; }
.footer-cols a:hover, .footer-cols a:focus-visible { color: var(--gold-dark); text-decoration: underline; }
.footer-cols p { margin: 0 0 .8rem; font-size: 1rem; }
.footer-legal a { display: inline-block; font-size: 1.05rem; margin-bottom: .6rem; }

.footer-search input[type="search"] {
  width: 100%; padding: .7rem .9rem; border: 1px solid #cdd8d4; border-radius: 10px;
  font: inherit; font-size: 1rem; background: var(--white); color: var(--ink);
}
.footer-search button {
  margin-top: 1rem; width: 100%; text-transform: uppercase; letter-spacing: .03em;
  border-radius: 10px; justify-content: center; font-size: 1rem;
}

.site-footer-bottom { background: var(--gold); color: var(--white); text-align: center; padding: 45px 0 35px; }
.site-footer-bottom .footer-logo { display: inline-block; margin-bottom: 1.6rem; }
.site-footer-bottom .footer-logo img { width: 140px; }
.footer-contact { display: flex; align-items: center; justify-content: center; gap: .5rem; margin: 0 0 1rem; }
.footer-contact img { width: 18px; }
.site-footer-bottom a { color: var(--white); text-decoration: underline; }
.site-footer-bottom a:hover, .site-footer-bottom a:focus-visible { color: var(--ink); }
.copyright { margin: 0; font-size: .95rem; }

/* ---------- Search results ---------- */

.search-form-page { display: flex; gap: .6rem; margin-bottom: 2rem; flex-wrap: wrap; }
.search-form-page input[type="search"] {
  flex: 1 1 260px; padding: .75rem 1rem; border: 1px solid #cdd8d4; border-radius: 10px; font: inherit;
}
.results { list-style: none; margin: 0; padding: 0; }
.results li { margin-bottom: 1.8rem; }
.results h2 { font-size: 1.2rem; margin-bottom: .3rem; }
.results a { text-decoration: none; }
.results a:hover { text-decoration: underline; }
.results mark { background: #f6e3b8; color: inherit; }

/* ---------- Responsive ---------- */

@media (max-width: 1300px) {
  .round-img { width: 400px; height: 600px; }
}

@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .hero { height: 600px; }
  .round-img { width: 330px; height: 500px; top: 60px; }
  .hero-title { max-width: 52%; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); row-gap: 2.5rem; }
}

@media (max-width: 900px) {
  .site-header .wrap { flex-wrap: wrap; }
  .brand { order: 1; }
  .nav-toggle { display: block; order: 2; margin-left: auto; }
  .site-nav {
    display: none; order: 3; flex-basis: 100%;
    border-top: 1px solid #e6ebe9; padding-top: 1rem;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav li { border-bottom: 1px solid #f0f3f2; }
  .site-nav a { display: block; padding: .8rem 0; border-bottom: 0; }
  /* The header button lives inside the menu on small screens. */
  .header-cta { order: 4; flex-basis: 100%; display: none; padding-bottom: .5rem; }
  .site-nav.is-open ~ .header-cta { display: block; }
  .header-cta .btn { width: 100%; justify-content: center; }

  .hero { height: auto; padding: 55px 0 110px; }
  .hero .wrap { flex-direction: column; align-items: stretch; gap: 2.5rem; }
  .hero-title { max-width: none; text-align: center; }
  /* Stays position:relative so the gold shape behind it stays anchored to the image. */
  .round-img {
    position: relative; top: auto; right: auto;
    width: min(320px, 100%); height: 420px;
    margin-inline: auto; z-index: 3;
  }
  .wave { height: 70px; }

  .page-banner { min-height: 280px; }
  .section { padding: 50px 0; }
}

@media (max-width: 620px) {
  body { font-size: 17px; }
  .top-bar .wrap { justify-content: center; text-align: center; }
  .cards { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr; }
  .brand img { width: 150px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Email link in the footer columns, matching the original site's styling. */
.footer-cols p a { color: var(--emerald); text-decoration: underline; }
.footer-cols p a:hover, .footer-cols p a:focus-visible { color: var(--gold-dark); }
