/* Design tokens */
:root {
  --color-accent: #c54e10;
  --color-accent-dark: #a2400c;
  --color-ink: #141414;
  --color-text: #000;
  --color-white: #fff;
  --color-bg-soft: #f6f6f6;
  --color-navy-900: #13263b;
  --color-navy-800: #192836;
  --color-navy-700: #31475c;
  --color-muted: #ababab;
  --color-arrow: #b4b4b4;
  --color-border: #d6d6d6;
  --color-backdrop: rgb(0 0 0 / 0.6);
  --color-white-muted: rgb(255 255 255 / 0.34);
  --color-white-border: rgb(255 255 255 / 0.15);
  --color-navy-card: rgb(19 38 59 / 0.74);

  --font-base: 'Rubik', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

  --fs-body: 0.875rem;
  --fs-small: 0.8125rem;
  --fs-label: 0.625rem;
  --fs-h1: 1.5rem;
  --fs-h2: 1.125rem;
  --fs-h3: 0.9375rem;
  --lh-body: 1.571;
  --tracking-label: 0.2em;

  --container: 72.5rem;
  --gutter: 1.25rem;
  --section-y: 3rem;

  --radius-btn: 0.5625rem;
  --radius-field: 0.125rem;
  --radius-card: 1.25rem;

  --transition: 0.2s ease;
}

@media (min-width: 48em) {
  :root {
    --fs-h1: 2.4375rem;
    --fs-h2: 1.25rem;
    --section-y: 4.5rem;
  }
}

@media (min-width: 64em) {
  :root {
    --gutter: 2rem;
    --section-y: 5.5rem;
  }
}

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

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

body {
  margin: 0;
  font-family: var(--font-base);
  font-size: var(--fs-body);
  font-weight: 300;
  line-height: var(--lh-body);
  color: var(--color-text);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, ul, ol, figure {
  margin: 0;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

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

[hidden] {
  display: none !important;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 1000;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0.75rem 1rem;
  clip-path: none;
  background: var(--color-white);
  color: var(--color-ink);
}

/* Layout */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

/* Section heading: same in every section, colour via modifier */
.section-head__eyebrow {
  margin-bottom: 0.5rem;
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-accent);
}

.section-head__title {
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-ink);
}

.section-head--light .section-head__title {
  color: var(--color-white);
}

.section-head--center {
  text-align: center;
}

/* Buttons and links */
.btn,
.wpcf7-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.5rem 2rem;
  border: 0;
  border-radius: var(--radius-btn);
  background: var(--color-accent);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-white);
  transition: background-color var(--transition);
}

.btn:hover,
.wpcf7-submit:hover {
  background: var(--color-accent-dark);
}

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-label);
  font-weight: 400;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-accent);
}

.link-more .icon {
  width: 0.8125rem;
  height: 0.6875rem;
  transition: transform var(--transition);
}

.link-more:hover .icon {
  transform: translateX(0.25rem);
}

/* Rich text from ACF wysiwyg fields */
.rte p + p,
.rte p + ul,
.rte ul + p {
  margin-top: 1.4rem;
}

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

.rte li::before {
  content: '\2022\00a0';
}

.rte a:hover {
  text-decoration: underline;
}

/* Reveal on scroll (class added by main.js) */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

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

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

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* Flexible content (page.php) */
.flex {
  padding-block: var(--section-y);
}

.flex--white {
  background: var(--color-white);
}

.flex--light {
  background: var(--color-bg-soft);
}

.flex--navy {
  background: var(--color-navy-900);
  color: var(--color-white);
}

.flex--navy .rte a {
  color: var(--color-white);
  text-decoration: underline;
}

.flex-text__text {
  max-width: 56rem;
  margin-top: 1.4rem;
}

.flex-text--center {
  text-align: center;
}

.flex-text--center .flex-text__text {
  margin-inline: auto;
}

.flex-text__btn {
  margin-top: 1.75rem;
}

.flex-text__cols {
  display: grid;
  gap: 1.4rem;
  margin-top: 1.4rem;
}

.flex-text__cols .flex-text__text {
  max-width: none;
  margin-top: 0;
}

@media (min-width: 48em) {
  .flex-text__cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3rem;
  }
}

@media (min-width: 64em) {
  .flex-text__cols {
    gap: 4.5rem;
  }
}

.flex-image-text__inner {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.flex-image-text__media {
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--color-bg-soft);
}

.flex-image-text__img {
  display: block;
  width: 100%;
  height: auto;
}

.flex-image-text__text {
  margin-top: 1.4rem;
}

.flex-image-text__btn {
  margin-top: 1.75rem;
}

@media (min-width: 64em) {
  .flex-image-text__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4.5rem;
  }

  .flex-image-text--right .flex-image-text__media {
    order: 2;
  }
}

.flex-faq__inner {
  display: grid;
  gap: 2rem;
  align-items: start;
}

.flex-faq__text {
  max-width: 24.5rem;
  margin-top: 1.4rem;
}

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

.faq-item:first-child {
  border-top: 1px solid var(--color-border);
}

.flex--navy .faq-item {
  border-color: var(--color-white-border);
}

.faq-item__question {
  position: relative;
  display: block;
  padding: 1.1rem 2.5rem 1.1rem 0;
  font-size: var(--fs-h3);
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
  transition: color var(--transition);
}

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

.faq-item__question::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 0.25rem;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--color-accent);
  border-bottom: 2px solid var(--color-accent);
  transform: translateY(-70%) rotate(45deg);
  transition: transform var(--transition);
}

.faq-item[open] .faq-item__question::after {
  transform: translateY(-30%) rotate(-135deg);
}

.faq-item__question:hover,
.faq-item[open] .faq-item__question {
  color: var(--color-accent);
}

.faq-item__question:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.faq-item__answer {
  padding: 0 2.5rem 1.4rem 0;
}

@media (min-width: 64em) {
  .flex-faq__inner {
    grid-template-columns: 22rem minmax(0, 1fr);
    gap: 4.5rem;
  }
}

.flex-gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 2rem;
}

.flex-gallery__item {
  display: block;
  aspect-ratio: 4 / 3;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-card);
  background: var(--color-bg-soft);
  cursor: zoom-in;
}

.flex-gallery__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.flex-gallery__item:hover .flex-gallery__img {
  transform: scale(1.05);
}

.flex-gallery__item:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-white);
}

.lightbox:not([open]) {
  display: none;
}

.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox::backdrop {
  background: var(--color-backdrop);
}

.lightbox__img {
  max-width: calc(100% - 7rem);
  max-height: calc(100% - 4rem);
  object-fit: contain;
  border-radius: var(--radius-field);
}

.lightbox__btn {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--color-navy-900);
  color: var(--color-white);
  cursor: pointer;
  transition: background-color var(--transition);
}

.lightbox__btn:hover {
  background: var(--color-accent);
}

.lightbox__btn .icon {
  width: 1rem;
  height: 1rem;
}

.lightbox__btn--close {
  top: 1rem;
  right: 1rem;
}

.lightbox__btn--prev {
  left: 0.75rem;
}

.lightbox__btn--next {
  right: 0.75rem;
}

@media (min-width: 36em) {
  .flex-gallery__grid--3,
  .flex-gallery__grid--4 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 64em) {
  .flex-gallery__grid {
    gap: 1.25rem;
  }

  .flex-gallery__grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flex-gallery__grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
