/* ============================================================
   Taymont — compiled design-system tokens, base & components
   Light theme (Seashell) with mustard accent. Dark "tone" reverses
   the tokens for footers, quotes and any block set to dark.
   ============================================================ */

/* ---------- Aileron (self-hosted) ---------- */
@font-face { font-family: 'Aileron'; font-style: normal; font-weight: 300; font-display: swap; src: url('fonts/Aileron-Light.woff2') format('woff2'); }
@font-face { font-family: 'Aileron'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/Aileron-Regular.woff2') format('woff2'); }
@font-face { font-family: 'Aileron'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/Aileron-SemiBold.woff2') format('woff2'); }
@font-face { font-family: 'Aileron'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/Aileron-Bold.woff2') format('woff2'); }
@font-face { font-family: 'Aileron'; font-style: normal; font-weight: 800; font-display: swap; src: url('fonts/Aileron-Heavy.woff2') format('woff2'); }
@font-face { font-family: 'Aileron'; font-style: normal; font-weight: 900; font-display: swap; src: url('fonts/Aileron-Black.woff2') format('woff2'); }

:root {
  /* ============================================================
     APPROVED PALETTE — eight colours only (British spelling)
     ============================================================ */
  --colour-soft-pink:     #FFB6EF;
  --colour-signal-yellow: #FFCC19;
  --colour-black:         #000000;
  --colour-white:         #FFFFFF;
  --colour-green:         #00804A;
  --colour-orange:        #FF5E29;
  --colour-electric-blue: #2A62F4;
  --colour-burgundy:      #800039;

  /* Semantic roles */
  --colour-ink:            var(--colour-black);
  --colour-paper:          var(--colour-white);
  --colour-primary-action: var(--colour-signal-yellow);
  --colour-header:         var(--colour-black);

  /* Local background / foreground — the automatic black-or-white text engine.
     Default surface is white paper with black ink; coloured backgrounds and
     dark sections override --local-foreground. Text tokens resolve to
     currentColor (always live) so a flipped section can never go dark-on-dark. */
  --local-background: var(--colour-white);
  --local-foreground: var(--colour-black);

  /* ============================================================
     Dot-pattern system (CSS radial-gradient, colourable)
     ============================================================ */
  --dot-pattern-colour:   var(--colour-black);
  --dot-size:             1.6px;
  --dot-spacing:          22px;
  --dot-opacity-subtle:   0.12;
  --dot-opacity-standard: 0.22;
  --dot-opacity-strong:   0.38;
  --dot-pattern-opacity:  var(--dot-opacity-standard);

  /* Spacing */
  --space-xs: 4px; --space-sm: 8px; --space-md: 16px;
  --space-lg: 24px; --space-xl: 40px; --space-xxl: 64px;
  --section-padding:          clamp(64px, 9vw, 132px);
  --section-padding-compact:  clamp(40px, 6vw, 72px);
  --section-padding-generous: clamp(96px, 13vw, 200px);

  /* Flat & sharp — no rounding, no shadow anywhere by default */
  --radius-sm: 0; --radius-md: 0; --radius-lg: 0; --radius-xl: 0; --radius-pill: 0;

  /* Motion */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --duration-fast: 140ms;
  --duration:      220ms;

  /* Typography — Aileron */
  --font-display: 'Aileron', system-ui, sans-serif;
  --font-body:    'Aileron', system-ui, sans-serif;

  /* ============================================================
     Compatibility aliases — existing components reference these.
     Foreground tokens = currentColor (live, never frozen).
     ============================================================ */
  --paper:        currentColor;   /* primary text */
  --stone:        currentColor;   /* was muted grey — now ink/paper, no grey */
  --ocean:        var(--local-background);
  --deep-ocean:   var(--local-background);
  --accent:       var(--colour-signal-yellow);
  --accent-fg:    var(--colour-black);
  --accent-hover: var(--colour-white);
  --border:        color-mix(in srgb, currentColor 22%, transparent);
  --border-strong: currentColor;

  /* Brand colours remapped to the approved palette */
  --c-tea:       var(--colour-green);
  --c-tangerine: var(--colour-orange);
  --c-pink:      var(--colour-soft-pink);
  --c-sky:       var(--colour-electric-blue);
  --c-lavender:  var(--colour-electric-blue);
  --c-red:       var(--colour-burgundy);

  /* M3 token names still referenced by components → remapped to the flat
     black/white/yellow system (no shadows, no rounding). */
  --md-sys-color-primary:               var(--colour-signal-yellow);
  --md-sys-color-on-primary:            var(--colour-black);
  --md-sys-color-primary-container:     var(--colour-signal-yellow);
  --md-sys-color-on-primary-container:  var(--colour-black);
  --md-sys-color-secondary-container:   var(--local-background);
  --md-sys-color-on-secondary-container: currentColor;
  --md-sys-color-inverse-primary:       var(--colour-signal-yellow);
  --md-sys-color-surface:               var(--local-background);
  --md-sys-color-on-surface:            currentColor;
  --md-sys-color-surface-variant:       var(--local-background);
  --md-sys-color-on-surface-variant:    currentColor;
  --md-sys-color-surface-container-lowest:  var(--local-background);
  --md-sys-color-surface-container-low:     var(--local-background);
  --md-sys-color-surface-container:         var(--local-background);
  --md-sys-color-surface-container-high:    color-mix(in srgb, currentColor 6%, var(--local-background));
  --md-sys-color-surface-container-highest: color-mix(in srgb, currentColor 9%, var(--local-background));
  --md-sys-color-outline:               currentColor;
  --md-sys-color-outline-variant:       color-mix(in srgb, currentColor 20%, transparent);
  --md-sys-elevation-1: none;
  --md-sys-elevation-2: none;
  --md-sys-elevation-3: none;
  --md-sys-shape-corner-none: 0; --md-sys-shape-corner-xs: 0; --md-sys-shape-corner-sm: 0;
  --md-sys-shape-corner-md: 0; --md-sys-shape-corner-lg: 0; --md-sys-shape-corner-xl: 0;
  --md-sys-shape-corner-full: 0;
  --md-sys-state-hover: 0.08; --md-sys-state-focus: 0.12; --md-sys-state-pressed: 0.12;
}

/* ============================================================
   AUTOMATIC BLACK-OR-WHITE FOREGROUND
   Every palette background establishes its required text colour
   (mapping from the brief's contrast table). Nested text inherits.
   ============================================================ */
.has-soft-pink-background-color     { --local-background: var(--colour-soft-pink);     --local-foreground: var(--colour-black); }
.has-signal-yellow-background-color { --local-background: var(--colour-signal-yellow); --local-foreground: var(--colour-black); }
.has-white-background-color         { --local-background: var(--colour-white);         --local-foreground: var(--colour-black); }
.has-orange-background-color        { --local-background: var(--colour-orange);        --local-foreground: var(--colour-black); }
.has-black-background-color         { --local-background: var(--colour-black);         --local-foreground: var(--colour-white); }
.has-green-background-color         { --local-background: var(--colour-green);         --local-foreground: var(--colour-white); }
.has-electric-blue-background-color { --local-background: var(--colour-electric-blue); --local-foreground: var(--colour-white); }
.has-burgundy-background-color      { --local-background: var(--colour-burgundy);      --local-foreground: var(--colour-white); }

/* Apply the foreground wherever a palette background is set. */
.has-background {
  background-color: var(--local-background);
  color: var(--local-foreground);
}
.has-background :where(h1,h2,h3,h4,h5,h6,p,li,figcaption,cite,blockquote,a,label,th,td) {
  color: inherit;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--colour-white);
  color: var(--colour-black);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--colour-signal-yellow); color: var(--colour-black); }

img { max-width: 100%; display: block; }

a { color: inherit; }

.tm-site { background: var(--colour-white); color: var(--colour-black); min-height: 100vh; }

/* Shared layout container */
.tm-container { max-width: 1280px; margin: 0 auto; padding-left: 48px; padding-right: 48px; }

/* ---------- Brand ---------- */
.tm-wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--paper);
  line-height: 1;
}
.tm-wordmark::after { content: "."; color: var(--accent); }

/* ---------- Typography helpers ---------- */
.tm-display {
  font-family: var(--font-display);
  font-weight: 600;            /* M3 display/headline — Aileron SemiBold */
  letter-spacing: -0.015em;
  color: var(--paper);
  margin: 0;
}

/* Accent flourish — a Signal-Yellow highlight (block of colour + black text),
   never coloured text. Use to mark a word or terminal punctuation. */
.tm-accent {
  background: var(--colour-signal-yellow);
  color: var(--colour-black);
  padding: 0 0.1em;
  -webkit-box-decoration-break: clone;
          box-decoration-break: clone;
}

/* ---------- Flow images ----------
   Oversized transparent PNGs that bleed off the frame edge (clipped by the
   page's overflow-x), with optional scroll parallax (transform set by JS). */
.tm-flow-img {
  position: absolute;            /* out of flow — section height follows the text */
  top: 50%;
  width: 50%;
  height: auto;
  max-width: none;
  border: 0;
  border-radius: 0;
  /* centred on the section + JS-driven parallax offset (the --tm-par var) */
  transform: translateY(calc(-50% + var(--tm-par, 0px)));
  pointer-events: none;
  will-change: transform;
}
.tm-flow-img--left  { left: -10%; right: auto; }
.tm-flow-img--right { right: -10%; left: auto; }

/* ---------- Inline highlight format ----------
   A flat block of palette colour behind selected words, with automatic
   black/white text. Applied via the Gutenberg "Highlight" toolbar button
   (assets/format-highlight.js). box-decoration-break keeps the padding on
   every line when a highlight wraps. */
mark.tm-highlight {
  background: var(--colour-signal-yellow);
  color: var(--colour-black);
  padding: 0 0.12em;
  border-radius: 0;
  -webkit-box-decoration-break: clone;
          box-decoration-break: clone;
}
mark.tm-highlight.has-soft-pink-highlight     { background: var(--colour-soft-pink);     color: var(--colour-black); }
mark.tm-highlight.has-signal-yellow-highlight { background: var(--colour-signal-yellow); color: var(--colour-black); }
mark.tm-highlight.has-green-highlight         { background: var(--colour-green);         color: var(--colour-white); }
mark.tm-highlight.has-orange-highlight        { background: var(--colour-orange);        color: var(--colour-black); }
mark.tm-highlight.has-electric-blue-highlight { background: var(--colour-electric-blue); color: var(--colour-white); }
mark.tm-highlight.has-burgundy-highlight      { background: var(--colour-burgundy);      color: var(--colour-white); }
mark.tm-highlight.has-black-highlight         { background: var(--colour-black);         color: var(--colour-white); }
mark.tm-highlight.has-white-highlight         { background: var(--colour-white);         color: var(--colour-black); }

/* ---------- Contained section images ----------
   Images in the editorial / belief blocks sit inside a frame that fills its
   column. With the grid set to `align-items:stretch`, the image column matches
   the height of the text column beside it, and object-fit keeps the picture
   centred and cropped neatly inside the frame — never bleeding past the edge. */
.tm-annot-col { display: flex; flex-direction: column; height: 100%; }
.tm-img-frame {
  position: relative;
  flex: 1 1 auto;        /* fill the column height left after the label */
  min-height: 240px;     /* sensible floor when the text is short */
  overflow: hidden;      /* contain the image */
  background: var(--local-background);
}
.tm-fit-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;       /* resize to fit fully — never crop the image */
  object-position: center;
  display: block;
}

/* Rich-text body wrappers (block body fields, editor + front end). */
.tm-richtext > p { margin: 0 0 1em; }
.tm-richtext > p:last-child { margin-bottom: 0; }
.tm-richtext > p:first-child { margin-top: 0; }

.tm-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--stone);
  margin: 0;
}

/* Links — inherit black/white; distinguished by underline, never colour. */
.tm-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-thickness 120ms var(--ease);
}
.tm-link:hover { color: inherit; text-decoration-thickness: 3px; }

/* Inline content links inside body copy / coloured sections. */
.article-body a, .has-background a, .tm-prose a { color: inherit; text-underline-offset: 3px; }
a:focus-visible { outline: 3px solid var(--colour-signal-yellow); outline-offset: 2px; }
.has-black-background-color a:focus-visible,
.tm-tone-dark a:focus-visible,
.tm-footer a:focus-visible,
.has-green-background-color a:focus-visible,
.has-electric-blue-background-color a:focus-visible,
.has-burgundy-background-color a:focus-visible { outline-color: var(--colour-white); }

/* ============================================================
   Buttons — one CTA system. Flat, rectangular, 2px black border.
   Primary: Signal Yellow + black text → white on hover/focus.
   Secondary: white + black text + black border → inverts on hover.
   No gradients, no shadows, no second colour.
   ============================================================ */
.tm-btn,
.wp-element-button,
.wp-block-button__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.2px;
  line-height: 1.2;
  text-decoration: none;
  background: var(--colour-signal-yellow);
  color: var(--colour-black);
  border: 2px solid var(--colour-black);
  border-radius: 0;
  padding: 13px 26px;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease), transform var(--duration-fast) var(--ease);
}
.tm-btn:hover, .tm-btn:focus-visible,
.wp-element-button:hover, .wp-element-button:focus-visible,
.wp-block-button__link:hover, .wp-block-button__link:focus-visible {
  background: var(--colour-white);
  color: var(--colour-black);
}
.tm-btn:active { transform: translateY(1px); }
.tm-btn:focus-visible,
.wp-element-button:focus-visible,
.wp-block-button__link:focus-visible {
  outline: 3px solid var(--colour-black);
  outline-offset: 2px;
}

/* Primary alias — same as base (single CTA system). */
.tm-btn--primary { background: var(--colour-signal-yellow); color: var(--colour-black); }

/* Secondary — white with black border, inverts on hover. */
.tm-btn--secondary,
.tm-btn--glass,
.tm-btn--outline,
.tm-btn--ghost {
  background: var(--colour-white);
  color: var(--colour-black);
  border: 2px solid var(--colour-black);
}
.tm-btn--secondary:hover, .tm-btn--secondary:focus-visible,
.tm-btn--glass:hover, .tm-btn--glass:focus-visible,
.tm-btn--outline:hover, .tm-btn--outline:focus-visible,
.tm-btn--ghost:hover, .tm-btn--ghost:focus-visible {
  background: var(--colour-black);
  color: var(--colour-white);
}

/* On a dark/black section the secondary starts inverted so it stays visible. */
.tm-tone-dark .tm-btn--secondary,
.tm-section--deep .tm-btn--secondary,
.tm-footer .tm-btn--secondary,
.tm-tone-dark .tm-btn--glass,
.tm-section--deep .tm-btn--glass {
  background: transparent;
  color: var(--colour-white);
  border-color: var(--colour-white);
}
.tm-tone-dark .tm-btn--secondary:hover,
.tm-section--deep .tm-btn--secondary:hover,
.tm-tone-dark .tm-btn--glass:hover,
.tm-section--deep .tm-btn--glass:hover {
  background: var(--colour-white);
  color: var(--colour-black);
}

/* Sizes */
.tm-btn--sm { font-size: 14px; padding: 9px 18px; }
.tm-btn--md { font-size: 15px; padding: 12px 24px; }
.tm-btn--lg { font-size: 15px; padding: 14px 28px; }
.tm-btn--xl { font-size: 16px; padding: 16px 32px; }
.tm-btn[disabled], .tm-btn--disabled { opacity: 0.4; pointer-events: none; }

/* ---------- Badges / chips — flat, square, black-or-white border ---------- */
.tm-badge {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 14px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2px;
  border-radius: 0;
  border: 2px solid currentColor;
  color: var(--local-foreground);
  background: transparent;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease);
}
a.tm-badge:hover { background: var(--local-foreground); color: var(--local-background); }

.tm-badge--muted  { color: var(--local-foreground); }
.tm-badge--accent { color: var(--colour-black); background: var(--colour-signal-yellow); border-color: var(--colour-black); }
a.tm-badge--accent:hover { background: var(--colour-white); color: var(--colour-black); }

/* ---------- Card — flat panel, square, hairline border, no shadow ---------- */
.tm-card {
  background: var(--local-background);
  border: 2px solid currentColor;
  border-radius: 0;
  padding: 24px;
}

/* ---------- Inputs — white field, black text + border, yellow focus ---------- */
.tm-field { display: flex; flex-direction: column; gap: 8px; }
.tm-field > label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: inherit;
}
.tm-input,
.tm-textarea {
  width: 100%;
  background: var(--colour-white);
  border: 2px solid var(--colour-black);
  border-radius: 0;
  color: var(--colour-black);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  padding: 13px 14px;
  outline: none;
  transition: outline-color var(--duration-fast) var(--ease);
}
.tm-input::placeholder,
.tm-textarea::placeholder { color: #000000; opacity: 0.55; }
.tm-input:focus,
.tm-textarea:focus {
  outline: 3px solid var(--colour-signal-yellow);
  outline-offset: 1px;
}
.tm-textarea { resize: vertical; }

/* ---------- Dot field container ---------- */
.tm-dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

/* ---------- Reading progress bar (article) ---------- */
.tm-reading-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: transparent;
  z-index: 60;
}
.tm-reading-progress > span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 80ms linear;
}

/* ============================================================
   Header / nav
   ============================================================ */
/* Black header — white logo, white nav, yellow accent only. */
.tm-header {
  position: sticky;
  top: 0;
  z-index: 50;
  --local-background: var(--colour-black);
  --local-foreground: var(--colour-white);
  background: var(--colour-black);
  color: var(--colour-white);
  border-bottom: 0;
}
.tm-nav {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.tm-nav__brand { display: inline-flex; align-items: center; text-decoration: none; color: var(--colour-white); }
.tm-nav__brand .tm-logo { height: 30px; width: auto; display: block; }
.tm-nav__links { display: flex; align-items: center; gap: 30px; }
.tm-nav__link { font-size: 14px; font-weight: 600; color: var(--colour-white); text-decoration: none; }
.tm-nav__link:hover { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.tm-nav__link--current { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; text-decoration-color: var(--colour-signal-yellow); }

.tm-nav__svc { position: relative; align-self: stretch; display: flex; align-items: center; }
.tm-nav__svc-head { display: inline-flex; align-items: center; gap: 8px; }
.tm-nav__svc-plus { display: none; } /* mobile only */
.tm-nav__svc-toggle {
  position: relative;
  font-size: 14px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; padding: 0; cursor: pointer;
  font-family: var(--font-body);
  transition: color 180ms var(--ease);
}
.tm-nav__svc-caret { font-size: 9px; opacity: 0.7; transition: transform 200ms var(--ease), opacity 200ms var(--ease); }

/* Open state — make clear you're inside the Services menu. */
.tm-nav__svc:hover .tm-nav__svc-toggle,
.tm-nav__svc:focus-within .tm-nav__svc-toggle { color: var(--paper); }
.tm-nav__svc:hover .tm-nav__svc-caret,
.tm-nav__svc:focus-within .tm-nav__svc-caret { transform: rotate(180deg); opacity: 1; }
.tm-nav__svc-toggle::after {
  content: ""; position: absolute; left: 0; right: 15px; bottom: -7px; height: 2px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 200ms var(--ease);
}
.tm-nav__svc:hover .tm-nav__svc-toggle::after,
.tm-nav__svc:focus-within .tm-nav__svc-toggle::after { transform: scaleX(1); }

/* Dropdown panel — square, dropping flush out of the header bar. */
/* M3 menu — elevated surface, extra-small corner, state-layer items. */
.tm-nav__dropdown {
  position: absolute;
  top: calc(100% + 18px);    /* lands on the header's bottom edge */
  left: -16px;
  width: 300px;
  padding: 0;
  --local-background: var(--colour-black);
  --local-foreground: var(--colour-white);
  background: var(--colour-black);
  color: var(--colour-white);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transform-origin: top;
  transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease), visibility var(--duration);
}
.tm-nav__dropdown::before { /* invisible bridge so hover survives the bar gap */
  content: "";
  position: absolute;
  left: 0; right: 0; top: -12px; height: 12px;
}
.tm-nav__svc:hover .tm-nav__dropdown,
.tm-nav__svc:focus-within .tm-nav__dropdown {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.tm-nav__dropdown-list { display: flex; flex-direction: column; }
.tm-nav__dropdown-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 0 20px;
  color: var(--colour-white);
  text-decoration: none;
  transition: background var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease);
}
.tm-nav__dropdown-item + .tm-nav__dropdown-item { border-top: 1px solid rgba(255, 255, 255, 0.16); }
.tm-nav__dropdown-item:hover,
.tm-nav__dropdown-item:focus-visible {
  background: var(--colour-white);
  color: var(--colour-black);
  outline: none;
}
.tm-nav__dropdown-title { font-size: 15px; font-weight: 700; color: inherit; }
.tm-nav__dropdown-arrow {
  font-family: var(--font-body);
  color: inherit;
  font-size: 15px;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity var(--duration-fast) var(--ease), transform var(--duration-fast) var(--ease);
}
.tm-nav__dropdown-item:hover .tm-nav__dropdown-arrow { opacity: 1; transform: none; }

/* Header CTA — yellow button, black border, white hover. */
.tm-nav__cta {
  text-decoration: none;
  background: var(--colour-signal-yellow);
  color: var(--colour-black);
  border: 2px solid var(--colour-black);
  font-weight: 700;
  font-size: 14px;
  padding: 9px 18px;
  border-radius: 0;
  white-space: nowrap;
  transition: background var(--duration-fast) var(--ease);
}
.tm-nav__cta:hover, .tm-nav__cta:focus-visible { background: var(--colour-white); color: var(--colour-black); }

/* Burger control — black button, white lines (currentColor); inverts on
   hover/focus and while open. Lines drawn with the bars span + pseudos. */
.tm-nav__toggle { display: none; }
.tm-nav__toggle {
  width: 48px; height: 48px;
  align-items: center; justify-content: center;
  background: var(--colour-black);
  color: var(--colour-white);
  border: 2px solid var(--colour-white);
  border-radius: 0;
  cursor: pointer;
  padding: 0;
  transition: background var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease);
}
.tm-nav__toggle:hover,
.tm-nav__toggle:focus-visible {
  background: var(--colour-white);
  color: var(--colour-black);
}
.tm-nav__toggle:focus-visible { outline: 3px solid var(--colour-signal-yellow); outline-offset: 2px; }
.tm-nav__toggle-bars,
.tm-nav__toggle-bars::before,
.tm-nav__toggle-bars::after {
  content: "";
  display: block;
  width: 22px; height: 2px;
  background: currentColor;
  transition: transform var(--duration-fast) var(--ease), opacity var(--duration-fast) var(--ease);
}
.tm-nav__toggle-bars { position: relative; }
.tm-nav__toggle-bars::before { position: absolute; top: -7px; left: 0; }
.tm-nav__toggle-bars::after  { position: absolute; top: 7px;  left: 0; }
/* Open → X (no spinning) */
.tm-nav__toggle[aria-expanded="true"] .tm-nav__toggle-bars { background: transparent; }
.tm-nav__toggle[aria-expanded="true"] .tm-nav__toggle-bars::before { top: 0; transform: rotate(45deg); }
.tm-nav__toggle[aria-expanded="true"] .tm-nav__toggle-bars::after  { top: 0; transform: rotate(-45deg); }

/* ============================================================
   Section scaffolding
   ============================================================ */
.tm-section { border-top: 0; }
/* Dark tone — solid black surface, white text. Foreground is established via
   `color`; text tokens are currentColor so everything inside flips. */
.tm-section--deep,
.tm-footer,
.tm-tone-dark {
  --local-background: var(--colour-black);
  --local-foreground: var(--colour-white);
  background: var(--colour-black);
  color: var(--colour-white);
}
.tm-section__inner { max-width: 1280px; margin: 0 auto; padding: var(--section-padding) 48px; }
.tm-section--compact .tm-section__inner  { padding-top: var(--section-padding-compact);  padding-bottom: var(--section-padding-compact); }
.tm-section--generous .tm-section__inner { padding-top: var(--section-padding-generous); padding-bottom: var(--section-padding-generous); }
.tm-relative { position: relative; }
.tm-overflow { overflow: hidden; }

/* ============================================================
   DOT-PATTERN OVERLAY — decorative, behind content, colourable.
   Sits in ::before with pointer-events:none; never affects flow,
   selection or screen readers. Crisp on retina (vector gradient).
   ============================================================ */
.has-dot-pattern { position: relative; isolation: isolate; }
.has-dot-pattern::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: var(--dot-pattern-opacity);
  background-image: radial-gradient(circle, var(--dot-pattern-colour) var(--dot-size), transparent calc(var(--dot-size) + 0.5px));
  background-size: var(--dot-spacing) var(--dot-spacing);
  background-position: center;
}

/* Pattern style → density / character */
.has-dot-pattern-sparse  { --dot-spacing: 34px; --dot-size: 1.5px; }
.has-dot-pattern-regular { --dot-spacing: 22px; --dot-size: 1.6px; }
.has-dot-pattern-dense   { --dot-spacing: 14px; --dot-size: 1.4px; }
.has-dot-pattern-fading::before {
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent);
          mask-image: linear-gradient(to bottom, #000, transparent);
}
.has-dot-pattern-scattered::before {
  background-image:
    radial-gradient(circle, var(--dot-pattern-colour) var(--dot-size), transparent calc(var(--dot-size) + 0.5px)),
    radial-gradient(circle, var(--dot-pattern-colour) var(--dot-size), transparent calc(var(--dot-size) + 0.5px));
  background-size: var(--dot-spacing) var(--dot-spacing), calc(var(--dot-spacing) * 1.7) calc(var(--dot-spacing) * 1.7);
  background-position: 0 0, calc(var(--dot-spacing) / 2) calc(var(--dot-spacing) / 2);
}
.has-dot-pattern-edge::before   { -webkit-mask-image: linear-gradient(to left, #000 22%, transparent 62%); mask-image: linear-gradient(to left, #000 22%, transparent 62%); }
.has-dot-pattern-corner::before { -webkit-mask-image: radial-gradient(130% 130% at 100% 0%, #000 32%, transparent 70%); mask-image: radial-gradient(130% 130% at 100% 0%, #000 32%, transparent 70%); }

/* Pattern position (region mask) — overrides style masks */
.has-dot-pos-top-left::before     { -webkit-mask-image: radial-gradient(130% 130% at 0% 0%,      #000 32%, transparent 70%); mask-image: radial-gradient(130% 130% at 0% 0%,      #000 32%, transparent 70%); }
.has-dot-pos-top-right::before    { -webkit-mask-image: radial-gradient(130% 130% at 100% 0%,    #000 32%, transparent 70%); mask-image: radial-gradient(130% 130% at 100% 0%,    #000 32%, transparent 70%); }
.has-dot-pos-bottom-left::before  { -webkit-mask-image: radial-gradient(130% 130% at 0% 100%,    #000 32%, transparent 70%); mask-image: radial-gradient(130% 130% at 0% 100%,    #000 32%, transparent 70%); }
.has-dot-pos-bottom-right::before { -webkit-mask-image: radial-gradient(130% 130% at 100% 100%,  #000 32%, transparent 70%); mask-image: radial-gradient(130% 130% at 100% 100%,  #000 32%, transparent 70%); }
.has-dot-pos-left-edge::before    { -webkit-mask-image: linear-gradient(to right, #000 22%, transparent 62%); mask-image: linear-gradient(to right, #000 22%, transparent 62%); }
.has-dot-pos-right-edge::before   { -webkit-mask-image: linear-gradient(to left,  #000 22%, transparent 62%); mask-image: linear-gradient(to left,  #000 22%, transparent 62%); }
.has-dot-pos-full::before         { -webkit-mask-image: none; mask-image: none; }

/* Pattern colour (any of the eight) */
.has-dot-colour-soft-pink     { --dot-pattern-colour: var(--colour-soft-pink); }
.has-dot-colour-signal-yellow { --dot-pattern-colour: var(--colour-signal-yellow); }
.has-dot-colour-black         { --dot-pattern-colour: var(--colour-black); }
.has-dot-colour-white         { --dot-pattern-colour: var(--colour-white); }
.has-dot-colour-green         { --dot-pattern-colour: var(--colour-green); }
.has-dot-colour-orange        { --dot-pattern-colour: var(--colour-orange); }
.has-dot-colour-electric-blue { --dot-pattern-colour: var(--colour-electric-blue); }
.has-dot-colour-burgundy      { --dot-pattern-colour: var(--colour-burgundy); }

/* Pattern strength */
.has-dot-strength-subtle   { --dot-pattern-opacity: var(--dot-opacity-subtle); }
.has-dot-strength-standard { --dot-pattern-opacity: var(--dot-opacity-standard); }
.has-dot-strength-strong   { --dot-pattern-opacity: var(--dot-opacity-strong); }

/* ---- Colour Section wrapper block ---- */
.tm-colour-section { position: relative; }
.tm-colour-section__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--section-padding) 48px;
}
.tm-colour-section.tm-section--compact  .tm-colour-section__inner { padding-top: var(--section-padding-compact);  padding-bottom: var(--section-padding-compact); }
.tm-colour-section.tm-section--generous .tm-colour-section__inner { padding-top: var(--section-padding-generous); padding-bottom: var(--section-padding-generous); }
@media (max-width: 860px) { .tm-colour-section__inner { padding-left: 24px; padding-right: 24px; } }

@media (max-width: 600px) {
  .has-dot-pattern-dense { --dot-spacing: 18px; } /* ease density on small screens */
}

/* Grid hairline pattern used on card grids */
.tm-grid-hairline {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.tm-grid-hairline--2 { grid-template-columns: 1fr 1fr; }
.tm-grid-hairline--3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- Footer ---------- */
.tm-footer { border-top: 1px solid var(--border); }
.tm-footer__inner { max-width: 1280px; margin: 0 auto; padding: 72px 48px 40px; }
.tm-footer__cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.tm-footer__col-list { display: flex; flex-direction: column; gap: 12px; }
.tm-footer__bottom {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  margin-top: 56px; padding-top: 28px;
  border-top: 1px solid var(--border);
}
.tm-footer__bottom p { font-size: 13px; color: var(--stone); margin: 0; }

/* ---------- Article body ---------- */
.article-body { max-width: 680px; margin: 56px auto 0; padding: 0 32px; }
.article-body p { font-size: 19px; line-height: 1.72; color: var(--stone); margin: 0 0 26px; }
.article-body h2 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 32px;
  line-height: 1.12;
  color: var(--paper);
  margin: 52px 0 18px;
}
.article-body strong { color: var(--paper); font-weight: 600; }
.article-body a {
  color: var(--paper);
  text-decoration: underline;
  text-decoration-color: var(--stone);
  text-underline-offset: 3px;
}
.article-body > p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-weight: 900;            /* Aileron Black — drop cap */
  font-size: 58px;
  line-height: 0.8;
  float: left;
  padding: 6px 14px 0 0;
  color: var(--paper);
}
.article-body blockquote {
  margin: 44px 0;
  padding: 0 0 0 28px;
  border-left: 2px solid var(--accent);
}
.article-body blockquote p {
  font-family: var(--font-display);
  font-weight: 300;            /* Aileron Light — large editorial quote */
  letter-spacing: -0.01em;
  font-size: 30px;
  line-height: 1.25;
  color: var(--paper);
  margin: 0;
}

/* ============================================================
   Page block flow

   Taymont section blocks render their own full-bleed <section>, so they are
   left alone. Plain/core blocks (headings, paragraphs, lists, images, groups,
   columns) are given a readable, padded, centred column so a page built from
   ordinary blocks still looks tidy.
   ============================================================ */
.tm-blocks > :not(section) {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}
.tm-blocks > :not(section).alignwide { max-width: 1100px; }
.tm-blocks > :not(section).alignfull { max-width: none; padding-left: 0; padding-right: 0; }
.tm-blocks > :not(section):first-child { margin-top: 72px; }
.tm-blocks > :not(section):last-child { margin-bottom: 96px; }
.tm-blocks > :not(section) + :not(section) { margin-top: 1.3em; }
.tm-blocks .wp-block-columns { gap: 40px; }
/* Full-bleed sections overlap their predecessor by 1px so the white body
   colour can't peek through a sub-pixel seam between two coloured bands
   (fractional heights + the composited scroll-reveal layer cause the gap). */
.tm-blocks > section + section { margin-top: -1px; }
.tm-blocks h1, .tm-blocks h2, .tm-blocks h3 { letter-spacing: -0.02em; }

/* ============================================================
   Block: checklist item — yellow arrow for links, dot for statements
   ============================================================ */
.tm-list-item {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid var(--border-strong);
}
.tm-list-item__marker { flex-shrink: 0; line-height: 1.55; }
/* Linked item: Signal Yellow arrow — "this goes somewhere". */
.tm-list-item__marker--arrow {
  color: var(--colour-signal-yellow);
  font-size: 18px;
  font-family: var(--font-display);
}
/* Plain item: a quiet dot bullet — a statement, not a destination. */
.tm-list-item__marker--dot {
  color: inherit;
  font-size: 22px;
  line-height: 1.2;
}
.tm-list-item__text { font-size: 17px; line-height: 1.55; margin: 0; color: inherit; }
/* Whole-row link: inherit colour, underline the text on hover/focus only. */
a.tm-list-item--link { text-decoration: none; color: inherit; }
a.tm-list-item--link:hover .tm-list-item__text,
a.tm-list-item--link:focus-visible .tm-list-item__text {
  text-decoration: underline;
  text-underline-offset: 3px;
}
a.tm-list-item--link:focus-visible { outline: 3px solid var(--colour-signal-yellow); outline-offset: 4px; }

/* ============================================================
   Block: glossary (A–Z) — jump index + two-level <details>
   ============================================================ */
/* A–Z jump index. Active letters link down; empty letters are dimmed. */
.tm-gl-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0 0 8px;
  padding: 12px 0;
  background: var(--local-background);
}
.tm-gl-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 4px;
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--border);
}
a.tm-gl-nav__link:hover,
a.tm-gl-nav__link:focus-visible {
  background: var(--colour-signal-yellow);
  color: var(--colour-black);
  border-color: var(--colour-signal-yellow);
  outline: none;
}
.tm-gl-nav__link.is-empty { opacity: 0.28; }

/* Letter group — collapsed by default; click + to reveal terms. */
.tm-gl-letter { border-top: 1px solid var(--border-strong); }
.tm-glossary > .tm-gl-letter:last-child { border-bottom: 1px solid var(--border-strong); }
.tm-gl-letter__sum {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  font-family: var(--font-display);
}
.tm-gl-letter__sum::-webkit-details-marker { display: none; }
.tm-gl-letter__sum::before {
  content: "+";
  flex-shrink: 0;
  width: 1em;
  font-family: var(--font-body);
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
  transition: transform var(--duration) var(--ease);
}
.tm-gl-letter[open] > .tm-gl-letter__sum::before { transform: rotate(45deg); }
.tm-gl-letter__char { font-size: 30px; line-height: 1; }
.tm-gl-letter__count { font-family: var(--font-body); font-size: 13px; color: var(--stone); }
.tm-gl-letter__items { padding: 0 0 12px 36px; }

/* Term — nested; click + to reveal its definition. */
.tm-gl-term { border-top: 1px solid var(--border); }
.tm-gl-term__sum {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 14px 0;
  font-family: var(--font-display);
  font-size: 18px;
}
.tm-gl-term__sum::-webkit-details-marker { display: none; }
.tm-gl-term__sum::before {
  content: "+";
  flex-shrink: 0;
  width: 1em;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1;
  transition: transform var(--duration) var(--ease);
}
.tm-gl-term[open] > .tm-gl-term__sum::before { transform: rotate(45deg); }
.tm-gl-term__def { padding: 0 0 16px 28px; font-size: 16px; line-height: 1.65; color: var(--stone); max-width: 60em; }
@media (prefers-reduced-motion: no-preference) {
  .tm-gl-letter[open] > .tm-gl-letter__items,
  .tm-gl-term[open] > .tm-gl-term__def { animation: tm-rise 0.3s var(--ease) both; }
}
@media (max-width: 600px) {
  .tm-gl-letter__items { padding-left: 22px; }
}

/* ============================================================
   Block: accordion (FAQ / Glossary) — native <details>
   ============================================================ */
/* M3 expandable list — divided rows, state-layer hover, rotating +/× icon. */
.tm-faq {
  border-top: 1px solid var(--md-sys-color-outline-variant);
}
.tm-faq-list > .tm-faq:last-child { border-bottom: 1px solid var(--md-sys-color-outline-variant); }
.tm-faq__q {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 22px 14px;
  font-family: var(--font-display);
  font-weight: 600;            /* M3 Title — Aileron SemiBold */
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.3;
  color: var(--md-sys-color-on-surface);
  border-radius: var(--md-sys-shape-corner-sm);
  transition: background var(--duration-fast) var(--ease);
}
.tm-faq__q::-webkit-details-marker { display: none; }
.tm-faq__q::after {
  content: "+";
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
  color: var(--md-sys-color-on-surface-variant);
  transition: color var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.tm-faq[open] .tm-faq__q::after { transform: rotate(45deg); color: var(--md-sys-color-primary); }
.tm-faq__q:hover { background: color-mix(in srgb, var(--md-sys-color-on-surface) 6%, transparent); }
.tm-faq__a {
  padding: 0 14px 26px;
  max-width: 60em;
  font-size: 16px;
  line-height: 1.7;
  color: var(--md-sys-color-on-surface-variant);
}
.tm-faq__a > p { margin: 0 0 1em; }
.tm-faq__a > p:last-child { margin-bottom: 0; }
@media (prefers-reduced-motion: no-preference) {
  .tm-faq[open] .tm-faq__a { animation: tm-rise 0.4s var(--ease) both; }
}

/* ============================================================
   Block: card grid cells
   ============================================================ */
/* Spaced cards — separate tiles with gaps instead of the hairline-joined grid. */
.tm-cards--spaced {
  gap: 20px;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
}
.tm-cards--spaced .tm-card-cell { border-radius: var(--radius-lg); }
.tm-cards--spaced .tm-card-cell:not([class*="tm-card--"]) { border: 1px solid var(--border); }

.tm-cards .tm-card-cell { background: var(--local-background); }
.tm-cards--ocean .tm-card-cell { background: var(--local-background); }
.tm-card-cell { transition: background 180ms var(--ease); }
/* Coloured cards — the eight approved palette colours, named to match the
   editor picker. Each sets the required black/white foreground per the brief's
   contrast table. Legacy M3 slugs (tea/tangerine/red/lavender/sky/pink) are
   kept as aliases so cards placed before the rename still render correctly. */
.tm-card-cell.tm-card--soft-pink,
.tm-card-cell.tm-card--pink          { background: var(--colour-soft-pink);     --local-background: var(--colour-soft-pink);     --local-foreground: var(--colour-black); color: var(--colour-black); }
.tm-card-cell.tm-card--signal-yellow { background: var(--colour-signal-yellow); --local-background: var(--colour-signal-yellow); --local-foreground: var(--colour-black); color: var(--colour-black); }
.tm-card-cell.tm-card--green,
.tm-card-cell.tm-card--tea           { background: var(--colour-green);         --local-background: var(--colour-green);         --local-foreground: var(--colour-white); color: var(--colour-white); }
.tm-card-cell.tm-card--orange,
.tm-card-cell.tm-card--tangerine     { background: var(--colour-orange);        --local-background: var(--colour-orange);        --local-foreground: var(--colour-black); color: var(--colour-black); }
.tm-card-cell.tm-card--electric-blue,
.tm-card-cell.tm-card--lavender,
.tm-card-cell.tm-card--sky           { background: var(--colour-electric-blue); --local-background: var(--colour-electric-blue); --local-foreground: var(--colour-white); color: var(--colour-white); }
.tm-card-cell.tm-card--burgundy,
.tm-card-cell.tm-card--red           { background: var(--colour-burgundy);      --local-background: var(--colour-burgundy);      --local-foreground: var(--colour-white); color: var(--colour-white); }
.tm-card-cell.tm-card--black         { background: var(--colour-black);         --local-background: var(--colour-black);         --local-foreground: var(--colour-white); color: var(--colour-white); }
.tm-card-cell.tm-card--white         { background: var(--colour-white);         --local-background: var(--colour-white);         --local-foreground: var(--colour-black); color: var(--colour-black); }

/* Hover: a flat darkening, no shadow. */
.tm-cards .tm-card-cell:not([class*="tm-card--"]):hover { background: color-mix(in srgb, currentColor 7%, var(--local-background)); }

/* Block: compact process (e.g. About principles) */
.tm-process--compact .tm-process__step { grid-template-columns: 40px 1fr; gap: 20px; padding: 24px 0; }
.tm-process--compact .tm-process__num { font-size: 22px; }
.tm-process--compact .tm-process__title { font-family: var(--font-body); font-size: 17px; font-weight: 600; letter-spacing: 0; }

/* ============================================================
   Editor-only chrome (block previews in Gutenberg)
   ============================================================ */
.tm-editor-block { padding: 8px 0; }
.tm-editor-block--child { padding: 4px 0; }
/* When a section background colour (or the legacy dark tone) is chosen, the
   editor block previews as a padded band so the surface reads as a section. */
.tm-editor-block.has-background,
.tm-editor-block.tm-tone-dark { padding: 24px; }
.tm-editor-chip {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--stone);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
  margin-bottom: 10px;
}
.tm-editor-inner {
  margin-top: 16px;
  padding: 8px 0 8px 14px;
  border-left: 2px solid var(--border-strong);
}
.tm-editor-listprev { margin-top: 8px; }
.tm-editor-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tm-editor-note {
  display: block;
  margin-top: 8px;
  font-size: 11px;
  font-style: italic;
  color: var(--stone);
  opacity: 0.8;
}

/* ============================================================
   Scroll reveal

   Top-level page blocks fade and rise as they enter the viewport. Guarded by
   .tm-js (added by theme.js) so content is fully visible if JavaScript is off,
   and disabled entirely for reduced-motion users.
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .tm-js .tm-blocks > * {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
    will-change: opacity, transform;
  }
  .tm-js .tm-blocks > .is-visible {
    opacity: 1;
    transform: none;
  }
  /* Gentle stagger for grid/list items within a revealed section. */
  .tm-js .tm-blocks > .is-visible .tm-grid-hairline > *,
  .tm-js .tm-blocks > .is-visible .tm-process__step {
    animation: tm-rise 0.6s var(--ease) both;
  }
  .tm-js .tm-blocks > .is-visible .tm-grid-hairline > *:nth-child(2),
  .tm-js .tm-blocks > .is-visible .tm-process__step:nth-child(2) { animation-delay: 0.07s; }
  .tm-js .tm-blocks > .is-visible .tm-grid-hairline > *:nth-child(3),
  .tm-js .tm-blocks > .is-visible .tm-process__step:nth-child(3) { animation-delay: 0.14s; }
  .tm-js .tm-blocks > .is-visible .tm-grid-hairline > *:nth-child(4),
  .tm-js .tm-blocks > .is-visible .tm-process__step:nth-child(4) { animation-delay: 0.21s; }
  .tm-js .tm-blocks > .is-visible .tm-grid-hairline > *:nth-child(5) { animation-delay: 0.28s; }
  .tm-js .tm-blocks > .is-visible .tm-grid-hairline > *:nth-child(6) { animation-delay: 0.35s; }
}
@keyframes tm-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .tm-footer__cols { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 860px) {
  .tm-container,
  .tm-nav,
  .tm-section__inner,
  .tm-footer__inner { padding-left: 24px; padding-right: 24px; }
  .tm-section__inner { padding-top: 72px; padding-bottom: 72px; }

  /* Nav collapses — keep logo left, group toggle + CTA on the right. */
  .tm-nav { gap: 12px; }
  .tm-nav__brand { margin-right: auto; }
  .tm-nav__cta { padding: 9px 14px; font-size: 13px; }
  .tm-nav__links { display: none; }
  .tm-nav__toggle { display: inline-flex; }

  /* Full black menu overlay — white text, large rows. */
  .tm-nav__links.is-open {
    display: flex;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 40;               /* below the header (50) so the close button stays tappable */
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 88px 0 32px;
    background: var(--colour-black);
    color: var(--colour-white);
    --local-background: var(--colour-black);
    --local-foreground: var(--colour-white);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .tm-nav__links.is-open > .tm-nav__link,
  .tm-nav__links.is-open .tm-nav__svc-toggle {
    display: flex; align-items: center;
    width: 100%;
    padding: 18px 24px;
    font-size: clamp(22px, 6vw, 30px);
    font-weight: 700;
    color: var(--colour-white);
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    text-decoration: none;
  }
  .tm-nav__links.is-open > .tm-nav__link:hover,
  .tm-nav__links.is-open > .tm-nav__link:focus-visible,
  .tm-nav__links.is-open > .tm-nav__link--current {
    background: var(--colour-white); color: var(--colour-black);
  }

  /* Services becomes an accordion row. */
  .tm-nav__svc { width: 100%; display: block; align-self: auto; }
  .tm-nav__svc-head {
    display: flex; align-items: center; justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
  }
  .tm-nav__svc-toggle { border-top: 0 !important; }
  .tm-nav__svc-toggle::after { display: none; }
  .tm-nav__svc-caret { display: none; }
  .tm-nav__svc-plus {
    display: inline-flex; align-items: center; justify-content: center;
    width: 60px; align-self: stretch;
    padding: 0; background: none; border: 0;
    color: var(--colour-white); cursor: pointer; line-height: 1;
  }
  .tm-nav__svc-plus::before { content: "+"; font-family: var(--font-body); font-size: 30px; font-weight: 400; }
  .tm-nav__svc.is-expanded .tm-nav__svc-plus::before { content: "\2212"; }
  .tm-nav__svc-plus:focus-visible { outline: 3px solid var(--colour-signal-yellow); outline-offset: -3px; }

  .tm-nav__dropdown {
    position: static;
    width: auto;
    transform: none;
    visibility: visible;
    opacity: 1;
    display: none;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0 0 8px;
    margin: 0;
    --local-background: var(--colour-black);
    --local-foreground: var(--colour-white);
  }
  .tm-nav__svc.is-expanded .tm-nav__dropdown { display: block; }
  .tm-nav__dropdown::before { display: none; }
  .tm-nav__dropdown-item {
    min-height: 0;
    padding: 12px 40px;
    color: var(--colour-white);
    border-top: 0;
  }
  .tm-nav__dropdown-item:hover,
  .tm-nav__dropdown-item:focus-visible { background: var(--colour-white); color: var(--colour-black); }
  .tm-nav__dropdown-arrow { display: none; }

  /* Flow images cling to the screen edge — only the tip pokes in, near the top */
  .tm-flow-img { width: 64% !important; top: 8% !important; transform: none !important; }
  .tm-flow-img--left  { left: -42% !important; right: auto !important; }
  .tm-flow-img--right { right: -42% !important; left: auto !important; }

  /* Multi-column grids collapse to a single column on small screens */
  .tm-stack-mobile { grid-template-columns: 1fr !important; }
  .tm-grid-hairline { grid-template-columns: 1fr !important; }
  .tm-card-cell { min-width: 0; } /* let long words wrap, never overflow */
  .tm-footer__cols { grid-template-columns: 1fr; }
}
