/* ============================================================
   BCS CARGO SERVICES — Single-page redesign foundation
   ------------------------------------------------------------
   Organisation (top-down):
     1. :root design tokens (ported VERBATIM from the DS)
     2. Base / reset
     3. Typography
     4. Layout primitives (.container, .section)
     5. Components (buttons, eyebrow, service card, header,
        forms, accordion, stat row, brand band)
     6. Page-section helpers (hero band, pale-wash bands)
     7. Utilities
     8. Responsive
   No @import — a single self-contained stylesheet.
   ============================================================ */

/* ============================================================
   1. DESIGN TOKENS — ported verbatim from the BCS design system
   (tokens/colors.css, typography.css, spacing.css)
   ============================================================ */
:root {
  /* ---- Brand: Boroncana Blue ---- */
  --bcs-blue-900: #062b54;   /* deepest navy — footers, overlays */
  --bcs-blue-800: #073c73;   /* deep navy — headings on light */
  --bcs-blue-700: #0a4d92;
  --bcs-blue-600: #0855a4;   /* PRIMARY — the logo blue */
  --bcs-blue-500: #1267bd;
  --bcs-blue-400: #2f86d6;   /* hover / links */
  --bcs-blue-300: #74b0e6;
  --bcs-blue-200: #b7d5f3;
  --bcs-blue-100: #dceafb;
  --bcs-blue-50:  #eef5fd;   /* palest tint — section wash */

  /* ---- Accent: Cargo Amber (use sparingly, for action) ---- */
  --bcs-amber-600: #d97a14;
  --bcs-amber-500: #f59324;  /* PRIMARY accent */
  --bcs-amber-400: #ffae54;
  --bcs-amber-100: #fdecd6;

  /* ---- Neutrals: cool slate ---- */
  --bcs-white:  #ffffff;
  --bcs-gray-50:  #f5f7fa;
  --bcs-gray-100: #eceff4;
  --bcs-gray-200: #dde3ec;
  --bcs-gray-300: #c7d0dc;
  --bcs-gray-400: #9aa6b6;
  --bcs-gray-500: #6b7889;
  --bcs-gray-600: #4c5868;
  --bcs-gray-700: #33404f;
  --bcs-gray-800: #1f2a38;
  --bcs-ink:      #11203a;   /* near-navy primary text */

  /* ---- Semantic feedback ---- */
  --bcs-success: #1f8a4c;
  --bcs-success-bg: #e4f4ea;
  --bcs-warning: #c9870a;
  --bcs-warning-bg: #fdf1da;
  --bcs-danger:  #c5362f;
  --bcs-danger-bg: #fbe6e5;
  --bcs-info:    var(--bcs-blue-600);
  --bcs-info-bg: var(--bcs-blue-50);

  /* ======================================================
     SEMANTIC ALIASES — prefer these in components/UI
     ====================================================== */
  --color-primary:        var(--bcs-blue-600);
  --color-primary-hover:  var(--bcs-blue-700);
  --color-primary-active: var(--bcs-blue-800);
  --color-accent:         var(--bcs-amber-500);
  --color-accent-hover:   var(--bcs-amber-600);

  --text-strong:   var(--bcs-ink);
  --text-heading:  var(--bcs-blue-800);
  --text-body:     var(--bcs-gray-700);
  --text-muted:    var(--bcs-gray-500);
  --text-on-brand: var(--bcs-white);
  --text-link:     var(--bcs-blue-600);

  --surface-page:    var(--bcs-white);
  --surface-subtle:  var(--bcs-gray-50);
  --surface-wash:    var(--bcs-blue-50);
  --surface-card:    var(--bcs-white);
  --surface-brand:   var(--bcs-blue-600);
  --surface-brand-deep: var(--bcs-blue-900);
  --surface-inverse: var(--bcs-blue-800);

  --border-subtle: var(--bcs-gray-200);
  --border-default: var(--bcs-gray-300);
  --border-strong: var(--bcs-gray-400);
  --border-brand:  var(--bcs-blue-600);

  --focus-ring: var(--bcs-blue-400);

  /* ---- Typography: families ---- */
  --font-display: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --font-body:    'Open Sans', 'Helvetica Neue', Arial, sans-serif;
  --font-mono:    ui-monospace, 'SFMono-Regular', 'Menlo', monospace;

  /* ---- Weights ---- */
  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;
  --fw-extra:    800;

  /* ---- Type scale (1.250 major-third, 16px base) ---- */
  --fs-2xs:  0.75rem;   /* 12px — labels, captions */
  --fs-xs:   0.8125rem; /* 13px */
  --fs-sm:   0.875rem;  /* 14px — UI, fine print */
  --fs-base: 1rem;      /* 16px — body */
  --fs-md:   1.125rem;  /* 18px — lead body */
  --fs-lg:   1.375rem;  /* 22px — card titles */
  --fs-xl:   1.75rem;   /* 28px — section subhead */
  --fs-2xl:  2.25rem;   /* 36px — section head */
  --fs-3xl:  3rem;      /* 48px — page head */
  --fs-4xl:  4rem;      /* 64px — hero */
  --fs-5xl:  5.25rem;   /* 84px — oversized display */

  /* ---- Line heights ---- */
  --lh-tight:   1.05;
  --lh-snug:    1.2;
  --lh-heading: 1.15;
  --lh-body:    1.65;
  --lh-relaxed: 1.8;

  /* ---- Letter spacing ---- */
  --ls-tight:  -0.02em;
  --ls-normal: 0;
  --ls-wide:   0.04em;
  --ls-caps:   0.12em;  /* uppercase eyebrows / overlines */

  /* ---- Type semantic aliases ---- */
  --text-eyebrow-size: var(--fs-sm);
  --text-eyebrow-spacing: var(--ls-caps);

  /* ---- Spacing (8px grid; 4px half-steps) ---- */
  --space-0:  0;
  --space-1:  0.25rem;  /* 4 */
  --space-2:  0.5rem;   /* 8 */
  --space-3:  0.75rem;  /* 12 */
  --space-4:  1rem;     /* 16 */
  --space-5:  1.5rem;   /* 24 */
  --space-6:  2rem;     /* 32 */
  --space-7:  2.5rem;   /* 40 */
  --space-8:  3rem;     /* 48 */
  --space-9:  4rem;     /* 64 */
  --space-10: 5rem;     /* 80 */
  --space-12: 7rem;     /* 112 — section rhythm */

  /* ---- Radii ---- */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;   /* default card / input */
  --radius-lg: 16px;   /* feature cards */
  --radius-xl: 24px;
  --radius-pill: 999px; /* buttons, tags, badges */

  /* ---- Borders ---- */
  --border-width: 1px;
  --border-width-strong: 2px;

  /* ---- Shadows (cool, navy-tinted, never gray-black) ---- */
  --shadow-xs: 0 1px 2px rgba(7, 60, 115, 0.06);
  --shadow-sm: 0 2px 6px rgba(7, 60, 115, 0.08);
  --shadow-md: 0 8px 20px rgba(7, 60, 115, 0.10);
  --shadow-lg: 0 16px 40px rgba(7, 60, 115, 0.14);
  --shadow-brand: 0 10px 24px rgba(8, 85, 164, 0.28);
  --shadow-amber: 0 10px 24px rgba(245, 147, 36, 0.30);

  /* ---- Layout ---- */
  --container-max: 1200px;
  --container-wide: 1320px;
  --gutter: var(--space-6);     /* 32px gutters */
  --header-height: 84px;

  /* ---- Motion ---- */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 140ms;
  --dur-base: 220ms;
  --dur-slow: 360ms;

  /* ---- Derived foundation values ---- */
  --focus-ring-shadow: 0 0 0 3px rgba(47, 134, 214, 0.18); /* 3px soft blue ring */
  --scroll-offset: calc(var(--header-height) + var(--space-5)); /* anchor landing offset */
}

/* ============================================================
   2. BASE / RESET
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--scroll-offset);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--text-body);
  background-color: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html,
body {
  overflow-x: hidden;
  overflow-x: clip;
}

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

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

a:hover {
  color: var(--bcs-blue-400);
}

button {
  font-family: inherit;
  cursor: pointer;
}

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

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* ============================================================
   3. TYPOGRAPHY
   Display & headings: Montserrat, tight tracking / tight leading.
   Body: Open Sans, calm 1.65 leading. Headings use Title Case.
   ============================================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 var(--space-4);
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-tight);
  color: var(--text-heading);
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-4xl);
  font-weight: var(--fw-extra);
  line-height: var(--lh-tight);
}

h2 {
  font-size: var(--fs-2xl);
}

h3 {
  font-size: var(--fs-lg);
}

h4 {
  font-size: var(--fs-md);
}

h5 {
  font-size: var(--fs-base);
}

h6 {
  font-size: var(--fs-sm);
}

p {
  margin: 0 0 var(--space-4);
}

p:last-child {
  margin-bottom: 0;
}

strong,
b {
  font-weight: var(--fw-bold);
}

small {
  font-size: var(--fs-sm);
}

.lead {
  font-size: var(--fs-md);
  color: var(--text-body);
}

.text-muted {
  color: var(--text-muted);
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-8);
}

.section-title h2 {
  margin-bottom: var(--space-3);
}

/* ============================================================
   4. LAYOUT PRIMITIVES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--wide {
  max-width: var(--container-wide);
}

.section {
  position: relative;
  padding-block: var(--space-12);
  /* anchor links land clear of the sticky header */
  scroll-margin-top: var(--scroll-offset);
}

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

/* Pale-wash alternating band */
.section--wash {
  background-color: var(--surface-wash);
}

.section--subtle {
  background-color: var(--surface-subtle);
}

.grid {
  display: grid;
  gap: var(--space-6);
}

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

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

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

/* ============================================================
   5. COMPONENTS
   ============================================================ */

/* ---- 5a. Pill buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.75rem 1.75rem;
  font-family: var(--font-display);
  font-size: var(--fs-base);
  font-weight: var(--fw-bold);
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-align: center;
  border: var(--border-width-strong) solid transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition:
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out),
    background-color var(--dur-base) var(--ease-out),
    color var(--dur-base) var(--ease-out),
    filter var(--dur-base) var(--ease-out);
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(0.93);
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring-shadow);
}

/* Primary — solid Boroncana blue with brand-tinted shadow */
.btn--primary {
  background-color: var(--color-primary);
  color: var(--text-on-brand);
  box-shadow: var(--shadow-brand);
}

.btn--primary:hover {
  background-color: var(--color-primary);
  color: var(--text-on-brand);
}

/* Accent — solid Cargo amber; reserve for highest-intent CTAs */
.btn--accent {
  background-color: var(--color-accent);
  color: var(--bcs-ink);
  box-shadow: var(--shadow-amber);
}

.btn--accent:hover {
  background-color: var(--color-accent);
  color: var(--bcs-ink);
}

/* Secondary — 2px blue outline */
.btn--secondary {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn--secondary:hover {
  background-color: var(--bcs-blue-50);
  color: var(--color-primary-hover);
  filter: none;
}

/* Ghost — text only */
.btn--ghost {
  background-color: transparent;
  color: var(--color-primary);
  border-color: transparent;
  box-shadow: none;
}

.btn--ghost:hover {
  background-color: var(--bcs-blue-50);
  filter: none;
}

/* Inverse — white on dark surfaces */
.btn--inverse {
  background-color: var(--bcs-white);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.btn--inverse:hover {
  background-color: var(--bcs-white);
}

.btn--sm {
  padding: 0.5rem 1.25rem;
  font-size: var(--fs-sm);
}

.btn--lg {
  padding: 0.95rem 2.25rem;
  font-size: var(--fs-md);
}

.btn[disabled],
.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

/* ---- Legacy button aliases (existing HTML uses .btn-red / .btn-dark) ----
   .btn-red  -> accent (amber) : the original red CTA was the high-intent action
   .btn-dark -> primary (blue) : the original dark hero button
   These keep existing markup (incl. register.html) restyling cleanly. */
.btn-red {
  background-color: var(--color-accent);
  color: var(--bcs-ink);
  box-shadow: var(--shadow-amber);
}

.btn-red:hover {
  background-color: var(--color-accent);
  color: var(--bcs-ink);
}

.btn-dark {
  background-color: var(--color-primary);
  color: var(--text-on-brand);
  box-shadow: var(--shadow-brand);
}

.btn-dark:hover {
  background-color: var(--color-primary);
  color: var(--text-on-brand);
}

/* ---- 5b. Eyebrow — UPPERCASE Montserrat preceded by an amber tick ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  font-family: var(--font-display);
  font-size: var(--text-eyebrow-size);
  font-weight: var(--fw-bold);
  letter-spacing: var(--text-eyebrow-spacing);
  text-transform: uppercase;
  color: var(--color-primary);
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 26px;
  height: 2px;
  background-color: var(--color-accent);
}

/* Centered eyebrow inside centered section titles */
.section-title .eyebrow {
  justify-content: center;
}

/* ---- 5c. Service card with mask-recolor icon chip ---- */
.service-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6);
  background-color: var(--surface-card);
  border: var(--border-width) solid var(--bcs-gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

/* Icon chip — pale blue at rest, floods solid blue on hover */
.service-card__chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background-color: var(--bcs-blue-50);
  transition: background-color var(--dur-base) var(--ease-out);
}

.service-card:hover .service-card__chip {
  background-color: var(--color-primary);
}

/*
  Reusable mask-recolor: a black PNG silhouette paints DS-blue by
  default and white on card hover. Set the glyph per-card with
  `--icon: url('images/icon-xyz.png')` on the .service-card__icon node.
*/
.service-card__icon {
  width: 34px;
  height: 34px;
  background-color: var(--color-primary);
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
  transition: background-color var(--dur-base) var(--ease-out);
}

.service-card:hover .service-card__icon {
  background-color: var(--bcs-white);
}

/* Native <img> glyph fallback, used only where mask-image is unsupported */
.service-card__icon-img {
  display: none;
  width: 34px;
  height: 34px;
  object-fit: contain;
}

@supports not ((-webkit-mask-image: url("x")) or (mask-image: url("x"))) {
  .service-card__icon {
    display: none;
  }
  .service-card__icon-img {
    display: block;
  }
}

.service-card h3 {
  margin-bottom: var(--space-1);
  color: var(--text-heading);
}

.service-card p {
  color: var(--text-body);
}

/* ---- 5d. Sticky header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition:
    box-shadow var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out),
    background-color var(--dur-base) var(--ease-out);
}

.site-header.scrolled {
  border-bottom-color: var(--bcs-gray-200);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  height: 100%;
  max-width: var(--container-wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.logo img {
  height: 52px;
  width: auto;
}

.site-header nav {
  margin-left: auto;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.nav-menu > li > a {
  position: relative;
  display: inline-block;
  padding-block: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.01em;
  color: var(--text-strong);
}

.nav-menu > li > a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background-color: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease-out);
}

.nav-menu > li > a:hover {
  color: var(--color-primary);
}

.nav-menu > li > a.active {
  color: var(--color-primary);
}

.nav-menu > li > a.active::after {
  transform: scaleX(1);
}

.header-social {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.header-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  color: var(--color-primary);
  background-color: var(--bcs-blue-50);
  transition:
    background-color var(--dur-base) var(--ease-out),
    color var(--dur-base) var(--ease-out);
}

.header-social a:hover {
  background-color: var(--color-primary);
  color: var(--bcs-white);
}

.social-icon {
  --social-icon: none;
  display: block;
  width: 18px;
  height: 18px;
  background-color: currentColor;
  -webkit-mask: var(--social-icon) center / contain no-repeat;
  mask: var(--social-icon) center / contain no-repeat;
}

.social-icon--facebook {
  --social-icon: url("/images/brands/facebook-f.svg");
}

.social-icon--instagram {
  --social-icon: url("/images/brands/instagram.svg");
}

.nav-menu > li.nav-menu__social {
  display: none;
}

/* Header Register CTA */
.header-cta {
  flex-shrink: 0;
}

/* Hamburger — hidden on desktop, shown on mobile */
.hamburger {
  display: none;
  flex-shrink: 0;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: var(--radius-pill);
  background-color: var(--text-strong);
  transition:
    transform var(--dur-base) var(--ease-out),
    opacity var(--dur-fast) var(--ease-out);
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---- 5e. Forms ---- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
}

.form-group label {
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-strong);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  color: var(--text-strong);
  background-color: var(--surface-card);
  border: var(--border-width) solid var(--border-default);
  border-radius: var(--radius-md);
  transition:
    border-color var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-width: 1.5px;
  border-color: var(--border-brand);
  box-shadow: var(--focus-ring-shadow);
}

.form-group input[aria-invalid="true"],
.form-group select[aria-invalid="true"],
.form-group textarea[aria-invalid="true"] {
  border-color: var(--bcs-danger);
}

/* Honeypot — visually hidden but reachable by bots */
.honeypot-field {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.form-message {
  display: none;
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  font-size: var(--fs-sm);
  border-radius: var(--radius-md);
}

.form-message.show {
  display: block;
}

.form-message.success {
  color: var(--bcs-success);
  background-color: var(--bcs-success-bg);
}

.form-message.error {
  color: var(--bcs-danger);
  background-color: var(--bcs-danger-bg);
}

/* ---- 5f. Accordion (used by /register) ---- */
.accordion {
  border: var(--border-width) solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.accordion-item + .accordion-item {
  border-top: var(--border-width) solid var(--border-subtle);
}

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  width: 100%;
  padding: var(--space-4) var(--space-5);
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  color: var(--text-heading);
  background-color: var(--surface-card);
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out);
}

.accordion-header:hover {
  background-color: var(--surface-wash);
}

.accordion-header .accordion-icon {
  flex-shrink: 0;
  color: var(--color-primary);
  transition: transform var(--dur-base) var(--ease-out);
}

.accordion-item.open .accordion-header .accordion-icon {
  transform: rotate(45deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--dur-slow) var(--ease-out);
}

.accordion-body-inner {
  padding: 0 var(--space-5) var(--space-5);
  color: var(--text-body);
}

/* ---- 5g. Stat row (used by #about) ---- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-6);
}

.stat {
  text-align: center;
}

.stat__value {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  font-weight: var(--fw-extra);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--color-primary);
}

.stat__label {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

/* ---- 5h. Brand gradient band ---- */
.band--brand {
  background-image: linear-gradient(
    160deg,
    var(--bcs-blue-600) 0%,
    var(--bcs-blue-900) 100%
  );
  color: var(--text-on-brand);
}

.band--brand h1,
.band--brand h2,
.band--brand h3,
.band--brand h4,
.band--brand h5,
.band--brand h6 {
  color: var(--text-on-brand);
}

.band--brand .eyebrow {
  color: var(--bcs-amber-400);
}

.band--brand p {
  color: rgba(255, 255, 255, 0.88);
}

/* ============================================================
   6. PAGE-SECTION HELPERS
   ============================================================ */

/* Hero band */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(560px, 80vh, 760px);
  padding-block: var(--space-12);
  background-color: var(--bcs-blue-900);
  background-size: cover;
  background-position: center;
  color: var(--text-on-brand);
  scroll-margin-top: var(--scroll-offset);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
    120deg,
    rgba(6, 43, 84, 0.85) 0%,
    rgba(8, 85, 164, 0.55) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-content h1 {
  color: var(--text-on-brand);
}

.hero-content h1 strong {
  color: var(--bcs-amber-400);
}

.hero-content h3 {
  margin-bottom: var(--space-6);
  font-weight: var(--fw-medium);
  color: rgba(255, 255, 255, 0.92);
}

/* Call-us banner (legacy markup hook) */
.call-banner {
  padding-block: var(--space-9);
}

.call-banner .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  text-align: center;
}

/* ============================================================
   7. UTILITIES
   ============================================================ */
.text-center {
  text-align: center;
}

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

.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

/* Scroll-reveal animation hooks (main.js toggles .visible) */
.fade-in,
.fade-in-left,
.fade-in-right {
  opacity: 0;
  transition:
    opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
}

.fade-in {
  transform: translateY(24px);
}

.fade-in-left {
  transform: translateX(-24px);
}

.fade-in-right {
  transform: translateX(24px);
}

.fade-in.visible,
.fade-in-left.visible,
.fade-in-right.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .fade-in,
  .fade-in-left,
  .fade-in-right {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  padding-block: var(--space-7);
  background-color: var(--surface-brand-deep);
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  font-size: var(--fs-sm);
}

.site-footer a {
  color: var(--bcs-blue-200);
  font-weight: var(--fw-semibold);
}

.site-footer a:hover {
  color: var(--bcs-white);
}

/* ============================================================
   COOKIE BANNER
   ============================================================ */
.cookie-banner {
  position: fixed;
  left: var(--space-5);
  right: var(--space-5);
  bottom: var(--space-5);
  z-index: 1100;
  display: none;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  max-width: 760px;
  margin-inline: auto;
  padding: var(--space-5);
  background-color: var(--bcs-white);
  border: var(--border-width) solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.cookie-banner.show {
  display: flex;
}

.cookie-banner p {
  flex: 1 1 320px;
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--text-body);
}

.cookie-buttons {
  display: flex;
  gap: var(--space-3);
}

.cookie-btn {
  padding: 0.55rem 1.25rem;
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  border: var(--border-width-strong) solid transparent;
  border-radius: var(--radius-pill);
  transition:
    background-color var(--dur-base) var(--ease-out),
    color var(--dur-base) var(--ease-out),
    filter var(--dur-base) var(--ease-out);
}

.cookie-accept {
  background-color: var(--color-primary);
  color: var(--text-on-brand);
}

.cookie-accept:hover {
  filter: brightness(0.93);
}

.cookie-decline {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.cookie-decline:hover {
  background-color: var(--bcs-blue-50);
}

/* ============================================================
   8. RESPONSIVE
   ============================================================ */
@media (max-width: 992px) {
  :root {
    --gutter: var(--space-5); /* 24px on smaller screens */
  }

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

  h1 {
    font-size: var(--fs-3xl);
  }

  h2 {
    font-size: var(--fs-xl);
  }

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

@media (max-width: 768px) {
  /* Hamburger reveal: main.js toggles .open on #nav-menu.
     The menu itself becomes the fixed drawer/overlay. */
  .hamburger {
    display: flex;
    order: 3;
    margin-inline-end: -10px;
  }

  .site-header nav {
    margin-left: 0;
  }

  .header-cta {
    margin-left: auto;
  }

  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    height: calc(100vh - var(--header-height));
    height: calc(100dvh - var(--header-height));
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-5) var(--gutter);
    background-color: rgba(255, 255, 255, 0.98);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transform: translateX(100%);
    transition: transform var(--dur-base) var(--ease-out);
    overflow-y: auto;
    visibility: hidden;
  }

  .nav-menu.open {
    transform: translateX(0);
    visibility: visible;
  }

  .nav-menu > li {
    border-bottom: var(--border-width) solid var(--border-subtle);
  }

  .nav-menu > li > a {
    display: block;
    padding-block: var(--space-4);
    font-size: var(--fs-md);
  }

  .nav-menu > li > a::after {
    display: none;
  }

  .header-social {
    display: none;
  }

  .nav-menu > li.nav-menu__social {
    display: flex;
    gap: var(--space-3);
    margin-top: auto;
    padding-block: var(--space-5);
    border-bottom: 0;
  }

  .nav-menu > li.nav-menu__social > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: var(--radius-pill);
    color: var(--color-primary);
    background-color: var(--bcs-blue-50);
    transition:
      background-color var(--dur-base) var(--ease-out),
      color var(--dur-base) var(--ease-out);
  }

  .nav-menu > li.nav-menu__social > a:hover {
    background-color: var(--color-primary);
    color: var(--bcs-white);
  }

  .nav-menu > li.nav-menu__social .social-icon {
    width: 20px;
    height: 20px;
  }

  .header-inner {
    gap: var(--space-4);
  }

  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }

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

  h1 {
    font-size: var(--fs-2xl);
  }

  .hero {
    min-height: clamp(480px, 70vh, 640px);
    text-align: center;
  }

  .hero-content {
    margin-inline: auto;
  }

  .hero-content h3 {
    font-size: var(--fs-md);
  }

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

  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .cookie-banner p {
    flex: 0 0 auto;
  }

  .cookie-buttons {
    justify-content: center;
  }
}

/* ===== SECTIONS #18–#20 (hero / services / about) =====
   Appended block: page-specific composition on top of the DS foundation.
   Component classes (.hero, .hero-overlay, .service-card, .stat-row…) are
   defined above; here we only add the section backgrounds, the hero CTA
   row, and the About two-column layout. */

/* ---- #18 Hero #home ----
   Photo background under a deep navy DS gradient (~160°). The generic
   .hero-overlay is re-tinted here to the navy brand wash for legible
   white/inverse text over images/hero-home.webp. */
#home.hero {
  background-image: url("../images/hero-home.webp");
  background-size: cover;
  background-position: center;
}

#home.hero .hero-overlay {
  background-image: linear-gradient(
    160deg,
    rgba(8, 85, 164, 0.82) 0%,
    rgba(6, 43, 84, 0.94) 100%
  );
}

#home .hero-content {
  max-width: 760px;
}

#home .hero-content .eyebrow {
  color: var(--bcs-amber-400);
}

#home .hero-content h1 {
  font-size: var(--fs-5xl);
  margin-bottom: var(--space-5);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-7);
}

/* ---- #19 Services #services ----
   Cards stretch to equal height and keep their CTA pinned to the bottom
   so an 8-up grid stays tidy across the rows. */
#services .service-card {
  height: 100%;
}

#services .service-card .btn {
  align-self: flex-start;
  margin-top: auto;
}

/* ---- #20 About #about ---- */
.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--space-8);
  align-items: center;
}

.about-copy .btn {
  margin-top: var(--space-5);
}

.about-media {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.about-media__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

/* Offset the two trust photos for a friendlier, layered composition. */
.about-media__img:first-child {
  margin-top: var(--space-6);
}

.about-media__img:last-child {
  margin-bottom: var(--space-6);
}

.about-stats {
  margin-top: var(--space-10);
  padding-top: var(--space-8);
  border-top: var(--border-width) solid var(--border-subtle);
}

/* ---- Responsive ---- */
@media (max-width: 992px) {
  #home .hero-content h1 {
    font-size: var(--fs-4xl);
  }
}

@media (max-width: 768px) {
  #home .hero-content h1 {
    font-size: var(--fs-3xl);
  }

  .hero-actions {
    justify-content: center;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-7);
  }

  /* Reset the desktop layering so the stacked photos line up cleanly. */
  .about-media__img:first-child,
  .about-media__img:last-child {
    margin-top: 0;
    margin-bottom: 0;
  }

  .about-copy .btn,
  .about-stats {
    margin-inline: auto;
  }

  .about-copy {
    text-align: center;
  }
}

/* ===== SECTIONS #21–#23 (howitworks / online-shopping / quote+contact) ===== */

/* ---- #21 How It Works — numbered step sequence ---- */
.how-steps {
  display: grid;
  gap: var(--space-5);
  max-width: 820px;
  margin-inline: auto;
  counter-reset: how-step;
}

.how-step {
  display: flex;
  align-items: flex-start;
  gap: var(--space-5);
  padding: var(--space-6);
  background-color: var(--surface-card);
  border: var(--border-width) solid var(--bcs-gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out);
}

.how-step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.how-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: var(--fw-extra);
  line-height: 1;
  color: var(--text-on-brand);
  background-image: linear-gradient(
    160deg,
    var(--bcs-blue-500) 0%,
    var(--bcs-blue-800) 100%
  );
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-brand);
}

.how-step__body {
  flex: 1 1 auto;
}

.how-step__title {
  margin-bottom: var(--space-2);
  font-size: var(--fs-lg);
  color: var(--text-heading);
}

.how-step__body p {
  color: var(--text-body);
}

/* ---- #22 Online Shopping — media + pitch ---- */
.online-shopping {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--space-9);
}

.online-shopping__media img {
  width: 100%;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.online-shopping__points {
  display: grid;
  gap: var(--space-3);
  margin-block: var(--space-5) var(--space-6);
}

.online-shopping__points li {
  position: relative;
  padding-left: var(--space-6);
  color: var(--text-body);
}

.online-shopping__points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 14px;
  height: 14px;
  background-color: var(--color-accent);
  border-radius: var(--radius-xs);
  transform: rotate(45deg);
}

/* ---- #23 Quote + Contact — single brand gradient band ---- */
/* Stitch the two stacked brand sections into one seamless band. */
#quote.band--brand {
  padding-bottom: var(--space-9);
}

#contact.band--brand {
  padding-top: var(--space-9);
}

/* Quote: two-column form + aside */
.quote-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-8);
  align-items: start;
}

.quote-form-wrapper {
  padding: var(--space-7);
  background-color: var(--surface-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.quote-form-wrapper h3 {
  margin-bottom: var(--space-5);
  color: var(--text-heading);
}

/* The form sits on a white card, so restore dark body text inside it
   (the .band--brand white-text rule would otherwise bleed in). */
.quote-form-wrapper p,
.quote-form-wrapper label {
  color: var(--text-strong);
}

.quote-aside {
  align-self: stretch;
}

.quote-aside__img {
  width: 100%;
  margin-bottom: var(--space-5);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.quote-aside__cta a {
  color: var(--bcs-amber-400);
  font-weight: var(--fw-semibold);
}

.quote-aside__cta a:hover {
  color: var(--bcs-white);
}

/* Contact: icon-led detail list */
.contact-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  max-width: 980px;
  margin-inline: auto;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}

.contact-item__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  color: var(--bcs-amber-400);
  background-color: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
}

.contact-item__icon svg {
  width: 24px;
  height: 24px;
}

.contact-item__title {
  margin-bottom: var(--space-1);
  font-size: var(--fs-base);
  color: var(--text-on-brand);
}

.contact-item__body p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
}

.contact-item__body a {
  color: var(--bcs-white);
  font-weight: var(--fw-semibold);
}

.contact-item__body a:hover {
  color: var(--bcs-amber-400);
}

.contact-item__sep {
  margin-inline: var(--space-2);
  color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 992px) {
  .quote-grid {
    grid-template-columns: 1fr;
    gap: var(--space-7);
  }

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

@media (max-width: 768px) {
  .online-shopping {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .online-shopping__media {
    order: -1;
  }

  .how-step {
    gap: var(--space-4);
    padding: var(--space-5);
  }

  .how-step__num {
    width: 48px;
    height: 48px;
    font-size: var(--fs-lg);
  }

  .contact-list {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }
}

/* ===== #24 REGISTER PAGE =====
   Register-specific styling for /register. Reuses the DS foundation
   (.section, .container, .form-group, .form-row, .btn--accent, .eyebrow,
   .accordion*, header/footer/cookie classes); only the register layout,
   the radio/checkbox groups, the accordion <button> reset and a compact
   hero modifier are defined here. Keep additions minimal. */

/* Compact hero band — a form page needs a banner, not a full-height hero. */
.hero--register {
  min-height: auto;
  padding-block: var(--space-9);
}

.hero--register .hero-content {
  max-width: 760px;
}

/* Two-column layout: registration form + Terms & Conditions sidebar. */
.register-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: var(--space-8);
  align-items: start;
}

.register-form-wrapper,
.register-terms {
  padding: var(--space-7);
  background-color: var(--surface-card);
  border: var(--border-width) solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.register-form-wrapper > h2,
.register-terms > h2 {
  margin-bottom: var(--space-3);
}

.register-form-wrapper > .lead {
  margin-bottom: var(--space-6);
}

/* Terms sidebar sits on the pale wash to set it apart from the form card. */
.register-terms {
  background-color: var(--surface-wash);
}

.register-terms__intro {
  margin-bottom: var(--space-4);
  color: var(--text-body);
}

.register-terms .accordion {
  margin-top: var(--space-5);
  background-color: var(--surface-card);
}

/* Radio + checkbox groups (register-only; not part of the foundation). */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
}

.radio-group label,
.checkbox-group label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  color: var(--text-body);
  cursor: pointer;
}

.radio-group input,
.checkbox-group input {
  width: auto;
  margin: 0;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.checkbox-group input {
  margin-top: 0.2rem;
}

/* Date-of-birth helper line under the dob input. */
.form-hint {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

/* The accordion header is now a real <button>; normalise its box so it
   matches the foundation's div-based styling. */
.accordion-header {
  appearance: none;
  font: inherit;
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
}

.register-submit {
  width: 100%;
  margin-top: var(--space-2);
}

@media (max-width: 992px) {
  .register-grid {
    grid-template-columns: 1fr;
    gap: var(--space-7);
  }

  .register-form-wrapper,
  .register-terms {
    padding: var(--space-6);
  }
}
