/* ==========================================================================
   Ives Construction — design system
   Blue-forward, institutional. Light base, deep navy anchors.
   ========================================================================== */

:root {
  /* Brand */
  --ink:        #0A1B2E;
  --navy:       #0E2A47;
  --navy-deep:  #071626;
  --blue:       #0F5FB0;
  --blue-dark:  #0B4584;
  --blue-light: #5EA3E8;
  --blue-wash:  #EDF4FC;
  --amber:      #E09A2E;

  --steel:      #56697E;
  --steel-soft: #8396A8;
  --line:       #DCE5EE;
  --line-soft:  #EBF1F7;
  --surface:    #F5F8FC;
  --white:      #FFFFFF;

  /* Semantic */
  --bg:          var(--white);
  --bg-alt:      var(--surface);
  --text:        var(--ink);
  --text-muted:  var(--steel);
  --accent:      var(--blue);
  --border:      var(--line);

  /* Type */
  --font-display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-body:    'Inter', 'Helvetica Neue', Arial, sans-serif;
  --fs-base: 1.0625rem;

  /* Space + shape */
  --radius:    14px;
  --radius-sm: 8px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(10,27,46,.06), 0 2px 8px rgba(10,27,46,.05);
  --shadow:    0 4px 12px rgba(10,27,46,.07), 0 14px 38px rgba(10,27,46,.09);
  --shadow-lg: 0 10px 28px rgba(10,27,46,.10), 0 32px 70px rgba(10,27,46,.14);
  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-y: clamp(4rem, 9vw, 7.5rem);

  --ease: cubic-bezier(.22,.61,.36,1);
}

/* --------------------------------------------------------------------------
   Accessibility preference hooks (toggled from the a11y panel)
   -------------------------------------------------------------------------- */
html[data-a11y-contrast="high"] {
  --text: #000000;
  --text-muted: #1E2A36;
  --steel: #1E2A36;
  --steel-soft: #27333F;
  --blue: #0A4C93;
  --accent: #0A4C93;
  --border: #5A6B7D;
  --line: #5A6B7D;
  --bg-alt: #FFFFFF;
  --surface: #FFFFFF;
  --blue-wash: #FFFFFF;
}
html[data-a11y-contrast="high"] img { filter: contrast(1.08); }
html[data-a11y-contrast="high"] .card,
html[data-a11y-contrast="high"] .panel { border-width: 2px; }

html[data-a11y-text="lg"]  { font-size: 112.5%; }
html[data-a11y-text="xl"]  { font-size: 125%; }

html[data-a11y-links="on"] :is(main, footer) a:not(.btn) { text-decoration: underline; text-underline-offset: 3px; }

html[data-a11y-font="readable"] { --font-body: Verdana, Tahoma, 'DejaVu Sans', sans-serif; --font-display: Verdana, Tahoma, 'DejaVu Sans', sans-serif; letter-spacing: .012em; word-spacing: .08em; }
html[data-a11y-font="readable"] .display, html[data-a11y-font="readable"] h1, html[data-a11y-font="readable"] h2 { letter-spacing: 0; }

html[data-a11y-motion="off"] *,
html[data-a11y-motion="off"] *::before,
html[data-a11y-motion="off"] *::after {
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
  scroll-behavior: auto !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
img { background: var(--line-soft); }

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); line-height: 1.1; letter-spacing: -.022em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.85rem, 3.8vw, 2.85rem); }
h3 { font-size: clamp(1.2rem, 1.9vw, 1.45rem); }
h4 { font-size: 1.05rem; }
p  { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--blue); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--blue-dark); }

ul, ol { margin: 0 0 1.1em; padding-left: 1.25em; }
li { margin-bottom: .45em; }

strong, b { font-weight: 650; color: var(--ink); }
hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 2000;
  background: var(--blue); color: #fff; padding: .85rem 1.3rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm); font-weight: 600; text-decoration: none;
  transition: top .18s var(--ease);
}
.skip-link:focus { top: 0; color: #fff; }

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: 820px; }
.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(2.75rem, 6vw, 4.5rem); }
.section--alt { background: var(--bg-alt); }
.section--navy { background: var(--navy); color: #D9E4F0; }
.section--navy h2, .section--navy h3, .section--navy h4 { color: #fff; }
.section--navy .eyebrow { color: var(--blue-light); }
.section--navy a:not(.btn) { color: #9FC8EF; }

.grid { display: grid; gap: clamp(1.25rem, 2.6vw, 2rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(275px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }

.split { display: grid; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--wide-left  { grid-template-columns: 1.15fr .85fr; }
  .split--wide-right { grid-template-columns: .85fr 1.15fr; }
  .split--flip > :first-child { order: 2; }
}

.stack > * + * { margin-top: 1.15rem; }
.measure { max-width: 62ch; }
.center { text-align: center; margin-inline: auto; }

/* --------------------------------------------------------------------------
   Typographic helpers
   -------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-body);
  font-size: .775rem; font-weight: 650; letter-spacing: .16em; text-transform: uppercase;
  color: var(--blue); margin: 0 0 1rem;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: currentColor; flex: none; }
.eyebrow--plain::before { display: none; }

.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.6; color: var(--steel); }
.section--navy .lead { color: #BCCEE2; }
.muted { color: var(--text-muted); }
.small { font-size: .875rem; }
.xsmall { font-size: .8rem; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  font-family: var(--font-body); font-size: .97rem; font-weight: 600; line-height: 1;
  padding: 1rem 1.6rem; border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 1.05em; height: 1.05em; flex: none; }

.btn--primary { background: var(--blue); color: #fff; box-shadow: 0 6px 18px rgba(15,95,176,.28); }
.btn--primary:hover { background: var(--blue-dark); color: #fff; box-shadow: 0 10px 26px rgba(15,95,176,.34); }

.btn--ghost { background: transparent; color: var(--blue); border-color: var(--border); }
.btn--ghost:hover { background: var(--blue-wash); border-color: var(--blue-light); color: var(--blue-dark); }

.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: #EAF2FB; color: var(--navy); }

.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.btn--outline-light:hover { background: rgba(255,255,255,.1); color: #fff; border-color: #fff; }

.btn-row { display: flex; flex-wrap: wrap; gap: .85rem; }

/* --------------------------------------------------------------------------
   Header / nav
   -------------------------------------------------------------------------- */
.topbar {
  background: var(--navy-deep); color: #A9C2DB;
  font-size: .82rem; letter-spacing: .01em;
}
.topbar .container { display: flex; flex-wrap: wrap; gap: .4rem 1.75rem; align-items: center; justify-content: space-between; padding-block: .55rem; }
.topbar a { color: #D4E4F5; text-decoration: none; font-weight: 500; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.topbar-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; align-items: center; }
.topbar-meta span { display: inline-flex; align-items: center; gap: .45rem; }
.topbar svg { width: 15px; height: 15px; opacity: .8; }

.site-header {
  position: sticky; top: 0; z-index: 900;
  background: rgba(255,255,255,.93);
  backdrop-filter: saturate(170%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
  transition: box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.site-header.is-stuck { box-shadow: 0 4px 24px rgba(10,27,46,.09); border-color: transparent; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: .85rem; }

.brand { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; flex: none; }
.brand img { width: 46px; height: 46px; border-radius: 11px; background: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name {
  font-family: var(--font-display); font-weight: 800; font-size: 1.38rem;
  letter-spacing: .01em; color: var(--ink);
}
.brand-sub {
  font-size: .62rem; font-weight: 650; letter-spacing: .285em;
  text-transform: uppercase; color: var(--blue); margin-top: .3rem;
}

.nav { display: flex; align-items: center; gap: 1.9rem; }
.nav-list { display: flex; align-items: center; gap: 1.75rem; list-style: none; margin: 0; padding: 0; }
.nav-list li { margin: 0; }
.nav-list a {
  position: relative; text-decoration: none; color: var(--ink);
  font-weight: 540; font-size: .96rem; padding-block: .4rem;
}
.nav-list a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--blue); transform: scaleX(0); transform-origin: left;
  transition: transform .22s var(--ease);
}
.nav-list a:hover::after, .nav-list a[aria-current="page"]::after { transform: scaleX(1); }
.nav-list a[aria-current="page"] { color: var(--blue); font-weight: 650; }

.nav-toggle {
  display: none; width: 46px; height: 46px; border: 1px solid var(--border);
  background: #fff; border-radius: 11px; cursor: pointer; padding: 0;
  align-items: center; justify-content: center;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); position: relative; transition: background .2s var(--ease); }
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--ink);
  transition: transform .25s var(--ease), top .25s var(--ease);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after  { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { top: 0; transform: rotate(-45deg); }

@media (max-width: 1000px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(360px, 86vw);
    background: #fff; flex-direction: column; align-items: stretch; justify-content: flex-start;
    gap: 0; padding: 6rem 1.75rem 2.5rem; box-shadow: -18px 0 50px rgba(10,27,46,.18);
    transform: translateX(100%); transition: transform .32s var(--ease);
    overflow-y: auto; z-index: 950;
  }
  .nav.is-open { transform: translateX(0); }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list li { border-bottom: 1px solid var(--line-soft); }
  .nav-list a { display: block; padding: 1rem 0; font-size: 1.08rem; }
  .nav-list a::after { display: none; }
  .nav .btn { margin-top: 1.75rem; }
  .nav-backdrop {
    position: fixed; inset: 0; background: rgba(7,22,38,.45); z-index: 940;
    opacity: 0; pointer-events: none; transition: opacity .3s var(--ease);
  }
  .nav-backdrop.is-open { opacity: 1; pointer-events: auto; }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero { position: relative; background: var(--navy-deep); color: #fff; overflow: hidden; isolation: isolate; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(104deg, rgba(7,22,38,.95) 0%, rgba(10,36,64,.86) 46%, rgba(11,58,107,.62) 100%);
}
.hero-media {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover; object-position: center 42%;
}
.hero-inner { padding-block: clamp(4.5rem, 11vw, 9rem); max-width: 50rem; }
.hero h1 { color: #fff; margin-bottom: .55em; text-wrap: balance; }
.hero .eyebrow { color: var(--blue-light); }
.hero-lead { font-size: clamp(1.08rem, 1.55vw, 1.3rem); color: #C9DBEE; max-width: 44rem; margin-bottom: 2.25rem; }
.hero .btn-row { margin-bottom: 2.75rem; }

.hero-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem 2rem; padding-top: 2.25rem; border-top: 1px solid rgba(255,255,255,.17);
  max-width: 46rem;
}
.hero-stats dt { font-family: var(--font-display); font-size: clamp(1.75rem, 3vw, 2.4rem); font-weight: 800; color: #fff; line-height: 1; letter-spacing: -.02em; }
.hero-stats dd { margin: .5rem 0 0; font-size: .83rem; letter-spacing: .07em; text-transform: uppercase; color: #9FBDD9; font-weight: 550; }

/* Page banner (interior pages) */
.page-head { background: var(--navy); color: #fff; position: relative; overflow: hidden; isolation: isolate; }
.page-head::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .22;
  background: url("../img/ext-colony.jpg") center/cover no-repeat;
}
.page-head::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, var(--navy-deep) 18%, rgba(14,42,71,.72) 100%);
}
.page-head .container { padding-block: clamp(3.25rem, 7vw, 5.5rem); }
.page-head h1 { color: #fff; max-width: 20ch; text-wrap: balance; }
.page-head .lead { color: #BCD2E8; max-width: 56ch; }
.page-head .eyebrow { color: var(--blue-light); }

.breadcrumb { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0 0 1.5rem; font-size: .82rem; color: #8FACC9; }
.breadcrumb li { margin: 0; display: flex; gap: .5rem; align-items: center; }
.breadcrumb li + li::before { content: "/"; color: #5C7C9C; }
.breadcrumb a { color: #BCD2E8; text-decoration: none; }
.breadcrumb a:hover { color: #fff; text-decoration: underline; }

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: clamp(1.5rem, 2.4vw, 2rem);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.card--hover:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--blue-light); }
.card h3 { margin-bottom: .5rem; }
.card p:last-child { margin-bottom: 0; }

.card-icon {
  width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center;
  background: var(--blue-wash); color: var(--blue); margin-bottom: 1.15rem;
}
.card-icon svg { width: 25px; height: 25px; }
.section--navy .card { background: rgba(255,255,255,.055); border-color: rgba(255,255,255,.14); color: #C8D9EB; }
.section--navy .card-icon { background: rgba(94,163,232,.17); color: #8FC2F0; }

.panel {
  background: var(--blue-wash); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(1.5rem, 2.6vw, 2.25rem);
}

/* Numbered process steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: clamp(1.25rem, 2.4vw, 1.75rem); }
.steps > li { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; align-items: start; }
.step-num {
  font-family: var(--font-display); font-weight: 800; font-size: 1rem;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--blue); color: #fff; flex: none;
}
.section--navy .step-num { background: var(--blue-light); color: var(--navy-deep); }
.steps h3 { font-size: 1.12rem; margin-bottom: .3rem; }

/* Stat blocks */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 2rem; }
.stat-num { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 3.6vw, 2.9rem); color: var(--blue); line-height: 1; letter-spacing: -.025em; }
.section--navy .stat-num { color: #fff; }
.stat-label { margin-top: .55rem; font-size: .85rem; color: var(--text-muted); }
.section--navy .stat-label { color: #A8C0D8; }

/* Checklist */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.checklist li { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .75rem; align-items: start; }
.checklist li::before {
  content: ""; width: 21px; height: 21px; border-radius: 50%; margin-top: .22em; flex: none;
  background: var(--blue-wash) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F5FB0' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/13px no-repeat;
}
.section--navy .checklist li::before { background-color: rgba(94,163,232,.2); }

/* --------------------------------------------------------------------------
   Media / figures
   -------------------------------------------------------------------------- */
.figure { margin: 0; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); background: var(--line-soft); }
.figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.figure--wide img { aspect-ratio: 16 / 10; }
.figure--tall img { aspect-ratio: 3 / 4; }
.figure figcaption { padding: .9rem 1.15rem; font-size: .83rem; color: var(--text-muted); background: #fff; border-top: 1px solid var(--line-soft); }

.media-stack { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(.75rem, 1.6vw, 1.15rem); }
.media-stack .figure:first-child { grid-column: 1 / -1; }

/* Portfolio grid */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: clamp(1.25rem, 2.4vw, 1.9rem); }
.project {
  position: relative; border-radius: var(--radius); overflow: hidden; background: var(--navy);
  box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  display: block; color: #fff; text-decoration: none;
}
.project:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); color: #fff; }
.project img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .55s var(--ease), opacity .3s var(--ease); opacity: .9; }
.project:hover img { transform: scale(1.055); opacity: 1; }
.project-body {
  position: absolute; inset: auto 0 0 0; padding: 1.5rem 1.4rem 1.3rem;
  background: linear-gradient(to top, rgba(7,22,38,.94) 10%, rgba(7,22,38,.72) 55%, transparent 100%);
}
.project-body h3 { color: #fff; font-size: 1.14rem; margin-bottom: .3rem; }
.project-meta { font-size: .83rem; color: #AFC8E0; display: flex; flex-wrap: wrap; gap: .3rem .9rem; }
.project-units {
  position: absolute; top: 1rem; left: 1rem; z-index: 2;
  background: rgba(255,255,255,.95); color: var(--navy-deep);
  font-family: var(--font-display); font-weight: 800; font-size: .82rem;
  padding: .4rem .75rem; border-radius: 999px; letter-spacing: .01em;
}

/* Before / after comparison slider */
.ba {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow); background: var(--line-soft); touch-action: pan-y;
  aspect-ratio: 4 / 3;
}
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-after { clip-path: inset(0 0 0 var(--pos, 50%)); }
.ba-handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 3px;
  background: #fff; transform: translateX(-50%); box-shadow: 0 0 0 1px rgba(10,27,46,.2);
  pointer-events: none;
}
.ba-handle::after {
  content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 46px; height: 46px; border-radius: 50%; background: #fff; box-shadow: var(--shadow);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F5FB0' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 7-5 5 5 5M15 7l5 5-5 5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 23px;
}
.ba-range {
  position: absolute; inset: 0; width: 100%; height: 100%;
  margin: 0; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; background: none;
}
.ba-range::-webkit-slider-thumb { -webkit-appearance: none; width: 48px; height: 100%; }
.ba-range::-moz-range-thumb { width: 48px; height: 100%; border: 0; background: transparent; }
.ba-range:focus-visible { opacity: 1; outline: 3px solid var(--blue); outline-offset: -3px; background: transparent; }
.ba-tag {
  position: absolute; top: 1rem; z-index: 3; pointer-events: none;
  font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  padding: .4rem .7rem; border-radius: 999px;
}
.ba-tag--before { left: 1rem; background: rgba(7,22,38,.78); color: #fff; }
.ba-tag--after  { right: 1rem; background: rgba(255,255,255,.93); color: var(--blue-dark); }

/* --------------------------------------------------------------------------
   Logos / credibility strip
   -------------------------------------------------------------------------- */
.marquee-note { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--steel-soft); font-weight: 650; }

.badge-row { display: flex; flex-wrap: wrap; gap: .65rem; }
.badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--blue-wash); color: var(--blue-dark);
  border: 1px solid #CFE2F6; border-radius: 999px;
  padding: .5rem .95rem; font-size: .83rem; font-weight: 600;
}
.badge svg { width: 15px; height: 15px; }
.section--navy .badge { background: rgba(94,163,232,.15); border-color: rgba(94,163,232,.3); color: #C7DFF7; }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.form-grid { display: grid; gap: 1.15rem; }
@media (min-width: 640px) { .form-grid--2 { grid-template-columns: 1fr 1fr; } .form-span { grid-column: 1 / -1; } }

.field label { display: block; font-size: .88rem; font-weight: 600; color: var(--ink); margin-bottom: .45rem; }
.field .hint { display: block; font-weight: 400; color: var(--text-muted); font-size: .8rem; margin-top: .2rem; }
.req { color: #B4232A; }
html[data-a11y-contrast="high"] .req { color: #8C0E14; }

input[type="text"], input[type="email"], input[type="tel"], input[type="number"], select, textarea {
  width: 100%; font: inherit; font-size: .97rem; color: var(--ink);
  background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: .8rem .95rem; transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
textarea { min-height: 145px; resize: vertical; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2356697E' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .85rem center; background-size: 17px;
  padding-right: 2.6rem;
}
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(15,95,176,.16); outline: none; }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] { border-color: #B4232A; }
.field-error { color: #B4232A; font-size: .82rem; margin-top: .35rem; display: block; }

.checkbox { display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: start; font-size: .89rem; color: var(--text-muted); }
.checkbox input { width: 19px; height: 19px; margin: .18em 0 0; accent-color: var(--blue); }

.form-status { border-radius: var(--radius-sm); padding: .95rem 1.1rem; font-size: .92rem; font-weight: 500; }
.form-status[data-state="ok"]   { background: #E7F6EC; color: #10572C; border: 1px solid #A8DCBC; }
.form-status[data-state="err"]  { background: #FCEBEC; color: #8C1A20; border: 1px solid #F0BCBF; }
.form-status[hidden] { display: none; }

/* --------------------------------------------------------------------------
   CTA band
   -------------------------------------------------------------------------- */
.cta-band { background: linear-gradient(118deg, var(--navy-deep), var(--blue-dark)); color: #fff; }
.cta-band .container { padding-block: clamp(3rem, 6.5vw, 5rem); }
.cta-band h2 { color: #fff; max-width: 22ch; }
.cta-band p { color: #BED4EA; max-width: 54ch; }
.cta-inner { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 900px) { .cta-inner { grid-template-columns: 1.3fr .7fr; } .cta-inner .btn-row { justify-content: flex-end; } }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer { background: var(--navy-deep); color: #9FB6CC; font-size: .92rem; }
.site-footer a { color: #C6D9EC; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-top { display: grid; gap: 2.5rem; padding-block: clamp(3rem, 6vw, 4.5rem); }
@media (min-width: 860px) { .footer-top { grid-template-columns: 1.5fr 1fr 1fr 1.2fr; } }
.footer-brand img { width: 190px; margin-bottom: 1.2rem; }
.site-footer .footer-heading { color: #fff; font-size: .8rem; letter-spacing: .15em; text-transform: uppercase; margin: 0 0 1.1rem; font-family: var(--font-body); font-weight: 700; line-height: 1.3; }
.footer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.footer-list li { margin: 0; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); padding-block: 1.6rem;
  display: flex; flex-wrap: wrap; gap: .75rem 1.75rem; align-items: center; justify-content: space-between;
  font-size: .83rem; color: #809AB4;
}
.footer-legal { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; list-style: none; margin: 0; padding: 0; }
.footer-legal li { margin: 0; }
.footer-contact { display: grid; gap: .75rem; }
.footer-contact a, .footer-contact span { display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: start; }
.footer-contact svg { width: 17px; height: 17px; margin-top: .25em; color: var(--blue-light); flex: none; }

/* --------------------------------------------------------------------------
   Accessibility widget
   -------------------------------------------------------------------------- */
.a11y-fab {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1100;
  width: 54px; height: 54px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--blue); color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 22px rgba(10,27,46,.26);
  transition: transform .2s var(--ease), background-color .2s var(--ease);
}
.a11y-fab:hover { transform: scale(1.06); background: var(--blue-dark); }
.a11y-fab svg { width: 27px; height: 27px; }

.a11y-panel {
  position: fixed; right: 1.25rem; bottom: 5.5rem; z-index: 1101;
  width: min(330px, calc(100vw - 2.5rem));
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 1.35rem;
  max-height: min(78vh, 640px); overflow-y: auto;
}
.a11y-panel[hidden] { display: none; }
.a11y-panel h2 { font-size: 1.08rem; margin-bottom: .2rem; }
.a11y-panel .xsmall { color: var(--text-muted); margin-bottom: 1.1rem; }
.a11y-group { margin-bottom: 1.15rem; }
.a11y-group > p { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: .55rem; }
.a11y-opts { display: flex; flex-wrap: wrap; gap: .45rem; }
.a11y-opt {
  flex: 1 1 auto; font: inherit; font-size: .86rem; font-weight: 550;
  padding: .55rem .7rem; border-radius: var(--radius-sm); cursor: pointer;
  border: 1.5px solid var(--border); background: #fff; color: var(--ink);
  transition: border-color .18s var(--ease), background-color .18s var(--ease), color .18s var(--ease);
}
.a11y-opt:hover { border-color: var(--blue-light); background: var(--blue-wash); }
.a11y-opt[aria-pressed="true"], .a11y-opt[aria-checked="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.a11y-close { width: 100%; margin-top: .35rem; }
.a11y-panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.a11y-x { border: none; background: none; cursor: pointer; color: var(--text-muted); padding: .2rem; line-height: 1; font-size: 1.3rem; }
.a11y-x:hover { color: var(--ink); }

/* --------------------------------------------------------------------------
   Reveal animation
   -------------------------------------------------------------------------- */
/* Only hide when scripting is active, so the page is fully readable without JS. */
html.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
html.js .reveal.is-visible { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   Legal / long-form pages
   -------------------------------------------------------------------------- */
.legal { max-width: 78ch; }
.legal h2 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); margin-top: 2.6rem; padding-top: 1.75rem; border-top: 1px solid var(--line-soft); }
.legal h2:first-of-type { margin-top: 1rem; border-top: 0; padding-top: 0; }
.legal h3 { font-size: 1.1rem; margin-top: 1.8rem; }
.legal ul, .legal ol { padding-left: 1.4em; }
.legal address { font-style: normal; background: var(--bg-alt); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 1.1rem 1.3rem; }
.toc { background: var(--bg-alt); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 1.35rem 1.6rem; }
.toc ol { columns: 2; column-gap: 2rem; margin: 0; font-size: .92rem; }
@media (max-width: 640px) { .toc ol { columns: 1; } }

.faq { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.3rem 2.5rem 1.3rem 0; position: relative;
  font-family: var(--font-display); font-weight: 650; font-size: 1.08rem; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: .25rem; top: 1.55rem; width: 16px; height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F5FB0' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center/contain no-repeat;
  transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(135deg); }
.faq details > div { padding-bottom: 1.4rem; color: var(--text-muted); max-width: 72ch; }

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */
@media print {
  .site-header, .topbar, .a11y-fab, .a11y-panel, .cta-band, .nav-backdrop, .btn { display: none !important; }
  body { font-size: 11pt; color: #000; }
  .reveal { opacity: 1 !important; transform: none !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #444; }
}
