/*
Theme Name: Wild Spaces Modern
Theme URI: https://www.wildspacesfund.org.uk/
Author: Wild Spaces Fund
Description: A modern, responsive WordPress theme for Wild Spaces Fund, designed for simple upload and activation on Fasthosts-hosted WordPress.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: wildspaces-modern
*/

:root {
  --ws-ink: #14231c;
  --ws-muted: #5c6f65;
  --ws-leaf: #1f6f4a;
  --ws-moss: #7d9f45;
  --ws-sky: #d8e9ef;
  --ws-water: #4d8791;
  --ws-reed: #c59654;
  --ws-sand: #f6f2e8;
  --ws-white: #ffffff;
  --ws-line: rgba(20, 35, 28, 0.14);
  --ws-shadow: 0 18px 60px rgba(20, 35, 28, 0.18);
  --ws-radius: 8px;
  --ws-max: 1180px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ws-ink);
  background: var(--ws-sand);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

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

.skip-link {
  left: 1rem;
  padding: 0.75rem 1rem;
  position: absolute;
  top: -4rem;
  z-index: 100;
  background: var(--ws-white);
}

.skip-link:focus {
  top: 1rem;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 242, 232, 0.92);
  border-bottom: 1px solid var(--ws-line);
  backdrop-filter: blur(16px);
}

.top-strip {
  background: var(--ws-ink);
  color: var(--ws-white);
  font-size: 0.86rem;
}

.top-strip__inner,
.header-inner,
.section-inner {
  width: min(var(--ws-max), calc(100% - 32px));
  margin: 0 auto;
}

.top-strip__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  gap: 1rem;
}

.top-strip a {
  color: var(--ws-white);
  text-decoration: none;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 220px;
  color: var(--ws-ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-right: 0.85rem;
  color: var(--ws-white);
  background: linear-gradient(135deg, var(--ws-leaf), var(--ws-water));
  border-radius: 50%;
  font-weight: 800;
}

.brand-text {
  display: grid;
  line-height: 1.1;
}

.brand-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  font-weight: 700;
}

.brand-tagline {
  color: var(--ws-muted);
  font-size: 0.84rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--ws-line);
  border-radius: var(--ws-radius);
  background: var(--ws-white);
  color: var(--ws-ink);
  cursor: pointer;
}

.menu-toggle span,
.menu-toggle::before,
.menu-toggle::after {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  content: "";
  background: currentColor;
}

.primary-menu,
.primary-menu ul {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  gap: 0.35rem;
  list-style: none;
}

.primary-menu a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 0.72rem;
  border-radius: var(--ws-radius);
  color: var(--ws-ink);
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a {
  background: rgba(31, 111, 74, 0.1);
  color: var(--ws-leaf);
}

.button,
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.75rem 1.1rem;
  border: 0;
  border-radius: var(--ws-radius);
  background: var(--ws-leaf);
  color: var(--ws-white);
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(31, 111, 74, 0.22);
}

.button:hover,
.wp-block-button__link:hover {
  background: #195c3e;
}

.button--light {
  background: var(--ws-white);
  color: var(--ws-ink);
}

.button--outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.58);
  color: var(--ws-white);
  box-shadow: none;
}

.content-area .button--outline {
  border-color: var(--ws-line);
  color: var(--ws-leaf);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: clamp(620px, 88vh, 820px);
  color: var(--ws-white);
  background:
    linear-gradient(90deg, rgba(13, 35, 28, 0.88), rgba(13, 35, 28, 0.56) 46%, rgba(13, 35, 28, 0.12)),
    linear-gradient(180deg, rgba(96, 154, 164, 0.35), rgba(31, 111, 74, 0.22)),
    url("assets/images/grebes.jpg") center / cover no-repeat;
}

.hero::after {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  content: "";
  background:
    radial-gradient(ellipse at 10% 100%, rgba(197, 150, 84, 0.46), transparent 38%),
    linear-gradient(0deg, rgba(20, 35, 28, 0.88), transparent);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  min-height: inherit;
  width: min(var(--ws-max), calc(100% - 32px));
  margin: 0 auto;
  padding: 5rem 0 7rem;
}

.hero-copy {
  width: min(720px, 100%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin: 0 0 1rem;
  color: var(--ws-sky);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 8vw, 6.7rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-lede {
  width: min(650px, 100%);
  margin: 1.4rem 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  margin-top: 2rem;
  gap: 0.85rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(680px, 100%);
  margin-top: 3.2rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.hero-stat {
  min-height: 116px;
  padding: 1.2rem;
  border-right: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-stat:last-child {
  border-right: 0;
}

.hero-stat strong {
  display: block;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1;
}

.hero-stat span {
  display: block;
  margin-top: 0.45rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

.section {
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.section--white {
  background: var(--ws-white);
}

.section--dark {
  background: var(--ws-ink);
  color: var(--ws-white);
}

.section-kicker {
  margin: 0 0 0.7rem;
  color: var(--ws-leaf);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section--dark .section-kicker {
  color: var(--ws-reed);
}

.section-title {
  width: min(760px, 100%);
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1;
  letter-spacing: 0;
}

.section-copy {
  width: min(760px, 100%);
  margin: 1.1rem 0 0;
  color: var(--ws-muted);
  font-size: 1.08rem;
}

.section--dark .section-copy {
  color: rgba(255, 255, 255, 0.74);
}

.intro-grid,
.reserve-grid,
.help-grid,
.footer-grid {
  display: grid;
  gap: 1.5rem;
}

.intro-grid {
  grid-template-columns: 1.1fr 0.9fr;
  align-items: start;
}

.feature-panel {
  padding: clamp(1.4rem, 3vw, 2.2rem);
  background: var(--ws-white);
  border: 1px solid var(--ws-line);
  border-radius: var(--ws-radius);
  box-shadow: var(--ws-shadow);
}

.feature-panel h2,
.feature-panel h3,
.article-card h3,
.reserve-card h3,
.help-card h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  line-height: 1.1;
}

.feature-panel p:last-child,
.article-card p:last-child,
.reserve-card p:last-child,
.help-card p:last-child {
  margin-bottom: 0;
}

.news-link {
  display: inline-flex;
  margin-top: 0.75rem;
  color: var(--ws-leaf);
  font-weight: 800;
}

.image-stack {
  display: grid;
  gap: 1rem;
}

.image-stack img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--ws-radius);
  box-shadow: var(--ws-shadow);
}

.image-stack img:nth-child(2) {
  width: 78%;
  margin-left: auto;
  margin-top: -3rem;
  border: 8px solid var(--ws-sand);
}

.reserve-grid,
.help-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 2rem;
}

.reserve-card,
.help-card,
.article-card {
  overflow: hidden;
  background: var(--ws-white);
  border: 1px solid var(--ws-line);
  border-radius: var(--ws-radius);
}

.reserve-card img,
.article-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.reserve-card__body,
.help-card,
.article-card__body {
  padding: 1.35rem;
}

.help-card {
  min-height: 240px;
}

.help-card .number {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: rgba(31, 111, 74, 0.12);
  color: var(--ws-leaf);
  font-weight: 900;
}

.cta-band {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: clamp(1.6rem, 4vw, 2.5rem);
  background: linear-gradient(135deg, var(--ws-water), var(--ws-leaf));
  border-radius: var(--ws-radius);
  color: var(--ws-white);
}

.cta-band h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
}

.cta-band p {
  margin: 0.7rem 0 0;
  color: rgba(255, 255, 255, 0.82);
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.page-hero {
  padding: clamp(4rem, 8vw, 7rem) 0;
  background: linear-gradient(135deg, var(--ws-ink), #1f4f4e);
  color: var(--ws-white);
}

.content-area {
  width: min(850px, calc(100% - 32px));
  margin: 0 auto;
  padding: 4rem 0;
}

.content-area > *:first-child {
  margin-top: 0;
}

.content-area h2,
.content-area h3 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.1;
}

.legacy-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.legacy-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--ws-radius);
}

.content-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.site-footer {
  padding: 3.5rem 0 2rem;
  background: #0f1c16;
  color: rgba(255, 255, 255, 0.78);
}

.footer-grid {
  grid-template-columns: 1.1fr 0.7fr 0.7fr;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 0.75rem;
  color: var(--ws-white);
  font-family: Georgia, "Times New Roman", serif;
}

.footer-links {
  display: grid;
  gap: 0.4rem;
}

.footer-links a,
.site-footer a {
  color: rgba(255, 255, 255, 0.86);
}

.footer-bottom {
  width: min(var(--ws-max), calc(100% - 32px));
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.9rem;
}

@media (max-width: 920px) {
  .menu-toggle {
    display: inline-block;
  }

  .nav-wrap {
    position: relative;
  }

  .primary-menu,
  .primary-menu ul {
    display: none;
    position: absolute;
    top: 52px;
    right: 0;
    width: min(320px, calc(100vw - 32px));
    padding: 0.75rem;
    background: var(--ws-white);
    border: 1px solid var(--ws-line);
    border-radius: var(--ws-radius);
    box-shadow: var(--ws-shadow);
  }

  .primary-menu.is-open,
  .primary-menu.is-open ul {
    display: grid;
  }

  .primary-menu a {
    width: 100%;
  }

  .intro-grid,
  .reserve-grid,
  .help-grid,
  .article-grid,
  .footer-grid,
  .cta-band {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .hero-stat {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  }

  .hero-stat:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 640px) {
  .top-strip__inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 0.55rem 0;
    gap: 0.15rem;
  }

  .header-inner {
    min-height: 72px;
  }

  .brand {
    min-width: 0;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
  }

  .brand-name {
    font-size: 1.15rem;
  }

  .brand-tagline {
    font-size: 0.72rem;
  }

  .hero {
    min-height: 760px;
  }

  .hero-actions .button {
    width: 100%;
  }
}
