/* ==========================================================================
   We Lead — foundation
   Reset, tokens, typography, layout primitives, buttons.

   A client build overrides the token values in its child theme and changes
   nothing else. Never write a literal colour or a hard-coded gap in a
   section file — add a token here instead.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Colour — ground is the page, ink is the text and the dark band. */
  --wl-ground: #ffffff;
  --wl-sand: #f5f3ef;
  --wl-ink: #14181c;
  --wl-ink-soft: #5a646e;
  --wl-rule: #e3e0da;
  --wl-accent: #0e5c7f;
  --wl-accent-hover: #0a4661;
  --wl-on-accent: #ffffff;
  --wl-on-ink: #f2f1ee;
  --wl-on-ink-soft: #a7b0b8;

  /* Type */
  --wl-font-display: Georgia, "Times New Roman", serif;
  --wl-font-text: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  --wl-text-xs: 0.8125rem;
  --wl-text-sm: 0.9375rem;
  --wl-text-base: 1.0625rem;
  --wl-text-lg: clamp(1.125rem, 0.4vw + 1rem, 1.3125rem);
  --wl-text-xl: clamp(1.375rem, 1vw + 1rem, 1.75rem);
  --wl-text-2xl: clamp(1.75rem, 2vw + 1.125rem, 2.5rem);
  --wl-text-3xl: clamp(2.25rem, 4vw + 1.25rem, 3.75rem);
  --wl-text-4xl: clamp(2.75rem, 6vw + 1.25rem, 5rem);

  --wl-leading-tight: 1.04;
  --wl-leading-snug: 1.25;
  --wl-leading-body: 1.6;
  --wl-tracking-tight: -0.02em;
  --wl-tracking-wide: 0.14em;

  /* Space */
  --wl-space-2xs: 0.25rem;
  --wl-space-xs: 0.5rem;
  --wl-space-sm: 0.75rem;
  --wl-space-md: 1.25rem;
  --wl-space-lg: 2rem;
  --wl-space-xl: 3rem;
  --wl-space-2xl: clamp(3.5rem, 7vw, 6.5rem);
  --wl-space-section: clamp(3.5rem, 8vw, 7rem);

  /* Layout */
  --wl-container: 1200px;
  --wl-measure: 66ch;
  --wl-gutter: clamp(1rem, 4vw, 3rem);
  --wl-radius: 0;

  /* Motion */
  --wl-ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --wl-duration: 220ms;
}

/* --------------------------------------------------------------------------
   2. Reset
   -------------------------------------------------------------------------- */

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

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

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd {
  margin: 0;
}

body {
  background: var(--wl-ground);
  color: var(--wl-ink);
  font-family: var(--wl-font-text);
  font-size: var(--wl-text-base);
  line-height: var(--wl-leading-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

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

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

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--wl-font-display);
  font-weight: 400;
  line-height: var(--wl-leading-tight);
  letter-spacing: var(--wl-tracking-tight);
  text-wrap: balance;
}

h1 { font-size: var(--wl-text-4xl); }
h2 { font-size: var(--wl-text-3xl); }
h3 { font-size: var(--wl-text-xl); line-height: var(--wl-leading-snug); }
h4 { font-size: var(--wl-text-lg); line-height: var(--wl-leading-snug); }

a {
  color: var(--wl-accent);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--wl-accent-hover);
}

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

strong { font-weight: 600; }

/* Rich text coming out of a WYSIWYG field. */
.wl-rich > * + * { margin-top: var(--wl-space-md); }
.wl-rich ul,
.wl-rich ol { padding-left: 1.2em; }
.wl-rich li + li { margin-top: var(--wl-space-2xs); }
.wl-rich h2,
.wl-rich h3 { margin-top: var(--wl-space-lg); }
.wl-rich img { margin-block: var(--wl-space-lg); }

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

.wl-lede {
  font-size: var(--wl-text-lg);
  line-height: 1.5;
  color: var(--wl-ink-soft);
}

.wl-eyebrow {
  font-size: var(--wl-text-xs);
  letter-spacing: var(--wl-tracking-wide);
  text-transform: uppercase;
  color: var(--wl-ink-soft);
  font-weight: 600;
}

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

.wl-skip-link {
  position: absolute;
  left: var(--wl-space-md);
  top: -4rem;
  z-index: 100;
  background: var(--wl-ink);
  color: var(--wl-on-ink);
  padding: var(--wl-space-sm) var(--wl-space-md);
  text-decoration: none;
  transition: top var(--wl-duration) var(--wl-ease);
}

.wl-skip-link:focus {
  top: var(--wl-space-md);
  color: var(--wl-on-ink);
}

/* --------------------------------------------------------------------------
   4. Layout primitives
   -------------------------------------------------------------------------- */

.wl-container {
  width: 100%;
  max-width: var(--wl-container);
  margin-inline: auto;
  padding-inline: var(--wl-gutter);
}

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

/* Tone modifiers. Every section accepts these three and nothing else. */
.wl-section.is-ground { background: var(--wl-ground); color: var(--wl-ink); }
.wl-section.is-sand   { background: var(--wl-sand);   color: var(--wl-ink); }
.wl-section.is-ink    { background: var(--wl-ink);    color: var(--wl-on-ink); }

.wl-section.is-ink .wl-lede,
.wl-section.is-ink .wl-eyebrow { color: var(--wl-on-ink-soft); }
.wl-section.is-ink a { color: #8fcdea; }
.wl-section.is-ink a:hover { color: #b6dff1; }
.wl-section.is-ink :focus-visible { outline-color: #8fcdea; }

/* Two columns that stack on a phone. */
.wl-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--wl-space-xl);
  align-items: center;
}

@media (min-width: 48em) {
  .wl-split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--wl-space-2xl);
  }

  /* Image left: reorder visually, leave the DOM order alone so the
     heading is still read first. */
  .wl-split.has-media-left > .wl-split__media { order: -1; }
}

.wl-split > * { min-width: 0; }

.wl-stack {
  display: flex;
  flex-direction: column;
  gap: var(--wl-space-md);
  align-items: flex-start;
}

.wl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wl-space-sm);
  margin-top: var(--wl-space-xs);
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */

.wl-btn {
  display: inline-block;
  background: var(--wl-accent);
  color: var(--wl-on-accent);
  padding: 0.9rem 1.75rem;
  border: 1px solid var(--wl-accent);
  border-radius: var(--wl-radius);
  font-size: var(--wl-text-sm);
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  min-height: 44px;
  transition: background var(--wl-duration) var(--wl-ease),
              border-color var(--wl-duration) var(--wl-ease);
}

.wl-btn:hover,
.wl-btn:focus-visible {
  background: var(--wl-accent-hover);
  border-color: var(--wl-accent-hover);
  color: var(--wl-on-accent);
}

.wl-btn--secondary {
  background: transparent;
  color: currentColor;
  border-color: currentColor;
}

.wl-btn--secondary:hover,
.wl-btn--secondary:focus-visible {
  background: currentColor;
  border-color: currentColor;
  color: var(--wl-ground);
}

.wl-section.is-ink .wl-btn {
  background: var(--wl-on-ink);
  border-color: var(--wl-on-ink);
  color: var(--wl-ink);
}

.wl-section.is-ink .wl-btn:hover,
.wl-section.is-ink .wl-btn:focus-visible {
  background: #ffffff;
  border-color: #ffffff;
  color: var(--wl-ink);
}

/* --------------------------------------------------------------------------
   6. Site header and footer
   -------------------------------------------------------------------------- */

.wl-header {
  border-bottom: 1px solid var(--wl-rule);
}

.wl-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wl-space-md);
  min-height: 72px;
  padding-block: var(--wl-space-sm);
}

.wl-brand {
  font-family: var(--wl-font-display);
  font-size: var(--wl-text-xl);
  color: var(--wl-ink);
  text-decoration: none;
  line-height: 1;
}

.wl-brand img { max-height: 44px; width: auto; }

.wl-nav__toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--wl-space-xs);
  background: none;
  border: 1px solid var(--wl-rule);
  padding: 0.6rem 0.9rem;
  min-height: 44px;
  cursor: pointer;
  font-size: var(--wl-text-sm);
}

.wl-nav__list {
  display: flex;
  flex-direction: column;
  gap: var(--wl-space-sm);
  list-style: none;
  margin: 0;
  padding: 0 0 var(--wl-space-md);
}

.wl-nav__list a {
  color: var(--wl-ink);
  text-decoration: none;
  display: inline-block;
  padding-block: 0.4rem;
}

.wl-nav__list a:hover,
.wl-nav__list .current-menu-item > a {
  color: var(--wl-accent);
}

/* Closed on a phone until the toggle opens it. */
.wl-nav[data-open="false"] .wl-nav__list { display: none; }

@media (min-width: 48em) {
  .wl-nav__toggle { display: none; }

  .wl-nav__list,
  .wl-nav[data-open="false"] .wl-nav__list {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--wl-space-lg);
    padding: 0;
  }
}

.wl-footer {
  background: var(--wl-ink);
  color: var(--wl-on-ink);
  padding-block: var(--wl-space-2xl);
}

.wl-footer a { color: var(--wl-on-ink); }
.wl-footer a:hover { color: #ffffff; }

.wl-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wl-space-lg);
  justify-content: space-between;
  align-items: flex-end;
}

.wl-footer__brand {
  font-family: var(--wl-font-display);
  font-size: var(--wl-text-2xl);
  line-height: 1;
}

.wl-footer__meta {
  font-size: var(--wl-text-sm);
  color: var(--wl-on-ink-soft);
}

.wl-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wl-space-md);
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--wl-text-sm);
}

/* --------------------------------------------------------------------------
   6b. Page title
   Only rendered when no section on the page provides the H1 — normal while
   a hero is still being designed. Deliberately plain: this is the page's
   heading doing its job, not a hero pretending to be finished.
   -------------------------------------------------------------------------- */

.wl-page-title {
  padding-block: var(--wl-space-2xl) var(--wl-space-lg);
}

.wl-page-title__text {
  font-size: var(--wl-text-3xl);
  max-width: 28ch;
}

/* --------------------------------------------------------------------------
   7. Editor fallback
   Only seen when ACF is inactive or a page has no sections yet.
   -------------------------------------------------------------------------- */

.wl-fallback {
  padding-block: var(--wl-space-section);
}

.wl-fallback__notice {
  border-left: 3px solid var(--wl-accent);
  padding: var(--wl-space-md) var(--wl-space-lg);
  background: var(--wl-sand);
  max-width: var(--wl-measure);
}
