:root {
  --navy: #033238;
  --navy-dark: #021b1f;
  --accent: #044983;
  --text: #1c1c1c;
  --muted: #5b6472;
  --border: #e4e7eb;
  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --card-bg: #eef2fa;
  --card-border: #dbe4f3;

  /* Typography scale — fluid between a mobile (~340px) and desktop
     (~1280px) viewport so headings grow smoothly with screen size
     instead of jumping at a breakpoint. Realised ranges:
     H1 38–42px mobile / 52–56px desktop (--font-h1-lg reserves up to
     60px for major hero statements only — currently just finance.html's
     homepage hero; capped below the 64px brief ceiling because a
     realistic headline at 64px was forcing an awkward 3-line wrap
     even at a generous max-width); H2 28–32px / 36–40px; H3 22–26px / 24–28px. */
  --font-h1: clamp(2.375rem, 1.97rem + 1.9vw, 3.5rem);
  --font-h1-lg: clamp(2.375rem, 1.88rem + 2.34vw, 3.75rem);
  --font-h2: clamp(1.75rem, 1.48rem + 1.28vw, 2.5rem);
  --font-h3: clamp(1.375rem, 1.24rem + 0.64vw, 1.75rem);
  --font-body: 1.0625rem;   /* 17px */
  --font-secondary: 1rem;   /* 16px — supporting/secondary text */
  --font-nav: 0.95rem;      /* ~15px — nav links and buttons, already in range */

  --leading-heading: 1.2;
  --leading-body: 1.6;

  /* Spacing scale — restrained, consistent rhythm. Applied to the
     shared/global components (header, nav, buttons, cards, sections,
     container) in this pass; not retrofitted into every page's
     existing content spacing, which is out of scope for this phase. */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 80px;
  --space-10: 96px;
  --space-11: 120px;

  --radius: 8px; /* standard card/component corner radius */
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: var(--font-body);
  line-height: var(--leading-body);
}

h1, h2, h3 {
  line-height: var(--leading-heading);
  text-wrap: balance;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: inherit; }

/* Focus states — keyboard navigation must stay visible; browser default
   outlines were previously unstyled/inconsistent across elements. */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.logo img {
  display: block;
  height: 42px;
  width: auto;
  filter: drop-shadow(0 2px 3px rgba(3, 50, 56, 0.28));
}
.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}
.main-nav a {
  text-decoration: none;
  color: var(--text);
  font-size: var(--font-nav);
}
.main-nav a.active {
  color: var(--navy);
  font-weight: 600;
}
.nav-cta {
  background: var(--navy);
  color: #fff !important;
  padding: var(--space-2) var(--space-4);
  border-radius: 4px;
  transition: background 0.15s ease;
}
.nav-cta:hover { background: var(--navy-dark); }

/* Nav dropdowns (Finance, Sectors) — click/keyboard toggle only, no
   hover-to-open, so the menu is fully operable without a mouse and
   never appears/disappears from an incidental hover (WCAG 1.4.13). */
.nav-dropdown { position: relative; }
.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: var(--font-nav);
  color: var(--text);
  cursor: pointer;
}
.nav-dropdown-trigger.active { color: var(--navy); font-weight: 600; }
.nav-dropdown-trigger::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.15s ease;
}
.nav-dropdown.open .nav-dropdown-trigger::after { transform: rotate(-135deg) translateY(2px); }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + var(--space-4));
  left: 50%;
  transform: translateX(-50%);
  min-width: 240px;
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(16, 35, 63, 0.16);
  padding: var(--space-2);
  z-index: 110;
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block;
  padding: var(--space-2) var(--space-3);
  border-radius: 4px;
  white-space: nowrap;
  font-size: var(--font-nav);
}
.nav-dropdown-menu a:hover,
.nav-dropdown-menu a:focus-visible { background: var(--bg-alt); }

/* Mobile nav toggle — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
}

/* Breadcrumb */
.breadcrumb {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
}
.breadcrumb .wrap { padding-top: 10px; padding-bottom: 10px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 6px; }

/* Hero */
.hero {
  background: var(--navy);
  color: #fff;
  padding: var(--space-9) 0;
  text-align: center;
}
.hero h1 {
  font-size: var(--font-h1-lg);
  max-width: 960px;
  margin: 0 auto var(--space-4);
}
.hero-sub {
  max-width: 640px;
  margin: 0 auto var(--space-6);
  color: #cdd6e3;
  font-size: var(--font-secondary);
}
/* Hero background image (optional, per page) — see the HERO IMAGE comment
   above each page's <section class="hero hero-product"> tag for the exact
   inline style to add once a photo exists. Without it, the solid .hero
   navy background above is the fallback, so pages render correctly either
   way. */
.hero-product {
  padding: var(--space-7) 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 340px;
  display: flex;
  align-items: center;
}
.hero-product h1 { font-size: var(--font-h1); max-width: 960px; }
.hero-product .wrap { width: 100%; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  font-size: var(--font-nav);
}
.btn {
  transition: background 0.15s ease, transform 0.05s ease;
}
.btn-primary {
  background: var(--accent);
  color: #ffffff;
}
.btn-primary:hover { background: #033a6b; }
.btn-primary:active { background: #022c52; transform: translateY(1px); }
.btn-secondary {
  background: var(--navy);
  color: #fff;
}
.btn-secondary:hover { background: var(--navy-dark); }
.btn-secondary:active { background: #010f12; transform: translateY(1px); }
.btn[disabled],
.btn[aria-disabled="true"] {
  background: var(--card-border);
  color: var(--muted);
  cursor: not-allowed;
  pointer-events: none;
}

/* Sections */
.section { padding: var(--space-8) 0; }
.section h2 {
  font-size: var(--font-h2);
  margin-bottom: 32px;
  color: var(--navy);
}
.why-section { background: var(--bg-alt); }

/* Base h3 size — covers bare h3 usage (e.g. .cta-card h3) not already
   given a component-specific size below. */
h3 { font-size: var(--font-h3); }

/* Product grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-5);
}
.product-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  text-decoration: none;
  background: var(--card-bg);
  box-shadow: 0 2px 6px rgba(16, 35, 63, 0.10), 0 6px 16px rgba(16, 35, 63, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.product-card:hover {
  border-color: var(--navy);
  background: #e4ebf8;
  transform: translateY(-7px);
  box-shadow: 0 20px 34px rgba(16, 35, 63, 0.20), 0 8px 14px rgba(16, 35, 63, 0.12);
}

/* Card image + overlapping badge */
.card-media {
  position: relative;
  aspect-ratio: 8 / 5;
  overflow: hidden;
  background: var(--card-bg);
}
.card-media > img:first-child {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 56px;
  height: 56px;
  padding: 8px;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(16, 35, 63, 0.25);
  object-fit: contain;
  box-sizing: border-box;
}

.card-body { padding: var(--space-4) var(--space-5) var(--space-5); }

.product-card h3 {
  margin: 0 0 8px;
  color: var(--navy-dark);
  font-size: var(--font-h3);
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.18s ease;
}
.product-card:hover h3 { text-decoration-color: var(--navy-dark); }
.product-card p {
  margin: 0 0 16px;
  color: #3d4b60;
  font-size: var(--font-secondary);
}
.card-cta {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 4px;
}

/* Mobile: drop the image, keep title/body/CTA — matches the reference layout */
@media (max-width: 640px) {
  .card-media { display: none; }
  .card-body { padding: 20px; }
}

/* Checklist */
.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.checklist li {
  padding-left: 28px;
  position: relative;
  color: var(--text);
}
.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* CTA row */
.cta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-5);
}
.cta-card {
  border: 1px solid var(--card-border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: var(--space-6);
  text-align: center;
  background: var(--card-bg);
  box-shadow: 0 2px 6px rgba(16, 35, 63, 0.10), 0 6px 16px rgba(16, 35, 63, 0.08);
}
.cta-card h3 { margin-top: 0; color: var(--navy); }
.cta-grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* Numbered list */
.numbered-list {
  columns: 2;
  column-gap: 40px;
  padding-left: 22px;
  margin: 0;
}
.numbered-list li { break-inside: avoid; margin-bottom: 12px; }

/* Checklist stacked variant (product pages) */
.checklist-col {
  display: block;
}
.checklist-col li { margin-bottom: 12px; }

/* Value card (About page) — same tint as product cards, no image/badge */
.value-card {
  display: block;
  border: 1px solid var(--card-border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: var(--space-5);
  background: var(--card-bg);
  box-shadow: 0 2px 6px rgba(16, 35, 63, 0.10), 0 6px 16px rgba(16, 35, 63, 0.08);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
a.value-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(16, 35, 63, 0.16), 0 4px 8px rgba(16, 35, 63, 0.10);
}
.value-card h3 {
  margin: 0 0 8px;
  color: var(--navy-dark);
  font-size: var(--font-h3);
}
.value-card p {
  margin: 0;
  color: #3d4b60;
  font-size: var(--font-secondary);
}

/* Contact page */
.contact-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: start;
}
.contact-info {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 2px 6px rgba(16, 35, 63, 0.10), 0 6px 16px rgba(16, 35, 63, 0.08);
}
.contact-info h2 { margin-top: 0; font-size: 1.15rem; color: var(--navy); }
.contact-line { margin: 0 0 18px; color: #3d4b60; font-size: var(--font-secondary); line-height: 1.5; }
.contact-line a { color: var(--accent); }

.enquiry-form-wrap { min-width: 0; }
.enquiry-form { display: flex; flex-direction: column; gap: 20px; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-row-2col > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.enquiry-form label { font-size: 0.9rem; font-weight: 600; color: var(--navy-dark); }
.enquiry-form input[type="text"],
.enquiry-form input[type="email"],
.enquiry-form input[type="tel"],
.enquiry-form input[type="number"],
.enquiry-form input[type="date"],
.enquiry-form textarea {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 0.95rem;
  font-family: inherit;
}
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: 400 !important;
  font-size: 0.9rem;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: border-color 0.15s, background 0.15s;
}
.checkbox-item input { margin-top: 3px; accent-color: var(--accent); }
.checkbox-item:has(input:checked) {
  border-color: var(--accent);
  background: var(--card-bg);
}
.enquiry-group-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 4px 0 -2px;
}
.enquiry-not-sure { margin-top: 4px; }
.consent-group { gap: 10px; }
.consent-item-highlight {
  border-left: 3px solid var(--accent);
  background: var(--card-bg);
  border-radius: 0 6px 6px 0;
}
.consent-item-highlight label { font-weight: 400 !important; }
.form-status { font-size: 0.92rem; font-weight: 600; }
.form-status-success { color: #0a6b3d; }
.form-status-error { color: #b3261e; }

.legal-content { max-width: 760px; }
.legal-content h2 { font-size: 1.25rem; color: var(--navy); margin: 32px 0 12px; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p, .legal-content ul { margin: 0 0 16px; line-height: 1.6; color: var(--text); }
.legal-content ul { padding-left: 22px; }
.legal-content .legal-updated { color: var(--muted); font-size: 0.88rem; margin-bottom: 32px; }

@media (max-width: 760px) {
  .contact-grid { grid-template-columns: 1fr; }
  .form-row-2col { grid-template-columns: 1fr; }
}

/* FAQ accordion */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--navy-dark);
  font-size: 1rem;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
  content: "+";
  display: inline-block;
  width: 1.2em;
  color: var(--accent);
  font-weight: 700;
}
.faq-item[open] summary::before { content: "\2212"; }
.faq-item p {
  margin: 12px 0 0 1.2em;
  color: #3d4b60;
  font-size: var(--font-secondary);
}

/* Mid-content full-width image - breaks up text runs between sections.
   Contained within .wrap (max 1120px), not full-bleed like the hero.
   Design at 1600x500px (3.2:1), JPEG, <200KB. margin-top keeps it from
   sitting flush against whatever card grid/text precedes it. */
.content-image-full {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 5;
  object-fit: cover;
  border-radius: 8px;
  margin-top: var(--space-6);
}

/* Side image — pairs with a paragraph/list, two columns on desktop,
   stacks on mobile. Image defaults to the left; add
   .content-split--reverse to put it on the right instead.
   Design at 1080x810px (4:3), JPEG, <200KB. */
.content-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  margin-top: 24px;
}
.content-split-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  order: 1;
}
.content-split-text { order: 2; }
.content-split--reverse .content-split-image { order: 2; }
.content-split--reverse .content-split-text { order: 1; }

@media (max-width: 760px) {
  .content-split { grid-template-columns: 1fr; }
  .content-split-image, .content-split--reverse .content-split-image { order: 1; }
  .content-split-text, .content-split--reverse .content-split-text { order: 2; }
}

/* Scope note (BTL regulatory boundary) */
.scope-note {
  background: var(--card-bg);
  border-left: 4px solid var(--accent);
  border-radius: 4px;
  padding: 16px 20px;
  margin: 24px 0 0;
  font-size: var(--font-secondary);
  color: #23394a;
}

/* Footer */
.site-footer {
  background: var(--navy-dark);
  color: #b9c2d0;
  padding: 32px 0;
  font-size: 0.85rem;
}
.site-footer a { color: #b9c2d0; }
.compliance-note {
  color: #e0a84f;
  border: 1px dashed #e0a84f;
  padding: 12px;
  border-radius: 4px;
  margin-bottom: 20px;
}

/* Tablet and below: collapse nav into a toggled dropdown */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }

  .main-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: var(--space-2) var(--space-5) var(--space-4);
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }
  .main-nav.open { display: flex; }
  .main-nav > a {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }
  .main-nav > a:last-child { border-bottom: none; }
  .nav-cta {
    margin-top: 12px;
    text-align: center;
  }

  /* Dropdowns become inline accordions rather than floating panels —
     a floating panel doesn't make sense inside an already-vertical
     mobile menu. */
  .nav-dropdown {
    border-bottom: 1px solid var(--border);
  }
  .nav-dropdown-trigger {
    width: 100%;
    justify-content: space-between;
    padding: 12px 0;
  }
  .nav-dropdown-menu {
    display: none;
    position: static;
    transform: none;
    min-width: 0;
    border: none;
    box-shadow: none;
    padding: 0 0 var(--space-2) var(--space-4);
    background: var(--bg-alt);
    border-radius: 0;
  }
  .nav-dropdown.open .nav-dropdown-menu { display: block; }
  .nav-dropdown-menu a { padding: 10px var(--space-3); }
}

@media (max-width: 640px) {
  .hero { padding: var(--space-7) 0; }
  .hero-product { min-height: 260px; }
  .section { padding: var(--space-6) 0; }
  .cta-grid, .card-grid { grid-template-columns: 1fr; }
  .numbered-list { columns: 1; }
}
