/* =============================================================================
   SITE DESIGN SYSTEM
   Source of truth: docs/design-system.md + the approved mockup in context/mockups/
   Loaded by functions.php as 't20-site' at priority 20 — AFTER Divi's stylesheet
   and after Divi's per-page dynamic CSS. That ordering is why these rules win on
   specificity and mostly don't need !important.

   HOW THIS FILE IS ORGANISED
     PART 1  MACHINERY            — keep on every project. Palette, type scale,
                                    buttons, nav, footer, reveal, form hooks.
     PART 2  DIVI DEFENCES        — keep on every project. Non-obvious fixes for
                                    Divi behaviours that break layouts silently.
                                    Do not delete these because "nothing looks
                                    wrong yet" — the symptoms appear later.
     PART 3  REFERENCE PATTERNS   — ADAPT OR DELETE. Real component blocks from a
                                    shipped build. Genuinely useful starting
                                    points, but they encode one client's design.
     PART 4  RESPONSIVE           — machinery + pattern breakpoints together.

   PREFIX: everything is `t20-`. Find/replace `t20-` with the client prefix
   (README step 5) across css/, js/, inc/, functions.php, and tools/.

   SCOPE RULE: every rule is scoped to a .t20-* class emitted by the page
   generator, so we are never fighting Divi globally. The only justified global
   rules are the ones the design mandates everywhere (see "brand guarantees").
   ============================================================================= */


/* =============================================================================
   PART 1 — MACHINERY
   ============================================================================= */

/* ---------- 1.1 Palette ----------------------------------------------------
   FILL IN from docs/design-system.md.

   These duplicate the values in tools/php/foundation.php and
   tools/lib/content.js. That duplication is unavoidable: Divi module attributes
   cannot read CSS custom properties, so module-level colours need literals.
   Three files, one source of truth (the design system doc). Change all three.
   -------------------------------------------------------------------------- */

:root {
  --primary: #1A1A2E;
  --primary-dark: #111122;
  --primary-mid: #2A2A45;
  --primary-tint: rgba(26, 26, 46, .06);

  --accent: #C8A951;
  --accent-dark: #A88C38;      /* contrast-safe accent for text on white */
  --accent-light: #DCC47E;
  --accent-tint: rgba(200, 169, 81, .1);

  --white: #FFFFFF;
  --offwhite: #F7F8FA;
  --light-gray: #EDEEF2;
  --border: #DDDFE6;
  --mid-gray: #9295A5;
  --dark-gray: #4A4D62;
  --muted: #6A6E82;

  /* Layout rhythm. Changing these retunes the whole site. */
  --gutter: 6%;
  --gutter-mobile: 5%;
  --content-max: 1560px;
  --nav-height: 68px;
}

/* ---------- 1.2 Foundations ------------------------------------------------ */

body,
body.et-db #et-boc .et-l,
.et_pb_module {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
  color: var(--primary);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', sans-serif;
  color: var(--primary);
  padding-bottom: 0;
}

/* ---------- 1.3 Brand guarantees -------------------------------------------
   The only global rules in the file. Each one enforces something the design
   mandates everywhere, against Divi's defaults.

   DELETE the radius rule if the brand actually wants rounded corners — but if it
   wants sharp corners, this is the only reliable way to get them, because Divi
   sprinkles radius across modules, buttons, images, and form controls.
   -------------------------------------------------------------------------- */

.et_pb_section, .et_pb_row, .et_pb_column, .et_pb_module,
.et_pb_button, .et_pb_image img, .et_pb_team_member_image img,
input, select, textarea, button,
.wpforms-container input, .wpforms-container select, .wpforms-container textarea,
.wpforms-container button, .wpforms-submit {
  border-radius: 0 !important;
}

/* Divi likes to add its own drop shadows; the design specifies only card hovers. */
.et_pb_section, .et_pb_row { box-shadow: none; }

/* ---------- 1.4 Fluid type scale ------------------------------------------
   clamp() cannot be expressed in Divi 5 module attributes, so the scale lives
   here. Colours and weights are still set on the modules so the Visual Builder
   shows the client something sensible when they open a page.

   The compound selectors (`.t20-h1 h1, .t20-h1 h2`) exist because the generator
   applies the class to the module WRAPPER, and the heading level inside is set
   per instance — so the class has to match whatever tag Divi rendered.
   -------------------------------------------------------------------------- */

.t20-h1 h1, .t20-h1 h2 {
  font-size: clamp(2.2rem, 4.5vw, 3.5rem) !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  letter-spacing: -.02em !important;
  color: var(--primary) !important;
}
/* The one-word highlight in a headline. */
.t20-h1 .accent { color: var(--accent-dark) !important; }

.t20-h2 h1, .t20-h2 h2, .t20-h2 h3 {
  font-size: clamp(1.7rem, 2.8vw, 2.5rem) !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
  letter-spacing: -.02em !important;
}

/* Section eyebrow / tag. */
.t20-tag,
.t20-tag p {
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 2.5px !important;
  text-transform: uppercase;
  color: var(--accent-dark) !important;
  line-height: 1.4 !important;
  margin-bottom: 12px !important;
}

/* Lead paragraph. */
.t20-lead,
.t20-lead p {
  font-size: 16px !important;
  color: var(--muted) !important;
  line-height: 1.7 !important;
}
.t20-lead { max-width: 560px; }
.t20-center { text-align: center; }
.t20-center .t20-lead,
.t20-center.t20-lead { margin-left: auto; margin-right: auto; }

/* Body copy inside a split — slightly larger than card copy. */
.t20-body p {
  font-size: 16px !important;
  color: var(--muted) !important;
  line-height: 1.75 !important;
}

/* Small italic note, for provisional content flagged to the client. */
.t20-note p {
  font-size: 11px !important;
  color: var(--mid-gray) !important;
  letter-spacing: .3px;
  font-style: italic;
  margin: 14px 0 0 !important;
}

/* ---------- 1.5 Button system ---------------------------------------------
   Divi does NOT emit button padding from JSON attributes
   (button.decoration.spacing produces no CSS — docs/divi5-reference.md §6.7),
   so all button padding lives here.

   Three variants:
     .t20-btn        primary, dark fill
     .t20-btn-gold   accent fill, for dark backgrounds
     .t20-btn-link   text link with an arrow
   Each has a Divi-module form (`.t20-btn .et_pb_button`) and a raw-anchor form
   (`a.t20-btn`), because CTA pairs are often authored as raw HTML so both sit on
   one flex line.
   -------------------------------------------------------------------------- */

.t20-btn .et_pb_button,
.t20-btn.et_pb_button,
a.t20-btn {
  background-color: var(--primary) !important;
  color: var(--accent) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  padding: 14px 30px !important;
  border: none !important;
  line-height: 1.4 !important;
  display: inline-block;
  text-decoration: none;
  transition: background-color .2s ease, transform .2s ease;
}
.t20-btn .et_pb_button:hover,
.t20-btn.et_pb_button:hover,
a.t20-btn:hover {
  background-color: var(--primary-mid) !important;
  color: var(--accent) !important;
  transform: translateY(-2px);
  padding: 14px 30px !important;   /* Divi shifts padding on hover; pin it */
}
/* Kill Divi's injected arrow glyph. */
.t20-btn .et_pb_button:after,
.t20-btn.et_pb_button:after { display: none !important; content: none !important; }

/* Accent button, for dark bands. */
.t20-btn-gold .et_pb_button,
a.t20-btn-gold {
  background-color: var(--accent) !important;
  color: var(--primary) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  padding: 14px 30px !important;
  border: none !important;
  text-decoration: none;
  display: inline-block;
}
.t20-btn-gold .et_pb_button:hover,
a.t20-btn-gold:hover { background-color: var(--accent-light) !important; }
.t20-btn-gold .et_pb_button:after { display: none !important; content: none !important; }

/* Text link with a trailing arrow that slides on hover. Divi module form. */
.t20-btn-link .et_pb_button,
.t20-btn-link.et_pb_button {
  background: transparent !important;
  color: var(--primary) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  padding: 14px 0 !important;
  border: none !important;
}
.t20-btn-link .et_pb_button:after,
.t20-btn-link.et_pb_button:after {
  display: inline-block !important;
  content: '\2192' !important;
  font-family: inherit !important;
  opacity: 1 !important;
  margin-left: 6px !important;
  transition: margin-left .2s ease;
}
.t20-btn-link .et_pb_button:hover:after { margin-left: 10px !important; }
.t20-btn-link .et_pb_button:hover { background: transparent !important; }

/* Raw-anchor form of the same thing (arrow supplied in the markup as &rarr;). */
a.t20-btn-link-a {
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color .2s ease;
}
a.t20-btn-link-a:hover { color: var(--accent-dark); }

/* Keeps a raw-HTML button block-level so wpautop doesn't wrap it in a stray <p>. */
.t20-btn-wrap { display: block; }

/* ---------- 1.6 Fixed nav ------------------------------------------------- */

#main-header.t20-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: none;
  padding: 0 var(--gutter);
  transition: box-shadow .3s ease;
}
#main-header.t20-nav.t20-nav--scrolled { box-shadow: 0 1px 16px rgba(26, 26, 46, .1); }
/* Don't hide the nav under the WP admin bar for logged-in reviewers. */
.admin-bar #main-header.t20-nav { top: 32px; }

.t20-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--nav-height);
  max-width: var(--content-max);
  margin: 0 auto;
}

/* Offset page content below the fixed bar. Divi's JS also sets this from
   data-height-onload; the CSS value keeps it correct before JS runs. */
body.t20-has-fixed-nav #page-container { padding-top: var(--nav-height); }

/* Logo lockup. The mark inherits `color`, so one markup works in both places. */
.t20-logo {
  display: flex; align-items: center; gap: 11px;
  text-decoration: none; flex: 0 0 auto;
  color: var(--primary);
}
.t20-logo__mark {
  width: auto; height: 38px; flex: 0 0 auto;
  display: block;
  transition: color .2s ease;
}
.t20-logo:hover .t20-logo__mark { color: var(--accent-dark); }
.t20-logo__txt { display: flex; flex-direction: column; line-height: 1.15; }
.t20-logo__name { font-size: 17px; font-weight: 800; color: var(--primary); letter-spacing: .5px; }
.t20-logo__tag {
  font-size: 10px; font-weight: 600; color: var(--accent-dark);
  letter-spacing: 1.5px; text-transform: uppercase;
}
.t20-logo--dark { color: var(--white); }
.t20-logo--dark .t20-logo__name { color: var(--white); }
.t20-logo--dark .t20-logo__tag { color: var(--accent); }
.t20-logo--dark:hover .t20-logo__mark { color: var(--accent); }

/* Desktop menu. */
.t20-nav__menu { display: flex; justify-content: flex-end; flex: 1 1 auto; }
ul.t20-menu {
  display: flex; align-items: center; gap: 26px;
  list-style: none; margin: 0; padding: 0;
}
ul.t20-menu > li { margin: 0; padding: 0; list-style: none; position: relative; }
ul.t20-menu > li > a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  padding: 4px 0;
  position: relative;
  display: inline-block;
  transition: color .2s ease;
}
ul.t20-menu > li > a:hover { color: var(--primary); }
/* Accent underline scaling in from the left. Divi cannot express this. */
ul.t20-menu > li > a:before {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
}
ul.t20-menu > li > a:hover:before { transform: scaleX(1); }
ul.t20-menu > li.current-menu-item > a { color: var(--primary); }
ul.t20-menu > li.current-menu-item > a:before { transform: scaleX(1); }

/* CONVENTION: give the CTA menu item the CSS class `nav-cta` in
   Appearance > Menus and it becomes a button. */
ul.t20-menu > li.nav-cta > a {
  background: var(--primary);
  color: var(--accent);
  padding: 9px 20px;
  font-weight: 700;
  transition: background-color .2s ease;
}
ul.t20-menu > li.nav-cta > a:hover { background: var(--primary-mid); color: var(--accent); }
ul.t20-menu > li.nav-cta > a:before { display: none; }

/* Hamburger — hidden until the <=980px breakpoint in PART 4. */
.t20-burger {
  display: none;
  flex-direction: column; gap: 4px;
  background: none; border: none; padding: 6px; cursor: pointer;
}
.t20-burger span {
  display: block; width: 22px; height: 2px; background: var(--primary);
  transition: transform .2s ease, opacity .2s ease;
}
.t20-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.t20-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.t20-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile panel. Negative margins bleed it to the full viewport width. */
.t20-mobile-panel {
  border-top: 1px solid var(--border);
  background: var(--white);
  box-shadow: 0 8px 24px rgba(26, 26, 46, .08);
  margin: 0 calc(-1 * var(--gutter));
  padding: 8px 0;
}
.t20-mobile-panel[hidden] { display: none; }
ul.t20-menu-mobile { list-style: none; margin: 0; padding: 0; }
ul.t20-menu-mobile > li { margin: 0; list-style: none; }
ul.t20-menu-mobile > li > a {
  display: block;
  color: var(--muted);
  font-size: 14px; font-weight: 500;
  text-decoration: none;
  padding: 14px var(--gutter);
  border-bottom: 1px solid var(--border);
}
ul.t20-menu-mobile > li:last-child > a { border-bottom: none; }
ul.t20-menu-mobile > li.nav-cta > a { color: var(--primary); font-weight: 700; }
ul.t20-menu-mobile > li.current-menu-item > a { color: var(--primary); }

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

#main-footer.t20-footer {
  background: var(--primary-dark);
  padding: 52px var(--gutter) 26px;
  border: none;
}
.t20-footer__inner { max-width: var(--content-max); margin: 0 auto; }
.t20-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.t20-footer__brand p {
  font-size: 13px; color: rgba(255, 255, 255, .4);
  line-height: 1.7; margin-top: 12px; max-width: 240px;
}
.t20-footer__col h4 {
  font-size: 11px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px; padding-bottom: 0;
}
.t20-footer__col ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.t20-footer__col ul li { list-style: none; }
.t20-footer__col ul li a {
  color: rgba(255, 255, 255, .45);
  text-decoration: none; font-size: 13px;
  transition: color .2s ease;
}
.t20-footer__col ul li a:hover { color: var(--white); }
.t20-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, .07);
  padding-top: 18px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
.t20-footer__bottom p { font-size: 12px; color: rgba(255, 255, 255, .25); margin: 0; }

/* ---------- 1.8 Dark section helper --------------------------------------- */
/* Applied to any section with a dark background so text, tags, and headings all
   invert together. Saves setting colours per module. */

.t20-dark.et_pb_section { background: var(--primary) !important; }
.t20-dark .t20-tag, .t20-dark .t20-tag p { color: var(--accent) !important; }
.t20-dark h1, .t20-dark h2, .t20-dark h3 { color: var(--white) !important; }
.t20-dark .t20-lead p { color: rgba(255, 255, 255, .6) !important; }

/* ---------- 1.9 Scroll reveal --------------------------------------------- */
/* GATED ON .t20-js so content is NEVER invisible when JS doesn't run — no-JS,
   script error, print, crawlers. Without the gate a broken script means a blank
   page, which is a far worse failure than a missing animation. */

.t20-js .t20-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .45s ease, transform .45s ease;
}
.t20-js .t20-reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .t20-js .t20-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .t20-btn .et_pb_button:hover, a.t20-btn:hover,
  .t20-team .et_pb_team_member:hover, .t20-blog .et_pb_post:hover { transform: none !important; }
}

/* ---------- 1.10 Form styling hooks --------------------------------------- */
/* WPForms' own markup cannot be styled from Divi, so forms are styled here.
   Two panels: dark (.t20-form-panel) and light (.t20-form-light). Apply the class
   to the COLUMN containing the form. */

/* Dark form panel. */
.t20-form-panel.et_pb_column { background: var(--primary); padding: 40px !important; }
.t20-form-panel h2, .t20-form-panel h3 {
  font-size: 20px !important; font-weight: 800 !important;
  color: var(--white) !important; margin-bottom: 24px;
}
.t20-form-panel .wpforms-container { margin: 0; }
.t20-form-panel .wpforms-form .wpforms-field { padding: 0 0 12px 0; }
.t20-form-panel .wpforms-form .wpforms-field-label {
  font-size: 10px !important; font-weight: 700 !important;
  letter-spacing: 1.5px !important; text-transform: uppercase;
  color: rgba(255, 255, 255, .5) !important; margin-bottom: 5px !important;
}
.t20-form-panel .wpforms-form .wpforms-required-label { color: var(--accent) !important; }
.t20-form-panel .wpforms-form input[type=text],
.t20-form-panel .wpforms-form input[type=email],
.t20-form-panel .wpforms-form input[type=tel],
.t20-form-panel .wpforms-form select,
.t20-form-panel .wpforms-form textarea {
  background: rgba(255, 255, 255, .07) !important;
  border: 1px solid rgba(255, 255, 255, .12) !important;
  padding: 10px 13px !important;
  color: var(--white) !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 13px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-shadow: none !important;
  transition: border-color .2s ease;
}
.t20-form-panel .wpforms-form input:focus,
.t20-form-panel .wpforms-form select:focus,
.t20-form-panel .wpforms-form textarea:focus {
  border-color: var(--accent) !important; outline: none !important;
}
.t20-form-panel .wpforms-form input::placeholder,
.t20-form-panel .wpforms-form textarea::placeholder { color: rgba(255, 255, 255, .35) !important; }
/* Native select options render on the OS layer — set both to stay readable. */
.t20-form-panel .wpforms-form select option { background: var(--primary); color: var(--white); }
.t20-form-panel .wpforms-form textarea { height: 100px; resize: vertical; }
.t20-form-panel .wpforms-form button[type=submit] {
  background: var(--accent) !important;
  color: var(--primary) !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 14px !important; font-weight: 700 !important;
  padding: 14px 30px !important;
  border: none !important; width: 100%;
  transition: background-color .2s ease;
}
.t20-form-panel .wpforms-form button[type=submit]:hover { background: var(--accent-light) !important; }
/* Two-up field rows — set with the `wpforms-one-half` css class in forms.php. */
.t20-form-panel .wpforms-form .wpforms-one-half { width: 48.5% !important; margin-left: 3% !important; }
.t20-form-panel .wpforms-form .wpforms-one-half.wpforms-first { margin-left: 0 !important; }
.t20-form-panel .wpforms-confirmation-container,
.t20-form-panel .wpforms-confirmation-container-full {
  background: var(--accent-tint) !important;
  border: 1px solid var(--accent) !important;
  color: var(--white) !important;
}
.t20-form-panel .wpforms-confirmation-container p { color: var(--white) !important; }

/* Light form panel. */
.t20-form-light .wpforms-form .wpforms-field-label {
  font-size: 10px !important; font-weight: 700 !important;
  letter-spacing: 1.5px !important; text-transform: uppercase;
  color: var(--mid-gray) !important;
}
.t20-form-light .wpforms-form input[type=text],
.t20-form-light .wpforms-form input[type=email],
.t20-form-light .wpforms-form input[type=tel],
.t20-form-light .wpforms-form select,
.t20-form-light .wpforms-form textarea {
  background: var(--white) !important;
  border: 1px solid var(--border) !important;
  padding: 10px 13px !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 13px !important;
  color: var(--primary) !important;
  box-shadow: none !important;
}
.t20-form-light .wpforms-form input:focus,
.t20-form-light .wpforms-form select:focus,
.t20-form-light .wpforms-form textarea:focus {
  border-color: var(--accent) !important; outline: none !important;
}
.t20-form-light .wpforms-form button[type=submit] {
  background: var(--primary) !important; color: var(--accent) !important;
  font-size: 14px !important; font-weight: 700 !important;
  padding: 14px 30px !important; border: none !important;
  font-family: 'Inter', sans-serif !important;
}
.t20-form-light .wpforms-form button[type=submit]:hover { background: var(--primary-mid) !important; }
.t20-form-card.et_pb_column { border: 1px solid var(--border); }


/* =============================================================================
   PART 2 — DIVI DEFENCES
   Keep all of this. Each rule fixes a Divi behaviour that breaks layouts
   silently, and the symptoms show up later than the cause.
   Reference: docs/divi5-reference.md §6.
   ============================================================================= */

/* ---------- 2.1 Overlay containing-block fix (reference §6.8) -------------
   Divi's .et_pb_text_inner is position:relative, so IT — not your wrapper —
   becomes the containing block for an absolutely positioned child. And when its
   only child is absolutely positioned it collapses to zero height, so `bottom: 0`
   resolves to a zero-height box in the wrong place. The result: hero badges and
   stat strips pin themselves ABOVE the image instead of inside it.

   Apply .t20-overlay to any module that only contains absolutely positioned
   overlay content. Target it with an explicit class — :last-child is unreliable
   because Divi appends nodes.
   -------------------------------------------------------------------------- */

.t20-overlay,
.t20-hero-overlay {
  position: absolute !important;
  inset: 0;
  margin: 0 !important;
  pointer-events: none;   /* let clicks through to the image beneath */
}
.t20-overlay .et_pb_text_inner,
.t20-hero-overlay .et_pb_text_inner { position: static; }
/* …but keep links inside the overlay clickable. */
.t20-overlay a,
.t20-hero-overlay a { pointer-events: auto; }

/* The column is the positioning context. In a two-column split it must also HUG
   its image rather than stretching to match a taller sibling, or `bottom: 0`
   resolves to the bottom of the stretched column, not the bottom of the image. */
.t20-hero-visual { position: relative !important; }
.t20-about-visual { position: relative !important; align-self: flex-start; }

/* ---------- 2.2 Mobile row wrap safety net (reference §6.6) ----------------
   Divi emits `display:flex` on any row that sets vertical column alignment
   (gutter.alignColumns) but never adds flex-wrap — so Divi's own `width:100%`
   mobile rule leaves the columns on one non-wrapping line and the whole page
   scrolls sideways. Verify with tools/find-overflow.js at 390/768/1024.

   This lives with the other <=980px rules in PART 4, cross-referenced here so it
   is not deleted by accident.
   -------------------------------------------------------------------------- */


/* =============================================================================
   PART 3 — REFERENCE PATTERNS
   ADAPT OR DELETE. These are real, shipped component blocks. They are useful
   starting points and they encode one client's design decisions — read each one,
   keep what the mockup calls for, delete the rest. Leaving unused blocks here is
   harmless but makes the file lie about what the site does.
   ============================================================================= */

/* ---------- 3.1 Split hero with overlay proof ----------------------------- */

.t20-hero.et_pb_section { padding: 0 var(--gutter) !important; }
.t20-hero .et_pb_row { min-height: calc(100vh - var(--nav-height)); align-items: center; }
.t20-hero .et_pb_column { margin-bottom: 0 !important; }

/* Eyebrow with a short accent rule before the text. */
.t20-eyebrow,
.t20-eyebrow p {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px !important; font-weight: 700 !important;
  letter-spacing: 2px !important; text-transform: uppercase;
  color: var(--primary) !important;
  margin-bottom: 20px !important;
}
.t20-eyebrow p:before {
  content: ''; width: 32px; height: 3px; background: var(--accent);
  flex: 0 0 32px; display: inline-block;
}

.t20-hero-sub p {
  font-size: 17px !important; color: var(--muted) !important;
  line-height: 1.75 !important; max-width: 480px;
}

.t20-hero-visual .et_pb_image { margin-bottom: 0 !important; }
.t20-hero-visual .et_pb_image .et_pb_image_wrap { width: 100%; display: block; }
.t20-hero-visual .et_pb_image img {
  width: 100%;
  display: block;
  /* Divi ships height:auto on module images, hence !important. */
  height: 560px !important;
  object-fit: cover;
}

/* Overlapping badge. If the mockup puts a badge where the stat strip covers it,
   move the badge — an invisible proof point is a bug in the mockup, not a spec.
   Log the deviation. */
.t20-hero-badge {
  position: absolute; top: 0; right: 0;
  background: var(--accent); padding: 20px 24px; z-index: 3;
}
.t20-hero-badge .big { font-size: 2.2rem; font-weight: 800; color: var(--primary); line-height: 1; }
.t20-hero-badge .small {
  font-size: 10px; font-weight: 700; color: rgba(26, 26, 46, .65);
  letter-spacing: 1.5px; text-transform: uppercase; margin-top: 2px;
}

/* Stat strip overhanging the image's bottom-left. The 2px gap + border-colour
   background is the hairline-grid trick applied to a small grid. */
.t20-hero-stats {
  position: absolute; bottom: -20px; left: -20px; right: 20px;
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 2px; background: var(--border); z-index: 4;
}
.t20-hero-stats .stat { background: var(--white); padding: 16px 18px; border-top: 3px solid var(--accent); }
.t20-hero-stats .num { font-size: 1.6rem; font-weight: 800; color: var(--primary); line-height: 1; }
.t20-hero-stats .lbl {
  font-size: 10px; font-weight: 600; color: var(--muted);
  margin-top: 2px; letter-spacing: .5px; text-transform: uppercase;
}

/* ---------- 3.2 Interior page hero band ---------------------------------- */

.t20-page-hero .t20-lead p { color: rgba(255, 255, 255, .6) !important; max-width: 640px; }
.t20-page-hero .t20-h1 h1 { max-width: 900px; }

/* ---------- 3.3 Thin credibility strip ----------------------------------- */

.t20-regions.et_pb_section {
  background: var(--offwhite) !important;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px var(--gutter) !important;
}
.t20-regions .et_pb_row { padding: 0 !important; }
.t20-regions .et_pb_module { margin-bottom: 0 !important; }
.t20-regions-inner { display: flex; align-items: center; flex-wrap: wrap; gap: 0 32px; }
.t20-regions-inner .label {
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--mid-gray); white-space: nowrap;
}
.t20-regions-inner .items { display: flex; gap: 32px; align-items: center; flex-wrap: wrap; }
.t20-regions-inner .items span {
  font-size: 13px; font-weight: 600; color: var(--muted);
  letter-spacing: .3px; white-space: nowrap;
}

/* ---------- 3.4 Ruled card grid ------------------------------------------
   Cards are REAL Divi columns with gutter:1 (zero gap) plus a border-left, so
   the 1px hairlines come from the columns themselves and each card stays
   editable in the Visual Builder. The scaleX underline on hover is the signature
   Divi cannot express.
   -------------------------------------------------------------------------- */

.t20-svc-card.et_pb_column {
  background: var(--white);
  transition: background-color .3s ease;
  position: relative;
  overflow: hidden;
}
.t20-svc-card.et_pb_column:after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
}
.t20-svc-card.et_pb_column:hover:after { transform: scaleX(1); }
.t20-svc-card.et_pb_column:hover { background: var(--accent-tint); }
.t20-svc-card .et_pb_module:last-child { margin-bottom: 0 !important; }

.t20-num p {
  font-size: 11px !important; font-weight: 700 !important;
  color: var(--accent-dark) !important; letter-spacing: 2px !important;
  opacity: .7; margin-bottom: 0 !important;
}
.t20-svc-card h3 { font-size: 15px !important; font-weight: 700 !important; line-height: 1.3 !important; }
.t20-card-body p { font-size: 13px !important; color: var(--muted) !important; line-height: 1.65 !important; }
.t20-svc-card .t20-num { margin-bottom: 14px !important; }
.t20-svc-card .t20-card-h { margin-bottom: 9px !important; }

/* ---------- 3.5 Dark audience band with ghost numerals ------------------- */

.t20-serve-card.et_pb_column {
  background: var(--primary);
  transition: background-color .2s ease;
}
.t20-serve-card.et_pb_column:hover { background: var(--primary-mid); }
.t20-serve-card .t20-ghost-num p {
  font-size: 3rem !important; font-weight: 800 !important;
  color: var(--accent-tint) !important; line-height: 1 !important;
  margin-bottom: 14px !important;
}
.t20-serve-card h3 {
  font-size: 19px !important; font-weight: 700 !important;
  color: var(--white) !important; margin-bottom: 10px;
}
.t20-serve-card .t20-card-body p {
  font-size: 14px !important; color: rgba(255, 255, 255, .55) !important; line-height: 1.65 !important;
}
.t20-serve-card .et_pb_module:last-child { margin-bottom: 0 !important; }

/* ---------- 3.6 About split: image badge + principle rows ---------------- */

.t20-about-img .et_pb_image img {
  width: 100%; height: 500px !important; object-fit: cover; display: block;
}
.t20-about-visual .et_pb_image { margin-bottom: 0 !important; line-height: 0; }

.t20-about-badge {
  position: absolute; bottom: 0; right: 0; z-index: 3;
  background: var(--accent); padding: 20px 24px;
}
.t20-about-badge .big { font-size: 2.2rem; font-weight: 800; color: var(--primary); line-height: 1; }
.t20-about-badge .small {
  font-size: 10px; font-weight: 700; color: rgba(26, 26, 46, .65);
  letter-spacing: 1.5px; text-transform: uppercase; margin-top: 2px;
}

/* Icon square + text rows. Icon colour is set HERE, not on a Divi blurb: blurb
   icon colour ignores the attribute and falls back to a global var
   (docs/divi5-reference.md §6.11). */
.t20-principle {
  display: flex; gap: 16px; padding: 16px;
  border: 1px solid var(--border);
  transition: border-color .2s ease, background-color .2s ease;
  margin-bottom: 20px;
}
.t20-principle:last-child { margin-bottom: 0; }
.t20-principle:hover { border-color: var(--accent); background: var(--accent-tint); }
.t20-principle .ico {
  width: 38px; height: 38px; flex: 0 0 38px;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.t20-principle .ico svg { width: 18px; height: 18px; stroke: var(--accent); fill: none; stroke-width: 1.5; }
.t20-principle h4 { font-size: 15px; font-weight: 700; color: var(--primary); margin-bottom: 3px; }
.t20-principle p { font-size: 13px; color: var(--muted); line-height: 1.55; margin: 0; }

/* ---------- 3.7 Accreditation chip + checklist --------------------------- */

.t20-chip {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--accent); padding: 7px 16px;
  background: var(--accent-tint);
}
.t20-chip span {
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--accent-dark);
}
.t20-chip svg { flex: 0 0 16px; }

.t20-checklist { display: flex; flex-direction: column; gap: 11px; }
.t20-checklist .item { display: flex; gap: 10px; align-items: flex-start; }
.t20-checklist .box {
  width: 18px; height: 18px; flex: 0 0 18px; margin-top: 2px;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.t20-checklist .box svg { width: 10px; height: 10px; stroke: var(--accent); fill: none; stroke-width: 2.5; }
.t20-checklist p { font-size: 14px; color: var(--primary); line-height: 1.6; margin: 0; }

/* ---------- 3.8 Bordered offer cards (seminars, packages, programmes) ---- */

.t20-sem-card {
  background: var(--white); padding: 22px;
  border: 1px solid var(--border); border-left: 4px solid var(--accent);
  transition: box-shadow .2s ease;
  margin-bottom: 14px !important;
}
.t20-sem-card:hover { box-shadow: 0 4px 20px rgba(26, 26, 46, .08); }
.t20-sem-card .sem-tag {
  display: inline-block; font-size: 10px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--accent-dark); background: var(--accent-tint);
  padding: 3px 8px; margin-bottom: 7px;
}
.t20-sem-card h4 { font-size: 15px; font-weight: 700; color: var(--primary); margin-bottom: 5px; }
.t20-sem-card p { font-size: 13px; color: var(--muted); line-height: 1.55; margin: 0; }

/* ---------- 3.9 Team cards ----------------------------------------------- */

.t20-team .et_pb_team_member {
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow .3s ease, transform .3s ease;
  margin-bottom: 0 !important;
  height: 100%;
}
.t20-team .et_pb_team_member:hover { box-shadow: 0 8px 32px rgba(26, 26, 46, .1); transform: translateY(-4px); }
.t20-team .et_pb_team_member_image { margin: 0 !important; width: 100%; }
.t20-team .et_pb_team_member_image img {
  width: 100%; height: 340px; object-fit: cover;
  /* center top keeps faces in frame when headshot crops are inconsistent. */
  object-position: center top;
  display: block; background: var(--light-gray);
}
.t20-team .et_pb_team_member_description { padding: 16px 18px; }
.t20-team .et_pb_module_header {
  font-size: 15px !important; font-weight: 700 !important;
  color: var(--primary) !important; padding-bottom: 2px !important;
}
.t20-team .et_pb_member_position {
  font-size: 12px !important; font-weight: 600 !important;
  color: var(--accent-dark) !important; margin-bottom: 5px; display: block;
}
.t20-team .et_pb_team_member_description p {
  font-size: 11px !important; color: var(--muted) !important; line-height: 1.5 !important;
}
.t20-team .et_pb_team_member_description p a { color: var(--muted) !important; }
.t20-team .et_pb_team_member_description p a:hover { color: var(--accent-dark) !important; }

/* Placeholder portraits, where no headshot exists.
   If the placeholder's aspect ratio is CLOSE to the card's image slot, leave it
   on the same cover treatment as the real headshots — then placeholder and photo
   cards are indistinguishable in shape, which is what you want. The white
   background is only a safety net: if the graphic is re-cropped to an aspect that
   letterboxes, it letterboxes on white rather than showing a grey box.
   If the placeholder is very differently proportioned, switch to
   `object-fit: contain` instead, or a cover crop will slice the shoulders. */
.t20-team--placeholder .et_pb_team_member_image img { background: var(--white); }

/* ---------- 3.10 Office / location cards -------------------------------- */

.t20-office {
  padding: 14px 16px; border: 1px solid var(--border);
  transition: border-color .2s ease; margin-bottom: 10px;
}
.t20-office:last-child { margin-bottom: 0; }
.t20-office:hover { border-color: var(--accent); }
.t20-office h4 { font-size: 13px; font-weight: 700; color: var(--primary); margin-bottom: 2px; }
.t20-office p { font-size: 12px; color: var(--muted); line-height: 1.5; margin: 0; }
.t20-office a { color: var(--muted); text-decoration: none; }
.t20-office a:hover { color: var(--accent-dark); }

.t20-offices-h h2 { font-size: 16px !important; font-weight: 700 !important; margin-bottom: 18px; }

/* Oversized contact details on a dark band. */
.t20-bigcontact { margin: 0 0 4px; }
.t20-bigcontact a {
  font-size: 26px; font-weight: 800; color: var(--white);
  text-decoration: none; letter-spacing: -.01em;
}
.t20-bigcontact a:hover { color: var(--accent); }
.t20-subcontact { font-size: 14px; color: rgba(255, 255, 255, .55); line-height: 1.7; margin: 0; }
.t20-subcontact a { color: rgba(255, 255, 255, .55); text-decoration: none; }
.t20-subcontact a:hover { color: var(--accent); }

/* Association / partner logo strip. Low opacity because these are usually
   whatever resolution the client happens to have. */
.t20-logos img { max-width: 280px; opacity: .55; }

/* ---------- 3.11 Numbered process steps --------------------------------- */
/* One hairline grid via `gap: 1px` over a border-coloured background. */

ol.t20-steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1px; background: var(--border);
}
.t20-step {
  list-style: none;
  display: flex; gap: 24px; align-items: flex-start;
  background: var(--white);
  padding: 28px 32px;
  transition: background-color .25s ease;
}
.t20-step:hover { background: var(--accent-tint); }
.t20-step__num {
  font-size: 13px; font-weight: 700; letter-spacing: 2px;
  color: var(--accent-dark); flex: 0 0 40px; padding-top: 3px;
}
.t20-step__body h3 { font-size: 17px; font-weight: 700; color: var(--primary); margin-bottom: 5px; }
.t20-step__body p { font-size: 14px; color: var(--muted); line-height: 1.65; margin: 0; max-width: 820px; }

/* ---------- 3.12 Capability grid, with an "in development" variant ------ */
/* The dashed variant exists for a specific integrity problem: a client brief may
   list capabilities the audit does not substantiate. Holding them in a visually
   distinct, dashed group means the page cannot be read as claiming them today,
   without deleting a differentiator the client asked for. Flag both for
   confirmation before launch. */

.t20-tech-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: rgba(255, 255, 255, .12);
}
.t20-tech-item { background: var(--primary); padding: 32px 28px; transition: background-color .2s ease; }
.t20-tech-item:hover { background: var(--primary-mid); }
.t20-tech-item h3 { font-size: 16px; font-weight: 700; color: var(--white); margin-bottom: 8px; }
.t20-tech-item p { font-size: 13px; color: rgba(255, 255, 255, .55); line-height: 1.65; margin: 0; }

.t20-tech-planned { margin-top: 34px !important; }
.t20-tech-planned .t20-tech-grid {
  grid-template-columns: repeat(2, 1fr);
  background: transparent;   /* dashed cards, so a real gap not a hairline */
  gap: 14px;
}
.t20-tech-planned__label {
  font-size: 10px !important; font-weight: 700 !important;
  letter-spacing: 2px !important; text-transform: uppercase;
  color: var(--accent) !important;
  margin: 0 0 12px !important;
  display: flex; align-items: center; gap: 10px;
}
.t20-tech-planned__label:after {
  content: ''; flex: 1 1 auto; height: 1px; background: rgba(255, 255, 255, .12);
}
.t20-tech-item--planned { background: transparent; border: 1px dashed rgba(255, 255, 255, .18); }
.t20-tech-item--planned:hover { background: rgba(255, 255, 255, .03); }
.t20-tech-item--planned h3 { color: rgba(255, 255, 255, .75); }

/* ---------- 3.13 Blog index cards + single post readability ------------- */

.t20-blog .et_pb_post {
  border: 1px solid var(--border);
  padding: 0 0 20px 0;
  margin-bottom: 0 !important;
  background: var(--white);
  transition: box-shadow .3s ease, transform .3s ease;
}
.t20-blog .et_pb_post:hover { box-shadow: 0 8px 32px rgba(26, 26, 46, .1); transform: translateY(-4px); }
.t20-blog .et_pb_image_container { margin: 0 0 18px 0 !important; }
.t20-blog .et_pb_image_container img { width: 100%; height: 200px; object-fit: cover; display: block; }
.t20-blog .entry-title {
  padding: 0 22px 8px !important; font-size: 17px !important;
  font-weight: 700 !important; line-height: 1.3 !important;
}
.t20-blog .entry-title a { color: var(--primary) !important; }
.t20-blog .entry-title a:hover { color: var(--accent-dark) !important; }
.t20-blog .post-meta {
  padding: 0 22px 8px !important; font-size: 10px !important;
  font-weight: 700 !important; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--mid-gray) !important;
}
.t20-blog .post-meta a { color: var(--accent-dark) !important; font-weight: 700; }
.t20-blog .post-content { padding: 0 22px !important; }
.t20-blog .post-content p { font-size: 13px !important; color: var(--muted) !important; line-height: 1.65 !important; }
.t20-blog .post-content .more-link {
  font-size: 12px; font-weight: 700; color: var(--primary);
  letter-spacing: .5px; text-transform: uppercase;
}
.t20-blog .post-content .more-link:hover { color: var(--accent-dark); }
/* Posts with no featured image need the title padding back. */
.t20-blog .et_pb_no_thumb .entry-title { padding-top: 22px !important; }

.t20-post-body p { font-size: 17px; color: var(--muted); line-height: 1.8; margin-bottom: 22px; }
.t20-post-body h2 { font-size: 26px; font-weight: 800; margin: 36px 0 14px; letter-spacing: -.02em; }
.t20-post-body h3 { font-size: 19px; font-weight: 700; margin: 28px 0 10px; }
.t20-post-body ul { margin: 0 0 22px 0; padding-left: 20px; }
.t20-post-body li { font-size: 17px; color: var(--muted); line-height: 1.8; margin-bottom: 8px; }
.t20-post-body strong { color: var(--primary); }


/* =============================================================================
   PART 4 — RESPONSIVE
   Divi 5 front-end CSS is DESKTOP-FIRST, so these are all max-width queries.
   980px is Divi's own column-stacking breakpoint — align with it rather than
   inventing another.
   ============================================================================= */

@media (max-width: 980px) {

  /* --- MACHINERY --- */

  /* Nav collapses to the hamburger. */
  .t20-nav__menu { display: none; }
  .t20-burger { display: flex; }
  .t20-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }

  /* =========================================================================
     KEEP THIS. Divi emits `display:flex` on any row that sets vertical column
     alignment but never adds flex-wrap, so its own `width:100%` mobile rule
     leaves the columns on one non-wrapping line and the whole page scrolls
     sideways (measured 578px wide at a 390px viewport before this fix).
     docs/divi5-reference.md §6.6. Verify with tools/find-overflow.js.
     ========================================================================= */
  .et_pb_row { flex-wrap: wrap !important; }
  .et_pb_row > .et_pb_column {
    width: 100% !important;
    max-width: 100% !important;
    margin-right: 0 !important;
  }

  /* --- REFERENCE PATTERNS --- */

  /* Divi stacks columns at 980px, which kills the vertical hairlines. Convert
     them to horizontal rules so a card grid still reads as a grid rather than
     floating boxes. */
  .t20-svc-card.et_pb_column,
  .t20-serve-card.et_pb_column {
    border-left: none !important;
    border-top: 1px solid var(--border) !important;
    width: 100% !important;
    margin-bottom: 0 !important;
  }
  .t20-serve-card.et_pb_column { border-top-color: rgba(255, 255, 255, .12) !important; }

  .t20-hero .et_pb_row { min-height: 0; padding-top: 32px !important; padding-bottom: 32px !important; }
  .t20-hero-visual .et_pb_image img { height: 420px !important; }
  .t20-form-panel.et_pb_column { padding: 32px 24px !important; }
  .t20-tech-grid { grid-template-columns: repeat(2, 1fr); }
  .t20-team .et_pb_team_member_image img { height: 300px; }
}

@media (max-width: 767px) {

  /* --- MACHINERY --- */

  #main-header.t20-nav { padding: 0 var(--gutter-mobile); }
  .t20-mobile-panel { margin: 0 calc(-1 * var(--gutter-mobile)); }
  ul.t20-menu-mobile > li > a { padding: 14px var(--gutter-mobile); }
  #main-footer.t20-footer { padding: 48px var(--gutter-mobile) 24px; }
  .t20-footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .t20-footer__bottom { flex-direction: column; }

  /* Two-up form fields go full width. */
  .t20-form-panel .wpforms-form .wpforms-one-half,
  .t20-form-light .wpforms-form .wpforms-one-half {
    width: 100% !important; margin-left: 0 !important;
  }

  /* --- REFERENCE PATTERNS --- */

  .t20-hero.et_pb_section { padding: 0 var(--gutter-mobile) !important; }

  /* A mockup that sets `.hero-right{display:none}` on mobile throws away the
     only proof imagery on the page. Better: keep the image and drop the whole
     overlay OUT of overlay mode, so the badge and stat strip flow beneath the
     photo instead of covering it. Log the deviation. */
  .t20-hero-visual .et_pb_image img { height: 260px !important; }
  .t20-hero-overlay {
    position: static !important;
    inset: auto;
    pointer-events: auto;
  }
  .t20-hero-badge {
    position: static;
    display: block;
    padding: 14px 18px;
    text-align: center;
  }
  .t20-hero-badge .big { font-size: 1.7rem; }
  .t20-hero-stats {
    position: static; left: auto; right: auto; bottom: auto;
    margin-top: 1px; gap: 1px;
  }

  .t20-regions-inner { gap: 10px 0; flex-direction: column; align-items: flex-start; }
  .t20-regions-inner .items { gap: 8px 18px; }
  .t20-about-img .et_pb_image img { height: 320px !important; }
  .t20-about-badge { padding: 14px 18px; }
  .t20-about-badge .big { font-size: 1.7rem; }
  .t20-team .et_pb_team_member_image img { height: 320px; }
  .t20-post-body p, .t20-post-body li { font-size: 16px; }
  .t20-tech-grid { grid-template-columns: 1fr; }
  .t20-step { flex-direction: column; gap: 8px; padding: 22px 20px; }
  .t20-step__num { flex: none; padding-top: 0; }
}
