/* ==========================================================================
   Clwyd Special Riding Centre
   Design system. Brand colours are the charity's own, sampled from the
   previous site: royal blue #004AAD, warm cream #F5F6EA, red and green accents.

   Accessibility is a first-class concern here - the charity serves people with
   disabilities and additional needs, so: large type, high contrast, visible
   focus, generous touch targets, and full keyboard operation.
   ========================================================================== */

@font-face {
  font-family: "Figtree";
  src: url("/fonts/figtree-normal.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("/fonts/figtree-italic.woff2") format("woff2");
  font-weight: 300 900;
  font-style: italic;
  font-display: swap;
}

/* --------------------------------------------------------- tokens */

:root {
  --blue: #004aad;
  --blue-dark: #00368a;
  --blue-darker: #062b5b;
  --blue-tint: #e8f0fb;
  --navy: #0a2340;

  --cream: #f5f6ea;
  --sand: #ecece0;
  --white: #ffffff;

  --red: #db2133;
  --red-dark: #b31627;
  --green: #4d8038;

  --ink: #16202e;
  --ink-soft: #45536b;
  --line: #dfe3ea;

  --bg: var(--white);
  --fg: var(--ink);

  --font: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

  /* Fluid type scale */
  --step--1: clamp(0.94rem, 0.92rem + 0.1vw, 1rem);
  --step-0: clamp(1.05rem, 1rem + 0.25vw, 1.19rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.5vw, 1.55rem);
  --step-2: clamp(1.5rem, 1.32rem + 0.9vw, 2.1rem);
  --step-3: clamp(1.85rem, 1.5rem + 1.6vw, 2.9rem);
  --step-4: clamp(2.2rem, 1.6rem + 2.8vw, 4rem);
  --step-5: clamp(2.6rem, 1.7rem + 4.2vw, 5rem);

  --gap: clamp(1.25rem, 0.9rem + 1.6vw, 2.5rem);
  --section-y: clamp(3rem, 2rem + 4.5vw, 6.5rem);
  --radius: 14px;
  --radius-lg: 24px;
  --shadow: 0 1px 2px rgba(10, 35, 64, 0.06), 0 8px 24px rgba(10, 35, 64, 0.08);
  --shadow-lg: 0 2px 4px rgba(10, 35, 64, 0.06), 0 20px 50px rgba(10, 35, 64, 0.14);
  --container: 1200px;
  --measure: 68ch;
}

/* --------------------------------------------------------- reset */

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

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Long email addresses in the body copy overflowed narrow screens. */
  overflow-wrap: break-word;
}

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

h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy);
  text-wrap: balance;
}

h1 {
  font-size: var(--step-4);
}
h2 {
  font-size: var(--step-3);
}
h3 {
  font-size: var(--step-2);
}
h4 {
  font-size: var(--step-1);
}

p,
ul,
ol {
  margin: 0 0 1.1em;
}

a {
  color: var(--blue);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--blue-dark);
}

/* One consistent, unmistakable focus ring everywhere. */
:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--navy);
  color: #fff;
  padding: 0.9rem 1.4rem;
  font-weight: 700;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus {
  left: 0;
}

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

/* --------------------------------------------------------- layout */

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.container--narrow {
  width: min(100% - 2.5rem, 820px);
}

.section {
  padding-block: var(--section-y);
}

.section--tint {
  background: var(--cream);
}

.section--blue {
  background: var(--blue-darker);
  color: #eaf1fb;
}
.section--blue h1,
.section--blue h2,
.section--blue h3 {
  color: #fff;
}
.section--blue a {
  color: #fff;
}

.section__head {
  max-width: var(--measure);
  margin-bottom: clamp(1.75rem, 1rem + 2vw, 3rem);
}

.section__head p {
  font-size: var(--step-1);
  color: var(--ink-soft);
  margin-bottom: 0;
}

.section--blue .section__head p {
  color: #b9cdea;
}

.eyebrow {
  display: inline-block;
  font-size: var(--step--1);
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.85rem;
}

.section--blue .eyebrow,
.hero:not(.hero--plain) .eyebrow {
  color: #8fbcf2;
}

.grid {
  display: grid;
  gap: var(--gap);
}

@media (min-width: 640px) {
  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 980px) {
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 640px) and (max-width: 979px) {
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 50px;
  padding: 0.75rem 1.6rem;
  border: 2px solid transparent;
  border-radius: 100px;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s ease,
    border-color 0.18s ease, color 0.18s ease;
}

.btn:hover {
  background: var(--blue-dark);
  color: #fff;
  transform: translateY(-2px);
}

.btn--donate {
  background: var(--red);
}
.btn--donate:hover {
  background: var(--red-dark);
}

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

.section--blue .btn--ghost,
.hero .btn--ghost {
  color: #fff;
}
.section--blue .btn--ghost:hover,
.hero .btn--ghost:hover {
  background: #fff;
  border-color: #fff;
  color: var(--blue-darker);
}

/* The strongest action where the background is a photo or a block of colour:
   solid white reads at a glance where a blue button would sink into it. */
.btn--invert {
  background: #fff;
  border-color: #fff;
  color: var(--blue-darker);
}
.btn--invert:hover {
  background: var(--sand);
  border-color: var(--sand);
  color: var(--blue-darker);
}

.btn--lg {
  min-height: 58px;
  padding: 0.9rem 2rem;
  font-size: var(--step-1);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

/* --------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 88px;
}

/* The header carries more than the body grid, so let it run wider. */
.site-header .container {
  width: min(100% - 2.5rem, 1340px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--navy);
  flex: 0 0 auto;
  margin-right: auto;
}

.brand img {
  width: 62px;
  height: 62px;
}

.brand__text {
  display: none;
  line-height: 1.15;
}

.brand__name {
  display: block;
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.brand__tag {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: 0.02em;
}

@media (min-width: 560px) {
  .brand__text {
    display: block;
  }
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.5rem 1rem;
  border: 2px solid var(--line);
  border-radius: 100px;
  background: #fff;
  font: inherit;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
}

.nav-toggle__bars {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  position: relative;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: currentColor;
}
.nav-toggle__bars::before {
  top: -6px;
}
.nav-toggle__bars::after {
  top: 6px;
}

.nav {
  display: none;
}

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

.nav__link {
  display: block;
  padding: 0.55rem 0.5rem;
  border-radius: 8px;
  color: var(--navy);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
}

.nav__link:hover {
  background: var(--blue-tint);
  color: var(--blue-dark);
}

.nav__link[aria-current="page"] {
  color: var(--blue);
  box-shadow: inset 0 -3px 0 var(--blue);
  border-radius: 8px 8px 0 0;
}

/* Desktop: show the nav inline, hide the toggle. */
@media (min-width: 1180px) {
  .nav {
    display: block;
  }
  .nav-toggle {
    display: none;
  }
}

/* Mobile / tablet: the nav becomes a disclosure panel under the header. */
@media (max-width: 1179px) {
  .nav[data-open="true"] {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    padding: 0.75rem 0 1.25rem;
    max-height: calc(100vh - 88px);
    overflow-y: auto;
  }
  .nav[data-open="true"] .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: min(100% - 2.5rem, var(--container));
    margin-inline: auto;
  }
  .nav[data-open="true"] .nav__link {
    padding: 0.9rem 0.75rem;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    font-size: 1.05rem;
  }
  .nav[data-open="true"] .nav__link[aria-current="page"] {
    box-shadow: inset 3px 0 0 var(--blue);
  }
}

.header-cta {
  display: none;
}
@media (min-width: 460px) {
  .header-cta {
    display: inline-flex;
  }
}

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

.hero {
  position: relative;
  background: var(--blue-darker);
  color: #fff;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Opaque enough behind the text to keep it legible, then falls away so the
     photograph is actually visible on the right. */
  background: linear-gradient(
    95deg,
    rgba(6, 25, 55, 0.93) 0%,
    rgba(6, 25, 55, 0.85) 34%,
    rgba(6, 25, 55, 0.55) 62%,
    rgba(6, 25, 55, 0.16) 100%
  );
}

@media (max-width: 719px) {
  .hero__media::after {
    background: linear-gradient(
      to bottom,
      rgba(6, 25, 55, 0.55) 0%,
      rgba(6, 25, 55, 0.72) 45%,
      rgba(6, 25, 55, 0.92) 100%
    );
  }

  .hero__inner {
    padding-top: clamp(6rem, 20vw, 10rem);
  }
}

.hero__inner {
  position: relative;
  padding-block: clamp(3.5rem, 2rem + 7vw, 8rem);
  max-width: 46rem;
}

.hero h1 {
  color: #fff;
  margin-bottom: 0.4em;
}

.hero:not(.hero--plain) h1,
.hero:not(.hero--plain) .hero__lede,
.hero:not(.hero--plain) .eyebrow {
  text-shadow: 0 1px 12px rgba(3, 15, 35, 0.55);
}

.hero__lede {
  font-size: var(--step-1);
  color: #d6e4f7;
  max-width: 40rem;
  margin-bottom: 0;
}

.hero--page {
  /* Tall enough that a landscape photograph is not cropped to a letterbox. */
  min-height: 420px;
  display: flex;
  align-items: center;
}

.hero--page .hero__inner {
  padding-block: clamp(3rem, 2rem + 4vw, 5.5rem);
  width: min(100% - 2.5rem, var(--container));
}

.hero__media img {
  object-position: center 38%;
}

/* No photo behind it - the flex centring is unnecessary and hurts short pages. */
.hero--plain {
  min-height: 0;
  display: block;
}

.hero--plain {
  background: var(--cream);
  color: var(--ink);
}
.hero--plain h1 {
  color: var(--navy);
}
.hero--plain .hero__lede {
  color: var(--ink-soft);
}

/* --------------------------------------------------------- breadcrumb */

.breadcrumb {
  font-size: var(--step--1);
  padding-block: 0.9rem;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  color: var(--ink-soft);
}
.breadcrumb li + li::before {
  content: "/";
  margin-right: 0.4rem;
  color: var(--line);
}

/* --------------------------------------------------------- prose */

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

.prose > * + * {
  margin-top: 1.1em;
}

.prose h2 {
  margin-top: 1.8em;
  font-size: var(--step-2);
}

.prose h3 {
  margin-top: 1.6em;
  font-size: var(--step-1);
}

.prose h4 {
  margin-top: 1.4em;
  font-size: var(--step-0);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--blue);
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose li + li {
  margin-top: 0.4em;
}

.prose li::marker {
  color: var(--blue);
  font-weight: 700;
}

.prose img {
  border-radius: var(--radius);
  margin-block: 2rem;
  box-shadow: var(--shadow);
}

.prose blockquote {
  margin: 2rem 0;
  padding: 1.4rem 1.6rem;
  border-left: 5px solid var(--blue);
  background: var(--cream);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: var(--step-1);
  font-style: italic;
  color: var(--navy);
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose hr {
  border: 0;
  border-top: 2px solid var(--line);
  margin: 2.5rem 0;
}

.prose strong {
  font-weight: 800;
  color: var(--navy);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step--1);
}
.prose th,
.prose td {
  text-align: left;
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--line);
}
.prose th {
  background: var(--cream);
  font-weight: 800;
  color: var(--navy);
}

.table-scroll {
  overflow-x: auto;
}

/* --------------------------------------------------------- cards */

.card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card__media {
  aspect-ratio: 4 / 3;
  background: var(--sand);
  overflow: hidden;
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__body {
  padding: 1.4rem 1.5rem 1.6rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card__body h3 {
  font-size: var(--step-1);
  margin-bottom: 0.4rem;
}

.card__body p {
  color: var(--ink-soft);
  font-size: var(--step--1);
  margin-bottom: 1rem;
}

.card__body > :last-child {
  margin-top: auto;
  margin-bottom: 0;
}

/* The when/cost lines on an activity card: two short facts people scan for
   before they read anything, so they sit above the description. */
.card__meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 0.7rem;
  margin: 0 0 0.9rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
  font-size: var(--step--1);
}

.card__meta dt {
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  align-self: baseline;
}

.card__meta dd {
  margin: 0;
  font-weight: 600;
  text-wrap: pretty;
}

.card__link {
  font-weight: 700;
  text-decoration: none;
}
.card__link::after {
  content: " →";
}
.card__link:hover {
  text-decoration: underline;
}

/* Whole-card click target without nesting interactive elements. */
.card--linked {
  position: relative;
}
.card--linked .card__link::before {
  content: "";
  position: absolute;
  inset: 0;
}

.card--plain {
  background: var(--cream);
  border-color: transparent;
}

.card--price {
  border-top: 5px solid var(--blue);
}

.price {
  display: block;
  font-weight: 900;
  color: var(--blue);
  font-size: var(--step-1);
  margin-bottom: 0.6rem;
}

/* --------------------------------------------------------- split feature */

.split {
  display: grid;
  gap: var(--gap);
  align-items: center;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 1rem + 4vw, 5rem);
  }
  .split--reverse .split__media {
    order: 2;
  }
}

.split__media img {
  border-radius: var(--radius-lg);
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.split__body > :last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------- stats */

.stats {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(2, 1fr);
  text-align: center;
}

@media (min-width: 860px) {
  .stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat__num {
  display: block;
  font-size: var(--step-4);
  font-weight: 900;
  line-height: 1;
  color: var(--blue);
  letter-spacing: -0.03em;
}

.section--blue .stat__num {
  color: #7fb0f0;
}

.stat__label {
  display: block;
  margin-top: 0.5rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.section--blue .stat__label {
  color: #cfdff5;
}

/* --------------------------------------------------------- gallery */

.gallery {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
}

.gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--sand);
}

.gallery--wide img {
  aspect-ratio: 4 / 3;
}

/* --------------------------------------------------------- video */

.video {
  margin-block: 2rem;
}

.video video,
.video iframe {
  width: 100%;
  border-radius: var(--radius-lg);
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
  border: 0;
}

.video--portrait video {
  aspect-ratio: 9 / 16;
  max-height: 80vh;
  width: auto;
  margin-inline: auto;
}

.video__caption {
  margin-top: 0.85rem;
  font-size: var(--step--1);
  color: var(--ink-soft);
}

/* --------------------------------------------------------- horses */

.horse-grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
}

.horse {
  text-align: center;
}

.horse img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: 5px solid var(--cream);
  box-shadow: var(--shadow);
  margin-bottom: 0.9rem;
}

.horse h3 {
  font-size: var(--step-1);
  margin-bottom: 0.15rem;
}

.horse p {
  font-size: var(--step--1);
  color: var(--ink-soft);
  margin: 0;
}

/* Our Horses: every horse with its details and story (from the admin's Horses page). */
.herd {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
}
.herd__horse {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 1rem;
  align-items: start;
  background: #fff;
  border-radius: var(--radius, 16px);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}
.herd__horse img {
  width: 96px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--cream);
}
.herd__horse h3 {
  font-size: var(--step-1);
  margin: 0 0 0.15rem;
}
.herd__horse p {
  font-size: var(--step--1);
  margin: 0 0 0.6rem;
}
.herd__details {
  color: var(--ink-soft);
  font-weight: 600;
}

/* --------------------------------------------------------- news */

.news-grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}

.news-card__date {
  display: block;
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 0.3rem;
}

/* --------------------------------------------------------- contact */

.contact-tiles {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
}

.tile {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
}

.tile h3 {
  font-size: var(--step-0);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--blue);
  margin-bottom: 0.6rem;
}

.tile p,
.tile a {
  font-size: var(--step-1);
  font-weight: 700;
  color: var(--navy);
  margin: 0;
  word-break: break-word;
}

.tile a {
  text-decoration: none;
}
.tile a:hover {
  text-decoration: underline;
  color: var(--blue);
}

.tile .field__hint {
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--ink-soft);
  margin-top: 0.35rem;
}

.tile a {
  font-size: var(--step-0);
}

@media (min-width: 480px) {
  .tile a {
    font-size: var(--step-1);
  }
}

/* The charity's email addresses are long; give them a little more room to
   breathe on the narrowest screens rather than breaking a character onto
   its own line. */
@media (max-width: 419px) {
  .tile {
    padding: 1.3rem 1.15rem;
  }
  .tile a {
    font-size: var(--step--1);
  }
}

.tile__icon {
  width: 44px;
  height: 44px;
  object-fit: contain;
  margin-bottom: 1rem;
  border-radius: 0;
  box-shadow: none;
}

/* --------------------------------------------------------- forms */

.form {
  display: grid;
  gap: 1.25rem;
  max-width: 640px;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field label {
  font-weight: 700;
  color: var(--navy);
}

.field .req {
  color: var(--red);
}

.field input,
.field textarea,
.field select {
  font: inherit;
  padding: 0.8rem 1rem;
  min-height: 52px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  width: 100%;
}

.field textarea {
  min-height: 150px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(0, 74, 173, 0.25);
  outline-offset: 0;
}

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

.field-group {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 620px) {
  .field-group--2 {
    grid-template-columns: 1fr 1fr;
  }
}

.checkbox-list {
  display: grid;
  gap: 0.6rem;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-weight: 500;
}

.checkbox input {
  width: 22px;
  height: 22px;
  min-height: 0;
  margin-top: 0.2rem;
  flex: 0 0 auto;
  accent-color: var(--blue);
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

legend {
  font-weight: 700;
  color: var(--navy);
  padding: 0;
  margin-bottom: 0.6rem;
}

.form-note {
  font-size: var(--step--1);
  color: var(--ink-soft);
  background: var(--cream);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
}

/* --------------------------------------------------------- callout / CTA */

.callout {
  background: var(--cream);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 1rem + 2vw, 2.75rem);
}

.callout--blue {
  background: var(--blue-darker);
  color: #e7effa;
}
.callout--blue h2,
.callout--blue h3 {
  color: #fff;
}

.callout > :last-child {
  margin-bottom: 0;
}

.cta-band {
  background: var(--blue);
  color: #fff;
  text-align: center;
}

.cta-band h2 {
  color: #fff;
}

.cta-band p {
  color: #d3e3f9;
  font-size: var(--step-1);
  max-width: 46rem;
  margin-inline: auto;
}

.cta-band .btn-row {
  justify-content: center;
}

/* A ghost button is blue on white everywhere else, which on this blue band left
   it invisible: blue text, blue border, blue background. */
.cta-band .btn--ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.75);
}
.cta-band .btn--ghost:hover,
.cta-band .btn--ghost:focus-visible {
  background: #fff;
  border-color: #fff;
  color: var(--blue);
}

/* --------------------------------------------------------- downloads */

.downloads {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}

.download {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--navy);
  font-weight: 700;
}

.download:hover {
  border-color: var(--blue);
  background: var(--blue-tint);
}

.download__ext {
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  background: var(--blue);
  color: #fff;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
}

/* --------------------------------------------------------- FAQ */

.faq {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  cursor: pointer;
  padding: 1.1rem 0;
  font-weight: 700;
  font-size: var(--step-1);
  color: var(--navy);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  font-size: 1.6em;
  font-weight: 400;
  color: var(--blue);
  line-height: 1;
  flex: 0 0 auto;
}

.faq[open] summary::after {
  content: "−";
}

.faq__body {
  padding-bottom: 1.3rem;
  color: var(--ink-soft);
}

.faq__body > :last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------- footer */

.site-footer {
  background: var(--navy);
  color: #c3d2e6;
  padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem) 2rem;
  font-size: var(--step--1);
}

.site-footer h2,
.site-footer h3 {
  color: #fff;
  font-size: var(--step-0);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.site-footer a {
  color: #c3d2e6;
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.footer-brand img {
  width: 90px;
  background: #fff;
  border-radius: 12px;
  padding: 8px;
  margin-bottom: 1rem;
}

.socials {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
}

.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.socials a:hover {
  background: var(--blue);
}

.socials svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  justify-content: space-between;
  color: #93a7c2;
}

.footer-bottom ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin: 0;
  padding: 0;
}

/* --------------------------------------------------------- misc */

.lede {
  font-size: var(--step-1);
  color: var(--ink-soft);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
  align-items: center;
  justify-content: center;
}

.badge-row img {
  height: 68px;
  width: auto;
  object-fit: contain;
}

.anchor-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
}

.anchor-nav a {
  padding: 0.55rem 1.1rem;
  border: 2px solid var(--line);
  border-radius: 100px;
  font-weight: 700;
  font-size: var(--step--1);
  text-decoration: none;
  color: var(--navy);
}

.anchor-nav a:hover {
  border-color: var(--blue);
  background: var(--blue-tint);
  color: var(--blue-dark);
}

/* --------------------------------------------------------- donations and bookings

   Donations run through Beacon (an embedded form) and bookings through EC Pro
   (a link-out - EC Pro sends X-Frame-Options: SAMEORIGIN and cannot be framed).
   Both are optional: with neither configured these rules simply go unused. */

.header-ctas {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Two buttons plus nine nav items is a lot for one row, so the pair is sized
   to fit beside the nav at 1180px - the width the inline nav starts at. */
.header-ctas .btn {
  min-height: 44px;
  padding: 0.5rem 0.95rem;
  font-size: 0.95rem;
}

/* Below 1260px the nav and both buttons stop fitting on one row, and a wrapped
   nav looks broken. Donate is the one that stays - Book is in the nav itself
   (and in the mobile panel) at every width. */
@media (max-width: 1259px) {
  .header-cta--book {
    display: none;
  }
}

.give {
  display: grid;
  gap: clamp(2rem, 1rem + 3vw, 3.5rem);
}

@media (min-width: 900px) {
  .give {
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    align-items: start;
  }
}

.give__aside {
  display: grid;
  gap: 1.25rem;
}

/* The amount quick-picks. They only preselect an amount in the form - the
   donor can always type their own, so nothing here is a price. */
.amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}

.amounts__pick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  min-height: 56px;
  padding: 0.6rem 1.25rem;
  border: 2px solid var(--line);
  border-radius: 100px;
  background: var(--white);
  color: var(--navy);
  font-weight: 800;
  font-size: var(--step-1);
  text-decoration: none;
}

.amounts__pick:hover,
.amounts__pick:focus-visible {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.amounts__pick--other {
  font-size: 1rem;
}

/* A third-party form lands here. It arrives as an iframe that sizes itself, so
   the only job of these rules is to give it room and keep it in the page. */
.embed {
  margin-bottom: 1.5rem;
}

.embed--beacon .beacon-form {
  min-height: 320px;
}

.embed--beacon iframe {
  width: 100%;
  border: 0;
}

.embed__note,
.embed__fallback {
  margin-top: 1rem;
  font-size: var(--step--1);
  color: var(--ink-soft);
}

.routes {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 860px) {
  .routes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.route .card__body {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.route .btn-row {
  margin-top: auto;
  padding-top: 0.5rem;
}

.route--primary {
  background: var(--blue-tint);
  border-color: var(--blue);
}

.ticks {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

.ticks li {
  position: relative;
  padding-left: 2rem;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 1.1rem;
  height: 0.6rem;
  border-left: 3px solid var(--green);
  border-bottom: 3px solid var(--green);
  transform: rotate(-45deg);
}

/* --------------------------------------------------------- social page

   /social/ is a standalone page - nothing else moved for it. Its embeds are
   click-to-load (see static/js/social.js), so these rules cover both states:
   the placeholder, and the iframe that replaces it. */

.social-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.social-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  color: var(--navy);
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.social-card:hover,
.social-card:focus-visible {
  border-color: var(--blue);
  transform: translateY(-2px);
}

.social-card__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--blue-tint);
  color: var(--blue);
}

.social-card__icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.social-card__body {
  display: grid;
  gap: 0.3rem;
}

.social-card__name {
  font-weight: 800;
  font-size: 1.15rem;
}

.social-card__handle {
  font-size: var(--step--1);
  color: var(--blue);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.social-card__text {
  font-size: var(--step--1);
  color: var(--ink-soft);
}

@media (min-width: 900px) {
  .split--feed {
    grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
    align-items: start;
  }
}

.split__media--feed {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* The placeholder that stands in for a third-party iframe until it is asked
   for. It has to be useful on its own - with JavaScript off it is all there
   is, so it carries the explanation and a link to the post itself. */
.embed-consent {
  display: grid;
  gap: 0.35rem;
  padding: 1.5rem;
  border: 2px dashed var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
}

.embed-consent__blurb {
  font-weight: 600;
  margin: 0;
}

.embed-consent p {
  margin: 0;
}

.embed-consent--loaded {
  display: block;
  padding: 0;
  border-style: solid;
  border-color: var(--line);
  overflow: hidden;
}

.featured-post h3 {
  margin-bottom: 0.75rem;
}

@media print {
  .site-header,
  .site-footer,
  .cta-band,
  .nav-toggle {
    display: none;
  }
}

/* ---------------------------------------------------------------- about page */

/* The formal registration line under the story. Present, not prominent. */
.registration {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: var(--step--1);
}

/* Our story. A rule runs down the years, each one marked on it. */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline__item {
  position: relative;
  padding: 0 0 2.4rem 1.6rem;
  border-left: 2px solid var(--line);
}
.timeline__item:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

/* The dot sits on the rule itself. */
.timeline__item::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 0.45rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--blue);
  border: 3px solid var(--white);
}

.timeline__year {
  display: block;
  font-weight: 800;
  color: var(--blue);
  font-size: var(--step--1);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.timeline__body h3 {
  font-size: var(--step-1);
  margin: 0.2rem 0 0.5rem;
}

.timeline__body p {
  color: var(--ink-soft);
  margin: 0;
}

.timeline__image {
  margin-top: 1.2rem;
  border-radius: var(--radius-lg);
  /* These are old photographs, some only a few hundred pixels wide. Keep them
     near their natural size rather than blowing them up soft. */
  max-width: min(100%, 12rem);
  width: auto;
}

@media (min-width: 48em) {
  /* Beside the story rather than under it, so one photo does not push the rest
     of the timeline down the page. */
  .timeline__image {
    margin-top: 1.4rem;
  }
}

@media (min-width: 48em) {
  /* Wide enough to put the year in its own column, beside the rule. */
  .timeline__item {
    display: grid;
    grid-template-columns: 7rem 1fr;
    gap: 0 1.6rem;
    padding-left: 2rem;
  }
  .timeline__year {
    text-align: right;
    padding-top: 0.15rem;
  }
}

/* The panels of the history wall are wide and densely packed with small
   photographs and captions. Shrunk into a grid they are unreadable, so each gets
   the full width and links to the full-size image. */
.photo-wall {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.gallery__item {
  margin: 0;
}
.gallery__item a {
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.gallery__item a:hover img {
  transform: scale(1.01);
}
.gallery__item img {
  transition: transform 0.2s ease;
}
.gallery__item img {
  width: 100%;
  border-radius: var(--radius-lg);
  background: var(--sand);
}
.gallery__item figcaption {
  margin-top: 0.6rem;
  color: var(--ink-soft);
  font-size: var(--step--1);
}

/* A partner card: their photo, their logo, what they do, and a link to them.
   Wide rather than tall - there are few partners, and each has a lot to say. */
.partner-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 44em) {
  .partner {
    display: grid;
    grid-template-columns: 15rem 1fr;
  }
}

.partner__portrait {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--sand);
}

@media (min-width: 44em) {
  .partner__portrait {
    aspect-ratio: auto;
    height: 100%;
  }
}
.partner__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.partner__logo {
  max-height: 54px;
  width: auto;
  margin-bottom: 0.9rem;
  /* The card body is a column flexbox, so without this the logo is stretched to
     the full width and max-height then squashes it out of shape. */
  align-self: flex-start;
}

.partner__who {
  color: var(--blue);
  font-weight: 700;
  margin-bottom: 0.6rem !important;
}

.partner__credentials {
  list-style: none;
  margin: 0 0 1.2rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.partner__credentials li {
  padding-left: 1.5rem;
  position: relative;
}
/* A tick, drawn rather than loaded. */
.partner__credentials li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 0.5rem;
  height: 0.28rem;
  border-left: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(-45deg);
}


/* What's on: the booking calendar on /book/ (from the admin's Bookings page). */
.whatson__month {
  font-size: var(--step-0);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin: 2rem 0 0.75rem;
}
.whatson {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.whatson__item {
  display: grid;
  grid-template-columns: 4.25rem 1fr auto;
  gap: 1rem;
  align-items: center;
  background: #fff;
  border-radius: var(--radius, 16px);
  box-shadow: var(--shadow);
  padding: 1rem 1.25rem;
}
.whatson__tile {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background: var(--blue, #004aad);
  color: #fff;
  font-size: var(--step--1);
  text-transform: uppercase;
  line-height: 1.1;
}
.whatson__tile b {
  font-size: var(--step-2);
  display: block;
}
.whatson__body h4 {
  font-size: var(--step-1);
  margin: 0 0 0.15rem;
}
.whatson__body p {
  margin: 0;
  font-size: var(--step--1);
}
.whatson__when {
  color: var(--ink-soft);
  font-weight: 600;
}
@media (max-width: 34rem) {
  .whatson__item { grid-template-columns: 3.5rem 1fr; }
  .whatson__item .btn { grid-column: 2; justify-self: start; }
}
.btn--sm {
  padding: 0.5rem 1.1rem;
  font-size: var(--step--1);
  min-height: 0;
}
