:root {
    /* Theme colors */
    --bark: hsl(140, 25%, 18%);
    --bark-deep: hsl(143, 25%, 12%);
    --body-text: hsl(135, 12%, 20%);
    --fern: hsl(135, 25%, 30%);
    --clay: hsl(50, 60%, 40%);
    --clay-dark: hsl(50, 60%, 35%);;
    --clay-alt: hsl(10, 65%, 35%);
    --muted: hsl(129, 6%, 39%);
    --paper: hsl(84, 22%, 95%);
    --rule: hsl(96, 13%, 85%);

    /* Font sizing */
    --font-size-0: 0.875rem;
    --font-size-1: 1.0625rem;
    --font-size-2: 1.25rem;
    --font-size-3: 1.5rem;
    --font-size-4: 2rem;
    --font-size-5: 2.75rem;
    --font-size-6: 3.5rem;

    /* Spacing & layouts */
    --measure: 68ch;
    --space-xs: 0.5rem;
    --space-sm: 0.875rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;

    /* Fonts */
    --font-body: "Barlow", "Segoe UI", system-ui, -apple-system, sans-serif;
    --font-display: "Barlow Condensed", "Barlow", "Segoe UI", system-ui, sans-serif;
}

/* Root styling */

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--body-text);
    font-family: var(--font-body);
    font-size: var(--font-size-1);
    line-height: 1.65;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main { 
    flex: 1 0 auto; 
}

main:focus { 
    outline: none; 
}

img,
svg,
iframe { 
    max-width: 100%; 
}

img { 
    height: auto; 
}

h1, 
h2, 
h3, 
h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.12;
    color: var(--bark-deep);
    letter-spacing: 0.005em;
    margin: 0 0 var(--space-md);
    text-wrap: balance;
}

p { 
    margin: 0 0 var(--space-md); 
}

a {
    color: var(--clay-dark);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.16em;
}

a:hover { 
    color: var(--clay); 
}

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

address {
    font-style: normal;
    display: inline;
}

code {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.9em;
    background: rgba(35, 57, 43, 0.08);
    padding: 0.1em 0.35em;
    border-radius: 3px;
}

.brand__mark,
.footer-logo {
    filter: brightness(0) invert(1);
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */

.wrap {
    width: 100%;
    max-width: 1140px;
    margin-inline: auto;
    padding-inline: var(--space-md);
}

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

.skip-link {
  position: absolute;
  left: var(--space-md);
  top: -100px;
  z-index: 999;
  background: var(--clay);
  color: hsl(0, 0%, 100%);
  padding: 0.75rem 1.25rem;
  font-family: var(--font-display);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s ease-in;
}

.skip-link:focus {
  top: var(--space-md);
  color: hsl(0, 0%, 100%);
}

/* Button styling */

.btn {
    display: inline-block;
    font-family: var(--font-display);
    font-size: var(--font-size-2);
    font-weight: 600;
    line-height: 1.2;
    padding: 0.7em 1.35em;
    border: 2px solid transparent;
    border-radius: 2px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn--solid {
  background: var(--clay-alt);
  border-color: var(--clay-alt);
  color: hsl(0, 0%, 100%);
}

.btn--solid:hover {
  background: color-mix(in srgb, var(--clay-alt) 80%, black);
  border-color: color-mix(in srgb, var(--clay-alt) 80%, black);
  color: hsl(0, 0%, 100%);
}

.btn--ghost {
  background: transparent;
  border-color: currentColor;
  color: var(--bark-deep);
}

.btn--ghost:hover {
  background: var(--bark-deep);
  border-color: var(--bark-deep);
  color: hsl(0, 0%, 100%);
}

.btn__meta {
  font-size: var(--font-size-0);
  opacity: 0.8;
}

.btn-row { margin: var(--space-lg) 0 0; }

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

.site-header {
  background: var(--bark-deep);
  color: hsl(0, 0%, 100%);
  border-bottom: 4px solid var(--clay);
  position: relative;
  z-index: 20;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  min-height: 128px;
  padding-block: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: hsl(0, 0%, 100%);
  text-decoration: none;
  flex-shrink: 0;
}

.brand__mark {
  width: auto;
  height: 100px;
  display: block;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--font-size-2);
  line-height: 1.05;
  letter-spacing: 0.01em;
}

/* Nav toggle — hidden on wide screens, shown on narrow */

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.6rem;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 2px;
  color: hsl(0, 0%, 100%);
  font-family: var(--font-display);
  font-size: var(--font-size-1);
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  cursor: pointer;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  content: "";
}

.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before { position: absolute; top: -6px; }
.nav-toggle__bars::after { position: absolute; top: 6px; }

.site-nav__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
}

/* The secondary pages live in the drawer and the footer, not the desktop bar. */
.site-nav__list--secondary { display: none; }

.site-nav__link {
  display: block;
  font-family: var(--font-display);
  font-size: var(--font-size-2);
  font-weight: 600;
  color: hsl(0, 0%, 100%);
  text-decoration: none;
  padding: 0.45rem 0.7rem;
  border-bottom: 3px solid transparent;
}

.site-nav__link:hover {
  color: hsl(0, 0%, 100%);
  border-bottom-color: rgba(255, 255, 255, 0.45);
}

.site-nav__link.is-current {
  color: hsl(0, 0%, 100%);
  border-bottom-color: var(--clay);
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bark-deep);
    border-bottom: 4px solid var(--clay);
    padding: var(--space-sm) var(--space-md) var(--space-md);
    display: none;
    max-height: calc(100vh - 92px);
    overflow-y: auto;
  }

  .site-nav.is-open { display: block; }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav__list--secondary {
    display: flex;
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
  }

  .site-nav__link {
    padding: 0.7rem 0.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .site-nav__link.is-current {
    border-bottom-color: rgba(255, 255, 255, 0.1);
    box-shadow: inset 3px 0 0 var(--clay);
    padding-left: 0.85rem;
  }

  .site-nav__list--secondary .site-nav__link {
    font-size: var(--font-size-1);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
  }
}

@media (max-width: 480px) {
  .brand__name { font-size: var(--font-size-1); }
  .brand__mark { height: 46px; }
  .site-header__inner { min-height: 96px; }
  .site-nav { max-height: calc(100vh - 76px); }
}

/* --------------------------------------------------------------------------
   Heroes
   -------------------------------------------------------------------------- */

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to right,
    rgb(15 26 19 / 0.88) 0%,
    rgb(15 26 19 / 0.62) 34%,
    rgb(15 26 19 / 0.25) 62%,
    rgb(15 26 19 / 0) 85%
  );
}

.home-hero {
  position: relative;
  overflow: hidden;
  background: var(--bark);
  color: hsl(0, 0%, 100%);
  padding-block: clamp(3rem, 8vw, 5.5rem);
}

.home-hero__inner {
  position: relative;
  z-index: 1;
}

.home-hero__title {
  color: hsl(0, 0%, 100%);
  font-size: clamp(var(--font-size-4), 6vw, var(--font-size-6));
  margin-bottom: var(--space-md);
  max-width: 20ch;
}

.home-hero__standfirst {
  font-size: var(--font-size-2);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.9);
  max-width: 54ch;
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  margin-bottom: 0;
}

.home-hero .btn--ghost {
  color: hsl(0, 0%, 100%);
}

.home-hero .btn--ghost:hover {
  background: hsl(0, 0%, 100%);
  border-color: hsl(0, 0%, 100%);
  color: var(--bark-deep);
}

.page-hero {
  background: var(--bark);
  color: hsl(0, 0%, 100%);
  padding-block: clamp(1.75rem, 4vw, 2.75rem);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 20vh;
  align-content: center;
}

.page-hero { 
  position: relative; 
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to right,
    rgb(15 26 19 / 0.88)  0%,
    rgb(15 26 19 / 0.62) 28%,
    rgb(15 26 19 / 0.22) 55%,
    rgb(15 26 19 / 0)    78%);
}

.page-hero .wrap { 
  position: relative; 
  z-index: 1; 
}

.page-hero__title {
  font-family: var(--font-display);
  font-size: clamp(var(--font-size-3), 4vw, var(--font-size-5));
  font-weight: 700;
  line-height: 1.1;
  color: hsl(0, 0%, 100%);
  margin: 0;
}

/* --------------------------------------------------------------------------
   Sections and prose
   -------------------------------------------------------------------------- */

.section { padding-block: clamp(2.5rem, 6vw, var(--space-xl)); }

.section--tint {
  background: hsl(0, 0%, 100%);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.section__heading {
  font-size: var(--font-size-4);
  margin-bottom: var(--space-lg);
}

.prose { max-width: var(--measure); }

.prose > h1 {
  font-size: clamp(var(--font-size-4), 5vw, var(--font-size-5));
  margin-bottom: var(--space-lg);
}

.prose > h2 { font-size: var(--font-size-4); margin-top: var(--space-lg); }
.prose > h3 { font-size: var(--font-size-3); margin-top: var(--space-lg); }

.prose > h1:first-child,
.prose > h2:first-child,
.prose > h3:first-child { margin-top: 0; }

.prose ul,
.prose ol { padding-left: 1.25rem; margin-bottom: var(--space-md); }

.prose li { margin-bottom: 0.4rem; }

.prose strong { font-weight: 600; }

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.card-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: var(--space-md);
}

.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--fern);
  padding: var(--space-md);
}

.card__title {
  font-size: var(--font-size-3);
  margin-bottom: var(--space-xs);
}

.card__title a {
  color: var(--bark-deep);
  text-decoration: none;
}

.card__title a:hover {
  color: var(--clay-dark);
  text-decoration: underline;
}

.card__body {
  margin: 0;
  font-size: var(--font-size-0);
  color: var(--muted);
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   News
   -------------------------------------------------------------------------- */

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: var(--measure);
}

.post-list__item {
  padding-bottom: var(--space-lg);
  margin-bottom: var(--space-lg);
  border-bottom: 1px solid var(--rule);
}

.post-list__item:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.post-list__title {
  font-size: var(--font-size-3);
  margin-bottom: var(--space-xs);
}

.post-list__title a {
  color: var(--bark-deep);
  text-decoration: none;
}

.post-list__title a:hover {
  color: var(--clay-dark);
  text-decoration: underline;
}

.post-list__meta,
.post-header__meta {
  font-family: var(--font-display);
  font-size: var(--font-size-1);
  font-weight: 500;
  color: var(--muted);
  margin-bottom: var(--space-sm);
}

.post-list__summary { margin-bottom: var(--space-xs); }

.post-list__more {
  font-family: var(--font-display);
  font-weight: 600;
}

.post-header {
  max-width: var(--measure);
  margin-bottom: var(--space-lg);
}

.post-header__title {
  font-size: clamp(var(--font-size-4), 5vw, var(--font-size-5));
  margin-bottom: var(--space-xs);
}

.post-back {
  margin-top: var(--space-lg);
  font-family: var(--font-display);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Empty states
   -------------------------------------------------------------------------- */

.empty-state {
  max-width: var(--measure);
  background: hsl(0, 0%, 100%);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--fern);
  padding: var(--space-lg);
}

.empty-state__title {
  font-size: var(--font-size-3);
  margin-bottom: var(--space-sm);
}

.empty-state p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Gallery
   -------------------------------------------------------------------------- */

.gallery-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-md);
}

.gallery-grid figure {
  margin: 0;
  background: hsl(0, 0%, 100%);
  border: 1px solid var(--rule);
}

.gallery-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery-grid figcaption {
  padding: var(--space-sm);
  font-size: var(--font-size-0);
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

@media (min-width: 860px) {
  .contact-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-xl);
  }
}

.contact-details__heading,
.contact-form__heading,
.form-placeholder__title {
  font-size: var(--font-size-3);
  margin-bottom: var(--space-md);
}

.contact-list {
  list-style: none;
  margin: 0 0 var(--space-lg);
  padding: 0;
}

.contact-list li {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--rule);
}

.contact-list__label {
  display: block;
  font-family: var(--font-display);
  font-size: var(--font-size-0);
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

/* Ratio box stops the map overflowing on narrow screens. */
.map-embed {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.map-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.map-embed__fallback {
  margin-top: var(--space-xs);
  font-size: var(--font-size-0);
}

.contact-form__intro { max-width: var(--measure); }

.field { margin-bottom: var(--space-md); }

.field label {
  display: block;
  font-family: var(--font-display);
  font-size: var(--font-size-1);
  font-weight: 600;
  color: var(--bark-deep);
  margin-bottom: 0.3rem;
}

.field__hint {
  font-weight: 500;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: inherit;
  font-size: var(--font-size-1);
  color: var(--body-text);
  background: hsl(0, 0%, 100%);
  border: 1px solid #B8C2B4;
  border-radius: 2px;
  padding: 0.65rem 0.75rem;
}

.field textarea { resize: vertical; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--fern);
}

.form-placeholder {
  background: hsl(0, 0%, 100%);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--clay);
  padding: var(--space-lg);
}

.form-placeholder__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.form-placeholder__note {
  font-size: var(--font-size-0);
  color: var(--muted);
  margin-bottom: 0;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--rule);
}

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

.site-footer {
  background: var(--bark-deep);
  color: rgba(255, 255, 255, 0.82);
  margin-top: auto;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  padding-block: var(--space-xl);
}

@media (min-width: 700px) {
  .site-footer__grid {
    grid-template-columns: 1.4fr 1fr 1.1fr;
    gap: var(--space-xl);
  }
}

.footer-logo {
  width: auto;
  height: 148px;
  display: block;
  margin-bottom: var(--space-md);
}

.footer-blurb {
  font-size: var(--font-size-0);
  line-height: 1.6;
  max-width: 42ch;
}

.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-display);
  font-size: var(--font-size-1);
  font-weight: 600;
  color: hsl(0, 0%, 100%);
  text-decoration: none;
  border-bottom: 2px solid var(--clay);
  padding-bottom: 2px;
}

.footer-social:hover { color: hsl(0, 0%, 100%); }

.footer-heading {
  font-size: var(--font-size-2);
  color: hsl(0, 0%, 100%);
  text-transform: none;
  margin-bottom: var(--space-sm);
}

.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-list li { margin-bottom: 0.4rem; }

.footer-list a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: var(--font-size-0);
}

.footer-list a:hover {
  color: hsl(0, 0%, 100%);
  text-decoration: underline;
}

.footer-list--contact li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: var(--space-sm);
  font-size: var(--font-size-0);
  line-height: 1.5;
}

.footer-icon {
  flex-shrink: 0;
  color: var(--clay);
  font-size: 1.5rem;
  line-height: 1.5;   /* matches .footer-list--contact li so the glyph sits on the first text line */
}

.footer-social i {
  font-size: 1.15rem;
  line-height: 1;
}

.site-footer__bar {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-block: var(--space-md);
}

.site-footer__bar p {
  margin: 0;
  font-size: var(--font-size-0);
  color: rgba(255, 255, 255, 0.62);
}

/* --------------------------------------------------------------------------
   Back to top
   -------------------------------------------------------------------------- */

.to-top {
  position: fixed;
  right: var(--space-md);
  bottom: var(--space-md);
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: var(--clay);
  border: 0;
  border-radius: 2px;
  color: hsl(0, 0%, 100%);
  cursor: pointer;
  z-index: 30;
}

.to-top[hidden] { display: none; }

.to-top:hover { background: var(--clay-dark); }

.to-top__arrow {
  width: 11px;
  height: 11px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(45deg) translate(2px, 2px);
}

/* --------------------------------------------------------------------------
   Motion preferences
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */

@media print {
  .site-header,
  .site-footer,
  .to-top,
  .skip-link,
  .map-embed { display: none; }

  body { background: #fff; color: #000; }
  .page-hero,
  .home-hero { background: none; color: #000; padding-block: 0; }
  .page-hero__title,
  .home-hero__title { color: #000; }
}
