:root {
  --paper: #fbf7ef;
  --paper-deep: #f0eadf;
  --ink: #243c4b;
  --muted: #5a6d77;
  --blue: #0e4d71;
  --blue-soft: #356b88;
  --line: #d9d1c3;
  --line-blue: #8fa9b7;
  --white: #fffdfa;
  --max: 1240px;
  --header: 76px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Trebuchet MS", "DejaVu Sans", Arial, sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

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

.skip-link {
  position: fixed;
  left: 16px;
  top: 14px;
  z-index: 30;
  transform: translateY(-160%);
  padding: 10px 14px;
  background: var(--blue);
  color: white;
}

.skip-link:focus {
  transform: translateY(0);
}

.masthead {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  height: var(--header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(18px, 4vw, 64px);
  background: rgba(251, 247, 239, 0.9);
  border-bottom: 1px solid rgba(14, 77, 113, 0.14);
  backdrop-filter: blur(18px);
  transition: box-shadow 160ms ease, background 160ms ease;
}

.masthead.is-scrolled {
  background: rgba(251, 247, 239, 0.96);
  box-shadow: 0 14px 30px rgba(14, 77, 113, 0.08);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--blue);
  text-decoration: none;
  font-weight: 800;
  line-height: 1.1;
}

.wordmark-symbol {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 2px solid var(--blue);
  border-radius: 50%;
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 900;
}

.wordmark-symbol::before,
.wordmark-symbol::after {
  content: "";
  position: absolute;
  border: 1.5px solid currentColor;
  border-left: 0;
  border-right: 0;
  border-radius: 50%;
  opacity: 0.92;
}

.wordmark-symbol::before {
  width: 18px;
  height: 30px;
  transform: rotate(33deg);
}

.wordmark-symbol::after {
  width: 18px;
  height: 30px;
  transform: rotate(-33deg);
}

.wordmark-symbol {
  background:
    radial-gradient(circle at 50% 25%, currentColor 0 2px, transparent 2.5px),
    radial-gradient(circle at 50% 75%, currentColor 0 2px, transparent 2.5px),
    var(--paper);
}

.wordmark-symbol span {
  display: none;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 34px);
  color: var(--blue);
  font-size: 0.9rem;
  font-weight: 800;
}

.primary-nav a {
  position: relative;
  text-decoration: none;
  opacity: 0.72;
}

.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 160ms ease;
}

.primary-nav a:hover,
.primary-nav a.is-active {
  opacity: 1;
}

.primary-nav a:hover::after,
.primary-nav a.is-active::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--blue);
  background: transparent;
  color: var(--blue);
  padding: 10px 12px;
  font: inherit;
  font-weight: 800;
}

.nav-toggle span {
  width: 4px;
  height: 4px;
  background: currentColor;
}

.nav-toggle em {
  margin-left: 5px;
  font-style: normal;
}

.section-rail {
  position: fixed;
  left: clamp(14px, 2vw, 28px);
  top: 50%;
  z-index: 12;
  display: grid;
  gap: 13px;
  transform: translateY(-50%);
}

.section-rail a {
  position: relative;
  width: 14px;
  height: 14px;
  border: 1px solid var(--line-blue);
  background: var(--paper);
}

.section-rail a span {
  position: absolute;
  inset: 3px;
  background: transparent;
  transition: background 160ms ease;
}

.section-rail a.is-active span,
.section-rail a:hover span {
  background: var(--blue);
}

.section-rail a::after {
  content: attr(data-label);
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.section-rail a:hover::after {
  opacity: 1;
}

.panel {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(76px, 9vw, 132px) clamp(24px, 5vw, 54px);
  border-top: 1px solid rgba(14, 77, 113, 0.12);
}

.hero {
  max-width: none;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
  padding: var(--header) 0 0;
  border-top: 0;
}

.hero-content {
  align-self: center;
  max-width: 900px;
  padding: clamp(44px, 7vw, 96px) clamp(24px, 6vw, 92px);
}

.kicker {
  margin: 0 0 18px;
  color: var(--blue-soft);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--blue);
  line-height: 1.12;
  letter-spacing: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 28px;
  font-size: clamp(3.2rem, 6.1vw, 6.5rem);
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4.2vw, 4.8rem);
}

h3 {
  margin-bottom: 14px;
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.hero-content > p:not(.kicker) {
  max-width: 720px;
  margin-bottom: 42px;
  color: #304855;
  font-size: clamp(1.08rem, 1.55vw, 1.45rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--blue-soft);
  padding: 12px 22px;
  text-decoration: none;
  font-weight: 900;
  line-height: 1.15;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 28px rgba(14, 77, 113, 0.14);
}

.button-primary {
  background: var(--blue-soft);
  color: white;
}

.button-secondary {
  color: var(--blue-soft);
}

.hero-media {
  position: relative;
  min-height: calc(100svh - var(--header));
  overflow: hidden;
  background: var(--blue);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.95);
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 77, 113, 0.04), rgba(14, 77, 113, 0.26));
}

.system-map {
  position: absolute;
  right: clamp(18px, 3vw, 44px);
  bottom: clamp(18px, 4vw, 54px);
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  border: 1px solid rgba(255, 255, 255, 0.64);
  background: rgba(14, 77, 113, 0.76);
  color: white;
  backdrop-filter: blur(10px);
}

.system-map span {
  padding: 14px 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.34);
  border-bottom: 1px solid rgba(255, 255, 255, 0.34);
  font-size: 0.83rem;
  font-weight: 900;
}

.system-map span:nth-child(even) {
  border-right: 0;
}

.system-map span:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.panel-heading {
  max-width: 1120px;
  margin-bottom: clamp(34px, 6vw, 70px);
}

.panel-heading h2 {
  max-width: 1120px;
}

.split-copy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(34px, 7vw, 92px);
}

.copy-unit p,
.advisor-note,
.sector-row p,
.impact-item p,
.contact-main p {
  font-size: clamp(1.03rem, 1.4vw, 1.22rem);
}

.advisor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
}

.proof-cell {
  min-height: 270px;
  padding: clamp(24px, 3vw, 38px);
  background: var(--paper-deep);
  border-right: 1px solid var(--line);
}

.proof-cell:last-child {
  border-right: 0;
}

.proof-cell span {
  display: block;
  margin-bottom: 34px;
  color: var(--blue-soft);
  font-size: 0.85rem;
  font-weight: 900;
}

.advisor-note {
  max-width: 1120px;
  margin: 36px 0 0;
}

.service-architecture {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) minmax(0, 0.58fr);
  border: 2px solid var(--line);
  background: rgba(255, 255, 255, 0.18);
}

.service-index {
  display: grid;
  border-right: 2px solid var(--line);
}

.service-button {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(240, 234, 223, 0.62);
  color: var(--ink);
  padding: 22px;
  font: inherit;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.service-button:last-child {
  border-bottom: 0;
}

.service-button span {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid currentColor;
}

.service-button.is-active,
.service-button:hover {
  background: var(--blue-soft);
  color: white;
}

.service-detail {
  position: relative;
  min-height: 500px;
  padding: clamp(28px, 5vw, 56px);
}

.service-number {
  position: absolute;
  right: clamp(20px, 4vw, 50px);
  top: clamp(18px, 3vw, 38px);
  color: rgba(14, 77, 113, 0.08);
  font-size: clamp(5rem, 12vw, 10rem);
  font-weight: 900;
  line-height: 0.8;
}

.service-copy {
  position: relative;
  max-width: 700px;
  animation: rise 180ms ease both;
}

.service-copy p,
.service-copy li {
  font-size: clamp(1rem, 1.35vw, 1.17rem);
}

.service-copy ul {
  margin: 24px 0 0;
  padding-left: 22px;
}

.service-copy li + li {
  margin-top: 10px;
}

.sector-matrix {
  border-top: 2px solid var(--blue-soft);
}

.sector-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.28fr) minmax(220px, 0.34fr) minmax(0, 0.38fr);
  gap: 28px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.sector-row span {
  color: var(--blue-soft);
  font-weight: 900;
}

.sector-row h3,
.sector-row p {
  margin-bottom: 0;
}

.metric-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: clamp(44px, 7vw, 76px);
  border-block: 2px solid var(--line);
}

.metric-band div {
  padding: clamp(28px, 5vw, 54px) 24px;
  text-align: center;
  border-right: 1px solid var(--line);
}

.metric-band div:last-child {
  border-right: 0;
}

.metric-band strong,
.metric-band sup {
  color: var(--ink);
  font-size: clamp(4rem, 8vw, 7.5rem);
  line-height: 0.9;
}

.metric-band sup {
  font-size: clamp(2rem, 4vw, 4rem);
}

.metric-band span {
  display: block;
  margin-top: 16px;
  color: var(--blue);
  font-size: clamp(1rem, 1.7vw, 1.45rem);
  font-weight: 900;
}

.impact-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px 44px;
}

.impact-item {
  padding-top: 18px;
  border-top: 3px solid var(--blue-soft);
}

.impact-item span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.quote-system {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}

.quote-block {
  position: relative;
  margin: 0;
  padding: clamp(28px, 4vw, 48px);
  border: 2px solid var(--line);
}

.quote-block::before,
.quote-block::after {
  position: absolute;
  color: var(--blue-soft);
  font-size: 5rem;
  font-weight: 900;
  line-height: 1;
}

.quote-block::before {
  content: "“";
  left: -14px;
  top: -34px;
}

.quote-block::after {
  content: "”";
  right: -14px;
  bottom: -58px;
}

blockquote {
  margin: 0 0 24px;
  padding-left: 24px;
  border-left: 3px solid var(--blue-soft);
  font-size: clamp(1.05rem, 1.45vw, 1.25rem);
}

figcaption {
  padding-left: 24px;
  font-weight: 900;
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
  gap: clamp(42px, 8vw, 96px);
}

.contact-main h2 {
  margin-bottom: 28px;
}

.contact-main p {
  max-width: 800px;
  margin-bottom: 34px;
}

.contact-options {
  display: grid;
  align-content: center;
  gap: 16px;
}

.contact-options a {
  display: block;
  padding: 22px;
  background: var(--blue-soft);
  color: white;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease;
}

.contact-options a:nth-child(2) {
  background: #4e7891;
}

.contact-options a:nth-child(3) {
  background: #66899d;
}

.contact-options a:hover {
  background: var(--blue);
  transform: translateX(7px);
}

.contact-options span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.contact-dialog {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(36, 60, 75, 0.42);
  backdrop-filter: blur(8px);
}

.contact-dialog[hidden] {
  display: none;
}

.contact-dialog-panel {
  position: relative;
  width: min(560px, 100%);
  padding: clamp(28px, 5vw, 46px);
  background: var(--paper);
  border: 2px solid var(--line-blue);
  box-shadow: 0 24px 70px rgba(14, 77, 113, 0.2);
}

.contact-dialog-panel h2 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.dialog-close {
  position: absolute;
  right: 14px;
  top: 14px;
  border: 1px solid var(--blue);
  background: transparent;
  color: var(--blue);
  padding: 8px 10px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}

.email-copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 24px 0;
  border: 1px solid var(--line);
  background: var(--white);
  padding: 12px;
}

.email-copy-row strong {
  overflow-wrap: anywhere;
  color: var(--blue);
}

.email-copy-row button {
  border: 0;
  background: var(--blue-soft);
  color: white;
  padding: 10px 14px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(54px, 8vw, 90px) clamp(24px, 5vw, 54px);
  border-top: 3px solid var(--line-blue);
  color: var(--ink);
}

.footer h2 {
  font-size: clamp(1.4rem, 2vw, 2rem);
}

.footer > p {
  margin-top: 34px;
  padding-top: 24px;
  border-top: 3px solid var(--line-blue);
  font-size: 0.95rem;
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 1020px) {
  :root {
    --header: 66px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .primary-nav {
    position: fixed;
    inset: var(--header) 0 auto;
    display: grid;
    gap: 0;
    padding: 10px 20px 22px;
    background: rgba(251, 247, 239, 0.98);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 42px rgba(14, 77, 113, 0.12);
    transform: translateY(-125%);
    transition: transform 180ms ease;
  }

  .primary-nav.is-open {
    transform: translateY(0);
  }

  .primary-nav a {
    padding: 14px 0;
  }

  .section-rail {
    display: none;
  }

  .hero,
  .split-copy,
  .advisor-grid,
  .service-architecture,
  .metric-band,
  .quote-system,
  .contact {
    grid-template-columns: 1fr;
  }

  .hero-media {
    min-height: 52svh;
  }

  .proof-cell {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .proof-cell:last-child {
    border-bottom: 0;
  }

  .service-index {
    border-right: 0;
    border-bottom: 2px solid var(--line);
  }

  .service-detail {
    min-height: auto;
  }

  .sector-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .metric-band div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metric-band div:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 640px) {
  .wordmark span:last-child {
    max-width: 190px;
  }

  .hero-content,
  .panel,
  .footer {
    padding-inline: 18px;
  }

  h1 {
    font-size: clamp(2.55rem, 13vw, 3.8rem);
  }

  h2 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .button {
    width: 100%;
  }

  .system-map {
    left: 18px;
    right: 18px;
    grid-template-columns: 1fr 1fr;
  }

  .impact-list {
    grid-template-columns: 1fr;
  }

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

/* Consultation page */
.nav-cta { border: 1px solid currentColor; padding: 10px 14px !important; }
.consultation-page { background: var(--cream); }
.consultation-main { min-height: 100vh; padding-top: 84px; display: grid; grid-template-columns: minmax(0, .82fr) minmax(520px, 1.18fr); }
.consultation-intro, .consultation-form-wrap { padding: clamp(56px, 7vw, 112px) clamp(24px, 6vw, 96px); }
.consultation-intro { background: var(--blue); color: #fff; position: relative; overflow: hidden; }
.consultation-intro::after { content:""; position:absolute; width:360px; height:360px; border:1px solid rgba(255,255,255,.16); border-radius:50%; right:-150px; bottom:-130px; box-shadow:0 0 0 70px rgba(255,255,255,.035),0 0 0 140px rgba(255,255,255,.025); }
.consultation-intro .kicker { color: #fff; opacity: .78; }
.consultation-intro h1 { font-size: clamp(3rem, 5.3vw, 6.4rem); max-width: 10ch; }
.consultation-lede { max-width: 62ch; font-size: 1.08rem; line-height: 1.75; }
.consultation-points { margin-top: 52px; border-top:1px solid rgba(255,255,255,.25); }
.consultation-points div { display:grid; grid-template-columns:52px 1fr; gap:16px; padding:20px 0; border-bottom:1px solid rgba(255,255,255,.25); }
.consultation-points strong { color: var(--orange); }
.privacy-note { margin-top:34px; font-size:.82rem; opacity:.72; max-width:60ch; }
.consultation-form-wrap { background:#f8f5ee; }
.form-heading { margin-bottom:36px; }
.form-heading h2 { max-width: 13ch; margin-bottom:14px; }
.consultation-form { display:grid; gap:24px; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:22px; }
.consultation-form label { display:grid; gap:9px; font-weight:700; font-size:.82rem; letter-spacing:.02em; }
.consultation-form input, .consultation-form select, .consultation-form textarea { width:100%; border:1px solid rgba(10,48,75,.3); background:#fff; color:var(--ink); padding:14px 15px; font:inherit; border-radius:0; }
.consultation-form input:focus, .consultation-form select:focus, .consultation-form textarea:focus { outline:3px solid rgba(55,162,204,.22); border-color:var(--blue); }
.full-field { grid-column:1/-1; }
.consent-row { grid-template-columns:20px 1fr !important; align-items:start; font-weight:500 !important; line-height:1.5; }
.consent-row input { width:18px; height:18px; margin-top:2px; }
.form-actions { display:flex; flex-wrap:wrap; gap:12px; margin-top:8px; }
.email-fallback { flex-basis:100%; margin:4px 0 0; font-size:.88rem; line-height:1.5; }
.email-instructions { margin:0; padding:16px 18px; border-left:4px solid var(--orange); background:rgba(255,255,255,.72); color:var(--ink); font-size:.95rem; line-height:1.6; }
.honeypot { position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }
.consultation-footer { grid-template-columns:1fr 1fr auto; }
.status-page { min-height:100vh; display:grid; place-items:center; padding:120px 24px 60px; }
.status-page section { width:min(900px,100%); border-top:2px solid var(--blue); padding-top:38px; }
.status-page h1 { max-width:14ch; color:var(--blue); }
.status-page p { max-width:65ch; font-size:1.08rem; line-height:1.7; margin-bottom:28px; }
@media (max-width: 980px) { .consultation-main { grid-template-columns:1fr; } .consultation-intro h1 { max-width:13ch; } }
@media (max-width: 640px) { .consultation-main { padding-top:72px; } .consultation-intro,.consultation-form-wrap { padding:48px 18px; } .form-grid { grid-template-columns:1fr; } .consultation-footer { grid-template-columns:1fr; } }
