/* ==========================================================================
   Canso: site styles
   Brand tokens live in :root. Change them here to restyle the whole site.
   ========================================================================== */

:root {
  /* Brand palette */
  --brand-navy: #0b1f33;   /* Deep Navy */
  --brand-slate: #36546b;  /* Slate Blue */
  --brand-blue: #247ba0;   /* Clear Technology Blue */
  --brand-ice: #eaf3f6;    /* Pale Ice */
  --brand-white: #fafcfd;  /* Soft White */

  /* Roles (derived from the palette) */
  --ink: var(--brand-navy);        /* primary text / dark sections */
  --ink-soft: var(--brand-slate);  /* secondary text */
  --ink-muted: #5f7486;            /* tertiary text (slate, lightened) */
  --paper: var(--brand-white);     /* page background */
  --paper-tint: var(--brand-ice);  /* alternate section background */
  --line: #d3e2e8;                 /* borders (ice, deepened) */
  --white: #ffffff;
  --accent: var(--brand-blue);     /* highlight: the "AI" layer */
  --accent-deep: #1e6a8c;          /* blue, darkened for small text on light bg */
  --accent-light: #7fbdd8;         /* blue, lightened for text on navy */
  --on-dark-soft: #b4c6d3;         /* body text on navy */
  --slate-1: var(--brand-navy);    /* foundation stack, bottom → top */
  --slate-2: #1d3a53;
  --slate-3: var(--brand-slate);
  --slate-4: #6a889c;

  /* Type */
  /* Brand type: DM Sans throughout. H1 Bold, H2 SemiBold, H3 Medium, body Regular. */
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: var(--font-body);

  /* Layout */
  --container: 1360px;
  --gutter: clamp(16px, 4vw, 56px);
  --radius: 14px;
  --section-pad: clamp(72px, 10vw, 128px);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-soft);           /* body copy: Slate Blue */
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--heading-color, var(--ink)); /* headings: Deep Navy */
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 5.4vw, 4.25rem); font-weight: 700; line-height: 1.06; letter-spacing: -0.022em; }
h2 { font-size: clamp(2.1rem, 3.8vw, 3.1rem); font-weight: 600; }

/* Accent words inside headings */
.hl { color: var(--accent); }
h3 { font-size: 1.3rem; font-weight: 500; letter-spacing: -0.01em; }

p { margin: 0; text-wrap: pretty; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--ink);
  color: var(--white);
  padding: 8px 14px;
  border-radius: 6px;
  z-index: 100;
}
.skip-link:focus { left: 8px; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 18px;
}
.eyebrow::after { order: 2; margin-left: -0.14em; } /* offset trailing letter-spacing so both gaps match */
.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  flex: none;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  font: 600 0.95rem/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn:active { transform: translateY(1px); }

.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }

.btn-small { padding: 10px 18px; font-size: 0.875rem; }
.btn-block { width: 100%; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  /* Frosted Pale Ice glass with a faint Technology Blue wash */
  background:
    linear-gradient(90deg, rgba(36, 123, 160, 0.08), rgba(36, 123, 160, 0) 45%, rgba(36, 123, 160, 0.08)),
    rgba(234, 243, 246, 0.86);
  backdrop-filter: saturate(1.6) blur(16px);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid rgba(54, 84, 107, 0.10);
  transition: background-color .25s, box-shadow .25s;
}
/* Brand gradient rule along the bottom edge, shown once the page scrolls */
.site-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-navy), var(--brand-slate) 35%, var(--brand-blue) 70%, var(--accent-light));
  opacity: 0;
  transition: opacity .25s;
}
.site-header.is-scrolled { box-shadow: 0 6px 24px -12px rgba(11, 31, 51, 0.25); }
.site-header.is-scrolled::after { opacity: 1; }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 44px; width: auto; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-menu a:not(.btn) {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color .2s;
}
.nav-menu a:not(.btn):hover { color: var(--ink); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 11px;
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform .25s, top .25s;
}
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 25px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(64px, 9vw, 112px); overflow: hidden; }

/* Copy across the top; the Canso model sits below in its own tinted band */
.hero-grid { display: grid; gap: clamp(48px, 7vw, 80px); }
.hero-copy { max-width: 820px; }

.stack-band {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 8px clamp(32px, 4vw, 56px);
  align-items: center;
  background: var(--brand-ice);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(28px, 4vw, 48px);
}
.band-head { grid-column: 1 / -1; margin-bottom: 16px; }
.band-head .eyebrow { margin-bottom: 8px; }
.band-title { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.hero-visual { min-width: 0; }
.layer-details { min-width: 0; display: grid; gap: 14px; }

.lede {
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  line-height: 1.55;
  color: var(--ink-soft);
  margin-top: 24px;
  max-width: 34em;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* Layer explorer (hero): floating isometric stack + detail panels */

.layers-hint {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-align: center;
}
.hint-tap { display: none; }
@media (hover: none) {
  .hint-hover { display: none; }
  .hint-tap { display: inline; }
}

/* Per-layer colours (also used by the panels) */
.layer-1 { --c: var(--brand-navy);  --top: #1d3a53; --side-l: #0b1f33; --side-r: #06121e; --c-text: var(--brand-navy); }
.layer-2 { --c: var(--brand-slate); --top: #36546b; --side-l: #253f54; --side-r: #1a2f40; --c-text: var(--brand-slate); }
.layer-3 { --c: var(--brand-blue);  --top: #247ba0; --side-l: #1b6587; --side-r: #124a63; --c-text: var(--accent-deep); }

.stack-svg { width: 100%; height: auto; overflow: visible; }

.connectors polyline { fill: none; stroke: var(--brand-slate); stroke-width: 1.2; stroke-dasharray: 3 4; opacity: .55; }
.connectors circle { fill: var(--paper); stroke: var(--brand-slate); stroke-width: 1.2; }

.slab { cursor: pointer; outline: none; }
.slab .top    { fill: var(--top); }
.slab .side-l { fill: var(--side-l); }
.slab .side-r { fill: var(--side-r); }
.slab .top, .slab .side-l, .slab .side-r { stroke: var(--paper); stroke-width: 1.5; stroke-linejoin: round; }
.slab .hit { fill: transparent; }

.slab-lift { transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.slab .leader { stroke: var(--ink-muted); stroke-width: 1; stroke-dasharray: 2 3; transition: stroke .25s; }
.slab .leader-dot { fill: var(--paper); stroke: var(--ink-muted); stroke-width: 1; transition: fill .25s, stroke .25s; }
.slab-n { font: 600 12px var(--font-body); letter-spacing: .12em; fill: var(--ink-muted); transition: fill .25s; }
.slab-name { font: 500 18px var(--font-body); fill: var(--ink-soft); transition: fill .25s; }

/* Hover preview + selected state */
.slab:hover .slab-name { fill: var(--ink); }
.slab[aria-selected="true"] .slab-lift { transform: translateY(-12px); }
.slab[aria-selected="true"] .leader { stroke: var(--c); stroke-dasharray: none; }
.slab[aria-selected="true"] .leader-dot { fill: var(--c); stroke: var(--c); }
.slab[aria-selected="true"] .slab-n { fill: var(--c-text); }
.slab[aria-selected="true"] .slab-name { fill: var(--ink); font-weight: 600; }
.slab:focus-visible .top { stroke: var(--accent); stroke-width: 3; }
.slab:focus-visible .slab-name { text-decoration: underline; }

/* Gentle float for the whole stack; slabs settle in on load */
@media (prefers-reduced-motion: no-preference) {
  .stack { animation: stack-float 6s ease-in-out 1.4s infinite; }
  .stack-ground { animation: ground-pulse 6s ease-in-out 1.4s infinite; transform-origin: 200px 464px; }
  .slab, .connectors { animation: settle .7s cubic-bezier(.2,.8,.2,1) backwards; }
  .connectors { animation-delay: .6s; }
  .slab.layer-1 { animation-delay: .1s; }
  .slab.layer-2 { animation-delay: .25s; }
  .slab.layer-3 { animation-delay: .4s; }
  .layer-panels { animation: settle .6s cubic-bezier(.2,.8,.2,1) .6s backwards; }
}
@keyframes settle { from { opacity: 0; transform: translateY(-20px); } }
@keyframes stack-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes ground-pulse { 0%, 100% { transform: scaleX(1); opacity: 1; } 50% { transform: scaleX(.94); opacity: .75; } }

/* Detail panels */
.layer-panels { display: grid; }
.js .layer-panels > .layer-panel { grid-area: 1 / 1; } /* overlap so height never jumps */
.layer-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: inset 0 4px 0 var(--c);
  padding: 24px 26px 26px;
  margin-bottom: 16px;
  transition: opacity .3s ease, transform .3s ease, visibility .3s;
}
.js .layer-panel { margin-bottom: 0; }
.js .layer-panel:not(.is-active) { opacity: 0; visibility: hidden; transform: translateY(6px); }

.panel-kicker {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-text);
}
.panel-title { font-size: 1.5rem; font-weight: 500; margin-top: 6px; }
@media (min-width: 861px) {
  .layer-panel { padding: 30px 32px; }
  .panel-title { font-size: 1.75rem; }
  .layers-hint { text-align: left; }
}
.panel-summary { color: var(--ink-soft); font-size: 0.98rem; margin-top: 8px; }

.panel-points {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
}
.panel-points li {
  padding-left: 14px;
  border-left: 2px solid var(--c);
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.panel-points strong {
  display: block;
  color: var(--ink);
  font-size: 0.92rem;
  margin-bottom: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .slab-lift, .layer-panel { transition: none; }
}

/* ---------- Sections ---------- */
.section { padding: var(--section-pad) 0; }
.section-tint { background: var(--paper-tint); }

.section-head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 64px); }
.section-intro { font-size: 1.18rem; line-height: 1.55; color: var(--ink-soft); margin-top: 20px; }

/* Problem */
.problem { border-top: 1px solid var(--line); padding-bottom: calc(var(--section-pad) * .5); }
.symptoms {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}
.symptoms li {
  padding: 28px 28px 8px 0;
  border-right: 1px solid var(--line);
  margin-right: 28px;
}
.symptoms li:last-child { border-right: 0; margin-right: 0; }
.symptom-n {
  display: block;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--accent);
  margin-bottom: 14px;
}
.symptoms p { font-size: 1.08rem; font-weight: 500; color: var(--ink); }

/* Services */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card:hover {
  transform: translateY(-3px);
  border-color: #b9d0da;
  box-shadow: 0 18px 40px -24px rgba(11, 31, 51, .35);
}
.card p { color: var(--ink-soft); font-size: 0.98rem; }

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--paper-tint);
  display: grid;
  place-items: center;
  margin-bottom: 6px;
}
.card-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--slate-2);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(200px, 280px) 1fr;
  align-items: center;
  column-gap: 28px;
}
.card-wide .card-icon { margin-bottom: 0; }

.card-featured {
  --heading-color: var(--white);
  grid-row: span 2;
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
  justify-content: center;
  align-items: center;
  text-align: center;
  background-image:
    radial-gradient(circle at 50% 0%, rgba(36, 123, 160, .55), transparent 50%);
}
.card-featured:hover { border-color: var(--ink); }
.card-featured h3 { font-size: 1.75rem; font-weight: 500; }
.card-featured p { color: var(--on-dark-soft); font-size: 1.05rem; max-width: 36ch; }
.card-featured .card-tag { align-self: center; }
.card-featured .card-icon { background: rgba(255,255,255,.08); }
.card-featured .card-icon svg { stroke: var(--accent-light); }
.card-tag {
  align-self: flex-start;
  margin-top: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-light);
  border: 1px solid rgba(127, 189, 216, .5);
  padding: 6px 12px;
  border-radius: 999px;
}

/* Approach (dark) */
.section-dark { background: var(--ink); color: var(--white); --heading-color: var(--white); }
.section-dark .eyebrow { color: var(--accent-light); }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  counter-reset: step;
}
.steps li { position: relative; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.18); }
.steps li::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--accent);
}
.step-n {
  display: block;
  font-size: 3rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--accent-light);
  margin-bottom: 20px;
}
.steps h3 { margin-bottom: 10px; }
.steps p { color: var(--on-dark-soft); font-size: 0.98rem; }

/* Why */
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.why-grid .section-head { margin-bottom: 0; position: sticky; top: 120px; }
.principles { margin: 0; display: grid; gap: 0; }
.principles > div { padding: 28px 0; border-bottom: 1px solid var(--line); }
.principles > div:first-child { padding-top: 0; }
.principles dt {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 500;
  margin-bottom: 8px;
}
.principles dd { margin: 0; color: var(--ink-soft); }

/* Team: disciplines + industries */
.disciplines {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.discipline {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}
/* Accent rule along the top, stepping through the brand colours */
.discipline::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--accent);
}
.discipline:nth-child(1)::before { background: var(--brand-navy); }
.discipline:nth-child(2)::before { background: #23394f; }
.discipline:nth-child(3)::before { background: var(--brand-slate); }
.discipline:nth-child(4)::before { background: #2d678a; }
.discipline .card-icon { margin-bottom: 4px; }
.discipline h3 { font-size: 1.12rem; }
.discipline p { margin: 0; color: var(--ink-soft); font-size: 0.93rem; }

.industries {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}
.industries p {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.industries ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.industries li {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
}
@media (max-width: 1100px) { .disciplines { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .disciplines { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .disciplines { grid-template-columns: 1fr; } }

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

/* Success stories */
.stories { display: grid; gap: 24px; }
.story {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(22px, 3vw, 36px);
  box-shadow: 0 20px 40px -32px rgba(11, 31, 51, .3);
  display: grid; gap: 28px;
}
.story-head { display: grid; grid-template-columns: 1fr auto; gap: 24px 48px; align-items: end; }
.story-tag { margin: 0 0 10px; font-size: 0.72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-deep); }
.story-head h3 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); font-weight: 600; max-width: 28ch; }
.story-metrics { margin: 0; display: flex; gap: 12px; }
.story-metrics div {
  min-width: 150px;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--brand-navy);
  background-image: radial-gradient(circle at 100% 0%, rgba(36, 123, 160, .55), transparent 60%);
  color: var(--white);
  display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 4px;
}
.story-metrics div { container-type: inline-size; }
/* Number shrinks with its tile so it always fits on one line */
.story-metrics dd { margin: 0; font-size: 1.5rem; font-size: clamp(1.1rem, 17cqi, 2rem); font-weight: 700; line-height: 1; letter-spacing: -.02em; white-space: nowrap; }
.story-metrics dt { font-size: 0.8rem; color: var(--on-dark-soft); max-width: 18ch; }

/* Four-metric variant: metrics sit on their own row under the headline */
.story-head-stacked { grid-template-columns: 1fr; }
.story-head-stacked h3 { max-width: 40ch; }
.story-head-stacked .story-metrics { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; } /* one row, however many tiles */
.story-head-stacked .story-metrics div { min-width: 0; }
@media (max-width: 700px) { .story-head-stacked .story-metrics { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); } }

.story-body { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.story-step { padding: 22px 24px 4px 0; }
.story-step + .story-step { padding-left: 24px; border-left: 1px solid var(--line); }
.story-step p { margin: 0; color: var(--ink-soft); }
.story-step .story-label { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-weight: 600; color: var(--ink); }
.story-label span {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px;
  font-size: 0.75rem; font-weight: 700; color: var(--white); background: var(--brand-slate);
}
.story-step:nth-child(1) .story-label span { background: var(--brand-navy); }
.story-step:nth-child(3) .story-label span { background: var(--brand-blue); }

.story-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px;
  padding-top: 20px; border-top: 1px solid var(--line);
}
.story-quote { margin: 0; flex: 1 1 380px; font-style: italic; color: var(--ink); }
.story-quote cite { display: block; margin-top: 4px; font-style: normal; font-size: 0.85rem; color: var(--ink-muted); }
.story-tech { display: flex; align-items: center; gap: 12px; }
.story-tech p { margin: 0; white-space: nowrap; font-size: 0.72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); }
.story-tech ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.story-tech li {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 0.82rem; font-weight: 500; color: var(--ink); background: var(--paper);
}
.story-tech img { width: 18px; height: 18px; object-fit: contain; }

@media (max-width: 900px) {
  .story-head { grid-template-columns: 1fr; }
  .story-body { grid-template-columns: 1fr; }
  .story-step, .story-step + .story-step { padding: 18px 0 0; border-left: 0; }
  .story-step + .story-step { border-top: 1px solid var(--line); margin-top: 18px; }
}
@media (max-width: 480px) {
  .story-metrics div { flex: 1; min-width: 0; padding: 12px 14px; }
  .story-tech { flex-direction: column; align-items: flex-start; }
}

/* Funding support */
.funding { border-top: 1px solid var(--line); }
.funds { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.fund {
  display: flex; flex-direction: column; gap: 8px;
  padding: 22px 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand-blue);
  border-radius: var(--radius);
}
.fund-tag { margin: 0; font-size: 0.7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-deep); }
.fund h3 { font-size: 1.08rem; font-weight: 600; line-height: 1.3; }
.fund p:not(.fund-tag) { margin: 0 0 8px; font-size: 0.92rem; color: var(--ink-soft); }
.fund { position: relative; transition: transform .2s, box-shadow .2s, border-color .2s; }
.fund:hover { transform: translateY(-3px); border-color: #b9d0da; box-shadow: 0 14px 28px -18px rgba(11, 31, 51, .35); }
.fund a {
  margin-top: auto;
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  border: 1.5px solid var(--brand-navy);
  border-radius: 999px;
  background: var(--white);
  font-weight: 600; font-size: 0.88rem; line-height: 1; color: var(--brand-navy); text-decoration: none;
  transition: background-color .2s, color .2s;
}
/* whole card is clickable */
.fund a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.fund:hover a, .fund a:focus-visible { background: var(--brand-navy); color: var(--white); }
.fund a:focus-visible { outline: 3px solid var(--accent-light); outline-offset: 2px; }
.fund a svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.funding-note { margin: 20px 0 0; font-size: 0.85rem; color: var(--ink-muted); }
@media (max-width: 1100px) { .funds { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .funds { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .funds { grid-template-columns: 1fr; } }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.contact-direct { margin-top: 28px; color: var(--ink-soft); }
.contact-direct a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }

.contact-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 40px);
  display: grid;
  gap: 20px;
}
.field { display: grid; gap: 8px; }
.field label { font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus,
.field textarea:focus {
  outline: none;
  background: var(--white);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(36, 123, 160, .2);
}
.field.has-error input,
.field.has-error textarea { border-color: #b3261e; }

.form-status { font-size: 0.95rem; min-height: 1.4em; color: var(--ink-soft); }
.form-status.is-error { color: #b3261e; }
.form-status.is-success { color: #2e6b3a; }

/* Footer */
.site-footer {
  background: var(--ink);
  color: var(--on-dark-soft);
  padding: 48px 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}
.brand-footer { max-width: 100%; }
.brand-footer img { height: auto; width: 301px; max-width: 100%; }
.footer-tag { font-family: var(--font-display); font-style: italic; font-size: 1.1rem; }
.footer-copy { font-size: 0.875rem; }
.footer-copy a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.footer-copy a:hover { color: var(--white); }
.footer-sep { margin: 0 6px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status a { color: inherit; text-decoration: underline; }
.form-note { margin: -4px 0 0; text-align: center; font-size: 0.82rem; color: var(--ink-muted); }
.form-note a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Legal pages (privacy policy) */
.legal-inner { max-width: 760px; }
.legal h1 { font-size: clamp(2.2rem, 4.4vw, 3.2rem); margin-bottom: 8px; }
.legal h2 { font-size: clamp(1.35rem, 2.2vw, 1.6rem); margin: 40px 0 12px; }
.legal h3 { font-size: 1.1rem; margin: 24px 0 8px; }
.legal p, .legal li { line-height: 1.7; max-width: 70ch; }
.legal p { margin: 0 0 14px; }
.legal ul { margin: 0 0 16px; padding-left: 1.25rem; display: grid; gap: 8px; }
.legal a { color: var(--brand-blue); text-decoration: underline; text-underline-offset: 3px; }
.legal-updated { color: var(--ink-muted); font-size: 0.92rem; margin-bottom: 28px !important; }

/* Reveal-on-scroll (enabled by JS so content is visible without it) */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}

/* ---------- Solutions: architecture diagram (generated section; see brand-source/build_solutions.py) ---------- */
.arch {
  --link: 40px;
  display: grid;
  grid-template-columns: 1fr var(--link) 1fr var(--link) 1.08fr var(--link) 1fr var(--link) 1fr;
  grid-template-rows: auto 1fr auto;
  row-gap: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(20px, 3vw, 36px);
  box-shadow: 0 24px 48px -32px rgba(11, 31, 51, .25);
}

/* Bands above the lanes map the diagram onto the Canso model */
.arch-band {
  margin: 0;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--k);
  font-size: 0.72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--k-text, var(--k));
  text-align: center;
}
.arch-band-src { --k: #b9cbd6; --k-text: var(--ink-muted); grid-column: 1; }
.arch-band-fdn { --k: var(--brand-navy); grid-column: 3 / 8; }
.arch-band-use { --k: var(--brand-blue); --k-text: var(--accent-deep); grid-column: 9; }

.lane {
  grid-row: 2;
  min-width: 0;
  display: flex; flex-direction: column; gap: 12px;
  padding: 16px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--paper);
}
.lane-title { margin: 0; font-size: 1.05rem; font-weight: 600; text-align: center; }
.lane-src { background: var(--white); border-style: dashed; border-top: 4px solid #cfdbe3; }
.lane-fdn { border-top: 4px solid var(--brand-navy); }
.lane-use { border-top: 4px solid var(--brand-blue); background: linear-gradient(180deg, rgba(36, 123, 160, .07), rgba(36, 123, 160, 0) 60%), var(--paper); }
.lane-hub { border-color: var(--brand-blue); border-top-color: var(--brand-navy); box-shadow: 0 0 0 4px rgba(36, 123, 160, .1), 0 12px 28px -12px rgba(36, 123, 160, .45); }

.lane-tools { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lane-tools li {
  display: flex; align-items: center; gap: 10px;
  min-width: 0;
  padding: 7px 10px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 0.84rem; font-weight: 500; line-height: 1.2; color: var(--ink);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.lane-tools li:hover { transform: translateX(2px); border-color: #b9d0da; box-shadow: 0 6px 14px -10px rgba(11, 31, 51, .3); }
.lane-note { margin: 2px 0 0; padding: 10px 8px 0; border-top: 1px dashed var(--line); font-size: 0.82rem; font-weight: 500; line-height: 1.4; text-align: center; color: var(--accent-deep); }
.lane-tools img { flex: none; width: 22px; height: 22px; object-fit: contain; }
.lane-tools span { min-width: 0; }

/* Animated connector between lanes */
.lane-link { grid-row: 2; position: relative; align-self: center; height: 14px; }
.lane-link span {
  position: absolute; left: 4px; right: 10px; top: 50%; height: 3px; transform: translateY(-50%);
  background: repeating-linear-gradient(90deg, var(--brand-slate) 0 4px, transparent 4px 10px);
  border-radius: 2px;
}
.lane-link::after {
  content: ""; position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  border: 6px solid transparent; border-left: 9px solid var(--brand-slate); border-right: 0;
}

.arch-gov {
  grid-row: 3; grid-column: 3 / -1;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px;
  padding: 16px 22px;
  border-radius: 14px;
  background: var(--brand-slate);
  color: var(--white);
}
.arch-gov-title { margin: 0; font-size: 0.72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--white); }
.arch-gov-title span { display: block; margin-top: 2px; font-weight: 500; letter-spacing: .04em; text-transform: none; color: var(--on-dark-soft); font-size: 0.78rem; }
.arch-gov ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.arch-gov li { display: inline-flex; align-items: center; gap: 8px; font-size: 0.86rem; font-weight: 500; }
.arch-gov img { width: 20px; height: 20px; filter: brightness(0) invert(1); opacity: .9; }

@media (prefers-reduced-motion: no-preference) {
  .lane-link span { animation: arch-flow 1.2s linear infinite; }
  .lane-hub { animation: arch-pulse 3.2s ease-in-out infinite; }
}
@keyframes arch-flow { from { background-position: 0 0; } to { background-position: 20px 0; } }
@keyframes arch-pulse { 50% { box-shadow: 0 0 0 6px rgba(36, 123, 160, .16), 0 14px 34px -10px rgba(36, 123, 160, .6); } }

@media (min-width: 1101px) and (max-width: 1320px) {
  .arch { --link: 28px; padding: 22px; }
  .lane { padding: 14px 10px; }
  .lane-tools li { gap: 8px; padding: 7px 8px; font-size: 0.78rem; }
  .lane-tools img { width: 18px; height: 18px; }
}

/* Narrower screens: lanes stack top to bottom, arrows point down */
@media (max-width: 1100px) {
  .arch { grid-template-columns: 1fr; grid-template-rows: none; row-gap: 0; }
  .arch-band { display: none; }
  .lane, .lane-link, .arch-gov { grid-row: auto; grid-column: 1; }
  .lane-tools { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .lane-title { text-align: left; }
  .lane-link { height: 34px; width: 14px; justify-self: center; }
  .lane-link span {
    left: 50%; right: auto; top: 2px; bottom: 9px; width: 3px; height: auto; transform: translateX(-50%);
    background: repeating-linear-gradient(180deg, var(--brand-slate) 0 4px, transparent 4px 10px);
  }
  .lane-link::after { right: auto; left: 50%; top: auto; bottom: 0; transform: translateX(-50%); border: 6px solid transparent; border-top: 9px solid var(--brand-slate); border-bottom: 0; }
  .arch-gov { margin-top: 18px; }
  @keyframes arch-flow { from { background-position: 0 0; } to { background-position: 0 20px; } }
}
@media (max-width: 480px) {
  .lane-tools { grid-template-columns: repeat(2, 1fr); }
  .lane-tools li { padding: 7px 8px; gap: 8px; font-size: 0.8rem; }
}
/* ---------- end Solutions ---------- */

/* ---------- Responsive ---------- */
/* Full nav needs ~1080px with the Canso logo; below that it collapses to the menu button. */
@media (min-width: 1081px) and (max-width: 1240px) {
  .nav-menu { gap: 22px; }
  .nav-menu a:not(.btn) { font-size: 0.92rem; }
}
@media (max-width: 1080px) {
  .nav-toggle { display: block; }
  .nav-menu {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 24px;
    background: rgba(234, 243, 246, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-menu.is-open { display: flex; }
  .nav-menu a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav-menu .btn { margin-top: 20px; }
}
@media (max-width: 1000px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .card-featured { grid-row: auto; grid-column: span 2; }
  .symptoms { grid-template-columns: repeat(2, 1fr); }
  .symptoms li:nth-child(2) { border-right: 0; margin-right: 0; }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 48px; }
}

@media (max-width: 860px) {

  .stack-band { grid-template-columns: 1fr; padding: 24px 20px; border-radius: 18px; }

  .why-grid,
  .contact-grid { grid-template-columns: 1fr; }
  .why-grid .section-head { position: static; margin-bottom: 8px; }

}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .cards { grid-template-columns: 1fr; }
  .card-featured { grid-column: auto; }
  .card-wide { display: flex; }
  .symptoms { grid-template-columns: 1fr; }
  .symptoms li { border-right: 0; margin-right: 0; border-bottom: 1px solid var(--line); padding: 22px 0; }
  .symptoms li:last-child { border-bottom: 0; }
  .steps { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 100%; }
  .slab-name { font-size: 20px; }
  .slab-n { font-size: 14px; }
  .panel-points { grid-template-columns: 1fr; }
  .layer-panel { padding: 20px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
