/* ============================================================
   Nexplexity design system
   Brand: Montserrat + deep blue #000887 (preserved from logo)
   ============================================================ */

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/montserrat-latin-var.311d352d9323.woff2") format("woff2");
}

:root {
  /* Brand */
  --navy: #000887;          /* primary — from the logo */
  --navy-deep: #000550;
  --navy-black: #02031f;
  --blue: #232baa;
  --azure: #176be0;
  --sky: #7ea6ff;
  --mist: #eef2ff;
  --white: #ffffff;

  /* Text */
  --ink: #0e1030;
  --muted: #5a5f7a;
  --on-navy-muted: #b8c2f2;

  /* Type scale */
  --font: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --fs-hero: clamp(2.6rem, 6.5vw, 4.6rem);
  --fs-h2: clamp(1.9rem, 4vw, 3rem);
  --fs-h3: clamp(1.15rem, 2vw, 1.4rem);
  --fs-body: 1.0625rem;

  /* Rhythm */
  --container: 1200px;
  --section-pad: clamp(4.5rem, 9vw, 8rem);
  --radius: 5px;
  --radius-lg: 5px;

  --shadow-card: 0 18px 50px -18px rgba(0, 8, 135, 0.22);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 { line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }

a { color: var(--azure); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: min(var(--container), 100% - 3rem);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  background: var(--white); color: var(--navy);
  padding: 0.6rem 1.2rem; border-radius: 5px; font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */
.btn {
  display: inline-block;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 1.9rem;
  border-radius: 5px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s, background 0.25s, color 0.25s;
  text-decoration: none !important;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 10px 30px -10px rgba(0, 8, 135, 0.55);
}
.btn-primary:hover { background: var(--blue); }

.btn-light {
  background: var(--white);
  color: var(--navy);
}
.btn-light:hover { background: var(--mist); }

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.45);
}
.btn-ghost:hover { border-color: var(--white); background: rgba(255, 255, 255, 0.08); }

/* ------------------------------------------------------------
   Header
   ------------------------------------------------------------ */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  padding: 1.1rem 0;
  transition: background 0.35s, padding 0.35s, box-shadow 0.35s;
  background: transparent;
}
/* No backdrop-filter here: it would become the containing block for the
   fixed mobile nav and break its off-screen hiding. */
.site-header.is-scrolled {
  background: rgba(0, 5, 80, 0.96);
  padding: 0.7rem 0;
  box-shadow: 0 8px 30px -12px rgba(2, 3, 31, 0.6);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  color: var(--white);
  text-decoration: none !important;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.9rem;
}
.site-nav a {
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  opacity: 0.92;
  transition: opacity 0.2s;
}
.site-nav a:hover { opacity: 1; text-decoration: none; }
.site-nav .btn { padding: 0.6rem 1.4rem; }
.site-nav .btn-light { color: var(--navy); opacity: 1; }

/* Services dropdown */
.nav-dropdown { position: relative; }

.nav-drop-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--white);
  opacity: 0.92;
  padding: 0;
  transition: opacity 0.2s;
}
.nav-drop-btn:hover { opacity: 1; }
.nav-drop-btn .chevron {
  width: 11px;
  height: 8px;
  transition: transform 0.25s var(--ease-out);
}
.nav-dropdown.is-open .nav-drop-btn .chevron { transform: rotate(180deg); }

.nav-drop-menu {
  position: absolute;
  top: calc(100% + 0.9rem);
  left: 50%;
  transform: translate(-50%, 6px);
  min-width: 250px;
  display: grid;
  padding: 0.5rem;
  background: var(--white);
  border-radius: 5px;
  box-shadow: 0 24px 60px -18px rgba(2, 3, 31, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out), visibility 0s 0.25s;
}
.nav-drop-menu::before {
  content: "";
  position: absolute;
  top: -0.9rem;
  left: 0;
  right: 0;
  height: 0.9rem; /* hover bridge between button and menu */
}
.nav-dropdown.is-open .nav-drop-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
  transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.site-nav .nav-drop-menu a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  white-space: nowrap;
  color: var(--navy);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.55rem 0.8rem;
  border-radius: 5px;
  opacity: 1;
}
.site-nav .nav-drop-menu a:hover { background: var(--mist); }
.nav-drop-menu .menu-group {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  padding: 0.55rem 0.8rem 0.1rem;
}
.nav-drop-menu .menu-group:not(:first-child) {
  margin-top: 0.3rem;
  border-top: 1px solid rgba(0, 8, 135, 0.08);
}

.menu-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 5px;
  background: var(--mist);
  color: var(--navy);
  transition: background 0.25s, color 0.25s;
}
.menu-icon svg { width: 18px; height: 18px; }
.nav-drop-menu a:hover .menu-icon { background: var(--navy); color: var(--white); }

@media (hover: hover) and (min-width: 701px) {
  .nav-dropdown:hover .nav-drop-menu,
  .nav-dropdown:focus-within .nav-drop-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
    transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out);
  }
  .nav-dropdown:hover .nav-drop-btn .chevron { transform: rotate(180deg); }
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 26px; height: 2.5px; border-radius: 2px;
  background: var(--white);
  transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ------------------------------------------------------------
   Hero
   ------------------------------------------------------------ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(23, 107, 224, 0.35), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(35, 43, 170, 0.5), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 70%, var(--navy-black) 100%);
  color: var(--white);
  padding: calc(var(--section-pad) + 3rem) 0 var(--section-pad);
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

/* The cube lives inside .hero-inner (so it can flow between the intro and
   the audit form on mobile). On desktop it is pinned to the container's
   right edge, sized to the space beside the 640px content column so it can
   never overlap the form. */
.hero-inner > .hero-3d {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 0;
  width: calc(100% - 640px - 2rem);
  max-width: none;
  height: min(72vh, 680px);
  z-index: 1;
  pointer-events: none;
}
.hero-3d canvas { width: 100% !important; height: 100% !important; display: block; }

/* The cube is desktop-only; the stacked layout goes straight to the form */
@media (max-width: 1024px) {
  .hero-inner > .hero-3d { display: none; }
}

/* Shares .container with the header, so the headline lines up with the logo */
.hero-inner { position: relative; z-index: 2; }
.hero-inner > * { max-width: 640px; }

.hero h1 {
  font-size: var(--fs-hero);
  margin-bottom: 1.4rem;
}
.hero h1 .accent {
  /* inline-block + bottom padding so the clipped background covers the y descender */
  display: inline-block;
  padding-bottom: 0.15em;
  margin-bottom: -0.15em;
  background: linear-gradient(90deg, var(--sky), #b4c9ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--on-navy-muted);
  max-width: 25em;
  margin-bottom: 2.4rem;
}

.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Hero audit form: the primary lead capture */
.hero-audit { margin-bottom: 1.4rem; }
.hero-audit-fields {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: stretch;
}
.hero-audit-fields input {
  flex: 1 1 190px;
  font: inherit;
  font-size: 0.95rem;
  padding: 0.85rem 1.1rem;
  border-radius: 5px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}
.hero-audit-fields input::placeholder { color: rgba(255, 255, 255, 0.55); }
.hero-audit-fields input:focus {
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 4px rgba(126, 166, 255, 0.2);
  background: rgba(255, 255, 255, 0.14);
}
.hero-audit-note {
  margin-top: 0.7rem;
  font-size: 0.85rem;
  color: var(--on-navy-muted);
}

/* Audit results */
.audit-results { display: grid; gap: 2.4rem; }
.audit-category h2 {
  font-size: 1.3rem;
  color: var(--navy);
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.audit-cat-summary {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}
.audit-checks { list-style: none; display: grid; gap: 0.7rem; }
.audit-checks li {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid rgba(0, 8, 135, 0.09);
  border-radius: 5px;
  padding: 1rem 1.2rem;
}
.audit-checks strong { font-size: 0.98rem; }
.audit-checks p { color: var(--muted); font-size: 0.92rem; margin-top: 0.15rem; }
.check-dot {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-top: 0.45rem;
}
.check-pass .check-dot { background: #0a7d4f; }
.check-warn .check-dot { background: #e09b00; }
.check-fail .check-dot { background: #c62348; }
.check-fail { border-left: 3px solid #c62348; }
.check-warn { border-left: 3px solid #e09b00; }

/* Area coverage chips */
.areas-grid { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.area-chip {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border: 1.5px solid rgba(0, 8, 135, 0.18);
  border-radius: 5px;
  background: var(--white);
  color: var(--navy);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none !important;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.area-chip:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }
.area-chip-all { background: var(--navy); color: var(--white); border-color: var(--navy); }
.area-chip-all:hover { background: var(--blue); }
.section-navy .area-chip {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--white);
}
.section-navy .area-chip:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--white); }

/* FAQ accordions */
.faq-list { display: grid; gap: 0.8rem; }
.faq-list details {
  background: var(--white);
  border: 1px solid rgba(0, 8, 135, 0.09);
  border-radius: 5px;
  box-shadow: var(--shadow-card);
}
.faq-list summary {
  cursor: pointer;
  font-weight: 700;
  padding: 1.1rem 1.3rem;
  color: var(--navy);
  list-style: none;
  position: relative;
  padding-right: 3rem;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 1.3rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--azure);
}
.faq-list details[open] summary::after { content: "\2212"; }
.faq-list details p { padding: 0 1.3rem 1.2rem; color: var(--muted); }

.form-note { color: var(--muted); font-size: 0.88rem; }
.audit-form { max-width: 560px; }

/* ---- Report head: score ring + stat tiles + verdict ---- */
.report-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.score-visual { position: relative; width: 230px; }
.score-ring { width: 230px; height: 230px; transform: rotate(-90deg); }
.score-ring circle { fill: none; stroke-width: 9; }
.ring-track { stroke: var(--mist); }
.ring-fill {
  stroke-linecap: round;
  transition: stroke-dasharray 1.2s var(--ease-out);
}
.ring-A .ring-fill, .ring-B .ring-fill { stroke: #0a7d4f; }
.ring-C .ring-fill { stroke: #e09b00; }
.ring-D .ring-fill, .ring-E .ring-fill { stroke: #c62348; }

.score-number {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}
.score-number strong {
  font-size: 3.6rem;
  font-weight: 800;
  line-height: 1;
  color: var(--ink);
}
.score-number span {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

.stat-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
}
.stat-tile {
  background: var(--white);
  border: 1px solid rgba(0, 8, 135, 0.09);
  border-radius: 5px;
  padding: 1rem 1.2rem;
  box-shadow: var(--shadow-card);
}
.stat-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}
.stat-label .check-dot { margin: 0; }
.stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--ink);
  margin-top: 0.2rem;
}
.dot-pass { background: #0a7d4f; }
.dot-warn { background: #e09b00; }
.dot-fail { background: #c62348; }

.verdict {
  margin-top: 1.6rem;
  background: var(--mist);
  border-left: 3px solid var(--navy);
  border-radius: 5px;
  padding: 1.4rem 1.6rem;
}
.verdict h2 { font-size: 1.05rem; color: var(--navy); margin-bottom: 0.5rem; }
.verdict p { color: var(--ink); font-size: 0.98rem; }

/* ---- Category scorecards with meters ---- */
.scorecard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}
.scorecard {
  background: var(--white);
  border: 1px solid rgba(0, 8, 135, 0.09);
  border-radius: 5px;
  padding: 1.3rem 1.4rem;
  box-shadow: var(--shadow-card);
}
.scorecard-group {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.scorecard h3 { font-size: 1rem; margin: 0.3rem 0 0.8rem; min-height: 2.4em; }
.scorecard-row { display: flex; align-items: center; gap: 0.8rem; }
.cat-meter { flex: 1; height: 6px; overflow: visible; }
.cat-meter line { stroke-width: 6; stroke-linecap: round; }
.meter-track { stroke: var(--mist); }
.meter-good { stroke: #0a7d4f; }
.meter-warn { stroke: #e09b00; }
.meter-bad { stroke: #c62348; }
.scorecard-score {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink);
  min-width: 2ch;
  text-align: right;
}
.scorecard-counts { margin-top: 0.6rem; font-size: 0.85rem; color: var(--muted); }

.priority-meta-dark {
  margin-top: 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sky);
}
.priorities-row { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 960px) {
  .report-head { grid-template-columns: 1fr; justify-items: center; }
  .report-side { width: 100%; }
  .stat-tiles { grid-template-columns: repeat(2, 1fr); }
  .scorecard-grid { grid-template-columns: repeat(2, 1fr); }
  .priorities-row { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .scorecard-grid { grid-template-columns: 1fr; }
}

.check-evidence {
  font-style: italic;
  color: var(--navy);
  font-size: 0.9rem;
  margin: 0.2rem 0 0.3rem;
}
.priorities-grid { margin-bottom: 3rem; }
.priority-meta {
  margin-top: 0.6rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--azure);
}

.hero-scroll {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  color: var(--on-navy-muted);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  z-index: 2;
}

/* ------------------------------------------------------------
   Sections
   ------------------------------------------------------------ */
.section { padding: var(--section-pad) 0; }
.section-light { background: var(--white); }
.section-mist { background: var(--mist); }
.section-navy {
  background: linear-gradient(165deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--white);
}

.section-head { margin-bottom: 3.2rem; }
.section-head h2 { font-size: var(--fs-h2); margin-bottom: 1rem; }
.section-head p { color: var(--muted); }
.section-navy .section-head p { color: var(--on-navy-muted); }
.section-head.centered { margin-inline: auto; text-align: center; }
.areas-grid + .section-head { margin-top: 3.2rem; }

/* ------------------------------------------------------------
   Service cards (bento)
   ------------------------------------------------------------ */
.bento {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.6rem;
}

.card {
  position: relative;
  background: var(--white);
  border: 1px solid rgba(0, 8, 135, 0.09);
  border-radius: var(--radius-lg);
  padding: 2.4rem 2.2rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--navy), var(--azure), var(--sky));
  opacity: 0;
  transition: opacity 0.3s;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 26px 60px -20px rgba(0, 8, 135, 0.32); }
.card:hover::before { opacity: 1; }

.card .card-num {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--azure);
  letter-spacing: 0.15em;
}

.card-icon-wrap {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 5px;
  background: var(--mist);
  color: var(--navy);
  margin-bottom: 0.5rem;
  transition: background 0.3s, color 0.3s;
}
.card-icon-wrap svg { width: 30px; height: 30px; }
.card:hover .card-icon-wrap { background: var(--navy); color: var(--white); }

/* Manifesto strip: one confident statement, room to breathe */
.manifesto {
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  font-weight: 600;
  line-height: 1.55;
  color: var(--navy);
}

/* The arc: capability rows grouped under Found / Chosen / Freed */
.stage { margin-bottom: 3rem; }
.stage:last-child { margin-bottom: 0; }
.stage-head { margin-bottom: 1.2rem; }
.stage-head h3 { font-size: 1.5rem; margin-bottom: 0.3rem; }
.stage-head p { color: var(--muted); }

/* Service rows: the five services as full-width scannable rows */
.service-rows { display: grid; gap: 1.1rem; }
.service-row {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.8rem;
  background: var(--white);
  border: 1px solid rgba(0, 8, 135, 0.09);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s;
}
.service-row:hover { transform: translateY(-4px); box-shadow: 0 26px 60px -20px rgba(0, 8, 135, 0.32); }
.service-row .card-icon-wrap { margin-bottom: 0; }
.service-row:hover .card-icon-wrap { background: var(--navy); color: var(--white); }
.service-row h3, .service-row h4 { font-size: var(--fs-h3); margin: 0 0 0.25rem; }
.service-row p { color: var(--muted); font-size: 0.98rem; max-width: 68ch; }
.service-row .card-link {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--navy);
  white-space: nowrap;
}
.service-row .card-link::after { content: " →"; transition: margin-left 0.2s; }
.service-row:hover .card-link::after { margin-left: 4px; }
/* Whole row is clickable without diluting the anchor text */
.service-row .card-link::before { content: ""; position: absolute; inset: 0; }
.card h3 { font-size: var(--fs-h3); margin: 0.9rem 0 0.8rem; }
.card p { color: var(--muted); font-size: 0.98rem; }
.card .card-link {
  display: inline-block;
  margin-top: 1.4rem;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--navy);
}
.card .card-link::after { content: " →"; transition: margin-left 0.2s; }
.card .card-link:hover::after { margin-left: 4px; }

/* ------------------------------------------------------------
   Process strip
   ------------------------------------------------------------ */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.6rem;
  counter-reset: step;
}
.process-step {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  padding: 1.9rem 1.7rem;
}
.process-step .step-num {
  font-weight: 800;
  font-size: 2rem;
  color: var(--sky);
}
.process-step h3 { font-size: 1.1rem; margin: 0.7rem 0 0.5rem; }
.process-step p { color: var(--on-navy-muted); font-size: 0.94rem; }

/* ------------------------------------------------------------
   Feature list (service detail)
   ------------------------------------------------------------ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem;
}
.feature {
  background: var(--white);
  border: 1px solid rgba(0, 8, 135, 0.09);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-card);
}
.feature h3 { font-size: 1.15rem; margin-bottom: 0.6rem; color: var(--navy); }
.feature p { color: var(--muted); font-size: 0.97rem; }

/* Page hero (inner pages) */
.page-hero {
  background:
    radial-gradient(900px 500px at 85% -20%, rgba(23, 107, 224, 0.35), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--white);
  padding: calc(var(--section-pad) + 2.5rem) 0 calc(var(--section-pad) * 0.7);
}
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: 1rem; }
.page-hero p { color: var(--on-navy-muted); font-size: 1.1rem; }

/* ------------------------------------------------------------
   CTA band
   ------------------------------------------------------------ */
.cta-band { text-align: center; }
.cta-band h2 { font-size: var(--fs-h2); max-width: 18em; margin: 0 auto 1.2rem; }
.cta-band p { color: var(--on-navy-muted); margin-bottom: 2.2rem; }

/* ------------------------------------------------------------
   Forms
   ------------------------------------------------------------ */
.form-grid { display: grid; gap: 1.1rem; max-width: 560px; }
.form-grid label { font-weight: 700; font-size: 0.9rem; }
.form-grid input,
.form-grid textarea {
  font: inherit;
  width: 100%;
  padding: 0.9rem 1.1rem;
  border: 1.5px solid rgba(0, 8, 135, 0.18);
  border-radius: 5px;
  background: var(--white);
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-grid input:focus,
.form-grid textarea:focus {
  outline: none;
  border-color: var(--azure);
  box-shadow: 0 0 0 4px rgba(23, 107, 224, 0.15);
}
.errorlist { color: #c62348; list-style: none; font-size: 0.88rem; font-weight: 600; }

.newsletter-form { display: flex; gap: 0.6rem; margin-top: 1rem; flex-wrap: wrap; }
.newsletter-form input[type="email"] {
  flex: 1 1 200px;
  font: inherit;
  padding: 0.75rem 1.1rem;
  border-radius: 5px;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}
.newsletter-form input[type="email"]::placeholder { color: rgba(255, 255, 255, 0.5); }
.newsletter-form input[type="email"]:focus {
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 4px rgba(126, 166, 255, 0.2);
}

/* Flash messages */
.flash-stack {
  position: fixed;
  top: 5.2rem; left: 50%;
  transform: translateX(-50%);
  z-index: 150;
  display: grid;
  gap: 0.6rem;
  width: min(480px, calc(100% - 2rem));
}
.flash {
  padding: 0.95rem 1.4rem;
  border-radius: 5px;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 16px 40px -12px rgba(2, 3, 31, 0.4);
  animation: flash-in 0.4s var(--ease-out);
}
.flash-success { background: #0a7d4f; color: var(--white); }
.flash-error { background: #c62348; color: var(--white); }
@keyframes flash-in { from { opacity: 0; transform: translateY(-10px); } }

/* ------------------------------------------------------------
   Blog
   ------------------------------------------------------------ */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}
.post-card {
  display: block;
  background: var(--white);
  border: 1px solid rgba(0, 8, 135, 0.09);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  color: inherit;
  text-decoration: none !important;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s;
}
.post-card:hover { transform: translateY(-5px); box-shadow: 0 26px 60px -20px rgba(0, 8, 135, 0.3); }
.post-card time { font-size: 0.82rem; font-weight: 700; color: var(--azure); letter-spacing: 0.08em; text-transform: uppercase; }
.post-card h3 { font-size: 1.2rem; margin: 0.7rem 0 0.6rem; color: var(--navy); }
.post-card p { color: var(--muted); font-size: 0.95rem; }

.prose { max-width: 720px; }
.prose h2, .prose h3 { margin: 2.2rem 0 0.8rem; color: var(--navy); }
.prose p, .prose ul, .prose ol { margin-bottom: 1.2rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.9em;
  background: var(--mist);
  padding: 0.15em 0.45em;
  border-radius: 5px;
}
.prose pre {
  background: var(--navy-black);
  color: #dfe6ff;
  padding: 1.2rem 1.4rem;
  border-radius: 5px;
  overflow-x: auto;
  margin-bottom: 1.2rem;
}
.prose pre code { background: none; padding: 0; }
.prose blockquote {
  border-left: 4px solid var(--azure);
  padding-left: 1.2rem;
  color: var(--muted);
  font-style: italic;
}

.post-meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 2rem; }

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
.site-footer {
  background: linear-gradient(180deg, var(--navy-deep), var(--navy-black));
  color: var(--white);
  padding: 4.5rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.4fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.footer-brand p { color: var(--on-navy-muted); margin: 1rem 0; max-width: 26em; font-size: 0.96rem; }
.footer-email { color: var(--white); font-weight: 700; }
.footer-nav { display: grid; gap: 0.55rem; align-content: start; }
.footer-nav h3, .footer-news h3 {
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 0.7rem;
}
.footer-nav a { color: var(--white); opacity: 0.85; font-size: 0.95rem; }
.footer-nav a:hover { opacity: 1; text-decoration: none; }
.footer-news p { color: var(--on-navy-muted); font-size: 0.95rem; }
.footer-legal {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.8rem;
  color: var(--on-navy-muted);
  font-size: 0.86rem;
}
.footer-legal a, .footer-legal .link-btn { color: var(--on-navy-muted); margin-left: 1.2rem; opacity: 1; }
.footer-legal a:hover, .footer-legal .link-btn:hover { color: var(--white); }

/* ------------------------------------------------------------
   Reveal-on-scroll
   ------------------------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }

/* ------------------------------------------------------------
   Error pages
   ------------------------------------------------------------ */
.error-page {
  min-height: 100svh;
  display: grid;
  place-content: center;
  text-align: center;
  background: linear-gradient(160deg, var(--navy), var(--navy-black));
  color: var(--white);
  padding: 2rem;
}
.error-page .code { font-size: clamp(5rem, 18vw, 10rem); font-weight: 800; color: var(--sky); line-height: 1; }
.error-page p { color: var(--on-navy-muted); margin: 1rem 0 2rem; }

/* ------------------------------------------------------------
   Contact page: form beside the Essex map
   ------------------------------------------------------------ */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 560px) 1fr;
  gap: 3rem;
  align-items: stretch;
}
.map-embed {
  position: relative;
  min-height: 480px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--white);
}
.map-facade {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1rem;
  padding: 2.4rem;
  text-align: center;
}
.map-facade h2 { font-size: var(--fs-h3); }
.map-facade p { color: var(--on-navy-muted); max-width: 34em; }
.map-note { font-size: 0.85rem; }
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 960px) {
  .contact-grid { grid-template-columns: 1fr; }
  .map-embed { min-height: 380px; }
}

/* ------------------------------------------------------------
   Essex map: faint county silhouette behind the areas section,
   flowing corridor streams, town dots synced with the chips
   ------------------------------------------------------------ */
.has-areas-map { position: relative; overflow: hidden; }
/* The container floats above the map but must not swallow hovers on the
   dots beneath it: pass events through except on real content */
.has-areas-map .container { position: relative; z-index: 2; pointer-events: none; }
.has-areas-map .container .section-head,
.has-areas-map .container .area-chip { pointer-events: auto; }
.has-areas-map .areas-grid-map { max-width: 760px; }

.areas-map {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: 1%;
  transform: translateY(-50%);
  height: 118%;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 26%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 26%);
}

.map-county {
  fill: rgba(0, 8, 135, 0.045);
  stroke: rgba(0, 8, 135, 0.22);
  stroke-width: 1.4;
  fill-rule: evenodd;
}
.map-stream-base { fill: none; stroke: rgba(23, 107, 224, 0.14); stroke-width: 2; stroke-linecap: round; }
.map-stream-base.map-trib { stroke-width: 1.2; }
.map-stream-flow {
  fill: none;
  stroke: var(--azure);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-dasharray: 14 86;
  filter: drop-shadow(0 0 4px rgba(23, 107, 224, 0.55));
  animation: map-flow linear infinite;
}
.map-stream-flow.map-trib { stroke-width: 1.6; stroke-dasharray: 22 78; }
/* Timing via classes: the CSP blocks inline style attributes */
.map-c1 { animation-duration: 10s; }
.map-c2 { animation-duration: 8s; animation-delay: -3s; }
.map-c3 { animation-duration: 12s; animation-delay: -6s; }
.map-t1 { animation-duration: 5s; animation-delay: -1s; }
.map-t2 { animation-duration: 4.5s; animation-delay: -2s; }
.map-t3 { animation-duration: 4s; animation-delay: -0.5s; }
.map-t4 { animation-duration: 5.5s; animation-delay: -3.5s; }
@keyframes map-flow {
  from { stroke-dashoffset: 100; }
  to { stroke-dashoffset: 0; }
}
/* Animations only run while the section is on screen (JS toggles is-live) */
.map-stream-flow, .map-pulse { animation-play-state: paused; }
.areas-map.is-live .map-stream-flow,
.areas-map.is-live .map-pulse { animation-play-state: running; }

.map-town { pointer-events: auto; cursor: pointer; outline: none; }
.map-hit { fill: transparent; }
.map-dot { fill: var(--azure); transition: r 0.25s; }
.map-town:hover .map-dot,
.map-town.is-hot .map-dot { r: 6; fill: var(--navy); filter: drop-shadow(0 0 6px rgba(23, 107, 224, 0.9)); }
.map-pulse {
  fill: none;
  stroke: rgba(23, 107, 224, 0.5);
  stroke-width: 1.6;
  transform-box: fill-box;
  transform-origin: center;
  animation: map-pulse 3.2s ease-out infinite;
}
@keyframes map-pulse {
  0% { transform: scale(0.45); opacity: 0.9; }
  70% { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}
.map-pd1 { animation-delay: 0.5s; }
.map-pd2 { animation-delay: 1.1s; }
.map-pd3 { animation-delay: 1.7s; }
.map-pd4 { animation-delay: 2.3s; }
.map-pd5 { animation-delay: 2.8s; }
.map-label {
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  fill: var(--navy);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 3.5;
  stroke-linejoin: round;
}
.map-town:hover .map-label,
.map-town.is-hot .map-label { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .map-stream-flow { animation: none; stroke-dasharray: none; opacity: 0.35; }
  .map-pulse { animation: none; opacity: 0; }
}
@media (max-width: 860px) {
  .areas-map { right: -30%; height: 120%; opacity: 0.55; }
  .map-town { pointer-events: none; }
}

/* ------------------------------------------------------------
   Clarity Report progress page
   ------------------------------------------------------------ */
.audit-progress { max-width: 560px; }
.progress-track {
  height: 8px;
  border-radius: 5px;
  background: rgba(0, 8, 135, 0.1);
  overflow: hidden;
  margin-bottom: 1.6rem;
}
.progress-fill {
  height: 100%;
  width: 40%;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--navy), var(--azure), var(--sky));
  animation: progress-sweep 1.6s ease-in-out infinite;
}
@keyframes progress-sweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}
@media (prefers-reduced-motion: reduce) {
  .progress-fill { animation: none; width: 100%; opacity: 0.5; }
}
.progress-stages { list-style: none; display: grid; gap: 0.55rem; margin-bottom: 1.4rem; }
.progress-stage {
  color: var(--muted);
  opacity: 0.45;
  transition: opacity 0.4s;
  padding-left: 1.6rem;
  position: relative;
}
.progress-stage::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 0.7em;
  height: 0.7em;
  border-radius: 50%;
  border: 2px solid currentColor;
}
.progress-stage.is-active { opacity: 1; color: var(--navy); font-weight: 600; }
.progress-stage.is-active::before { background: var(--azure); border-color: var(--azure); }
.progress-note { color: var(--muted); font-size: 0.92rem; }
.progress-error a { font-weight: 700; }

/* ------------------------------------------------------------
   Cookie consent banner
   ------------------------------------------------------------ */
/* The hidden attribute must beat our display declarations below */
.cookie-banner[hidden],
.cookie-prefs[hidden],
.cookie-actions [hidden] { display: none !important; }

.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 90;
  display: flex;
  justify-content: center;
}
.cookie-banner-inner {
  background: var(--navy-deep);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.55);
  padding: 1.4rem 1.6rem;
  max-width: 720px;
  width: 100%;
}
.cookie-banner h2 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.cookie-banner p { color: var(--on-navy-muted); font-size: 0.92rem; margin-bottom: 1rem; }
.cookie-banner a { color: var(--sky); }
.cookie-prefs { display: grid; gap: 0.5rem; margin-bottom: 1rem; }
.cookie-pref { display: flex; align-items: center; gap: 0.6rem; font-size: 0.92rem; }
.cookie-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.cookie-actions .btn { padding: 0.7rem 1.3rem; font-size: 0.9rem; }

@media (max-width: 700px) {
  .cookie-banner { left: 0.6rem; right: 0.6rem; bottom: 0.6rem; }
  .cookie-banner-inner { padding: 1rem 1.1rem; }
  .cookie-banner h2 { font-size: 0.98rem; }
  .cookie-banner p { font-size: 0.85rem; margin-bottom: 0.8rem; }
  .cookie-actions { gap: 0.5rem; }
  .cookie-actions .btn {
    flex: 1 1 40%;
    padding: 0.65rem 0.6rem;
    font-size: 0.86rem;
    text-align: center;
    white-space: nowrap;
  }
}

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  opacity: 0.85;
}
.link-btn:hover { opacity: 1; text-decoration: underline; }

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 960px) {
  .bento, .post-grid { grid-template-columns: repeat(2, 1fr); }
  .service-row { gap: 1.2rem; }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .bento, .post-grid, .feature-grid, .process-grid, .footer-grid { grid-template-columns: 1fr; }
  .service-row { grid-template-columns: auto 1fr; padding: 1.3rem 1.4rem; }
  .service-row .card-link { grid-column: 2; justify-self: start; }

  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 2.2rem;
    background: rgba(0, 5, 80, 0.97);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out), visibility 0s 0.3s;
  }
  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  }
  .site-nav a { font-size: 1.3rem; }

  /* Dropdown becomes an inline sub-list inside the fullscreen menu */
  .nav-dropdown { display: grid; justify-items: center; }
  .nav-drop-btn { font-size: 1.3rem; }
  .nav-drop-menu {
    position: static;
    transform: none;
    min-width: 0;
    display: none;
    gap: 0.2rem;
    padding: 0.6rem 0 0;
    background: transparent;
    box-shadow: none;
  }
  .nav-dropdown.is-open .nav-drop-menu {
    display: grid;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }
  .site-nav .nav-drop-menu a {
    color: var(--white);
    font-size: 1.05rem;
    opacity: 0.85;
    text-align: center;
  }
  .site-nav .nav-drop-menu a:hover { background: rgba(255, 255, 255, 0.08); }
}

/* ------------------------------------------------------------
   Reduced motion
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  #hero-canvas { display: none; }
}
