@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/*
 * FCRO brand usage guide (ticket #146)
 * Charcoal      #1C1C1E — authority, clarity: headings, ink, dark hero/panel backgrounds
 * Electric Blue #1F6FEB — trust, competence: primary buttons, links, icons, nav, diagrams, hero accents
 * Crimson       #C1272D — energy, action: CTA band, primary-button hover, urgent highlights (used with intent, not decoration)
 * Gold          #D9A441 — premium value: key stat numbers and numbered markers only, used sparingly
 * Soft White / Graphite Grey / Mist Grey — neutrals: backgrounds, body text, section dividers
 * --blue-ink is a darkened Electric Blue kept at ~5.9:1 contrast for small text on light backgrounds;
 * --blue-tint is a lightened Electric Blue for text/accents on dark backgrounds (hero, panels).
 */
:root {
  /* Brand palette */
  --bg: #F7F7F5;          /* Soft White */
  --bg-alt: #E3E4E5;      /* Mist Grey */
  --bg-alt-2: #EDEEEC;    /* Soft White / Mist Grey blend, for gradients */
  --bg-rgb: 247, 247, 245;
  --surface: #FFFFFF;
  --ink: #1C1C1E;         /* Charcoal */
  --ink-muted: #3A3D40;   /* Graphite Grey */
  --ink-faint: #6B6E71;
  --ink-rgb: 28, 28, 30;
  --blue: #1F6FEB;        /* Electric Blue */
  --blue-ink: #195BC1;    /* accessible shade of Electric Blue for small text on light backgrounds */
  --blue-tint: #8FB7F5;   /* lighter Electric Blue, for text/accents on dark panels */
  --blue-rgb: 31, 111, 235;
  --crimson: #C1272D;     /* Crimson */
  --crimson-rgb: 193, 39, 45;
  --gold: #D9A441;        /* Gold — used sparingly for key numbers */
  --gold-rgb: 217, 164, 65;
  --panel-dark: #1C1C1E;  /* dark accent panels standing in for photography */
  --panel-dark-2: #3A3D40;
  --radius: 14px;
  --max: 1180px;
  --shadow: 0 20px 50px -20px rgba(28, 28, 30, 0.15);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink-muted);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 28px; }

h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.08; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); line-height: 1.15; }
h3 { font-size: 1.3rem; line-height: 1.3; }
p { color: var(--ink-muted); }
.lede { font-size: 1.2rem; color: var(--ink-muted); max-width: 640px; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-ink);
  margin-bottom: 14px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, filter 0.15s ease;
}
.btn-primary { background: var(--blue); color: var(--bg); }
.btn-primary:hover { background: var(--crimson); transform: translateY(-1px); }
.btn-ghost { border-color: rgba(var(--ink-rgb), 0.25); color: var(--ink); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-dark:hover { background: var(--ink-muted); }

/* Header */
header.site {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.08);
}
/* Blur/tint lives on a pseudo-element rather than header.site itself: backdrop-filter on
   header.site would make it the containing block for its fixed-position mobile nav.main
   child (per spec), collapsing that nav's height against the ~100px header instead of the
   viewport and clipping the mobile menu to its first item (ticket #186). */
header.site::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: rgba(var(--bg-rgb), 0.88);
  backdrop-filter: blur(10px);
}
header.site .bar { display: flex; align-items: center; justify-content: space-between; padding: 16px 28px; }
header.site .logo svg { height: 96px; width: auto; display: block; }
nav.main { display: flex; align-items: center; gap: 34px; }
nav.main a { font-size: 0.95rem; font-weight: 500; color: var(--ink-muted); transition: color 0.15s ease; }
nav.main a:hover, nav.main a.active { color: var(--ink); }
nav.main .btn { margin-left: 6px; }
nav.main .btn-primary { color: #fff; }
nav.main .btn-primary:hover { color: #fff; }
.nav-toggle { display: none; background: none; border: none; padding: 0; color: var(--ink); cursor: pointer; }
.nav-toggle svg { width: 34px; height: 34px; display: block; }
.nav-toggle .icon-close { display: none; }
.nav-toggle.open .icon-menu { display: none; }
.nav-toggle.open .icon-close { display: block; }

@media (max-width: 860px) {
  header.site .bar { justify-content: flex-start; gap: 6px; }
  /* The logo svg's viewBox has ~46px of empty canvas to the right of the wordmark
     (measured off the real Poppins metrics) — left un-clipped, that dead space reads
     as a big gap that pushes the toggle over towards the right edge (ticket #200).
     Cropping the anchor box to just past the visible wordmark pulls the icon in
     next to the logo without touching the svg markup itself. */
  header.site .logo { display: inline-block; width: 210px; overflow: hidden; }
  header.site .logo svg { height: 82px; }
  .nav-toggle { display: flex; align-items: center; justify-content: center; height: 82px; flex-shrink: 0; position: relative; top: -2px; left: -2px; }
  .nav-toggle svg { width: 42px; height: 42px; }
  nav.main { position: fixed; top: 114px; left: 0; right: 0; bottom: 0; z-index: 1000; background: var(--bg); flex-direction: column; align-items: flex-start; padding: 30px 28px; gap: 22px; transform: translateX(100%); transition: transform 0.25s ease; overflow-y: auto; border-top: 1px solid rgba(var(--ink-rgb), 0.08); }
  nav.main.open { transform: translateX(0); }
  nav.main a { font-size: 1.15rem; font-weight: 600; color: var(--ink); }
}

/* Hero */
.hero { position: relative; overflow: hidden; padding: 96px 0 100px; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.65; }
.hero .wrap, .page-hero .wrap { position: relative; z-index: 1; }
.hero-inner { max-width: 780px; }
.hero .cta-row { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 44px; margin-top: 56px; flex-wrap: wrap; }
.hero-stats div strong { display: block; font-size: 1.7rem; color: var(--gold); }
.hero-stats div span { font-size: 0.85rem; color: rgba(var(--bg-rgb), 0.75); }

/* Home hero: distinctive Sydney photo (Harbour Bridge + Opera House), with a Charcoal
   scrim so heading/lede text stays reliably legible regardless of the photo underneath. */
.hero .hero-bg {
  background:
    linear-gradient(0deg, rgba(28,28,30,0.92) 0%, rgba(28,28,30,0.84) 55%, rgba(28,28,30,0.88) 100%),
    url('/assets/img/hero-sydney.jpg') center 58% / cover no-repeat;
}
.hero .eyebrow { color: var(--blue-tint); }
.hero h1 { color: var(--bg); }
.hero .lede { color: rgba(var(--bg-rgb), 0.85); }
.hero .btn-ghost { border-color: rgba(var(--bg-rgb), 0.5); color: var(--bg); }
.hero .btn-ghost:hover { border-color: var(--blue-tint); color: var(--blue-tint); }

/* Inner-page heroes: a deliberate dark Charcoal band (not a light wash) so heading/lede
   text is always light-on-dark. Replaces the earlier light hero-bg gradient approach from
   tickets #141/#143/#145, which visually washed out and never resolved the reported
   text-contrast complaints on About/Services/Why/Contact. */
.page-hero { padding: 76px 0 64px; position: relative; overflow: hidden; }
.page-hero .hero-bg {
  background:
    radial-gradient(55% 60% at 85% 10%, rgba(var(--blue-rgb),0.22), transparent 60%),
    linear-gradient(160deg, var(--panel-dark) 0%, var(--panel-dark-2) 100%);
}
.page-hero .eyebrow { color: var(--blue-tint); }
.page-hero h1 { color: var(--bg); }
.page-hero .lede { color: rgba(var(--bg-rgb), 0.82); }
.page-hero .cta-row { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.page-hero .btn-primary, .hero .btn-primary { color: #fff; }

/* Sections */
section { padding: 88px 0; }
section.tight { padding: 64px 0; }
.section-warm { background: var(--bg-alt); color: var(--ink); }
.section-warm p { color: var(--ink-muted); }
.section-warm h2, .section-warm h3 { color: var(--ink); }
.section-charcoal { background: var(--panel-dark); color: var(--bg); }
.section-navy2 { background: var(--bg-alt); }

.split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 36px; } }
.split.reverse .col-media { order: 2; }
@media (max-width: 860px) { .split.reverse .col-media { order: 0; } }

/* Media panels stand in for photography, so they keep a deliberate dark, moody treatment against the light page */
.media-panel {
  border-radius: var(--radius);
  aspect-ratio: 4/3;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--panel-dark-2), var(--panel-dark));
  border: 1px solid rgba(var(--bg-rgb), 0.08);
}
.media-panel.teal { background: linear-gradient(135deg, var(--blue), var(--panel-dark)); }
.media-panel svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Grid / cards */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid rgba(var(--ink-rgb), 0.08);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-3px); border-color: rgba(var(--blue-rgb), 0.35); box-shadow: 0 24px 60px -20px rgba(var(--ink-rgb), 0.18); }
.card .icon { width: 46px; height: 46px; border-radius: 12px; background: rgba(var(--blue-rgb), 0.12); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.card .icon svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 10px; }
.card p { font-size: 0.96rem; }

.section-warm .card { background: var(--surface); border-color: rgba(var(--ink-rgb), 0.08); }
.card-light { background: var(--surface); color: var(--ink); }
.card-light h3 { color: var(--ink); }
.card-light p { color: var(--ink-muted); }
.card-light .num { color: var(--gold); }

.service-card { display: flex; gap: 20px; }
.service-card .num { font-size: 0.85rem; font-weight: 700; color: var(--gold); letter-spacing: 0.08em; }

.faq-list { max-width: 780px; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--surface);
  border: 1px solid rgba(var(--ink-rgb), 0.08);
  border-radius: var(--radius);
  padding: 22px 26px;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; float: right; color: var(--blue); font-weight: 700; }
.faq-item[open] summary::after { content: '\2212'; }
.faq-item p { margin-top: 14px; font-size: 0.96rem; }

/* CRO Framework diagram set (Services page) — Electric Blue line art, Gold accent node */
.diagram-card { text-align: center; }
.diagram-card .panel {
  aspect-ratio: 4/3; border-radius: var(--radius); position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--panel-dark-2), var(--panel-dark));
  margin-bottom: 16px;
}
.diagram-card .panel svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.diagram-card h4 { font-size: 0.95rem; color: var(--ink); }

/* Dot-line diagram animations — each SVG diagram gets its own distinct treatment so the ten across the site don't feel uniform */

/* Home hero — concentric rings sweep outward like a radar ping */
.diagram-anim--radar .radar-ring {
  transform-box: fill-box; transform-origin: center;
  opacity: 0;
  animation: radarRing 3.6s ease-out infinite;
}
.diagram-anim--radar .radar-ring:nth-child(1) { animation-delay: 0s; }
.diagram-anim--radar .radar-ring:nth-child(2) { animation-delay: 0.5s; }
.diagram-anim--radar .radar-ring:nth-child(3) { animation-delay: 1s; }
@keyframes radarRing {
  0% { transform: scale(0.55); opacity: 0; }
  20% { opacity: 0.6; }
  100% { transform: scale(1.08); opacity: 0; }
}
.diagram-anim--radar .radar-core {
  transform-box: fill-box; transform-origin: center;
  animation: radarCore 2.4s ease-in-out infinite;
}
@keyframes radarCore { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

/* About page — the connecting path draws itself in, dots light up as it passes.
   Plays 3 loops then holds on the finished frame; re-triggered on scroll by main.js
   toggling the .play class (see IntersectionObserver in main.js). */
.diagram-anim--trail .trail-path {
  stroke-dasharray: 460; stroke-dashoffset: 460;
}
.diagram-anim--trail.play .trail-path {
  animation: trailDraw 3.4s ease-in-out 3 forwards;
}
@keyframes trailDraw { 0% { stroke-dashoffset: 460; } 55%, 100% { stroke-dashoffset: 0; } }
.diagram-anim--trail .trail-dot {
  transform-box: fill-box; transform-origin: center;
  opacity: 0;
}
.diagram-anim--trail.play .trail-dot {
  animation: trailDotIn 3.4s ease-in-out 3 forwards;
}
@keyframes trailDotIn {
  0%, 22% { opacity: 0; transform: scale(0.4); }
  32% { opacity: 1; transform: scale(1.3); }
  42%, 100% { opacity: 1; transform: scale(1); }
}

/* Services — Revenue Architecture: bars grow up from the baseline, staggered */
.diagram-anim--bars .bar-grow {
  transform-box: fill-box; transform-origin: bottom center;
  animation: barGrow 3s ease-in-out infinite;
}
@keyframes barGrow {
  0% { transform: scaleY(0); opacity: 0; }
  30%, 85% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(0); opacity: 0; }
}
.diagram-anim--bars .bar-peak-dot {
  transform-box: fill-box; transform-origin: center;
  animation: dotPop 3s ease-in-out infinite;
  animation-delay: 0.4s;
}
@keyframes dotPop {
  0%, 25% { opacity: 0; transform: scale(0.4); }
  35% { opacity: 1; transform: scale(1.3); }
  45%, 85% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.4); }
}

/* Services — Sales Optimisation: the ascending line draws in, dots land in sequence */
.diagram-anim--ascend .ascend-path {
  stroke-dasharray: 320; stroke-dashoffset: 320;
  animation: ascendDraw 2.8s ease-in-out infinite;
}
@keyframes ascendDraw { 0% { stroke-dashoffset: 320; } 60%, 100% { stroke-dashoffset: 0; } }
.diagram-anim--ascend .ascend-dot {
  transform-box: fill-box; transform-origin: center;
  opacity: 0;
  animation: dotPop 2.8s ease-in-out infinite;
}
.diagram-anim--ascend .ascend-peak {
  transform-box: fill-box; transform-origin: center;
  animation: ascendPeak 2.8s ease-in-out infinite;
  animation-delay: 1.9s;
}
@keyframes ascendPeak {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(217, 164, 65, 0)); }
  30% { transform: scale(1.5); filter: drop-shadow(0 0 6px rgba(217, 164, 65, 0.8)); }
  60% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(217, 164, 65, 0.4)); }
}

/* Services — Pipeline Clarity: the funnel outline flows like marching ants, the dot breathes */
.diagram-anim--funnel .funnel-outline {
  stroke-dasharray: 6 5;
  animation: funnelFlow 2.4s linear infinite;
}
@keyframes funnelFlow { to { stroke-dashoffset: -110; } }
.diagram-anim--funnel .funnel-line { animation: funnelLine 3s ease-in-out infinite; }
@keyframes funnelLine { 0%, 100% { opacity: 0.15; } 50% { opacity: 0.65; } }
.diagram-anim--funnel .funnel-dot {
  transform-box: fill-box; transform-origin: center;
  animation: funnelDot 2.2s ease-in-out infinite;
}
@keyframes funnelDot {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(217, 164, 65, 0)); }
  50% { transform: scale(1.25); filter: drop-shadow(0 0 5px rgba(217, 164, 65, 0.7)); }
}

/* Services — Trust-Led Systems: a pulse travels node to node around the triangle */
.diagram-anim--network .network-node {
  transform-box: fill-box; transform-origin: center;
  animation: networkPulse 2.4s ease-in-out infinite;
}
@keyframes networkPulse {
  0%, 100% { transform: scale(1); stroke-opacity: 0.6; }
  40% { transform: scale(1.3); stroke-opacity: 1; }
}
.diagram-anim--network .network-edge { animation: networkEdge 2.4s ease-in-out infinite; }
@keyframes networkEdge { 0%, 100% { stroke-opacity: 0.4; } 40% { stroke-opacity: 0.9; } }
.diagram-anim--network .network-core {
  transform-box: fill-box; transform-origin: center;
  animation: networkCore 2.4s ease-in-out infinite;
}
@keyframes networkCore {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(217, 164, 65, 0)); }
  40% { transform: scale(1.5); filter: drop-shadow(0 0 6px rgba(217, 164, 65, 0.8)); }
}

/* Services — Scoped Engagement: lines draw out from the core to each scope box in sequence; the dashed line marches to signal flexible, unscoped work */
.diagram-anim--scope .scope-core {
  transform-box: fill-box; transform-origin: center;
  animation: scopeCorePulse 3.6s ease-in-out infinite;
}
@keyframes scopeCorePulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(217, 164, 65, 0)); }
  50% { transform: scale(1.3); filter: drop-shadow(0 0 5px rgba(217, 164, 65, 0.7)); }
}
.diagram-anim--scope .scope-line-1,
.diagram-anim--scope .scope-line-2 {
  stroke-dasharray: 200; stroke-dashoffset: 200;
  animation: scopeLineDraw 3.6s ease-in-out infinite;
}
.diagram-anim--scope .scope-line-1 { animation-delay: 0s; }
.diagram-anim--scope .scope-line-2 { animation-delay: 0.3s; }
@keyframes scopeLineDraw { 0%, 12% { stroke-dashoffset: 200; } 55%, 100% { stroke-dashoffset: 0; } }
.diagram-anim--scope .scope-line-3 {
  animation: scopeLineFlow 2s linear infinite;
}
@keyframes scopeLineFlow { to { stroke-dashoffset: -20; } }
.diagram-anim--scope .scope-box {
  opacity: 0;
  transform-box: fill-box; transform-origin: center;
  animation: scopeBoxIn 3.6s ease-in-out infinite;
}
.diagram-anim--scope .scope-box-1 { animation-delay: 0.5s; }
.diagram-anim--scope .scope-box-2 { animation-delay: 0.8s; }
@keyframes scopeBoxIn {
  0%, 15% { opacity: 0; transform: scale(0.85); }
  35%, 85% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.85); }
}
.diagram-anim--scope .scope-node {
  transform-box: fill-box; transform-origin: center;
  animation: dotPop 3.6s ease-in-out infinite;
}
.diagram-anim--scope .scope-node-1 { animation-delay: 0.6s; }
.diagram-anim--scope .scope-node-2 { animation-delay: 0.9s; }

/* Insights page — trust diagram: spokes and satellite dots light up outward in sequence, core pulses steadily */
.diagram-anim--radiate .radiate-spoke {
  opacity: 0.15;
  animation: radiatePulse 3.6s ease-in-out infinite;
}
.diagram-anim--radiate .radiate-spoke-1 { animation-delay: 0s; }
.diagram-anim--radiate .radiate-spoke-2 { animation-delay: 0.5s; }
.diagram-anim--radiate .radiate-spoke-3 { animation-delay: 1s; }
@keyframes radiatePulse { 0%, 100% { opacity: 0.15; } 30% { opacity: 0.7; } 60% { opacity: 0.15; } }
.diagram-anim--radiate .radiate-dot {
  transform-box: fill-box; transform-origin: center;
  animation: radiateDotPulse 3.6s ease-in-out infinite;
}
.diagram-anim--radiate .radiate-dot-1 { animation-delay: 0s; }
.diagram-anim--radiate .radiate-dot-2 { animation-delay: 0.5s; }
.diagram-anim--radiate .radiate-dot-3 { animation-delay: 1s; }
@keyframes radiateDotPulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  30% { transform: scale(1.4); opacity: 1; }
  60% { transform: scale(1); opacity: 0.7; }
}
.diagram-anim--radiate .radiate-core {
  transform-box: fill-box; transform-origin: center;
  animation: radiateCorePulse 2.4s ease-in-out infinite;
}
@keyframes radiateCorePulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(217, 164, 65, 0)); }
  50% { transform: scale(1.2); filter: drop-shadow(0 0 5px rgba(217, 164, 65, 0.6)); }
}

/* Insights page — GTM diagram: the dashed branches fray and dim in sequence, the failure point beacons */
.diagram-anim--branch .branch-line {
  animation: branchFray 4s ease-in-out infinite;
}
.diagram-anim--branch .branch-line-1 { animation-delay: 0s; }
.diagram-anim--branch .branch-line-2 { animation-delay: 0.4s; }
.diagram-anim--branch .branch-line-3 { animation-delay: 0.8s; }
@keyframes branchFray {
  0%, 100% { stroke-dashoffset: 0; opacity: 0.28; }
  50% { stroke-dashoffset: 22; opacity: 0.6; }
}
.diagram-anim--branch .branch-dot {
  transform-box: fill-box; transform-origin: center;
  animation: branchDotFade 4s ease-in-out infinite;
}
.diagram-anim--branch .branch-dot-1 { animation-delay: 0s; }
.diagram-anim--branch .branch-dot-2 { animation-delay: 0.4s; }
.diagram-anim--branch .branch-dot-3 { animation-delay: 0.8s; }
@keyframes branchDotFade {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.3); }
}
.diagram-anim--branch .branch-core {
  transform-box: fill-box; transform-origin: center;
  animation: branchCorePulse 2.6s ease-in-out infinite;
}
@keyframes branchCorePulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(193, 39, 45, 0)); }
  50% { transform: scale(1.35); filter: drop-shadow(0 0 6px rgba(193, 39, 45, 0.7)); }
}

/* Insights page — fractional leadership diagram: brightness sweeps up the bars, the peak dot glows on arrival */
.diagram-anim--climb .climb-bar {
  transform-box: fill-box; transform-origin: bottom center;
  animation: climbRise 3.6s ease-in-out infinite;
}
.diagram-anim--climb .climb-bar-1 { animation-delay: 0s; }
.diagram-anim--climb .climb-bar-2 { animation-delay: 0.3s; }
.diagram-anim--climb .climb-bar-3 { animation-delay: 0.6s; }
@keyframes climbRise {
  0%, 100% { transform: scaleY(1); filter: brightness(1); }
  15% { transform: scaleY(1.04); filter: brightness(1.35); }
  30% { transform: scaleY(1); filter: brightness(1); }
}
.diagram-anim--climb .climb-peak {
  transform-box: fill-box; transform-origin: center;
  animation: climbPeak 3.6s ease-in-out infinite;
  animation-delay: 0.75s;
}
@keyframes climbPeak {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(193, 39, 45, 0)); }
  15% { transform: scale(1.4); filter: drop-shadow(0 0 6px rgba(193, 39, 45, 0.75)); }
  30% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(193, 39, 45, 0)); }
}

/* Insights page — metrics diagram: background dots twinkle like noise, the gold signal line flows through and glows on arrival */
.diagram-anim--signal .signal-noise {
  animation: signalTwinkle 5s ease-in-out infinite;
}
.diagram-anim--signal .signal-noise:nth-child(odd) { animation-delay: 0s; animation-duration: 4.2s; }
.diagram-anim--signal .signal-noise:nth-child(even) { animation-delay: 1.4s; animation-duration: 5.6s; }
.diagram-anim--signal .signal-noise:nth-child(3n) { animation-delay: 2.6s; }
@keyframes signalTwinkle {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.4; }
}
.diagram-anim--signal .signal-path {
  animation: signalFlow 3s linear infinite;
}
@keyframes signalFlow { to { stroke-dashoffset: -66; } }
.diagram-anim--signal .signal-core {
  transform-box: fill-box; transform-origin: center;
  animation: signalCore 3s ease-in-out infinite;
}
@keyframes signalCore {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(217, 164, 65, 0)); }
  50% { transform: scale(1.3); filter: drop-shadow(0 0 6px rgba(217, 164, 65, 0.75)); }
}

@media (prefers-reduced-motion: reduce) {
  .diagram-anim * { animation: none !important; }
}

/* Section head */
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* Operating model diagram — uses Slate Blue, the palette's diagram accent */
.flow {
  display: flex; justify-content: space-between; align-items: flex-start;
  position: relative; margin-top: 60px; gap: 8px;
}
.flow-line { position: absolute; top: 27px; left: 4%; right: 4%; height: 2px; background: rgba(var(--ink-rgb), 0.12); z-index: 0; }
.flow-line .progress {
  position: absolute; top: 0; left: 0; height: 100%; width: 0%;
  background: linear-gradient(90deg, color-mix(in srgb, var(--blue) 55%, white), var(--blue));
  animation: flowProgress 5s ease-in-out infinite;
}
.flow-dot {
  position: absolute; top: -3px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--blue); box-shadow: 0 0 12px 3px rgba(var(--blue-rgb),0.5);
  animation: flowDot 5s ease-in-out infinite;
}
@keyframes flowProgress { 0% { width: 0%; } 85% { width: 100%; } 100% { width: 100%; } }
@keyframes flowDot { 0% { left: 0%; } 85% { left: calc(100% - 8px); } 100% { left: calc(100% - 8px); } }

.flow-step { position: relative; z-index: 1; flex: 1; text-align: center; }
.flow-node {
  width: 58px; height: 58px; border-radius: 50%; margin: 0 auto 16px;
  background: var(--surface); border: 2px solid rgba(var(--blue-rgb),0.35);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--blue-ink); font-size: 1.1rem;
  animation: nodePulse 5s ease-in-out infinite;
}
.flow-step:nth-child(2) .flow-node { animation-delay: 0.15s; }
.flow-step:nth-child(3) .flow-node { animation-delay: 0.3s; }
.flow-step:nth-child(4) .flow-node { animation-delay: 0.45s; }
.flow-step:nth-child(5) .flow-node { animation-delay: 0.6s; }
.flow-step:nth-child(6) .flow-node { animation-delay: 0.75s; }
@keyframes nodePulse {
  0%, 12% { border-color: rgba(var(--blue-rgb),0.35); box-shadow: none; }
  16%, 92% { border-color: var(--blue); box-shadow: 0 0 0 6px rgba(var(--blue-rgb),0.12); }
  100% { border-color: rgba(var(--blue-rgb),0.35); box-shadow: none; }
}
.flow-step h4 { font-size: 0.98rem; margin-bottom: 6px; }
.flow-step p { font-size: 0.82rem; max-width: 150px; margin: 0 auto; }
@media (max-width: 860px) {
  .flow { flex-direction: column; gap: 30px; }
  .flow-line { top: 0; bottom: 0; left: 27px; right: auto; width: 2px; height: auto; }
  .flow-line .progress { width: 100%; height: 0%; animation: flowProgressV 5s ease-in-out infinite; }
  .flow-dot { animation: flowDotV 5s ease-in-out infinite; top: 0; left: 23px; }
  @keyframes flowProgressV { 0% { height: 0%; } 85% { height: 100%; } 100% { height: 100%; } }
  @keyframes flowDotV { 0% { top: 0%; } 85% { top: calc(100% - 8px); } 100% { top: calc(100% - 8px); } }
  .flow-step { display: flex; gap: 20px; text-align: left; }
  .flow-node { margin: 0; flex-shrink: 0; }
  .flow-step p { margin: 0; }
}

/* Timeline (About) */
.timeline { position: relative; padding-left: 32px; border-left: 2px solid rgba(var(--blue-rgb),0.3); }
.timeline-item { position: relative; padding-bottom: 40px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ''; position: absolute; left: -38px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px rgba(var(--blue-rgb),0.18); }
.timeline-item .year { font-size: 0.82rem; font-weight: 700; color: var(--blue-ink); letter-spacing: 0.08em; text-transform: uppercase; }

/* About page — Founder Timeline: the connecting line draws downward and each milestone dot pops in as it arrives, same scroll-triggered/3-loop treatment as the diagram above it (see main.js) */
.diagram-anim--timeline.timeline { border-left-color: rgba(var(--blue-rgb),0.15); }
.diagram-anim--timeline.timeline::before {
  content: '';
  position: absolute;
  left: -2px; top: 0;
  width: 2px; height: 0;
  background: var(--blue);
}
.diagram-anim--timeline.timeline.play::before {
  animation: timelineDraw 3.4s ease-in-out 3 forwards;
}
@keyframes timelineDraw { 0% { height: 0; } 55%, 100% { height: 100%; } }
.diagram-anim--timeline .timeline-item::before { opacity: 0; transform: scale(0.4); }
.diagram-anim--timeline.play .timeline-item::before {
  animation: timelineDotIn 3.4s ease-in-out 3 forwards;
}
.diagram-anim--timeline.play .timeline-item:nth-child(1)::before { animation-delay: 0.3s; }
.diagram-anim--timeline.play .timeline-item:nth-child(2)::before { animation-delay: 0.75s; }
.diagram-anim--timeline.play .timeline-item:nth-child(3)::before { animation-delay: 1.2s; }
.diagram-anim--timeline.play .timeline-item:nth-child(4)::before { animation-delay: 1.65s; }
@keyframes timelineDotIn {
  0%, 22% { opacity: 0; transform: scale(0.4); }
  32% { opacity: 1; transform: scale(1.3); }
  42%, 100% { opacity: 1; transform: scale(1); }
}

/* Portrait — real founder photo, with a Charcoal scrim so the caption stays legible */
.portrait {
  border-radius: var(--radius); aspect-ratio: 3/4; position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--panel-dark-2) 0%, var(--panel-dark) 70%);
  border: 1px solid rgba(var(--bg-rgb), 0.1);
  display: flex; align-items: flex-end;
  max-width: 360px; margin: 0 auto;
}
.portrait svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.portrait::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(var(--ink-rgb), 0.88) 100%);
  pointer-events: none;
}
.portrait .cap { position: relative; z-index: 1; padding: 26px; }
.portrait .cap strong { display: block; color: var(--bg); }
.portrait .cap span { font-size: 0.85rem; color: rgba(var(--bg-rgb), 0.7); }

/* Blog cards */
.blog-card .tag { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--blue-ink); }
.blog-card .thumb { border-radius: 10px; aspect-ratio: 16/10; margin-bottom: 18px; overflow: hidden; background: linear-gradient(135deg, var(--panel-dark-2), var(--panel-dark)); position: relative; }
.blog-card .thumb svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* CTA band — Crimson (energy, action) marks this as the site's one deliberate "act now" moment,
   distinct from the Electric Blue used for everyday navigation/buttons elsewhere. */
.cta-band {
  background: linear-gradient(120deg, var(--crimson), color-mix(in srgb, var(--crimson) 78%, black));
  border-radius: 20px; padding: 56px; text-align: center; color: var(--bg);
  margin: 0 28px;
}
.cta-band h2 { color: var(--bg); }
.cta-band p { color: rgba(var(--bg-rgb), 0.85); max-width: 560px; margin: 12px auto 28px; }
.cta-band .btn-primary { background: var(--bg); color: var(--ink); }
.cta-band .btn-primary:hover { background: var(--bg-alt-2); color: var(--crimson); }
@media (max-width: 620px) { .cta-band { margin: 0; padding: 40px 24px; } }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; color: var(--ink); }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 16px; border-radius: 10px; border: 1px solid rgba(var(--ink-rgb), 0.15);
  background: var(--surface); color: var(--ink); font-family: inherit; font-size: 0.95rem;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--blue); }
.info-block { display: flex; gap: 16px; margin-bottom: 26px; }
.info-block .icon { width: 42px; height: 42px; border-radius: 10px; background: rgba(var(--blue-rgb), 0.12); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.info-block .icon svg { width: 20px; height: 20px; }
.info-block h4 { margin-bottom: 4px; }
.info-block p { font-size: 0.92rem; }
.form-note { font-size: 0.82rem; color: var(--ink-faint); margin-top: 10px; }

/* Footer */
footer.site { background: var(--panel-dark); border-top: 1px solid rgba(var(--bg-rgb), 0.1); padding: 56px 0 30px; }
footer.site .foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; margin-bottom: 44px; }
@media (max-width: 700px) { footer.site .foot-grid { grid-template-columns: 1fr; } }
footer.site .logo svg, footer.site .logo img { height: 82px; width: auto; display: block; margin-bottom: 16px; }
footer.site p { font-size: 0.9rem; max-width: 320px; color: rgba(var(--bg-rgb), 0.75); }
footer.site h5 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--bg); margin-bottom: 16px; }
footer.site ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
footer.site ul a { font-size: 0.92rem; color: rgba(var(--bg-rgb), 0.75); }
footer.site ul a:hover { color: var(--blue-tint); }
footer.site ul span { color: rgba(var(--bg-rgb), 0.75); }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 26px; border-top: 1px solid rgba(var(--bg-rgb), 0.1); font-size: 0.82rem; color: rgba(var(--bg-rgb), 0.6); flex-wrap: wrap; gap: 12px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* Utility */
.mt-0 { margin-top: 0 !important; }
.center { text-align: center; }
.pill-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.pill { padding: 8px 16px; border-radius: 999px; background: rgba(var(--blue-rgb), 0.08); border: 1px solid rgba(var(--blue-rgb), 0.25); font-size: 0.85rem; color: var(--blue-ink); }
