/* =====================================================================
   Castle Field Stud Farm: main stylesheet
   Direction: "Limestone & Pasture"

   Mobile-first. Breakpoints are in em so they follow the user's font size:
     48em  (~768px)  tablet / small laptop
     64em  (~1024px) desktop

   Contents
     1. Fonts (self-hosted)
     2. Design tokens
     3. Base and reset
     4. Utilities (skip link, focus, buttons, links)
     5. Header and navigation
     6. Hero
     7. Page sections
     8. Footer
     9. Motion
   ===================================================================== */


/* 1. Fonts ------------------------------------------------------------
   Both are SIL Open Font Licence (licences in /assets/fonts). Served from
   our own domain, so no requests go to Google or anyone else. */

@font-face {
  font-family: "Fraunces";
  src: url("../assets/fonts/fraunces-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("../assets/fonts/fraunces-latin-wght-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("../assets/fonts/source-sans-3-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}


/* 2. Design tokens ---------------------------------------------------- */

:root {
  /* Palette */
  --pasture:      #2F4A35;  /* primary green: headings, links, CTA band */
  --pasture-deep: #233829;  /* hover / pressed */
  --bog-oak:      #3B2F27;  /* footer */
  --limestone:    #E9E5DC;  /* alternate section background */
  --paper:        #F8F6F1;  /* page background */
  --gorse:        #C9A227;  /* accent: ONLY on dark backgrounds (fails on light) */
  --gorse-light:  #DDB943;

  --ink:          #27231E;  /* body text */
  --ink-soft:     #574E44;  /* secondary text (7:1 on --paper) */
  --rule:         #D3CDC1;

  /* Type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:    "Source Sans 3", "Segoe UI", system-ui, sans-serif;

  /* Fluid type scale: min at 20rem viewport, max at 80rem */
  --step--1: clamp(0.875rem, 0.85rem + 0.1vw, 0.95rem);
  --step-0:  clamp(1.0625rem, 1.03rem + 0.17vw, 1.1875rem);
  --step-1:  clamp(1.25rem, 1.18rem + 0.35vw, 1.5rem);
  --step-2:  clamp(1.5rem, 1.35rem + 0.75vw, 2.125rem);
  --step-3:  clamp(1.875rem, 1.6rem + 1.4vw, 3rem);
  --step-4:  clamp(2.375rem, 1.85rem + 2.6vw, 4.5rem);

  /* Spacing */
  --space-xs: 0.5rem;
  --space-s:  1rem;
  --space-m:  1.5rem;
  --space-l:  clamp(2rem, 1.5rem + 2.5vw, 3.5rem);
  --space-xl: clamp(3.5rem, 2.5rem + 5vw, 7rem);

  /* Layout */
  --gutter:  clamp(1.25rem, 0.75rem + 2.5vw, 3rem);
  --wrap:    76rem;
  --measure: 36rem;   /* comfortable line length for body copy */

  --radius-s: 4px;
  --header-h: 4rem;
}


/* 3. Base and reset --------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Stop the sticky header covering anchored headings */
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  font-kerning: normal;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
  color: var(--pasture);
  margin: 0 0 var(--space-s);
  text-wrap: balance;
}

h2 { font-size: var(--step-3); letter-spacing: -0.01em; }
h3 { font-size: var(--step-2); }

p { margin: 0 0 var(--space-s); text-wrap: pretty; }

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

ul { margin: 0; padding: 0; }

a { color: var(--pasture); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--pasture-deep); text-decoration-thickness: 2px; }

/* main gets tabindex="-1" for the skip link; don't outline it */
main:focus { outline: none; }


/* 4. Utilities -------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: var(--space-s);
  top: -10rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--pasture);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius-s);
}
.skip-link:focus { top: var(--space-s); color: #fff; }

/* One clear focus style everywhere: double ring visible on light AND dark */
:focus-visible {
  outline: 3px solid var(--pasture);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--paper);
  border-radius: 2px;
}
.on-dark :focus-visible,
.hero :focus-visible,
.cta :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--gorse-light);
  box-shadow: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;              /* comfortable touch target */
  padding: 0.75rem 1.4rem;
  border: 2px solid transparent;
  border-radius: var(--radius-s);
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

/* Gorse button: dark text on yellow, 8.6:1 */
.button--gorse { background: var(--gorse); color: #231D10; }
.button--gorse:hover { background: var(--gorse-light); color: #231D10; }

/* Outline button for dark/photo backgrounds */
.button--ghost { border-color: rgb(255 255 255 / 0.85); color: #fff; }
.button--ghost:hover { background: #fff; color: var(--pasture); }

.text-link { font-weight: 600; }

.section {
  padding-block: var(--space-xl);
  padding-inline: var(--gutter);
}

/* Tick list used for "what's included" */
.ticks { list-style: none; margin-bottom: var(--space-m); }
.ticks li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.35rem;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.45em;
  width: 0.7rem;
  height: 0.4rem;
  border-left: 2px solid var(--pasture);
  border-bottom: 2px solid var(--pasture);
  transform: rotate(-45deg);
}


/* 5. Header and navigation -------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  max-width: var(--wrap);
  min-height: var(--header-h);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--pasture);
  text-decoration: none;
}
.brand__mark { width: 1.6rem; height: 1.6rem; color: var(--gorse); }
.brand__mark path { stroke: var(--pasture); }
.brand__name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* --- Menu toggle (mobile). Hidden unless JS has run, see .has-js below --- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.85rem;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: var(--radius-s);
  color: var(--pasture);
  font: 600 1rem/1 var(--font-body);
  cursor: pointer;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after  { top: 6px; }

/* Bars become an X when open */
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after  { transform: translateY(-6px) rotate(-45deg); }

.site-nav__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  align-items: center;
}

.site-nav a {
  display: inline-block;
  padding: 0.5rem 0.15rem;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
/* Just above the phone breakpoint, tighten the gaps so the nav stays on one line */
@media (min-width: 48em) and (max-width: 54em) {
  .site-nav__list { gap: 0.25rem 0.85rem; }
}
.site-nav a:hover { color: var(--pasture); text-decoration: underline; }
.site-nav a[aria-current="page"] {
  color: var(--pasture);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.site-nav__cta {
  padding-inline: 1rem !important;
  border: 2px solid var(--pasture);
  border-radius: var(--radius-s);
  color: var(--pasture) !important;
}
.site-nav__cta:hover { background: var(--pasture); color: #fff !important; text-decoration: none !important; }

/*
  Small screens with JS: collapse the nav behind the toggle.
  Without JS the nav simply wraps under the logo, so it always works.
*/
@media (max-width: 47.99em) {
  .has-js .nav-toggle { display: inline-flex; }

  .has-js .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 12px 24px -12px rgb(39 35 30 / 0.25);
    padding: var(--space-xs) var(--gutter) var(--space-m);
  }
  .has-js .site-nav:not(.is-open) { display: none; }

  .has-js .site-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .has-js .site-nav a {
    display: block;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--rule);
    font-size: 1.125rem;
  }
  .has-js .site-nav__cta {
    margin-top: var(--space-s);
    text-align: center;
    border-bottom: 2px solid var(--pasture) !important;
  }

  /* No-JS fallback: logo on one line, links wrap underneath */
  html:not(.has-js) .site-header__inner { flex-wrap: wrap; padding-block: 0.5rem; }
}


/* 6. Hero ------------------------------------------------------------- */

.hero {
  position: relative;
  display: grid;
  /* Tall on phones (matches the 4:5 crop), shorter on wide screens */
  min-height: min(88svh, 52rem);
  color: #fff;
  background: var(--pasture);   /* shows while the image loads */
  overflow: hidden;
}

.hero__media,
.hero__media img {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
}
.hero__media img { object-fit: cover; object-position: 50% 60%; }
/* On phones the foal's head is on the right of the tall photo; keep it in view */
@media (max-width: 47.99em) {
  .hero__media img { object-position: 75% 60%; }
}

/* Gradient so white text always passes contrast, whatever the photo */
/*
  Layers are pinned explicitly: the load animation puts a transform on the
  image, which would otherwise paint it ABOVE this gradient and wash out
  the text. Image 0, gradient 1, text 2.
*/
.hero__media { position: relative; z-index: 0; }

.hero::after {
  content: "";
  position: relative;
  z-index: 1;
  grid-area: 1 / 1;
  background: linear-gradient(to top,
              rgb(20 30 22 / 0.85) 0%,
              rgb(20 30 22 / 0.55) 40%,
              rgb(20 30 22 / 0)    75%);
}

.hero__content {
  grid-area: 1 / 1;
  position: relative;
  z-index: 2;
  align-self: end;
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: var(--space-xl) var(--gutter) var(--space-l);
}

.hero__title {
  max-width: 15ch;
  color: #fff;
  font-size: var(--step-4);
  font-weight: 350;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-m);
}

.hero__lede {
  max-width: 32rem;
  font-size: var(--step-1);
  line-height: 1.45;
  margin-bottom: var(--space-l);
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

@media (min-width: 48em) {
  .hero { min-height: min(82svh, 48rem); }
}


/* 7. Page sections ---------------------------------------------------- */

/* --- Intro: text left, portrait photo right and dropped down a little --- */
.intro {
  display: grid;
  gap: var(--space-l);
  max-width: var(--wrap);
  margin-inline: auto;
}
.intro__text { max-width: var(--measure); }
.intro__text p:not(:last-child) { color: var(--ink); }
.intro__media { margin: 0; }
.intro__media img { border-radius: var(--radius-s); }

@media (min-width: 48em) {
  .intro {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: start;
  }
  .intro__text { padding-top: var(--space-l); }
  .intro__media { margin-top: calc(var(--space-xl) * 0.75); }
}
@media (min-width: 64em) {
  .intro { grid-template-columns: minmax(0, 1fr) 26rem; column-gap: var(--space-xl); }
}

/* --- Boarding: full-width limestone band, photo beside what's included --- */
.boarding {
  background: var(--limestone);
}
.boarding__inner {
  display: grid;
  gap: var(--space-l);
  max-width: var(--wrap);
  margin-inline: auto;
}
.boarding__media img { border-radius: var(--radius-s); }
.boarding__text { max-width: var(--measure); }
.boarding__text > p { color: var(--ink-soft); }
.boarding__rates {
  font-family: var(--font-display);
  font-size: var(--step-1);
  color: var(--pasture) !important;
}

@media (min-width: 48em) {
  .boarding__inner {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    column-gap: var(--space-xl);
    align-items: center;
  }
}

/* --- Facilities: a simple two-column definition list, no icons --- */
.facilities {
  max-width: var(--wrap);
  margin-inline: auto;
}
.facilities__list {
  display: grid;
  gap: var(--space-m) var(--space-l);
  margin: var(--space-l) 0 0;
}
.facilities__list > div {
  padding-top: var(--space-s);
  border-top: 2px solid var(--pasture);
}
.facilities__list dt {
  font-family: var(--font-display);
  font-size: var(--step-1);
  color: var(--pasture);
  margin-bottom: 0.25rem;
}
.facilities__list dd { margin: 0; color: var(--ink-soft); }

@media (min-width: 40em) {
  .facilities__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 64em) {
  .facilities__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* --- Call to action band --- */
.cta {
  background: var(--pasture);
  color: #fff;
  padding-block: var(--space-xl);
  padding-inline: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));
}
.cta__inner { max-width: var(--wrap); margin-inline: auto; }
.cta h2 { color: #fff; max-width: 18ch; }
.cta p { max-width: var(--measure); margin-bottom: var(--space-m); color: #E4EAE2; }


/* 8. Footer ----------------------------------------------------------- */

.site-footer {
  background: var(--bog-oak);
  color: #EDE7DE;
  padding: var(--space-l) 0 var(--space-m);
  padding-inline: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));
}
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--gorse-light); }

.site-footer__inner {
  display: grid;
  gap: var(--space-l);
  max-width: var(--wrap);
  margin-inline: auto;
}
@media (min-width: 48em) {
  .site-footer__inner { grid-template-columns: 2fr 1fr 1fr; }
}

.site-footer__brand {
  font-family: var(--font-display);
  font-size: var(--step-1);
  color: #fff;
  margin-bottom: 0.25rem;
}
.site-footer__heading {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 0.4rem; }
.site-footer p { margin-bottom: 0.4rem; }

.site-footer__legal {
  max-width: var(--wrap);
  margin: var(--space-l) auto 0;
  padding-top: var(--space-s);
  border-top: 1px solid rgb(255 255 255 / 0.18);
  font-size: var(--step--1);
  color: #CFC6B9;
}


/* 9. Motion ------------------------------------------------------------
   One orchestrated moment only: the hero settles in on load. Everything
   is wrapped in no-preference, so reduced-motion users get a static page. */

@media (prefers-reduced-motion: no-preference) {
  .hero__media img {
    animation: hero-settle 1.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .hero__title,
  .hero__lede,
  .hero__actions {
    animation: hero-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .hero__lede    { animation-delay: 0.12s; }
  .hero__actions { animation-delay: 0.24s; }
}

@keyframes hero-settle {
  from { transform: scale(1.06); }
  to   { transform: scale(1); }
}
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(0.75rem); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* 10. Inner pages ------------------------------------------------------
   Shared by every page except the home page. */

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

/* Plain heading band in place of a hero */
.page-head {
  background: var(--limestone);
  padding-block: var(--space-l);
  border-bottom: 1px solid var(--rule);
}
/* Gutter on the inner box, same as the header, so the edges line up */
.page-head__inner { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.page-head h1 {
  font-size: var(--step-4);
  font-weight: 350;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-s);
}
.page-head__lede {
  max-width: var(--measure);
  font-size: var(--step-1);
  line-height: 1.45;
  color: var(--ink-soft);
  margin: 0;
}

/* Solid green button for use on light backgrounds */
.button--pasture { background: var(--pasture); color: #fff; }
.button--pasture:hover { background: var(--pasture-deep); color: #fff; }
.button:disabled { opacity: 0.7; cursor: progress; }


/* 11. Contact page ----------------------------------------------------- */

:root {
  --error: #A3321F;          /* 6.4:1 on --paper */
  --error-bg: #FBEDEA;
  --ok-bg: #E8EFE6;
}

.contact {
  display: grid;
  gap: var(--space-xl);
  max-width: var(--wrap);
  margin-inline: auto;
}
.contact__heading { font-size: var(--step-2); margin-bottom: var(--space-m); }
.contact__form { max-width: 38rem; }

@media (min-width: 64em) {
  .contact {
    grid-template-columns: minmax(0, 1fr) 22rem;
    column-gap: var(--space-xl);
    align-items: start;
  }
}

/* --- Form fields --- */
.field { margin-bottom: var(--space-m); }

.field__label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.field__optional { font-weight: 400; color: var(--ink-soft); }

.field__hint {
  margin: 0 0 0.4rem;
  color: var(--ink-soft);
  font-size: var(--step--1);
}

.field__input {
  display: block;
  width: 100%;
  min-height: 3rem;
  padding: 0.6rem 0.75rem;
  background: #fff;
  border: 2px solid #6F665B;          /* 3:1+ against the page, per WCAG 1.4.11 */
  border-radius: var(--radius-s);
  color: var(--ink);
  font: inherit;
  font-size: max(1rem, 16px);        /* 16px+ stops iOS zooming in on focus */
}
.field__input:focus-visible { border-color: var(--pasture); }
.field__input--medium { max-width: 20rem; }
.field__textarea { min-height: 10rem; resize: vertical; line-height: 1.5; }

select.field__input {
  appearance: none;
  padding-right: 2.5rem;
  background-image: url("../assets/icons/chevron.svg");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 0.85rem;
}

.field__count {
  margin: 0.35rem 0 0;
  font-size: var(--step--1);
  color: var(--ink-soft);
}

/* Error state: red bar down the left, red message, red border */
.field--error {
  padding-left: 0.9rem;
  border-left: 4px solid var(--error);
}
.field--error .field__input { border-color: var(--error); }
.field__error {
  margin: 0 0 0.4rem;
  color: var(--error);
  font-weight: 700;
}

/* Checkbox */
.check { display: flex; gap: 0.75rem; align-items: flex-start; }
.check__input {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  margin: 0.1rem 0 0;
  accent-color: var(--pasture);
}
.check__label { max-width: 32rem; }

/* Turnstile spam check: keep its space so the button doesn't jump when it loads */
.field--spam { min-height: 65px; max-width: 30rem; }

/* Shown only when JavaScript is off */
.form-noscript {
  margin: 0 0 var(--space-m);
  padding: var(--space-s) var(--space-m);
  border-left: 6px solid var(--error);
  background: var(--error-bg);
}

/* Honeypot: moved off-screen rather than display:none, which some bots skip */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --- Error summary --- */
.error-summary {
  margin-bottom: var(--space-l);
  padding: var(--space-m);
  border: 3px solid var(--error);
  border-radius: var(--radius-s);
  background: var(--error-bg);
}
.error-summary:focus-visible { outline-color: var(--error); }
.error-summary__title {
  font-family: var(--font-body);
  font-size: var(--step-1);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.error-summary__list { list-style: none; }
.error-summary__list li { margin-bottom: 0.25rem; }
.error-summary__list a { color: var(--error); font-weight: 700; }

/* --- Sent / not sent message --- */
.form-status {
  margin-top: var(--space-m);
  padding: var(--space-m);
  border-radius: var(--radius-s);
  border-left: 6px solid var(--pasture);
  background: var(--ok-bg);
}
.form-status--error { border-left-color: var(--error); background: var(--error-bg); }
.form-status p { margin: 0; }
.form-status__title {
  font-family: var(--font-display);
  font-size: var(--step-2);
  color: var(--pasture);
  margin-bottom: 0.35rem !important;
}
.form-status--error .form-status__title { color: var(--error); }

/* --- Aside: phone, area, visiting --- */
.reach {
  padding-top: var(--space-s);
  margin-bottom: var(--space-l);
  border-top: 2px solid var(--pasture);
}
.reach__title {
  font-size: var(--step-1);
  margin-bottom: 0.4rem;
}
.reach p { color: var(--ink-soft); }
.reach__big {
  font-family: var(--font-display);
  font-size: var(--step-2);
  margin-bottom: 0.4rem;
}
.reach__big a { text-decoration: none; }
.reach__big a:hover { text-decoration: underline; }
.reach__map { margin: 0 0 var(--space-s); max-width: 22rem; }
.reach__map img { border-radius: var(--radius-s); border: 1px solid var(--rule); }


/* 12. Shared inner-page blocks ----------------------------------------- */

/* Several blocks below use padding-inline: max(gutter, (100% - wrap) / 2 + gutter).
   The padding does the centring, so a background colour can run edge to
   edge while the content lines up with the header. */
.section--stone { background: var(--limestone); }

/* Photo beside text. --reverse puts the photo on the right on wide screens. */
.split {
  display: grid;
  gap: var(--space-l);
  align-items: center;
  padding-inline: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));
}
.split__media img { border-radius: var(--radius-s); }
.split__text { max-width: var(--measure); }
.split__text > p { color: var(--ink-soft); }

@media (min-width: 48em) {
  .split { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); column-gap: var(--space-xl); }
  .split--reverse .split__media { order: 2; }
  .split--reverse { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .split__media--portrait { max-width: 26rem; justify-self: end; }
}

/* A single paragraph-led block, held to reading width */
.prose-block {
  padding-inline: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));
}
.prose-block > * { max-width: var(--measure); }

/* Large photo straight under the page heading */
.feature-photo {
  margin: 0 auto;
  max-width: var(--wrap);
  padding: var(--space-l) var(--gutter) 0;
}
.feature-photo img { width: 100%; border-radius: var(--radius-s); }


/* 13. Boarding page ----------------------------------------------------- */

/* Numbered steps: the content really is a sequence */
.steps__inner,
.faq__inner { max-width: var(--wrap); margin-inline: auto; }

.steps__list {
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: var(--space-l);
  margin-top: var(--space-l);
}
.steps__list li {
  counter-increment: step;
  position: relative;
  padding-left: 3.5rem;
}
.steps__list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.1rem;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 2px solid var(--pasture);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--pasture);
}
.steps__list h3 { font-size: var(--step-1); margin-bottom: 0.3rem; }
.steps__list p { color: var(--ink-soft); max-width: 30rem; margin: 0; }

@media (min-width: 48em) {
  .steps__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 64em) {
  .steps__list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .steps__list li { padding-left: 0; padding-top: 3.5rem; }
}

/* FAQ: native <details>, so it works with no JS and is keyboard-friendly */
.faq__inner > h2 { margin-bottom: var(--space-m); }
.faq__item {
  max-width: 46rem;
  border-top: 1px solid var(--rule);
}
.faq__item:last-of-type { border-bottom: 1px solid var(--rule); }
.faq__item summary {
  position: relative;
  padding: 1rem 2.5rem 1rem 0;
  font-family: var(--font-display);
  font-size: var(--step-1);
  color: var(--pasture);
  cursor: pointer;
  list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-body);
  font-size: 1.6rem;
  line-height: 1;
}
.faq__item[open] summary::after { content: "\2212"; }   /* minus sign */
.faq__item p { max-width: var(--measure); color: var(--ink-soft); padding-bottom: 1rem; margin: 0; }


/* 14. About page -------------------------------------------------------- */

/* Four items: two columns, then four in a row, so nothing is left on its own */
@media (min-width: 64em) {
  .facilities__list--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* The values list reuses .facilities but needs space from the section above */
.facilities h2 + .facilities__list { margin-top: var(--space-l); }


/* 15. Gallery ----------------------------------------------------------- */

.gallery {
  padding-inline: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));
}
.gallery__grid {
  list-style: none;
  display: grid;
  gap: var(--space-l) var(--space-m);
}
@media (min-width: 40em) { .gallery__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64em) { .gallery__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.gallery__item figure { margin: 0; }
.gallery__link {
  display: block;
  border-radius: var(--radius-s);
  overflow: hidden;
  cursor: zoom-in;
}
.gallery__link img {
  width: 100%;
  transition: transform 0.4s ease;
}
.gallery__link:hover img { transform: scale(1.03); }
.gallery__caption {
  margin-top: 0.5rem;
  color: var(--ink-soft);
  font-size: var(--step--1);
}

/* --- Lightbox --- */
.is-lightbox-open { overflow: hidden; }

.lightbox {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 4rem var(--gutter) 1.5rem;
  border: 0;
  background: rgb(20 18 15 / 0.94);
  color: #fff;
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgb(20 18 15 / 0.6); }

.lightbox__frame {
  max-width: min(100%, 75rem);
  touch-action: pan-y;              /* we handle sideways swipes ourselves */
}
.lightbox__img {
  width: auto;
  height: auto;            /* photos are mixed portrait/landscape; keep each one's shape */
  max-width: 100%;
  max-height: calc(100svh - 10rem);
  margin-inline: auto;
  border-radius: var(--radius-s);
  background: rgb(255 255 255 / 0.06);   /* faint placeholder while the next photo loads */
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox__bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  margin-top: 0.75rem;
}
.lightbox__bar p { margin: 0; }
.lightbox__caption { font-family: var(--font-display); font-size: var(--step-1); }
.lightbox__count { color: #D9D3C9; }

.lightbox__btn {
  position: fixed;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 2px solid rgb(255 255 255 / 0.6);
  border-radius: 50%;
  background: rgb(20 18 15 / 0.7);
  color: #fff;
  cursor: pointer;
}
.lightbox__btn svg { width: 1.4rem; height: 1.4rem; }
.lightbox__btn:hover { background: #fff; color: var(--ink); }
.lightbox__btn--close { top: 0.75rem; right: 0.75rem; }
.lightbox__btn--prev,
.lightbox__btn--next { top: 50%; transform: translateY(-50%); }
.lightbox__btn--prev { left: 0.75rem; }
.lightbox__btn--next { right: 0.75rem; }

/* On phones the arrows sit at the bottom, out of the way of the photo */
@media (max-width: 47.99em) {
  .lightbox__btn--prev,
  .lightbox__btn--next { top: auto; bottom: 0.75rem; transform: none; }
  .lightbox { padding-bottom: 4.5rem; }
}

.lightbox :focus-visible { outline-color: var(--gorse-light); box-shadow: none; }


/* 16. Privacy notice and other long text -------------------------------- */

.legal {
  display: grid;
  grid-template-columns: minmax(0, 1fr);   /* stops the wide table stretching the page */
  gap: var(--space-l);
  padding-inline: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));
}
@media (min-width: 64em) {
  .legal { grid-template-columns: 15rem minmax(0, 1fr); column-gap: var(--space-xl); align-items: start; }
  .legal__toc { position: sticky; top: calc(var(--header-h) + 1.5rem); }
}

.legal__toc h2 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.legal__toc ol { margin: 0; padding-left: 1.25rem; }
.legal__toc li { margin-bottom: 0.35rem; }

.legal__body { max-width: 42rem; }
.legal__body h2 { font-size: var(--step-2); margin-top: var(--space-l); }
.legal__body h2:first-child { margin-top: 0; }
.legal__body ul { padding-left: 1.25rem; margin-bottom: var(--space-s); }
.legal__body li { margin-bottom: 0.35rem; }
.legal__updated { color: var(--ink-soft); font-size: var(--step--1); }

/* Data table: scrolls sideways on its own on small screens, not the page */
.table-wrap {
  overflow-x: auto;
  margin: var(--space-s) 0 var(--space-m);
  border: 1px solid var(--rule);
  border-radius: var(--radius-s);
}
.table-wrap:focus-visible { outline-offset: 2px; }
.data-table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: var(--step--1);
}
.data-table caption {
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 700;
  background: var(--limestone);
}
.data-table th,
.data-table td {
  padding: 0.65rem 1rem;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid var(--rule);
}
.data-table thead th { background: var(--limestone); }


/* 17. 404 page ---------------------------------------------------------- */

.not-found {
  padding-inline: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));
}
.not-found__links { list-style: none; display: grid; gap: 0.5rem; margin-top: var(--space-m); }
.not-found__links a { font-weight: 600; font-size: var(--step-1); }

/* Contact: postal address and map links */
.reach__address {
  font-style: normal;
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: var(--space-s);
}
.reach__links { list-style: none; margin-bottom: var(--space-s); }
.reach__links li { margin-bottom: 0.4rem; }
.reach__links a { font-weight: 600; }
.reach p.reach__note { font-size: var(--step--1); }
