/* ==========================================================================
   Transforming World Education — Public Stylesheet
   Mobile-first, WCAG-friendly, reduced-motion aware
   ========================================================================== */

/* --- Reset & Base -------------------------------------------------------- */

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

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

@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;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-secondary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  line-height: 1.2;
  color: var(--color-primary);
  margin-top: 0;
}

p {
  margin-top: 0;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  margin: 0;
  padding: 0;
}

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

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

/* Text drawn in the accent colour needs more contrast than the accent itself
   carries: the brand orange gives 3.0:1 on a light ground and 4.0:1 on a dark
   one, both short of WCAG AA. These are the same hue nudged until they pass,
   derived from the theme's accent so a new theme keeps working. Decorative
   accent fills - the rules under a card title, a list marker - are not text and
   keep the accent as it is. */
:root {
  /* Cards and panels used to be "the button radius plus a bit". A theme with
     pill buttons would then have pill cards, which is not the same design, so
     they are their own step now - defaulting to what they always were. */
  --radius-card: calc(var(--radius-button, 4px) + 4px);
  --radius-panel: calc(var(--radius-card) + 4px);
  --font-heading-weight: 600;

  --color-accent-ink: color-mix(in srgb, var(--color-accent) 76%, #000);
  --color-accent-on-dark: color-mix(in srgb, var(--color-accent) 89%, #fff);
  /* One value for the small print: captions, empty states, quote attributions. */
  --muted-text-opacity: 0.78;
}

.container {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* Reading width for prose-led blocks. */
.container--text {
  width: 100%;
  max-width: 48rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.container--narrow {
  max-width: 44rem;
}

/* --- Skip Link ----------------------------------------------------------- */

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 10000;
  padding: 0.75rem 1.25rem;
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-button);
}

.skip-link:focus {
  top: 1rem;
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

/* --- Focus Styles (WCAG) ------------------------------------------------- */

:focus {
  outline: none;
}

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

/* --- Buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius-button);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.btn--primary:hover {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
  color: #fff;
}

.btn--secondary {
  background: var(--color-secondary);
  color: #fff;
  border-color: var(--color-secondary);
}

.btn--secondary:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.btn--outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}

.btn--outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: var(--color-primary);
  border-color: rgba(26, 58, 74, 0.2);
}

.btn--ghost:hover {
  background: rgba(26, 58, 74, 0.06);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn--lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

.btn--sm {
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
}

.btn:disabled,
.btn.is-loading {
  opacity: 0.65;
  cursor: not-allowed;
  pointer-events: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: color-mix(in srgb, var(--color-bg) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--color-primary) 8%, transparent);
}

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

.site-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  text-decoration: none;
  text-align: center;
  color: var(--color-primary);
  flex-shrink: 0;
  transform: translateX(-0.75rem);
}

.header-nav-wrap { margin-left: auto; }
.lang-switcher { margin-left: auto; }
.lang-switcher__link { display: inline-flex; align-items: center; gap: 0.28rem; }
.lang-switcher__flag { font-size: 1rem; line-height: 1; }

.site-logo__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border-radius: var(--radius-button);
}

.site-logo__image {
  display: block;
  width: auto;
  height: 2.5rem;
  max-width: 14rem;
  object-fit: contain;
}

.site-logo__text {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  max-width: 10rem;
}

@media (max-width: 767px) {
  .site-logo { transform: none; }
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  background: transparent;
  border: 2px solid rgba(26, 58, 74, 0.15);
  border-radius: var(--radius-button);
  cursor: pointer;
}

.nav-toggle__icon,
.nav-toggle__icon::before,
.nav-toggle__icon::after {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: var(--color-primary);
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle__icon {
  position: relative;
}

.nav-toggle__icon::before,
.nav-toggle__icon::after {
  content: '';
  position: absolute;
  left: 0;
}

.nav-toggle__icon::before {
  top: -6px;
}

.nav-toggle__icon::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon::after {
  top: 0;
  transform: rotate(-45deg);
}

.header-nav-wrap {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-bg);
  border-bottom: 1px solid rgba(26, 58, 74, 0.08);
  padding: 1.25rem;
  box-shadow: 0 12px 32px rgba(26, 58, 74, 0.08);
}

.header-nav-wrap.is-open {
  display: block;
}

.site-nav__list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.site-nav__link {
  display: block;
  padding: 0.65rem 0.5rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  border-radius: var(--radius-button);
}

.site-nav__link:hover,
.site-nav__link.is-active {
  color: var(--color-primary);
  background: rgba(45, 106, 106, 0.06);
}

.lang-switcher {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(26, 58, 74, 0.08);
}

.lang-switcher__list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Decorative divider between the language links, hidden from assistive tech.
   Kept light, but not so light that it reads as a rendering fault. */
.lang-switcher__sep {
  color: color-mix(in srgb, var(--color-primary) 70%, transparent);
  font-size: 0.875rem;
}

.lang-switcher__link {
  padding: 0.35rem 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-text);
  text-decoration: none;
  border-radius: var(--radius-button);
}

.lang-switcher__link:hover,
.lang-switcher__link.is-active {
  color: var(--color-secondary);
  background: rgba(45, 106, 106, 0.08);
}

/* --- Sections ------------------------------------------------------------ */

.section {
  padding-block: var(--section-gap, 3rem);
}

.section--intro {
  padding-block: calc(var(--section-gap, 3rem) * 0.667);
}

.section--content {
  padding-block: calc(var(--section-gap, 3rem) * 0.5) calc(var(--section-gap, 3rem) * 0.833);
}

.section-subtitle {
  margin-top: 0.75rem;
  font-size: 1.125rem;
  color: rgba(44, 44, 44, 0.75);
}

/* --- Page Hero ----------------------------------------------------------- */

.page-hero {
  padding-block: calc(var(--section-gap, 3rem) * 0.667) calc(var(--section-gap, 3rem) * 0.417);
  background: linear-gradient(180deg, rgba(26, 58, 74, 0.04) 0%, transparent 100%);
  border-bottom: 1px solid rgba(26, 58, 74, 0.06);
}

.page-hero__title {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.02em;
}

.page-hero__lead {
  max-width: 52ch;
  margin-top: 1rem;
  font-size: 1.125rem;
  color: rgba(44, 44, 44, 0.75);
}

.page-hero--height-compact.has-bg { min-height: 10rem; }
.page-hero--height-tall.has-bg,
.page-hero--height-viewport.has-bg {
  display: flex;
  align-items: center;
}
.page-hero--height-tall.has-bg { min-height: clamp(22rem, 48vw, 32rem); }
.page-hero--height-viewport.has-bg { min-height: min(72vh, 44rem); }

.page-visual__image {
  display: block;
  width: 100%;
  max-height: 28rem;
  object-fit: cover;
  object-position: center;
}

/* Contact methods configured independently for the Contact page. */
.contact-methods {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
  background: linear-gradient(145deg, #f5f0e6, #fffdf8 62%);
  border-bottom: 1px solid rgba(58, 58, 50, 0.08);
}
.contact-methods__heading { margin-bottom: 1.5rem; }
.contact-methods__heading h2 { margin: 0; font-size: clamp(1.75rem, 3vw, 2.4rem); }
.contact-methods__eyebrow {
  margin: 0 0 0.35rem;
  color: var(--color-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.contact-methods__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
}
.contact-method {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  min-width: 0;
  padding: 1.2rem;
  border: 1px solid rgba(58, 58, 50, 0.12);
  border-radius: var(--radius-panel, 12px);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 24px rgba(58, 58, 50, 0.06);
}
.contact-method__icon {
  display: grid;
  flex: 0 0 2.65rem;
  width: 2.65rem;
  height: 2.65rem;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--color-secondary);
}
.contact-method__icon svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.contact-method h3 { margin: 0 0 0.25rem; font-size: 1rem; }
.contact-method a { overflow-wrap: anywhere; color: var(--color-primary); font-weight: 600; }
.contact-method__apps { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.65rem; }
.contact-method__apps a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: rgba(45, 106, 106, 0.1);
  font-size: 0.8rem;
  text-decoration: none;
}
.contact-method__apps svg { width: 0.9rem; height: 0.9rem; fill: none; stroke: currentColor; stroke-width: 1.7; }

/* --- Prose --------------------------------------------------------------- */

.prose {
  /* Inherit, so prose is readable on a dark block too. It used to be a
     hard-coded dark grey, which vanished on the deep and hero tones. */
  color: inherit;
}

.prose h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.prose h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
}

.prose p,
.prose ul,
.prose ol {
  margin-bottom: 1.25rem;
}

.prose ul,
.prose ol {
  padding-left: 1.5rem;
}

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

.prose a {
  color: var(--color-secondary);
}

.prose--compact {
  font-size: 0.975rem;
}

.prose--compact h3 {
  font-size: 1.05rem;
}

.page-section-block {
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid rgba(26, 58, 74, 0.08);
}

.page-section-block:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* --- Work ---------------------------------------------------------------- */

.disclaimer-banner {
  padding-block: 1.25rem;
  background: rgba(196, 168, 130, 0.15);
  border-block: 1px solid rgba(196, 168, 130, 0.3);
}

.disclaimer-banner p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-primary);
}

.work-list {
  display: grid;
  gap: 2rem;
}

.work-card {
  padding: 2rem;
  background: #fff;
  border: 1px solid rgba(26, 58, 74, 0.08);
  border-radius: var(--radius-card);
  border-left: 4px solid var(--color-accent);
  overflow: hidden;
}

.work-card__media img {
  display: block;
  width: 100%;
  height: 12rem;
  object-fit: cover;
  margin: -2rem -2rem 1.25rem;
  width: calc(100% + 4rem);
  max-width: none;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}

.work-card__type {
  display: inline-block;
  margin-bottom: 0.5rem;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-secondary);
  background: rgba(45, 106, 106, 0.08);
  border-radius: var(--radius-button);
}

.work-card__title {
  margin-bottom: 0.5rem;
  font-size: 1.35rem;
}

.work-card__meta {
  margin-bottom: 1rem;
  font-size: 0.9375rem;
  color: var(--color-text);
  opacity: var(--muted-text-opacity);
}

.work-card__summary {
  margin-bottom: 1rem;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--color-primary);
}

.work-card__capabilities {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(26, 58, 74, 0.08);
}

.work-card__capabilities-label {
  margin-bottom: 0.35rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-secondary);
}

.work-card__capabilities p {
  margin: 0;
  font-size: 0.9375rem;
  color: rgba(44, 44, 44, 0.75);
}

/* --- Insights ------------------------------------------------------------ */

.insights-layout {
  display: grid;
  gap: 2.5rem;
}

.insights-sidebar__title {
  margin-bottom: 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-secondary);
}

.insights-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.insights-categories__link {
  padding: 0.45rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  background: #fff;
  border: 1px solid rgba(26, 58, 74, 0.12);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.insights-categories__link:hover,
.insights-categories__link.is-active {
  color: #fff;
  background: var(--color-secondary);
  border-color: var(--color-secondary);
}

.insights-grid {
  display: grid;
  gap: 1.5rem;
}

.insight-card {
  padding: 1.75rem;
  background: #fff;
  border: 1px solid rgba(26, 58, 74, 0.08);
  border-radius: var(--radius-card);
  transition: box-shadow 0.2s ease;
}

.insight-card:hover {
  box-shadow: 0 8px 28px rgba(26, 58, 74, 0.07);
}

.insight-card.is-hidden {
  display: none;
}

.insight-card__category {
  display: inline-block;
  margin-bottom: 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent-ink);
}

.insight-card__title {
  margin-bottom: 0.65rem;
  font-size: 1.2rem;
}

.insight-card__title a {
  color: var(--color-primary);
  text-decoration: none;
}

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

.insight-card__excerpt {
  margin-bottom: 0.75rem;
  font-size: 0.975rem;
  color: rgba(44, 44, 44, 0.75);
  line-height: 1.6;
}

.insight-card__date {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.8125rem;
  color: var(--color-text);
  opacity: var(--muted-text-opacity);
}

.insight-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-secondary);
  text-decoration: none;
}

.insights-empty {
  padding: 3rem;
  text-align: center;
  color: var(--color-text);
  opacity: var(--muted-text-opacity);
  background: rgba(26, 58, 74, 0.03);
  border-radius: var(--radius-card);
}

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

.alert {
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.975rem;
  border-radius: var(--radius-button);
  border-left: 4px solid;
}

.alert--success {
  background: rgba(45, 106, 106, 0.08);
  border-color: var(--color-secondary);
  color: var(--color-primary);
}

.alert--error {
  background: rgba(180, 60, 60, 0.06);
  border-color: #b43c3c;
  color: #8a2e2e;
}

.contact-form {
  padding: 2rem;
  background: #fff;
  border: 1px solid rgba(26, 58, 74, 0.08);
  border-radius: var(--radius-panel);
  box-shadow: 0 4px 24px rgba(26, 58, 74, 0.04);
}

.form-honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

.form-row {
  display: grid;
  gap: 1.25rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-primary);
}

.form-required {
  color: var(--color-accent-ink);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid rgba(26, 58, 74, 0.15);
  border-radius: var(--radius-button);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(45, 106, 106, 0.15);
  outline: none;
}

.form-group textarea {
  resize: vertical;
  min-height: 6rem;
}

.form-group--checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.form-group--checkbox input {
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.2rem;
  accent-color: var(--color-secondary);
}

.form-group--checkbox label {
  margin-bottom: 0;
  font-weight: 400;
  font-size: 0.9rem;
  line-height: 1.5;
}

.form-actions {
  margin-top: 0.5rem;
}

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

.site-footer {
  padding-block: 4rem 2rem;
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.85);
}

.footer-grid {
  display: grid;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-logo {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
}

.footer-logo:hover,
.footer-logo:focus-visible {
  color: var(--color-accent-on-dark);
  text-decoration: underline;
}

.footer-location {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-nav__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-nav__link {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.9375rem;
}

.footer-nav__link:hover {
  color: var(--color-accent-on-dark);
}

.footer-social__label {
  margin-bottom: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.footer-social__list {
  display: flex;
  gap: 0.75rem;
}

.footer-social__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-button);
  transition: background 0.2s ease, color 0.2s ease;
}

.footer-social__link:hover {
  background: var(--color-accent);
  color: var(--color-primary);
}

.footer-social__link svg {
  width: 1.125rem;
  height: 1.125rem;
  fill: currentColor;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-copyright {
  margin: 0;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

/* A button, not a link: it opens a dialogue rather than going anywhere, and
   on a dark footer an underlined word is easy to miss. */
.footer-cookie-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.1rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-button);
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.footer-cookie-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.6);
}

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

/* --- Cookie Banner ------------------------------------------------------- */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 1.25rem;
  background: #fff;
  border-top: 1px solid rgba(26, 58, 74, 0.1);
  box-shadow: 0 -8px 32px rgba(26, 58, 74, 0.1);
  transform: translateY(100%);
  transition: transform 0.35s ease;
}

.cookie-banner.is-visible {
  transform: translateY(0);
}

.cookie-banner__inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cookie-banner__title {
  margin-bottom: 0.35rem;
  font-size: 1.1rem;
}

.cookie-banner__intro {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(44, 44, 44, 0.75);
  line-height: 1.55;
}

.cookie-banner__options {
  display: grid;
  gap: 1rem;
  margin-top: 0.75rem;
}

.cookie-option {
  padding: 0.75rem;
  background: var(--color-bg);
  border-radius: var(--radius-button);
}

.cookie-option__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-option__label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-primary);
}

.cookie-option__desc {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  color: rgba(44, 44, 44, 0.75);
  line-height: 1.5;
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* --- Error Page ---------------------------------------------------------- */

.page-error {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.error-page {
  width: 100%;
  padding-block: 4rem;
  text-align: center;
}

.error-page__code {
  margin-bottom: 0.5rem;
  font-family: var(--font-heading);
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 600;
  line-height: 1;
  /* The numeral is the page's largest element; softening the accent to 60%
     dropped it to 1.8:1 against the page, and even at full strength the accent
     reaches only 2.8:1 - below AA for large text. */
  color: var(--color-accent-ink);
}

.error-page__title {
  margin-bottom: 1rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.error-page__message {
  max-width: 40ch;
  margin: 0 auto 2rem;
  font-size: 1.0625rem;
  color: rgba(44, 44, 44, 0.75);
}

.error-page__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* --- Desktop Layout ------------------------------------------------------ */

@media (min-width: 48rem) {
  .site-logo__text {
    max-width: none;
    font-size: 1.1rem;
  }

  .nav-toggle {
    display: none;
  }

  .header-nav-wrap {
    display: flex;
    position: static;
    align-items: center;
    gap: 2rem;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .site-nav__list {
    flex-direction: row;
    align-items: center;
    gap: 0.15rem;
  }

  .site-nav__link {
    padding: 0.5rem 0.75rem;
    font-size: 0.88rem;
  }

  .lang-switcher {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    transform: translateX(0.75rem);
  }

  .form-row {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
  }

  .footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .cookie-banner__inner {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }

  .cookie-banner__actions {
    flex-shrink: 0;
    justify-content: flex-end;
  }

  .insights-layout {
    grid-template-columns: 14rem 1fr;
    align-items: start;
  }

  .insights-layout--no-sidebar { grid-template-columns: minmax(0, 1fr); }

  .insights-categories {
    flex-direction: column;
    align-items: stretch;
  }

  .insights-categories__link {
    border-radius: var(--radius-button);
    text-align: left;
  }

  .insights-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64rem) {
  .container {
    padding-inline: 2rem;
  }

  .insights-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===========================================================================
   CONTENT BLOCKS
   Pages are assembled from blocks. Every block is a full-width section whose
   background is chosen in the admin panel ("tone"), so a page reads as a
   sequence of colour bands rather than one flat column.
   =========================================================================== */

.content-block {
  padding-block: var(--section-gap, 3rem);
  background: var(--block-bg, transparent);
  color: var(--block-fg, var(--color-text));
}

.content-block + .content-block { padding-block-start: var(--section-gap, 3rem); }

/* A page that reads as one continuous piece - header, picture, then its text -
   wants its bands closer together than a page of separate sections does. Both
   classes are needed: the "block after block" rule above is just as specific. */
.content-block.block-spacing--compact { padding-block: calc(var(--section-gap, 3rem) * 0.667); }
.content-block.block-spacing--none { padding-block: 0; }

/* The contact form continues the short introduction immediately above it. */
.content-block--rich_text + .content-block--contact_form {
  padding-block-start: 0;
}

/* Two neighbouring bands of the same tone would read as one long section, so
   the second one drops its top padding. */
.block-tone--muted + .block-tone--muted,
.block-tone--deep + .block-tone--deep,
.block-tone--accent + .block-tone--accent { padding-block-start: 0; }

.block-tone--default { --block-bg: transparent; }

.block-tone--muted {
  --block-bg: color-mix(in srgb, var(--color-primary) 3%, var(--color-bg));
}

.block-tone--deep {
  --block-bg: var(--color-primary);
  --block-fg: #fff;
}

.block-tone--accent {
  --block-bg: var(--color-accent);
  --block-fg: var(--color-primary);
}

.block-tone--deep .block-heading__title,
.block-tone--deep .card__title,
.block-tone--deep .feature__title,
.block-tone--deep .stat__value,
.block-tone--deep .block-columns__title { color: #fff; }

.block-tone--deep .block-heading__subtitle,
.block-tone--deep .card__text,
.block-tone--deep .feature__text,
.block-tone--deep .stat__label { color: rgba(255, 255, 255, 0.82); }

.block-tone--deep .card { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.16); }
.block-tone--deep .prose { color: rgba(255, 255, 255, 0.88); }
.block-tone--deep a { color: #fff; }

/* --- shared heading ------------------------------------------------------ */
.block-heading { max-width: 46rem; margin-bottom: 3rem; }

.block-heading__eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-secondary);
}

.block-heading__title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.2;
  font-weight: 600;
  color: var(--color-h2);
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.block-heading__subtitle {
  font-size: 1.06rem;
  line-height: 1.65;
  margin: 0;
  opacity: 0.82;
}

.block-empty { opacity: var(--muted-text-opacity); font-style: italic; }

/* --- grids --------------------------------------------------------------- */
.block-grid { display: grid; gap: 1.5rem; }
.block-grid--1 { grid-template-columns: minmax(0, 1fr); max-width: 48rem; margin-inline: auto; }
.block-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.block-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.block-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 900px) {
  .block-grid--3, .block-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .block-grid--2, .block-grid--3, .block-grid--4 { grid-template-columns: 1fr; }
}

/* --- hero ---------------------------------------------------------------- */
.content-block--hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(28rem, 70vh, 40rem);
  padding-block: calc(var(--section-gap, 3rem) * 0.833) calc(var(--section-gap, 3rem) * 0.667);
  background: linear-gradient(145deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  background-size: cover;
  background-position: center;
  color: #fff;
  overflow: hidden;
}

.content-block--hero-image { background-color: var(--color-primary); }

/* The overlay is a separate element rather than ::before so the two gradients
   (with and without a photograph behind them) stay independent. */
.content-block__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(196, 168, 130, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(255, 255, 255, 0.06) 0%, transparent 40%);
  opacity: var(--hero-overlay, 0.4);
  pointer-events: none;
}

.content-block--hero-image .content-block__overlay {
  background:
    linear-gradient(135deg, rgba(26, 58, 74, 0.88) 0%, rgba(45, 106, 106, 0.78) 100%),
    radial-gradient(ellipse at 20% 80%, rgba(196, 168, 130, 0.12) 0%, transparent 50%);
  opacity: 1;
}

.content-block--hero > .container { position: relative; z-index: 1; }

.block-hero__eyebrow {
  margin: 0 0 0.8rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent-on-dark);
}

.block-hero__title {
  max-width: 24ch;
  margin: 0 0 1rem;
  font-family: var(--font-heading);
  font-size: 2.25rem;
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: #fff;
}

.block-hero__subtitle {
  max-width: 58ch;
  margin: 0 0 2rem;
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.94);
}

.block-hero__title,
.block-hero__subtitle,
.page-hero__title,
.page-hero__lead {
  text-shadow: 3px 0px 3px #00000070;
}

@media (max-width: 620px) {
  .block-hero__title { max-width: 21ch; }
}

.block-hero__lead { max-width: 52ch; margin: 0 0 2rem; font-size: 1.1rem; line-height: 1.7; }
.block-hero__lead > :last-child { margin-bottom: 0; }
.block-hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0; }

/* --- image + text -------------------------------------------------------- */
.block-image-text__grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 768px) {
  .block-image-text__grid { grid-template-columns: 1fr 1.4fr; gap: 4rem; }
  .block-image-text--right .block-image-text__grid { grid-template-columns: 1.4fr 1fr; }
}

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

.block-image-text__media {
  margin: 0;
  max-width: 20rem;
  margin-inline: auto;
}

.block-image-text__media img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-panel);
  box-shadow: 0 20px 60px color-mix(in srgb, var(--color-primary) 15%, transparent);
}

.block-image-text__caption {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-style: italic;
  text-align: center;
  opacity: var(--muted-text-opacity);
}

.block-image-text__body .block-heading { margin-bottom: 1rem; }
.block-image-text__body .block-heading__title { margin-bottom: 0.83em; }

/* The subtitle sits directly under the name as a role line. */
.block-image-text__body .block-heading__subtitle {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-secondary);
  opacity: 1;
}

.block-image-text__body .prose { line-height: 1.7; }
.block-image-text__actions { margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: 0.75rem; }

@media (min-width: 768px) {
  .block-image-text--right .block-image-text__media { order: 2; }
}

/* --- cards --------------------------------------------------------------- */
.card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--color-primary) 8%, transparent);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.card:hover {
  box-shadow: 0 12px 40px color-mix(in srgb, var(--color-primary) 8%, transparent);
  transform: translateY(-2px);
}

.card__image { display: block; width: 100%; height: 170px; object-fit: cover; }
.card__body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1 1 auto; }

/* A card with no picture carries a small drawn mark instead, so a row of
   text-only cards still has something to lead the eye in. */
.card--plain .card__body { padding: 1.25rem 2rem 2rem; }

.card__mark {
  padding: 2rem 2rem 0;
  /* The second bar hangs below the first one; content-box keeps it out of the
     card's height, exactly as the mark it replaces did. */
  height: 3px;
  box-sizing: content-box;
}
.card__mark span {
  display: block;
  width: 3rem;
  height: 3px;
  background: var(--color-accent);
  border-radius: 2px;
}
.card__mark span::after {
  content: "";
  display: block;
  width: 1.5rem;
  height: 3px;
  margin-top: 6px;
  background: var(--color-secondary);
  border-radius: 2px;
  opacity: 0.5;
}

.card__title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.75rem;
  color: var(--color-h3);
}

.card__text { margin: 0 0 1.25rem; line-height: 1.65; opacity: 0.8; }

.card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: auto;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-secondary);
  text-decoration: none;
}
.card__link:hover { color: var(--color-primary); }

/* --- feature list -------------------------------------------------------- */
.block-features { list-style: none; margin: 0; padding: 0; display: grid; gap: 2rem; }

.feature__number {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-accent-ink);
  margin-bottom: 0.6rem;
}

.feature__title { font-size: 1.08rem; font-weight: 600; margin: 0 0 0.4rem; color: var(--color-h3); }
.feature__text { margin: 0; line-height: 1.65; opacity: 0.85; }

/* One column reads as a numbered list of statements rather than a grid of
   features, so it gets the card-per-line treatment. */
.block-features.block-grid--1 { gap: 1rem; }

.block-features.block-grid--1 .feature {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  background: #fff;
  border-left: 3px solid var(--color-accent);
  border-radius: 0 var(--radius-button) var(--radius-button) 0;
  box-shadow: 0 2px 12px color-mix(in srgb, var(--color-primary) 4%, transparent);
  text-align: left;
}

.block-features.block-grid--1 .feature__number {
  flex-shrink: 0;
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.4;
}

.block-features.block-grid--1 .feature__title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-primary);
}

.block-features.block-grid--1 .feature__text { margin-top: 0.35rem; }

/* --- statistics ---------------------------------------------------------- */
.block-stats { display: grid; gap: 2rem; margin: 0; }
.stat { text-align: left; }

.stat__value {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--color-secondary);
}

.stat__label { margin: 0.5rem 0 0; font-size: 0.95rem; line-height: 1.5; opacity: 0.82; }

/* --- quote --------------------------------------------------------------- */
.block-quote { margin: 0; text-align: center; }

.block-quote__portrait {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.5rem;
  display: block;
}

.block-quote__text {
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  line-height: 1.4;
  font-weight: 500;
  margin: 0;
  color: var(--color-h2);
}

.block-tone--deep .block-quote__text { color: #fff; }
.block-quote__text p { margin: 0; }

.block-quote__author {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: var(--muted-text-opacity);
}

/* --- media --------------------------------------------------------------- */
.block-media__figure { margin: 0; }
.block-media__figure img { display: block; width: 100%; height: auto; border-radius: var(--radius-card); }
.block-media--full .block-media__figure img {
  border-radius: 0;
  max-height: 28rem;
  object-fit: cover;
  object-position: center;
}
/* "Wide" has to be wider than the text column, which means breaking out of
   the container. It used to be max-width: 68rem inside a container whose
   content area is ~69.5rem - so the setting made the image 24px narrower than
   "normal", the opposite of its name. */
.block-media--wide .block-media__figure {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: min(84rem, calc(100vw - 2.5rem));
  max-width: none;
}
.block-media__caption { margin-top: 0.85rem; font-size: 0.88rem; opacity: var(--muted-text-opacity); }

/* --- gallery ------------------------------------------------------------- */
.block-gallery { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.gallery-item figure { margin: 0; }
.gallery-item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-card);
}
.gallery-item figcaption { margin-top: 0.5rem; font-size: 0.85rem; opacity: var(--muted-text-opacity); }

/* --- accordion ----------------------------------------------------------- */
.block-accordion { border-top: 1px solid color-mix(in srgb, var(--color-primary) 18%, transparent); }

.accordion-item { border-bottom: 1px solid color-mix(in srgb, var(--color-primary) 18%, transparent); }

.accordion-item__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 0;
  font-family: var(--font-heading);
  font-size: 1.06rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  color: var(--color-h3);
}

.accordion-item__summary::-webkit-details-marker { display: none; }

.accordion-item__summary::after {
  content: "+";
  flex-shrink: 0;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--color-secondary);
  transition: transform 0.18s ease;
}

.accordion-item[open] .accordion-item__summary::after { content: "−"; }
.accordion-item__body { padding-bottom: 1.3rem; }

/* --- columns ------------------------------------------------------------- */
.block-columns { display: grid; gap: 2.25rem; }
.block-columns__title { font-size: 1.1rem; font-weight: 600; margin: 0 0 0.6rem; color: var(--color-h3); }

/* --- cta ----------------------------------------------------------------- */
.content-block--cta,
.content-block + .content-block--cta { padding-block: calc(var(--section-gap, 3rem) * 0.667); }

.block-cta__inner {
  padding: 3rem 2rem;
  text-align: center;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border-radius: var(--radius-panel);
  color: #fff;
}

.block-cta__inner .block-heading { margin-inline: auto; margin-bottom: 1.25rem; }
.block-cta__inner .block-heading__title,
.block-cta__inner .block-heading__eyebrow { color: #fff; }

.block-cta__inner .prose {
  max-width: 48ch;
  margin-inline: auto;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  line-height: 1.65;
  color: #fff;
}

.block-cta__inner .prose > :last-child { margin-bottom: 0; }

.block-cta__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin: 1.75rem 0 0; }

/* The panel is always a dark field, whatever tone the band around it has. */
.block-cta__inner .btn--primary {
  background: #fff;
  border-color: #fff;
  color: var(--color-primary);
}

.block-cta__inner .btn--primary:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-primary);
}

/* --- contact ------------------------------------------------------------- */
.block-contact__details { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 0.4rem; }
.block-contact__actions { margin-top: 2rem; }

/* --- spacer -------------------------------------------------------------- */
.block-spacer { width: 100%; }

/* ---------------------------------------------------------------------------
   Blocks on a dark ground
   The hero image and the "deep" tone put white text on a dark field, so the
   controls that assume a light page have to be restated here.
   --------------------------------------------------------------------------- */
.content-block--hero-image,
.block-tone--deep { color: #fff; }

.content-block--hero-image .block-hero__lead,
.block-tone--deep .prose { color: rgba(255, 255, 255, 0.9); }

.content-block--hero-image .btn--ghost,
.block-tone--deep .btn--ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

.content-block--hero-image .btn--ghost:hover,
.block-tone--deep .btn--ghost:hover { background: rgba(255, 255, 255, 0.12); }

.content-block--hero-image .btn--primary,
.block-tone--deep .btn--primary {
  background: #fff;
  border-color: #fff;
  color: var(--color-primary);
}

.content-block--hero-image .btn--primary:hover,
.block-tone--deep .btn--primary:hover { background: rgba(255, 255, 255, 0.88); }

/* The accent tone is a light warm field: dark text, dark outline. */
.block-tone--accent .btn--primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.block-tone--accent .btn--ghost {
  color: var(--color-primary);
  border-color: color-mix(in srgb, var(--color-primary) 40%, transparent);
}

/* A centred heading introduces the band; the content under it keeps its own
   alignment, so a centred title does not centre a list of statements. */
.block-align--center .block-heading { margin-inline: auto; text-align: center; }

/* A short rich-text band with a centred heading is the page's opening
   paragraph: bigger type, centred. How tight the band is comes from its
   spacing setting. */
.content-block--rich_text.block-align--center .prose {
  font-size: clamp(1.2rem, 2.5vw, 1.45rem);
  line-height: 1.75;
  color: var(--color-primary);
  text-align: center;
}

.content-block--rich_text.block-align--center .prose > :last-child { margin-bottom: 0; }

/* --- services in full ---------------------------------------------------- */
.service-list { display: grid; gap: 2.5rem; }

.service-detail {
  padding: 2.5rem;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--color-primary) 8%, transparent);
  border-radius: var(--radius-panel);
  overflow: hidden;
}

/* The picture bleeds to the card's edges, so it reads as the card's own top. */
.service-detail__media { margin: -2.5rem -2.5rem 1.5rem; }

.service-detail__media img {
  display: block;
  width: 100%;
  height: 14rem;
  object-fit: cover;
}

.service-detail__header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.service-detail__icon {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.5rem;
  color: var(--color-secondary);
  background: color-mix(in srgb, var(--color-secondary) 8%, transparent);
  border-radius: var(--radius-button);
}

.service-detail__icon svg { width: 100%; height: 100%; fill: currentColor; }
.service-detail__icon .service-detail__icon-svg { fill: none; stroke: currentColor; }

.service-detail__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 2.5vw, 1.6rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-h2);
}

.service-detail__intro {
  margin: 0 0 1.75rem;
  font-size: 1.0625rem;
  line-height: 1.7;
  opacity: 0.85;
}

.service-detail__columns {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.service-detail__label {
  margin: 0 0 0.65rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-secondary);
}

.service-detail__columns .prose ul { margin: 0; padding-left: 1.5rem; }

@media (min-width: 768px) {
  .service-detail__columns { grid-template-columns: 1fr 1fr; }
}

/* ---------------------------------------------------------------------------
   Stratos
   A theme carries its palette, type and corners through the variables above.
   The few things a variable cannot say - the shape of the eyebrow, which way
   the hero's scrim runs, how far the headings are pushed - live here, scoped
   to the theme's own class so no other theme sees them.
   --------------------------------------------------------------------------- */
.theme-stratos .block-hero__eyebrow,
.theme-stratos .block-heading__eyebrow {
  display: inline-block;
  padding: 0.45rem 1.1rem;
  border: 1px solid color-mix(in srgb, currentColor 40%, transparent);
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
}

/* The scrim runs across rather than down, so the photograph stays readable on
   the side the text does not occupy. */
.theme-stratos .content-block--hero-image .content-block__overlay {
  background: linear-gradient(
    100deg,
    color-mix(in srgb, var(--color-primary) 96%, transparent) 0%,
    color-mix(in srgb, var(--color-primary) 82%, transparent) 38%,
    color-mix(in srgb, var(--color-primary) 30%, transparent) 100%
  );
}

.theme-stratos .block-hero__title {
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 16ch;
}

.theme-stratos .block-heading__title {
  letter-spacing: -0.03em;
  line-height: 1.1;
}

/* Cards sit on a hairline rather than a shadow, and lift on hover. */
.theme-stratos .card {
  border-color: color-mix(in srgb, var(--color-primary) 12%, transparent);
}

.theme-stratos .card:hover {
  box-shadow: 0 18px 50px color-mix(in srgb, var(--color-primary) 12%, transparent);
}

/* The numbered list reads as a stack of pills. */
.theme-stratos .block-features.block-grid--1 .feature {
  border-left: none;
  border-radius: var(--radius-panel);
  padding-inline: 1.75rem;
}

.theme-stratos .block-features.block-grid--1 .feature__number {
  color: var(--color-secondary);
}

/* ---------------------------------------------------------------------------
   Section backgrounds
   A band can carry a picture as well as its tone colour. The picture sits in
   its own layer so motion can transform it without moving the text, and the
   band's colour stays underneath - a picture with transparency lets it through,
   which is why both can be set at once.
   --------------------------------------------------------------------------- */
.content-block.has-bg,
.page-hero.has-bg {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.section-bg,
.page-hero__image,
.section-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.section-bg {
  z-index: -2;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.page-hero__image {
  z-index: -2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* The scrim is the band's own colour laid over the picture, so darkening a
   photograph until the text reads does not introduce a colour of its own. */
.section-scrim {
  z-index: -1;
  background: var(--block-bg, var(--color-primary));
}

.block-tone--default .section-scrim { background: var(--color-primary); }

/* The container has to sit above both layers. */
.content-block.has-bg > .container,
.content-block.has-bg > .block-media__bleed,
.page-hero.has-bg > .container { position: relative; z-index: 1; }

/* A header with a picture needs room for it: the plain band is sized for two
   lines of text and would crop a photograph to a strip. */
.page-hero.has-bg {
  padding-block: calc(var(--section-gap, 3rem) * 1.083) calc(var(--section-gap, 3rem) * 0.833);
  border-bottom: none;
  background: var(--color-primary);
}

/* In responsive-image mode the complete source image defines the header's
   aspect ratio. It scales with the page width without cropping or distortion,
   while the title and lead remain layered over it. */
.page-hero.page-hero--responsive-image {
  display: grid;
  min-height: 0;
  padding-block: 0;
}

.page-hero--responsive-image > .page-hero__image,
.page-hero--responsive-image > .section-scrim,
.page-hero--responsive-image > .container {
  grid-area: 1 / 1;
}

.page-hero.page-hero--responsive-image > .page-hero__image {
  position: relative;
  inset: auto;
  z-index: 0;
  align-self: start;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  animation: none;
  transform: none;
  will-change: auto;
}

.page-hero--responsive-image > .section-scrim { z-index: 1; }

.page-hero--responsive-image > .container {
  z-index: 2;
  align-self: center;
  padding-block: calc(var(--section-gap, 3rem) * 1.083) calc(var(--section-gap, 3rem) * 0.833);
}

/* A very wide image can be shallower than translated text on a phone. In that
   case keep the whole picture visible and place the readable text directly
   below it instead of clipping either one. */
@media (max-width: 620px) {
  .page-hero.page-hero--responsive-image { display: block; }
  .page-hero--responsive-image > .section-scrim { display: none; }
  .page-hero--responsive-image > .container {
    padding-block: 1.5rem;
    background: var(--color-primary);
  }
}

/* --- fit ------------------------------------------------------------------ */
.bg-fit--cover .section-bg { background-size: cover; }
.bg-fit--cover .page-hero__image { object-fit: cover; }
.bg-fit--adaptive .section-bg { background-size: cover; background-position: center; }
.bg-fit--adaptive .page-hero__image { object-fit: cover; object-position: center; }
.bg-fit--adaptive.bg-adaptive--portrait .section-bg {
  background-size: contain;
  background-repeat: no-repeat;
}
.bg-fit--adaptive.bg-adaptive--portrait .page-hero__image { object-fit: contain; }
.bg-fit--contain .section-bg { background-size: contain; }
.bg-fit--contain .page-hero__image { object-fit: contain; }
.bg-fit--tile .section-bg { background-size: auto; background-repeat: repeat; }

/* "Fixed" is the parallax look. It is ignored on touch screens, where fixed
   attachment either judders or is dropped by the browser anyway. */
@media (hover: hover) and (pointer: fine) {
  .bg-fit--fixed .section-bg { background-attachment: fixed; background-size: cover; }
}

/* --- position ------------------------------------------------------------- */
.bg-pos--center .section-bg { background-position: center; }
.bg-pos--center .page-hero__image { object-position: center; }
.bg-pos--top .section-bg { background-position: center top; }
.bg-pos--top .page-hero__image { object-position: center top; }
.bg-pos--bottom .section-bg { background-position: center bottom; }
.bg-pos--bottom .page-hero__image { object-position: center bottom; }
.bg-pos--left .section-bg { background-position: left center; }
.bg-pos--left .page-hero__image { object-position: left center; }
.bg-pos--right .section-bg { background-position: right center; }
.bg-pos--right .page-hero__image { object-position: right center; }

/* --- motion --------------------------------------------------------------- */
/* Scale and translate only: both are composited, so a slow pan does not force
   the page to re-paint on every frame. */
@keyframes bg-ken-burns {
  from { transform: scale(1.06) translate3d(-1.2%, -0.8%, 0); }
  to   { transform: scale(1.16) translate3d(1.2%, 0.8%, 0); }
}

@keyframes bg-drift {
  from { transform: scale(1.08) translate3d(-1.5%, 0, 0); }
  to   { transform: scale(1.08) translate3d(1.5%, 0, 0); }
}

@keyframes bg-zoom-in {
  from { transform: scale(1); }
  to   { transform: scale(1.1); }
}

.bg-effect--ken-burns .section-bg,
.bg-effect--ken-burns .page-hero__image {
  animation: bg-ken-burns 28s ease-in-out infinite alternate;
  will-change: transform;
}

.bg-effect--drift .section-bg,
.bg-effect--drift .page-hero__image {
  animation: bg-drift 22s ease-in-out infinite alternate;
  will-change: transform;
}

.bg-effect--zoom-in .section-bg,
.bg-effect--zoom-in .page-hero__image {
  animation: bg-zoom-in 12s ease-out forwards;
  will-change: transform;
}

/* A moving photograph behind text is exactly what this setting is there to
   stop. The reset at the top of this file already shortens animations; this
   removes the transform as well, so nothing is left mid-zoom. */
@media (prefers-reduced-motion: reduce) {
  .bg-effect--ken-burns .section-bg,
  .bg-effect--ken-burns .page-hero__image,
  .bg-effect--drift .section-bg,
  .bg-effect--drift .page-hero__image,
  .bg-effect--zoom-in .section-bg,
  .bg-effect--zoom-in .page-hero__image {
    animation: none;
    transform: none;
  }
}

/* --- text over a picture --------------------------------------------------- */
.text-on-bg--light,
.text-on-bg--light .block-heading__title,
.text-on-bg--light .block-heading__subtitle,
.text-on-bg--light .prose,
.text-on-bg--light .card__title,
.text-on-bg--light .feature__title,
.text-on-bg--light .block-hero__title,
.text-on-bg--light .page-hero__title,
.text-on-bg--light .page-hero__lead { color: #fff; }

/* Not the accent: over a photograph it lands between 1.4:1 and 2.0:1 whatever
   the veil, because the accent is a mid-tone and the ground underneath is
   unknown. White holds up at the veil strengths that make body text readable
   in the first place. */
.text-on-bg--light .block-heading__eyebrow,
.text-on-bg--light .block-hero__eyebrow { color: #fff; }

.text-on-bg--light .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, 0.45); }

.text-on-bg--dark,
.text-on-bg--dark .block-heading__title,
.text-on-bg--dark .prose,
.text-on-bg--dark .block-hero__title,
.text-on-bg--dark .page-hero__title,
.text-on-bg--dark .page-hero__lead { color: var(--color-primary); }

.text-on-bg--dark .block-heading__eyebrow,
.text-on-bg--dark .block-hero__eyebrow { color: var(--color-accent-ink); }

/* ---------------------------------------------------------------------------
   The check before a message is sent
   The question and its field live in the form; with JavaScript they are asked
   for here instead, at the moment of sending.
   --------------------------------------------------------------------------- */
.check-dialog {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.check-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--color-primary) 55%, transparent);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.check-dialog__panel {
  position: relative;
  width: 100%;
  max-width: 26rem;
  padding: 2rem;
  background: var(--color-bg);
  border-radius: var(--radius-panel);
  box-shadow: 0 24px 70px color-mix(in srgb, var(--color-primary) 28%, transparent);
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.check-dialog.is-open .check-dialog__backdrop { opacity: 1; }
.check-dialog.is-open .check-dialog__panel { opacity: 1; transform: none; }

.check-dialog__title {
  margin: 0 0 0.4rem;
  font-size: 1.25rem;
  color: var(--color-h2);
}

.check-dialog__question {
  margin: 0 0 1.1rem;
  font-size: 1.0625rem;
  line-height: 1.5;
}

.check-dialog__input {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: 1.25rem;
  text-align: center;
  color: var(--color-text);
  background: #fff;
  border: 2px solid color-mix(in srgb, var(--color-primary) 20%, transparent);
  border-radius: var(--radius-button);
}

.check-dialog__input:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-color: var(--color-secondary);
}

.check-dialog__error {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  color: var(--color-accent-ink);
}

.check-dialog__actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

/* The page behind must not scroll while the dialog is up. */
body.has-dialog { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .check-dialog__backdrop,
  .check-dialog__panel { transition: none; }
  .check-dialog__panel { transform: none; }
}

@media (max-width: 480px) {
  .check-dialog__actions { flex-direction: column-reverse; }
  .check-dialog__actions .btn { width: 100%; }
}

/* ---------------------------------------------------------------------------
   Boxed layout
   The shell is a plain wrapper in a full-width theme. A boxed theme lifts it
   off the page: a rounded frame with the theme's own choice of colour or
   picture showing around it.
   --------------------------------------------------------------------------- */
.layout--boxed {
  /* Something has to be behind the frame even when the theme sets nothing. */
  background-color: color-mix(in srgb, var(--color-primary) 8%, var(--color-bg));
}

.layout--boxed .site-shell {
  max-width: 84rem;
  margin-inline: auto;
  background: var(--color-bg);
  border-radius: 18px;
  /* Not overflow: hidden. Any overflow but visible makes this a scroll
     container, and a sticky header inside one sticks to the container rather
     than to the window - which looks exactly like a header that is not sticky.
     The corners are rounded on the header and footer themselves instead. */
  box-shadow: 0 18px 60px color-mix(in srgb, var(--color-primary) 16%, transparent);
}

.layout--boxed .site-header {
  border-radius: 18px 18px 0 0;
}

.layout--boxed .site-footer {
  border-radius: 0 0 18px 18px;
}

@media (min-width: 992px) {
  .layout--boxed .site-shell {
    margin-block: 2rem;
  }
}

/* Sticky in a boxed frame too. It rounds its own top corners, so it keeps the
   frame's shape while it is at rest and squares off once it lifts away. */
.layout--boxed .site-header {
  position: sticky;
  top: 0;
}

.layout--boxed .site-header.is-stuck {
  border-radius: 0;
}

/* A full-bleed band inside the frame is bounded by the frame, so the tricks
   that break out of the container have to stop at its edge. */
.layout--boxed .block-media--wide .block-media__figure {
  width: 100%;
  left: auto;
  transform: none;
}

/* On a small screen the frame is the whole screen: margins and rounded corners
   only waste room. */
@media (max-width: 991px) {
  .layout--boxed .site-shell {
    border-radius: 0;
    box-shadow: none;
  }
}

/* ---------------------------------------------------------------------------
   "The site is closed" reminder
   Only ever seen by someone signed in: a visitor is served the closed page
   instead. It sits above everything, including a boxed frame, because its whole
   job is to be noticed.
   --------------------------------------------------------------------------- */
.maintenance-bar {
  position: relative;
  z-index: 1100;
  background: #7a3b12;
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.5;
}

.maintenance-bar__inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-block: 0.7rem;
  flex-wrap: wrap;
}

.maintenance-bar__dot {
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ffb85c;
  box-shadow: 0 0 0 4px rgba(255, 184, 92, 0.25);
}

.maintenance-bar__text { margin: 0; flex: 1 1 20rem; }
.maintenance-bar__text strong { font-weight: 600; }

.maintenance-bar__link {
  flex-shrink: 0;
  padding: 0.35rem 0.9rem;
  color: #7a3b12;
  background: #fff;
  border-radius: var(--radius-button);
  font-weight: 600;
  text-decoration: none;
}

.maintenance-bar__link:hover { background: #ffe6c7; color: #7a3b12; }

/* The bar is outside the frame, so the frame starts under it. */
.layout--boxed .maintenance-bar { border-radius: 0; }

/* ---------------------------------------------------------------------------
   A soft shadow under the hero
   The hero band and any page header carrying a picture sit slightly above what
   follows. Two things make it work: the shadow is cast downward only, and the
   band is lifted a layer so the next section's own background does not paint
   over it.
   --------------------------------------------------------------------------- */
.content-block--hero,
.page-hero.has-bg {
  position: relative;
  /* Lifted a layer, or the next section's own background paints over it. */
  z-index: 1;
  /* Keep the separation soft. Mixing black with black made this effectively
     a solid black strip where two large pictures met. */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

/* --- contact details in the footer ---------------------------------------- */
.footer-contact {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.3rem;
  font-size: 0.9rem;
}

.footer-contact__link {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.footer-contact__link:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
