/* ==========================================================================
   Territory Systems and AI — site styles (v3)

   Palette sampled from the logo:
     orange #E86A0A ("TERRITORY") · blue #2B8EF6 ("SYSTEMS AND AI")
     navy   #030A1C (the map)
   CONTRAST RULES (checked, do not undo):
     - Pure orange and pure blue are ~3.2:1 on white — fills, large bold
       text and dark backgrounds only. Body-size text on light surfaces uses
       --orange-ink #B85200 (4.9:1) and --blue-ink #1A63C4 (5.8:1).
     - Orange buttons carry NAVY text (6.1:1), never white (3.2:1).
   LINKS: every state, including :visited, is pinned below so no phone
   browser ever falls back to default blue/purple.
   Fonts are self-hosted (no Google request, no layout shift): Montserrat
   for headings (it matches the wordmark), Lato for body. Both OFL 1.1.
   ========================================================================== */

@font-face {
  font-family: "Montserrat"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/montserrat-latin-var.woff2") format("woff2");
}
@font-face {
  font-family: "Lato"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/lato-latin-400.woff2") format("woff2");
}
@font-face {
  font-family: "Lato"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/lato-latin-700.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat Fallback"; src: local("Arial"), local("ArialMT");
  ascent-override: 85.7923%; descent-override: 22.2457%; line-gap-override: 0%; size-adjust: 112.8307%;
}
@font-face {
  font-family: "Lato Fallback"; src: local("Arial"), local("ArialMT");
  ascent-override: 101.0345%; descent-override: 21.8038%; line-gap-override: 0%; size-adjust: 97.6894%;
}

:root {
  --navy-950: #030a1c;
  --navy-900: #07132b;
  --navy-800: #0d1f45;
  --navy-700: #163061;
  --ink: #0c1a33;
  --ink-2: #3a4a67;
  --ink-3: #5a6a85;
  --paper: #f6f8fc;
  --paper-2: #eef2f9;
  --white: #fff;
  --line: #dde4ef;
  --line-2: #c8d3e4;

  --orange: #e86a0a;
  --orange-2: #f5923f;
  --orange-ink: #b85200;
  --orange-soft: #fff2e7;
  --blue: #2b8ef6;
  --blue-ink: #1a63c4;
  --blue-soft: #e9f3ff;
  --blue-light: #7cb8ff;

  --ok: #1d7a4b;
  --ok-soft: #e7f6ee;
  --warn: #8a5300;
  --warn-soft: #fff5e0;
  --err: #b42318;
  --err-soft: #fdecea;

  --head: "Montserrat", "Montserrat Fallback", "Segoe UI", Arial, sans-serif;
  --body: "Lato", "Lato Fallback", "Segoe UI", Arial, sans-serif;

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(12, 26, 51, .06), 0 2px 8px rgba(12, 26, 51, .05);
  --shadow: 0 1px 2px rgba(12, 26, 51, .06), 0 10px 30px rgba(12, 26, 51, .09);
  --shadow-lg: 0 24px 60px rgba(3, 10, 28, .22);
  --wrap: 1180px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--white); color: var(--ink);
  font-family: var(--body); font-size: 1.0625rem; line-height: 1.68;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;   /* clip, not hidden: keeps the sticky header working */
}
img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--head); color: var(--ink); line-height: 1.16; letter-spacing: -.012em; margin: 0 0 .6em; }
h1 { font-size: clamp(2.05rem, 4.6vw, 3.35rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.1vw, 2.3rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.25em; }
li { margin-bottom: .4em; }
strong { font-weight: 700; color: inherit; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
::selection { background: rgba(43, 142, 246, .28); }

/* ---------- Links: pinned on every state ---------- */
a { color: var(--blue-ink); text-decoration: none; -webkit-tap-highlight-color: transparent; }
a:visited { color: var(--blue-ink); }
a:hover, a:focus-visible { color: var(--orange-ink); }
a:active { color: var(--orange-ink); }
a[href^="tel:"], a[href^="mailto:"] { font-weight: 700; }
a[href^="mailto:"], a[href^="http"] { overflow-wrap: anywhere; }
.prose a, .text-link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgba(26, 99, 196, .4); }
.prose a:hover, .text-link:hover { text-decoration-color: currentColor; }

/* Dark surfaces */
.on-dark a, .on-dark a:visited { color: var(--blue-light); }
.on-dark a:hover, .on-dark a:focus-visible, .on-dark a:active { color: var(--orange-2); }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 300; background: var(--orange); color: var(--navy-950); padding: .6em 1.1em; border-radius: 8px; font-weight: 700; }
.skip-link:focus, .skip-link:visited:focus { left: 8px; color: var(--navy-950); }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.wrap-narrow { max-width: 820px; }
.section { padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.section-tight { padding: 2.75rem 0; }
.section-alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-dark { background: var(--navy-950); color: #d3ddef; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-head { max-width: 720px; margin-bottom: 2.6rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 2.4rem; }
.section-head-row .section-head { margin-bottom: 0; }
.kicker {
  display: inline-flex; align-items: center; gap: .5rem; margin-bottom: .9rem;
  font-family: var(--head); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--orange-ink);
}
.kicker::before { content: ""; width: 22px; height: 2px; background: var(--orange); border-radius: 2px; }
.section-dark .kicker, .on-dark .kicker { color: var(--orange-2); }
.lede { font-size: 1.16rem; color: var(--ink-2); }
.section-dark .lede { color: #b7c5de; }
.muted { color: var(--ink-3); }
.small { font-size: .9rem; }
.center { text-align: center; }
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 1rem; }

.grid { display: grid; gap: 1.4rem; }
.grid > * { min-width: 0; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .cols-3, .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cols-2, .cols-3, .cols-4 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--head); font-weight: 700; font-size: .98rem; line-height: 1.1; letter-spacing: .005em;
  padding: .95em 1.55em; border-radius: 999px; border: 2px solid transparent; cursor: pointer;
  text-align: center; text-decoration: none; transition: transform .15s ease, background .2s, color .2s, border-color .2s, box-shadow .2s;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.btn:active { transform: translateY(1px); }
.btn svg { flex: 0 0 auto; }
.btn-primary, .btn-primary:visited { background: var(--orange); color: var(--navy-950); box-shadow: 0 6px 18px rgba(232, 106, 10, .28); }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--orange-2); color: var(--navy-950); }
.btn-dark, .btn-dark:visited { background: var(--navy-900); color: #fff; }
.btn-dark:hover, .btn-dark:focus-visible { background: var(--navy-700); color: #fff; }
.btn-outline, .btn-outline:visited { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-outline:hover, .btn-outline:focus-visible { border-color: var(--blue-ink); color: var(--blue-ink); }
.btn-light, .btn-light:visited { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-light:hover, .btn-light:focus-visible { border-color: var(--blue-light); color: var(--blue-light); }
.btn-sm { font-size: .88rem; padding: .7em 1.2em; }
.btn-lg { font-size: 1.05rem; padding: 1.05em 1.9em; }
.btn-block { display: flex; width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; }
.btn-row.center { justify-content: center; }
.link-arrow { display: inline-flex; align-items: center; gap: .4rem; font-family: var(--head); font-weight: 700; font-size: .95rem; }
.link-arrow svg { transition: transform .2s; }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- Admin bar + preview banner ---------- */
.admin-bar { background: var(--navy-800); color: #cfdcf2; font-size: .84rem; }
.admin-bar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: .45rem; padding-bottom: .45rem; flex-wrap: wrap; }
.admin-bar span { display: inline-flex; align-items: center; gap: .45rem; }
.admin-bar a, .admin-bar a:visited { color: #fff; font-weight: 700; margin-left: 1rem; }
.admin-bar a:hover { color: var(--orange-2); }
.preview-banner { background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid #f1d9a8; font-size: .86rem; }
.preview-banner .wrap { display: flex; gap: .7rem; align-items: center; justify-content: center; padding-top: .5rem; padding-bottom: .5rem; text-align: center; flex-wrap: wrap; }
.preview-banner strong { background: var(--warn); color: #fff; font-family: var(--head); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; padding: .2rem .55rem; border-radius: 4px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1.2rem; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: .7rem; flex: 0 1 auto; min-width: 0; }
.brand:hover, .brand:visited, .brand:focus-visible { color: inherit; }
.brand-mark { width: 48px; height: 48px; flex: 0 0 auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1; min-width: 0; }
.brand-top { font-family: var(--head); font-weight: 700; font-size: 1.22rem; letter-spacing: .15em; color: var(--orange); }
.brand-sub { font-family: var(--head); font-weight: 700; font-size: .66rem; letter-spacing: .26em; color: var(--blue-ink); margin-top: .32rem; white-space: nowrap; }
.brand-light .brand-sub { color: var(--blue); }

.site-nav { display: flex; align-items: center; gap: 1.6rem; margin-left: auto; }
.site-nav ul { display: flex; gap: 1.45rem; list-style: none; margin: 0; padding: 0; }
.site-nav li { margin: 0; }
.site-nav ul a, .site-nav ul a:visited {
  font-family: var(--head); font-weight: 600; font-size: .95rem; color: var(--ink-2);
  padding: .45rem 0; border-bottom: 2px solid transparent;
}
.site-nav ul a:hover, .site-nav ul a:focus-visible { color: var(--ink); }
.site-nav ul a[aria-current="page"], .site-nav ul a[aria-current="page"]:visited { color: var(--ink); border-bottom-color: var(--orange); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line-2); border-radius: 10px; padding: 11px 11px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; margin: 4px 0; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1060px) {
  .site-nav ul { gap: 1.1rem; }
  .site-nav ul a { font-size: .9rem; }
}
@media (max-width: 960px) {
  .js .nav-toggle { display: block; }
  .js .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); padding: .5rem 22px 1.4rem;
  }
  .js .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { display: block; padding: .9rem .2rem; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
  .site-nav ul a[aria-current="page"] { border-bottom-color: var(--orange); }
  .nav-cta { margin-top: 1.1rem; }
  .site-nav:not(.is-open) { flex-wrap: wrap; }
}
@media (max-width: 420px) {
  .brand-mark { width: 42px; height: 42px; }
  .brand-top { font-size: 1.05rem; letter-spacing: .12em; }
  .brand-sub { font-size: .58rem; letter-spacing: .2em; }
}

/* ---------- Flash ---------- */
.flash { margin: 1.2rem 0 0; padding: .9rem 1.1rem; border-radius: var(--radius-sm); font-weight: 700; }
.flash-success { background: var(--ok-soft); color: var(--ok); }
.flash-error { background: var(--err-soft); color: var(--err); }
.flash-info { background: var(--blue-soft); color: var(--blue-ink); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, #fff 0%, var(--paper) 100%); border-bottom: 1px solid var(--line); }
.hero-net { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .55; }
.hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 3rem; align-items: center; padding: clamp(3rem, 6vw, 5rem) 22px clamp(3rem, 6vw, 4.5rem); }
.hero-badge {
  display: inline-flex; align-items: center; gap: .55rem; margin-bottom: 1.3rem;
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .42rem .95rem .42rem .55rem;
  font-family: var(--head); font-size: .82rem; font-weight: 700; color: var(--ink-2); box-shadow: var(--shadow-sm);
}
.hero-badge .dot { width: 22px; height: 22px; border-radius: 50%; background: var(--orange-soft); display: grid; place-items: center; }
.hero-badge .dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 0 rgba(232, 106, 10, .5); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(232, 106, 10, .45); } 70% { box-shadow: 0 0 0 9px rgba(232, 106, 10, 0); } 100% { box-shadow: 0 0 0 0 rgba(232, 106, 10, 0); } }
.hero h1 { margin-bottom: .45em; }
.hero h1 .hl { color: var(--orange-ink); }
.hero .lede { font-size: 1.2rem; max-width: 36em; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.9rem 0 1.8rem; }
.hero-facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .7rem 1.5rem; color: var(--ink-2); font-size: .95rem; }
.hero-facts li { display: inline-flex; align-items: center; gap: .45rem; margin: 0; }
.hero-facts svg { color: var(--blue); }
.hero-art { position: relative; display: flex; justify-content: center; }
.hero-art::before {
  content: ""; position: absolute; width: 78%; aspect-ratio: 1; top: 8%; left: 50%; transform: translateX(-50%);
  background: radial-gradient(circle, rgba(43, 142, 246, .18), rgba(43, 142, 246, 0) 68%); border-radius: 50%;
}
.hero-art img { position: relative; width: min(420px, 100%); filter: drop-shadow(0 24px 38px rgba(3, 10, 28, .22)); }
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
  .hero-art { order: -1; }
  .hero-art img { width: min(220px, 60%); }
}
/* On a phone the headline and main button should be on the first screen. */
@media (max-width: 520px) {
  .hero-inner { padding-top: 1.6rem; }
  .hero-art img { width: min(150px, 42%); }
  .hero-badge { font-size: .76rem; margin-bottom: 1rem; }
  .hero .lede { font-size: 1.08rem; }
  .hero-ctas { margin: 1.4rem 0 1.4rem; }
}

/* ---------- Trust strip ---------- */
.trust { background: var(--navy-950); color: #cdd8ec; }
.trust ul { list-style: none; margin: 0; padding: 1.35rem 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.trust li { display: flex; align-items: center; gap: .75rem; margin: 0; font-size: .95rem; line-height: 1.35; }
.trust strong { display: block; color: #fff; font-family: var(--head); font-size: .98rem; }
.trust .ic { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 12px; display: grid; place-items: center; background: rgba(43, 142, 246, .14); color: var(--blue-light); }
@media (max-width: 900px) { .trust ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .trust ul { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Cards ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.75rem; box-shadow: var(--shadow-sm); }
.card h3 { margin-bottom: .45rem; }
.card p { color: var(--ink-2); }
.card p:last-child { margin-bottom: 0; }
a.card { display: flex; flex-direction: column; color: var(--ink); transition: transform .2s, box-shadow .2s, border-color .2s; }
a.card:visited { color: var(--ink); }
a.card:hover, a.card:focus-visible { color: var(--ink); transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }
a.card .link-arrow { margin-top: auto; padding-top: .8rem; color: var(--blue-ink); }
a.card:hover .link-arrow { color: var(--orange-ink); }
.icon-chip { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; margin-bottom: 1.1rem; background: var(--blue-soft); color: var(--blue-ink); }
.icon-chip.orange { background: var(--orange-soft); color: var(--orange-ink); }
.service-card .tagline { font-family: var(--head); font-weight: 700; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; color: var(--orange-ink); margin-bottom: .35rem; }

/* ---------- Browser + phone frames ---------- */
.browser { border-radius: 14px; overflow: hidden; background: #fff; border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #eef2f8; border-bottom: 1px solid var(--line); }
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: #cbd5e3; }
.browser-bar i:nth-child(1) { background: #f28b82; } .browser-bar i:nth-child(2) { background: #f6c86a; } .browser-bar i:nth-child(3) { background: #7fd49c; }
.browser-bar span { margin-left: 8px; flex: 1; min-width: 0; font-size: .74rem; color: var(--ink-3); background: #fff; border-radius: 6px; padding: 2px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.browser img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.browser-placeholder { aspect-ratio: 16 / 10; display: grid; place-items: center; background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); color: var(--blue-light); }
.phone { width: 30%; max-width: 230px; border-radius: 26px; background: var(--navy-950); padding: 9px; box-shadow: var(--shadow-lg); }
.phone img { border-radius: 18px; width: 100%; aspect-ratio: 9 / 19.5; object-fit: cover; object-position: top; }
.device-stage { position: relative; padding-right: 9%; padding-bottom: 7%; }
.device-stage .phone { position: absolute; right: 0; bottom: 0; }

/* ---------- Work cards ---------- */
.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1.6rem; }
.work-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 980px) { .work-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .work-grid, .work-grid.three { grid-template-columns: minmax(0, 1fr); } }
a.work-card { display: block; color: var(--ink); }
a.work-card:visited { color: var(--ink); }
a.work-card:hover, a.work-card:focus-visible { color: var(--ink); }
a.work-card .browser { transition: transform .25s, box-shadow .25s; }
a.work-card:hover .browser { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.work-meta { display: flex; flex-wrap: wrap; gap: .35rem .8rem; margin: 1.05rem 0 .35rem; font-size: .84rem; color: var(--ink-3); font-family: var(--head); font-weight: 600; }
.work-card h3 { font-size: 1.22rem; margin-bottom: .35rem; }
.work-card p { color: var(--ink-2); margin-bottom: .6rem; }
.work-card .link-arrow { color: var(--blue-ink); }
.draft-badge {
  display: inline-flex; align-items: center; gap: .35rem; font-family: var(--head); font-size: .72rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; background: var(--warn-soft); color: var(--warn);
  border: 1px solid #f1d9a8; border-radius: 6px; padding: .18rem .5rem;
}
.chips { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; padding: 0; margin: 0; }
.chips li { margin: 0; font-size: .8rem; font-family: var(--head); font-weight: 600; background: var(--paper-2); color: var(--ink-2); border-radius: 999px; padding: .28rem .75rem; }
.chips a, .chips a:visited { color: var(--ink-2); }
.filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2.2rem; }
.filter-bar a, .filter-bar a:visited { font-family: var(--head); font-weight: 600; font-size: .9rem; color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 999px; padding: .5rem 1rem; }
.filter-bar a:hover { color: var(--ink); border-color: var(--ink-3); }
.filter-bar a[aria-current="true"], .filter-bar a[aria-current="true"]:visited { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; }
.step { position: relative; padding-top: .2rem; }
.step-no { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 1rem;
  font-family: var(--head); font-weight: 800; color: var(--navy-950); background: var(--orange); }
.section-dark .step p { color: #b3c1da; }
.section-dark .card { background: var(--navy-900); border-color: rgba(124, 184, 255, .16); box-shadow: none; }
.section-dark .card p { color: #b3c1da; }

/* ---------- Testimonials ---------- */
.quote-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.9rem 1.8rem 1.6rem; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.quote-card .qmark { color: var(--orange); margin-bottom: .7rem; }
.quote-card blockquote { margin: 0 0 1.4rem; font-size: 1.06rem; line-height: 1.7; color: var(--ink); }
.quote-card blockquote p:last-child { margin-bottom: 0; }
.quote-who { display: flex; align-items: center; gap: .8rem; margin-top: auto; }
.quote-who .avatar { width: 46px; height: 46px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; background: var(--navy-900); color: #fff; font-family: var(--head); font-weight: 700; overflow: hidden; }
.quote-who .avatar img { width: 100%; height: 100%; object-fit: cover; }
.quote-who strong { display: block; font-family: var(--head); font-size: .98rem; }
.quote-who span { font-size: .88rem; color: var(--ink-3); }
.quote-card .cs-link { font-size: .88rem; margin-top: .9rem; }
.quotes-masonry { columns: 3 320px; column-gap: 1.4rem; }
.quotes-masonry .quote-card { break-inside: avoid; margin-bottom: 1.4rem; }
.quote-feature { background: var(--navy-950); color: #d9e3f4; border-radius: var(--radius-lg); padding: clamp(1.8rem, 4vw, 3rem); }
.quote-feature blockquote { margin: 0 0 1.4rem; font-family: var(--head); font-size: clamp(1.15rem, 2.2vw, 1.5rem); font-weight: 600; line-height: 1.5; color: #fff; }
.quote-feature .qmark { color: var(--orange); margin-bottom: 1rem; }
.quote-feature .quote-who span { color: #9fb2d4; }
.quote-feature .quote-who strong { color: #fff; }

/* ---------- Article cards ---------- */
.article-card .meta { font-size: .82rem; color: var(--ink-3); font-family: var(--head); font-weight: 600; margin-bottom: .5rem; display: flex; gap: .7rem; flex-wrap: wrap; }
.article-card .meta .cat { color: var(--orange-ink); text-transform: uppercase; letter-spacing: .08em; }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; background: radial-gradient(900px 500px at 85% 20%, #133067, var(--navy-950) 70%); color: #cdd9ee; padding: clamp(3.5rem, 7vw, 5rem) 0; }
.cta-band .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: center; }
.cta-band h2 { color: #fff; margin-bottom: .4em; }
.cta-band p { color: #b3c1da; max-width: 38em; margin-bottom: 0; }
.cta-band .btn-row { justify-content: flex-end; }
.cta-mark { position: absolute; right: -60px; top: 50%; transform: translateY(-50%); width: 360px; opacity: .08; pointer-events: none; }
@media (max-width: 820px) { .cta-band .wrap { grid-template-columns: minmax(0, 1fr); } .cta-band .btn-row { justify-content: flex-start; } }

/* ---------- Interior page hero ---------- */
.page-hero { background: linear-gradient(180deg, #fff, var(--paper)); border-bottom: 1px solid var(--line); padding: clamp(2.6rem, 5vw, 4rem) 0 clamp(2.2rem, 4vw, 3rem); position: relative; overflow: hidden; }
.page-hero .hero-net { opacity: .35; }
.page-hero .wrap { position: relative; }
.page-hero h1 { max-width: 20em; }
.page-hero .lede { max-width: 42em; margin-bottom: 0; }
.crumbs { font-size: .86rem; color: var(--ink-3); margin-bottom: 1rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.crumbs a, .crumbs a:visited { color: var(--ink-3); }
.crumbs a:hover { color: var(--blue-ink); }
.crumbs span[aria-hidden] { opacity: .5; }

/* ---------- Prose (rich text from the admin) ---------- */
.prose { max-width: 740px; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 1.55rem; margin-top: 2.2rem; }
.prose h3 { font-size: 1.2rem; margin-top: 1.8rem; }
.prose p, .prose li { color: #26344f; }
.prose ul li::marker { color: var(--orange); }
.prose ol li::marker { color: var(--orange-ink); font-family: var(--head); font-weight: 700; }
.prose blockquote { margin: 1.8rem 0; padding: 1.1rem 1.4rem; border-left: 4px solid var(--orange); background: var(--orange-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.prose blockquote p { margin: 0; font-family: var(--head); font-weight: 600; color: var(--ink); line-height: 1.55; }
.lead-in > p:first-child { font-size: 1.14rem; color: var(--ink-2); }

/* ---------- Service page ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
.split > * { min-width: 0; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); gap: 2rem; } }
/* Deliberately not sticky: these sidebars can be taller than a laptop screen,
   and a sticky column taller than the window hides its own bottom cards. */
.side-stack { display: grid; gap: 1.2rem; align-content: start; }
.tick-list { list-style: none; padding: 0; margin: 0; }
.tick-list li { position: relative; padding-left: 1.9rem; margin-bottom: .6rem; color: var(--ink-2); }
.tick-list li::before { content: ""; position: absolute; left: 0; top: .28em; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--orange-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b85200' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7'/%3E%3C/svg%3E") center / 70% no-repeat; }
.section-dark .tick-list li { color: #c6d2e8; }
.section-dark .tick-list li::before { background-color: rgba(232, 106, 10, .18); }
.rate-box { background: var(--navy-950); color: #cfdaee; border-radius: var(--radius-lg); padding: 1.6rem; }
.rate-box h3 { color: #fff; }
.rate-box .rate { font-family: var(--head); font-weight: 800; font-size: 2.2rem; color: #fff; line-height: 1; margin: .2rem 0 .5rem; }
.rate-box .rate small { font-size: .95rem; font-weight: 600; color: #9fb2d4; }

/* ---------- Pricing ---------- */
.price-card { text-align: left; }
.price-card .price { font-family: var(--head); font-weight: 800; font-size: 2.6rem; line-height: 1; color: var(--ink); margin: .4rem 0 .6rem; }
.price-card .price small { font-size: 1rem; font-weight: 600; color: var(--ink-3); }
.price-card.featured { border: 2px solid var(--orange); }
.terms-list { list-style: none; padding: 0; margin: 0; }
.terms-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.terms-list li:last-child { border-bottom: 0; }
.terms-list .k { color: var(--ink-3); }
.terms-list .v { font-weight: 700; text-align: right; }

/* ---------- Case study page ---------- */
.cs-hero { padding-bottom: 0; border-bottom: 0; }
.cs-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin: 2rem 0 0; padding: 1.2rem 0 0; border-top: 1px solid var(--line); }
.cs-facts div { min-width: 0; }
.cs-facts dt { font-family: var(--head); font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.cs-facts dd { margin: .25rem 0 0; font-weight: 700; }
@media (max-width: 760px) { .cs-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cs-stage { background: linear-gradient(180deg, var(--paper) 0%, var(--paper) 55%, #fff 55%); padding: 2.4rem 0 1rem; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 1rem; margin: 0; }
.metric { background: var(--navy-950); color: #b9c7df; border-radius: var(--radius); padding: 1.3rem 1.4rem; }
.metric strong { display: block; font-family: var(--head); font-weight: 800; font-size: 2rem; line-height: 1.05; color: #fff; margin-bottom: .35rem; }
.metric strong::after { content: ""; display: block; width: 28px; height: 3px; background: var(--orange); border-radius: 3px; margin-top: .6rem; }
.cs-section { margin-bottom: 2.6rem; }
.cs-section > h2 { font-size: 1.45rem; display: flex; align-items: center; gap: .6rem; }
.cs-section > h2 .n { font-size: .8rem; color: var(--orange-ink); letter-spacing: .12em; }
.notice { display: flex; gap: .8rem; align-items: flex-start; padding: 1rem 1.2rem; border-radius: var(--radius); font-size: .95rem; }
.notice svg { flex: 0 0 auto; margin-top: .1rem; }
.notice-warn { background: var(--warn-soft); color: var(--warn); border: 1px solid #f1d9a8; }
.notice-info { background: var(--blue-soft); color: var(--blue-ink); }
.notice p { margin: 0; }

/* ---------- Share row (plain links) ---------- */
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 2.2rem 0 0; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.share-label { font-family: var(--head); font-weight: 700; font-size: .85rem; color: var(--ink-3); margin-right: .3rem; }
.share-btn, .share-btn:visited { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--line-2); border-radius: 999px; padding: .45rem .9rem; font-size: .88rem; font-weight: 700; color: var(--ink-2); }
.share-btn:hover, .share-btn:focus-visible { border-color: var(--blue-ink); color: var(--blue-ink); }

/* ---------- FAQ ---------- */
.faq-group { margin-bottom: 2.4rem; }
.faq-group h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .75rem; }
.faq-item summary { list-style: none; cursor: pointer; padding: 1.1rem 3.2rem 1.1rem 1.3rem; position: relative; font-family: var(--head); font-weight: 700; -webkit-tap-highlight-color: transparent; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 1.2rem; top: 50%; transform: translateY(-50%); font-size: 1.5rem; font-weight: 400; color: var(--orange); }
.faq-item[open] summary::after { content: "\2013"; }
.faq-item .answer { padding: 0 1.3rem 1.2rem; color: var(--ink-2); }
.faq-item .answer p:last-child { margin-bottom: 0; }

/* ---------- Forms ---------- */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.4rem, 3vw, 2.2rem); box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.1rem; }
.form-grid > * { min-width: 0; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 620px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.field { margin-bottom: 1.05rem; }
.field label, .field .label { display: block; font-family: var(--head); font-weight: 700; font-size: .92rem; margin-bottom: .4rem; color: var(--ink); }
.field .opt { font-weight: 500; color: var(--ink-3); }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="url"], .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: #fff;
  border: 1.5px solid var(--line-2); border-radius: var(--radius-sm); padding: .8rem .95rem; transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(43, 142, 246, .15); }
.field 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='%231a63c4' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .9rem center; background-size: 18px; padding-right: 2.6rem; }
.field-hint { font-size: .86rem; color: var(--ink-3); margin: .35rem 0 0; }
.field-error { font-size: .88rem; color: var(--err); font-weight: 700; margin: .35rem 0 0; }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: var(--err); }
.check-row { display: flex; gap: .7rem; align-items: flex-start; margin-bottom: .8rem; }
.check-row input { width: 20px; height: 20px; margin: .2rem 0 0; flex: 0 0 auto; accent-color: var(--orange); }
.check-row label { font-family: var(--body); font-weight: 400; font-size: .98rem; margin: 0; }
.radio-list { display: grid; gap: .5rem; }
.radio-list label { display: flex; gap: .65rem; align-items: flex-start; font-family: var(--body); font-weight: 400; margin: 0; padding: .7rem .9rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.radio-list input { margin-top: .25rem; accent-color: var(--orange); }
.radio-list label:has(input:checked) { border-color: var(--orange); background: var(--orange-soft); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-errors { background: var(--err-soft); color: var(--err); border-radius: var(--radius-sm); padding: .9rem 1.1rem; margin-bottom: 1.2rem; font-weight: 700; }
.form-errors ul { margin: .3rem 0 0; font-weight: 400; }
.success-box { text-align: center; padding: clamp(1.8rem, 4vw, 3rem); }
.success-box .ok { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 1.2rem; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 2.5rem; align-items: start; }
.contact-grid > * { min-width: 0; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
.contact-list { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.contact-list li { display: flex; gap: .9rem; align-items: flex-start; padding: 1rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.contact-list .ic { width: 44px; height: 44px; border-radius: 12px; flex: 0 0 auto; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue-ink); }
.contact-list strong { display: block; font-family: var(--head); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.contact-list a, .contact-list span.v { font-size: 1.08rem; }

/* ---------- About ---------- */
/* The Territory Proud stamp is landscape (640×420), so it sits above its caption. */
.proud-row { display: flex; flex-direction: column; gap: .9rem; align-items: flex-start; }
.proud-row img { width: min(230px, 100%); height: auto; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: #9fb0cf; padding: 3.6rem 0 1.6rem; font-size: .95rem; }
.site-footer a, .site-footer a:visited { color: #cfdaee; }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--orange-2); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 2.4rem; }
.footer-grid > * { min-width: 0; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }
.footer-brand p { margin-top: 1rem; }
.footer-proud { width: 190px; height: auto; margin-top: 1.1rem; }
.footer-h { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: #6f84a8; margin-bottom: 1rem; font-weight: 700; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .55rem; }
.footer-contact a, .footer-contact > li > span { display: inline-flex; gap: .5rem; align-items: center; }
.footer-contact a span { overflow-wrap: normal; word-break: normal; }
.footer-contact svg { color: var(--blue); flex: 0 0 auto; }
.footer-small { font-size: .86rem; color: #7f93b5; }
.footer-social { display: flex; gap: .8rem; }
.footer-ack { margin-top: 2.2rem; }
.footer-ack p { font-size: .86rem; color: #7f93b5; border-top: 1px solid rgba(124, 184, 255, .12); padding-top: 1.4rem; margin: 0; }
.footer-legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem 1.5rem; margin-top: 1.4rem; font-size: .86rem; color: #7f93b5; }
.footer-legal p { margin: 0; }
.footer-legal a, .footer-legal a:visited { color: #9fb0cf; margin-left: 1.1rem; }
.footer-legal a:first-child { margin-left: 0; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero-badge .dot::after { animation: none; }
  * { transition: none !important; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .admin-bar, .preview-banner, .cta-band, .hero-net { display: none !important; }
  body { font-size: 11pt; }
  a { color: #000 !important; }
}
