/* ==============================================================
   PAGE.CSS - shared shell for service / case-study / contact /
              knowledge pages. Same brand tokens as homepage.
   ============================================================== */
:root {
  --blue: #0160E2;
  --cyan: #209BD4;
  --spotlight: #4FBDF0;
  --sky: #8DD2F2;
  --gradient: linear-gradient(90deg, #0160E2 0%, #209BD4 100%);
  --gradient-d: linear-gradient(135deg, #0160E2 0%, #209BD4 50%, #4FBDF0 100%);

  --white: #FFFFFF;
  --paper: #F7F9FC;
  --tint-blue: #EEF6FB;
  --footer-bg: #062A6B;

  --ink: #0D1B4A;
  --ink-soft: #4A5568;
  --ink-mute: #6B7A99;
  --ink-faint: #94A3B8;
  --ink-on-blue-soft: rgba(255,255,255,0.82);
  --ink-on-blue-mute: rgba(255,255,255,0.55);

  --border: rgba(13,27,74,0.08);
  --border-strong: rgba(13,27,74,0.14);
  --border-blue: rgba(1,96,226,0.18);

  --font: 'Raleway', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Menlo', monospace;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;
  --r-sm: 6px; --r-md: 12px; --r-lg: 20px; --r-xl: 28px; --r-pill: 999px;
  --sh-sm: 0 2px 8px rgba(13,27,74,.06);
  --sh-md: 0 8px 24px rgba(13,27,74,.08);
  --sh-lg: 0 20px 50px rgba(13,27,74,.10);
  --sh-blue: 0 12px 30px rgba(1,96,226,.25);
  --max: 1280px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--white); color: var(--ink);
  font-family: var(--font); font-size: 17px; line-height: 1.6;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--blue); text-decoration: none; transition: color .2s; }
a:hover { color: var(--cyan); }
button { font-family: inherit; cursor: pointer; border: 0; background: none; }

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

/* Type */
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; color: var(--ink); }
.display { font-size: clamp(48px, 7.2vw, 92px); line-height: 0.98; font-weight: 700; letter-spacing: -0.035em; }
.h1 { font-size: clamp(40px, 5vw, 64px); line-height: 1.05; font-weight: 700; letter-spacing: -0.025em; }
.h2 { font-size: clamp(32px, 3.6vw, 48px); line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; }
.h3 { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.2; font-weight: 600; letter-spacing: -0.015em; }
.h4 { font-size: 20px; line-height: 1.3; font-weight: 600; }
.body { font-size: 17px; line-height: 1.7; color: var(--ink-soft); }
.body-l { font-size: 19px; line-height: 1.65; color: var(--ink-soft); }
.lede { color: var(--ink-soft); max-width: 65ch; }
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s2);
  font-size: 12px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--blue);
  margin-bottom: var(--s4);
}
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: var(--s2);
  padding: 14px 28px;
  border-radius: var(--r-pill);
  font-size: 15px; font-weight: 600; letter-spacing: 0.01em;
  transition: all .25s cubic-bezier(.4,0,.2,1);
  border: 1.5px solid transparent;
}
.btn-primary {
  background: var(--gradient); color: white;
  box-shadow: var(--sh-blue);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(1,96,226,.35);
  color: white; filter: brightness(1.08);
}
.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); background: rgba(1,96,226,0.04); }
.btn-arrow {
  width: 16px; height: 16px;
  display: inline-grid; place-items: center;
  transition: transform .25s;
}
.btn-arrow svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; fill: none; }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* Header */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .2s;
}
.header.is-scrolled { box-shadow: 0 2px 20px rgba(13,27,74,.06); }
.header-inner {
  max-width: var(--max); margin: 0 auto;
  padding: 16px var(--s7);
  display: flex; align-items: center; gap: var(--s7);
}
.logo { display: flex; align-items: center; text-decoration: none; }
.logo img { height: 56px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: var(--s5); margin-left: auto; list-style: none; padding: 0; }
.nav a { color: var(--ink-soft); font-size: 15.5px; font-weight: 500; transition: color .2s; }
.nav a:hover { color: var(--blue); }
.nav a.is-active { color: var(--blue); font-weight: 600; }
.nav-cta {
  padding: 10px 20px; border-radius: var(--r-pill);
  background: var(--gradient); color: white !important; font-weight: 600;
  box-shadow: 0 4px 14px rgba(1,96,226,.25);
  transition: transform .2s, box-shadow .2s;
  animation: shimmer 4s ease-in-out infinite;
}
.nav-cta:hover { color: white !important; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(1,96,226,.35); }
.nav-cta-arrow { display: inline-block; margin-left: 4px; transition: transform .2s; }
.nav-cta:hover .nav-cta-arrow { transform: translateX(3px); }
@keyframes shimmer { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.08); } }

/* Services dropdown */
.nav-has-dropdown { position: relative; }
.nav-has-dropdown > a { display: inline-flex; align-items: center; gap: 4px; }
.nav-has-dropdown > a::after {
  content: ""; width: 5px; height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  margin-left: 2px; opacity: 0.6;
  transition: transform .2s;
}
.nav-has-dropdown:hover > a::after,
.nav-has-dropdown:focus-within > a::after { transform: rotate(225deg) translateY(0); opacity: 1; }
/* Invisible hover bridge - keeps the dropdown open when the cursor moves
   from the parent nav item down to the menu. Without this the gap kills hover. */
.nav-has-dropdown::after {
  content: ""; position: absolute;
  top: 100%; left: -16px; right: -16px;
  height: 16px;
  background: transparent;
  pointer-events: none;
}
.nav-has-dropdown:hover::after,
.nav-has-dropdown:focus-within::after { pointer-events: auto; }
.nav-dropdown {
  position: absolute; top: calc(100% + 14px); left: -16px;
  min-width: 240px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 6px;
  box-shadow: 0 16px 40px rgba(13,27,74,.16);
  list-style: none;
  margin: 0;
  opacity: 0; transform: translateY(8px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 110;
}
.nav-has-dropdown:hover .nav-dropdown,
.nav-has-dropdown:focus-within .nav-dropdown,
.nav-has-dropdown.is-open .nav-dropdown {
  opacity: 1; transform: translateY(0); pointer-events: auto;
}
.nav-has-dropdown.is-open > a::after { transform: rotate(225deg) translateY(0); opacity: 1; }
.nav-dropdown li { display: block; }
.nav-dropdown a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  font-size: 14px; font-weight: 600;
  color: var(--ink) !important;
  transition: background .15s, color .15s;
}
.nav-dropdown a:hover { background: var(--tint-blue); color: var(--blue) !important; }

/* Mobile nav */
.nav-toggle {
  display: none; margin-left: auto;
  width: 44px; height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--white);
  align-items: center; justify-content: center;
  cursor: pointer; transition: border-color .2s;
}
.nav-toggle:hover { border-color: var(--blue); }
.nav-toggle svg { width: 20px; height: 20px; stroke: var(--ink); stroke-width: 2; fill: none; transition: stroke .2s; }
.nav-toggle:hover svg { stroke: var(--blue); }
.nav-toggle .icon-close { display: none; }
.nav-toggle.is-open .icon-open { display: none; }
.nav-toggle.is-open .icon-close { display: block; }
/* Hidden checkbox that drives the menu state via CSS */
.nav-toggle-checkbox {
  position: absolute; left: -9999px; opacity: 0; pointer-events: none;
}

.mobile-menu {
  position: fixed; top: 88px; left: 0; right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 16px 40px rgba(13,27,74,.10);
  transform: translateY(-110%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  z-index: 99;
  padding: var(--s5) var(--s5) var(--s6);
  max-height: calc(100vh - 88px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
/* Old class-based open state (kept harmless, in case any cached JS adds it) */
.mobile-menu.is-open { transform: translateY(0); }
/* New CSS-only open state - driven by the hidden checkbox */
.nav-toggle-checkbox:checked ~ .mobile-menu { transform: translateY(0); }
.nav-toggle-checkbox:checked ~ .mobile-menu-backdrop { opacity: 1; pointer-events: auto; }
.nav-toggle-checkbox:checked ~ .header .nav-toggle .icon-open,
.nav-toggle-checkbox:checked ~ * .nav-toggle .icon-open { display: none; }
.nav-toggle-checkbox:checked ~ .header .nav-toggle .icon-close,
.nav-toggle-checkbox:checked ~ * .nav-toggle .icon-close { display: block; }
.mobile-menu ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.mobile-menu a {
  display: block; padding: 14px var(--s4);
  border-radius: var(--r-md);
  font-size: 17px; font-weight: 600; color: var(--ink);
  transition: background .2s, color .2s;
}
.mobile-menu a:hover { background: var(--tint-blue); color: var(--blue); }
.mobile-menu .nav-cta { margin-top: var(--s4); text-align: center; color: white !important; animation: none; }

/* ========================================================================
   Mobile menu - Services dropdown
   - SVG chevron (inline in HTML) for reliable rendering across iOS Safari
   - Sub-items rendered as proper button-style cards with big tap targets
   - Hide the legacy CSS pseudo-element chevron in mobile menu
   ======================================================================== */

/* SVG chevron - only visible in the mobile menu */
.nav-mobile-chevron { display: none; }
.mobile-menu .nav-mobile-chevron {
  display: block;
  width: 20px !important; height: 20px !important;
  color: var(--ink-soft);
  flex-shrink: 0;
  transition: transform .25s ease;
}
/* Native details[open] handles the rotation */
.mobile-menu .mobile-services-details[open] .nav-mobile-chevron {
  transform: rotate(180deg);
  color: var(--blue);
}
/* Legacy: keep working for any cached HTML still using is-open class */
.mobile-menu .nav-has-dropdown.is-open .nav-mobile-chevron {
  transform: rotate(180deg);
  color: var(--blue);
}

/* Hide any desktop pseudo-element chevron from leaking into mobile menu */
.mobile-menu .nav-has-dropdown > a::after,
.mobile-menu .mobile-services-toggle::after { display: none !important; }

/* Services parent link - flex it so the chevron sits on the right */
/* The Services parent is now a <summary> element, not an <a>. Style it like a row. */
.mobile-menu .mobile-services-details { width: 100%; }
.mobile-menu .mobile-services-details > summary {
  list-style: none;          /* Hide the default disclosure triangle */
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--s4);
  border-radius: var(--r-md);
  font-size: 17px; font-weight: 600;
  color: var(--ink);
  min-height: 56px;
  transition: background .2s ease, color .2s ease;
}
.mobile-menu .mobile-services-details > summary::-webkit-details-marker,
.mobile-menu .mobile-services-details > summary::marker { display: none; content: ""; }
.mobile-menu .mobile-services-details > summary:hover { background: var(--tint-blue); color: var(--blue); }
.mobile-menu .mobile-services-details[open] > summary { color: var(--blue); background: var(--tint-blue); }

/* Legacy selector for cached pages still using <a> with is-open */
.mobile-menu .nav-has-dropdown > a {
  display: flex; align-items: center; justify-content: space-between;
  position: relative;
  min-height: 56px;
}
.mobile-menu .nav-has-dropdown.is-open > a {
  color: var(--blue);
  background: var(--tint-blue);
}

/* Top-level mobile menu link - bump tap target to 56px to match Services */
.mobile-menu > ul > li > a {
  min-height: 56px;
  display: flex; align-items: center;
}

/* Sub-items inside the mobile dropdown.
   Inside <details>, browser handles show/hide natively - we just style the
   open-state appearance. No max-height/transition trickery needed. */
.mobile-menu .nav-dropdown {
  position: static !important;
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto !important;
  background: transparent;
  border: 0; box-shadow: none;
  margin: 4px 0 0;
  padding: 6px var(--s4) 10px;
  display: flex; flex-direction: column; gap: 8px;
  list-style: none;
}
/* Legacy fallback for cached pages still using is-open class - same styling */
.mobile-menu .nav-has-dropdown.is-open .nav-dropdown {
  margin-top: 4px;
  padding: 6px var(--s4) 10px;
}

/* Sub-items styled as full-width cards with their own background and border - 
   visually distinct from each other and from the parent so users can't mis-tap */
.mobile-menu .nav-dropdown a {
  display: flex; align-items: center;
  min-height: 54px;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink) !important;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: background .2s ease, border-color .2s ease, color .2s ease;
  position: relative;
}
.mobile-menu .nav-dropdown a::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  margin-right: 12px;
  flex-shrink: 0;
  opacity: 0.5;
}
.mobile-menu .nav-dropdown a:hover,
.mobile-menu .nav-dropdown a:active {
  background: var(--tint-blue);
  border-color: var(--blue);
  color: var(--blue) !important;
}
.mobile-menu .nav-dropdown a:hover::before,
.mobile-menu .nav-dropdown a:active::before {
  background: var(--blue);
  opacity: 1;
}
.mobile-menu-backdrop {
  position: fixed; inset: 0;
  background: rgba(13,27,74,0.40);
  opacity: 0; pointer-events: none;
  transition: opacity .3s; z-index: 98;
}
.mobile-menu-backdrop.is-open { opacity: 1; pointer-events: auto; }

/* Sections */
.section { padding: var(--s10) 0; position: relative; }
.section.tight { padding: var(--s9) 0; }
.section.warm, .section.paper { background: var(--paper); }
.section.tint { background: var(--tint-blue); }

/* Page hero (variant of homepage hero - calmer, no full display type) */
.page-hero {
  position: relative; overflow: hidden;
  padding: var(--s10) 0 var(--s9);
  background:
    radial-gradient(circle at 80% 16%, rgba(143, 210, 242, 0.38) 0, transparent 50%),
    radial-gradient(circle at 8% 38%, rgba(1, 96, 226, 0.10) 0, transparent 46%),
    linear-gradient(165deg, var(--tint-blue) 0%, var(--white) 85%);
}
.page-hero-grid-bg {
  position: absolute; inset: 0; opacity: 0.08; pointer-events: none;
  background-image:
    linear-gradient(rgba(1,96,226,1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(1,96,226,1) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}
.page-hero-content { position: relative; z-index: 1; max-width: 920px; }
.page-hero h1 { font-size: clamp(40px, 5.4vw, 72px); line-height: 1.02; font-weight: 700; letter-spacing: -0.03em; }
.page-hero .lede { margin-top: var(--s5); font-size: clamp(17px, 1.6vw, 21px); line-height: 1.6; max-width: 60ch; }
.page-hero-cta-row { display: flex; gap: var(--s4); flex-wrap: wrap; margin-top: var(--s7); }

/* Generic CTA block (matches main site) */
.cta-block {
  background: var(--gradient-d);
  color: white;
  border-radius: var(--r-xl);
  padding: var(--s8) var(--s7);
  position: relative; overflow: hidden;
}
.cta-block::before {
  content: ""; position: absolute;
  right: -80px; top: -80px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(255,255,255,.15), transparent 70%);
  border-radius: 50%; pointer-events: none;
}
.cta-block::after {
  content: ""; position: absolute;
  left: -100px; bottom: -100px;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(255,255,255,.08), transparent 70%);
  border-radius: 50%; pointer-events: none;
}
.cta-content { position: relative; z-index: 1; max-width: 720px; }
.cta-eyebrow {
  display: inline-flex; align-items: center; gap: var(--s2);
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  margin-bottom: var(--s3);
}
.cta-block h2 { color: white; font-size: clamp(28px, 3.4vw, 40px); }
.cta-block .body-l { font-size: 16px !important; line-height: 1.6; }
.cta-row { display: flex; gap: var(--s3); flex-wrap: wrap; margin-top: var(--s5); }
.cta-block .btn-ghost { color: white; border-color: rgba(255,255,255,0.35); }
.cta-block .btn-ghost:hover { background: rgba(255,255,255,0.10); border-color: white; color: white; }

/* Footer */
.footer {
  background: var(--footer-bg);
  color: var(--ink-on-blue-soft);
  padding: var(--s7) 0 var(--s5);
  position: relative; overflow: hidden;
}
.footer::before {
  content: ""; position: absolute;
  right: -120px; top: -120px;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(79,189,240,.12), transparent 70%);
  border-radius: 50%; pointer-events: none;
}
.footer .container { position: relative; z-index: 1; }
.footer-top {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--s7);
  padding-bottom: var(--s6); margin-bottom: var(--s6);
  border-bottom: 1px solid rgba(255,255,255,0.10);
  align-items: end;
}
.footer-lead h2 {
  font-size: clamp(19px, 2.1vw, 25px);
  line-height: 1.2; color: white; letter-spacing: -0.015em;
  margin: 0 0 var(--s3); max-width: 30ch;
}
.footer-lead p { color: var(--ink-on-blue-soft); font-size: 16px; line-height: 1.6; margin: 0; max-width: 50ch; }
.footer-newsletter {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r-lg);
  padding: var(--s5);
}
.footer-h {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--spotlight); margin-bottom: var(--s4);
  display: block;
}
.footer-newsletter p { color: var(--ink-on-blue-soft); font-size: 14px; line-height: 1.55; margin: 0 0 var(--s4); }
.footer-newsletter form { display: flex; gap: 8px; }
.footer-newsletter input {
  flex: 1;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--r-pill);
  padding: 11px 18px;
  font-family: var(--font); font-size: 14px;
  color: white; transition: border-color .2s;
  min-width: 0;
}
.footer-newsletter input::placeholder { color: var(--ink-on-blue-mute); }
.footer-newsletter input:focus { outline: none; border-color: var(--spotlight); }
.footer-newsletter button {
  background: white; color: var(--blue);
  border: 0; border-radius: var(--r-pill);
  padding: 11px 22px;
  font-family: var(--font); font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all .25s; flex-shrink: 0;
}
.footer-newsletter button:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,0,0,.18); }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: var(--s6); margin-bottom: var(--s6);
}
.footer-brand { display: flex; flex-direction: column; gap: var(--s5); }
.footer-brand-logo { display: inline-flex; align-items: center; text-decoration: none; }
.footer-brand-logo img { height: 56px; width: auto; display: block; }
.footer-brand-tag { font-size: 14px; color: var(--ink-on-blue-soft); line-height: 1.55; max-width: 32ch; margin: 0; }
.footer-brand-contact { display: flex; flex-direction: column; gap: var(--s2); margin-top: var(--s2); }
.footer-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-list a { color: var(--ink-on-blue-soft); font-size: 14px; transition: color .2s; }
.footer-list a:hover { color: white; }
.footer-meta {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: var(--s5);
  display: flex; justify-content: space-between; align-items: center; gap: var(--s5); flex-wrap: wrap;
  font-size: 12px; color: var(--ink-on-blue-mute);
}
.footer-email { display: inline-block; font-size: 15px; font-weight: 600; color: var(--spotlight) !important; transition: color .2s; }
.footer-email:hover { color: white !important; }
.footer-address { font-size: 13px; color: var(--ink-on-blue-mute); line-height: 1.55; font-style: normal; }
.footer-socials { display: flex; gap: var(--s2); margin-top: var(--s3); }
.footer-social {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  color: white !important;
  transition: all .2s;
}
.footer-social:hover { background: var(--gradient); transform: translateY(-1px); color: white !important; }
.footer-legal { display: flex; gap: var(--s4); flex-wrap: wrap; font-size: 12px; }
.footer-legal a { color: var(--ink-on-blue-mute); transition: color .2s; }
.footer-legal a:hover { color: white; }

/* Reveal animations.
   IMPORTANT: defaults set the element to invisible (opacity: 0) for the
   nice fade-in, but a CSS-only safety animation auto-shows everything after
   1 second so content is never permanently hidden if JS doesn't run
   (iOS Safari quirks, JS errors elsewhere, etc). */
@keyframes reveal-safety { to { opacity: 1; transform: none; } }

.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity .9s cubic-bezier(.4,0,.2,1), transform .9s cubic-bezier(.4,0,.2,1);
  animation: reveal-safety 0.01s 1s forwards;
}
.reveal.is-visible {
  opacity: 1; transform: translateY(0);
  animation: none;
}
.reveal-stagger > * {
  opacity: 0; transform: translateY(20px);
  transition: opacity .6s cubic-bezier(.4,0,.2,1), transform .6s cubic-bezier(.4,0,.2,1);
  animation: reveal-safety 0.01s 1s forwards;
}
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: .08s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: .16s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: .24s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: .32s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: .40s; }
.reveal-stagger.is-visible > * {
  opacity: 1; transform: translateY(0);
  animation: none;
}

/* ==============================================================
   PROXIMITY HOVER SYSTEM
   Native cursor stays visible. A subtle precision ring trails it.
   Smooth, controlled responses on interactive elements via JS.
   ============================================================== */
/* Precision ring - follows cursor with smooth easing, native cursor remains */
.tdl-cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 28px; height: 28px;
  border: 1.5px solid rgba(1, 96, 226, 0.45);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  mix-blend-mode: multiply;
  transition:
    width .22s cubic-bezier(.2,.7,.3,1),
    height .22s cubic-bezier(.2,.7,.3,1),
    border-color .22s ease,
    background .22s ease,
    opacity .22s ease;
  opacity: 0;
  will-change: transform;
}
.tdl-cursor-ring.is-active { opacity: 1; }
.tdl-cursor-ring.is-hot {
  width: 44px; height: 44px;
  border-color: rgba(32, 155, 212, 0.65);
  background: rgba(79, 189, 240, 0.10);
}
.tdl-cursor-ring.is-text {
  width: 6px; height: 22px;
  border-radius: 2px;
  border-color: rgba(1, 96, 226, 0.55);
  background: rgba(1, 96, 226, 0.10);
}
@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .tdl-cursor-ring { display: none !important; }
}

/* ----- Auction hover system -----
   Cards in the same grid compete for visibility. The hovered card elevates
   and brightens (the "winning bid"); siblings de-emphasise. A short
   impression flash on enter signals the win, then settles. */
.bid-card {
  position: relative;
  transition:
    transform .32s cubic-bezier(.2,.7,.3,1),
    opacity .32s ease,
    box-shadow .32s ease,
    filter .32s ease,
    border-color .25s ease;
  will-change: transform, opacity;
}
.bid-card.is-winning {
  transform: translateY(-4px) scale(1.025);
  box-shadow: 0 24px 60px rgba(1, 96, 226, 0.18), 0 0 0 1.5px rgba(32, 155, 212, 0.35);
  z-index: 5;
}
.bid-card.is-dimmed {
  opacity: 0.62;
  transform: scale(0.99);
  filter: saturate(0.82);
}
/* Impression flash - single pulse on enter, no loop */
.bid-card.is-winning::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse at top, rgba(79, 189, 240, 0.18) 0%, transparent 60%);
  opacity: 0;
  pointer-events: none;
  animation: bid-impression .55s cubic-bezier(.2,.7,.3,1) forwards;
  z-index: 1;
}
@keyframes bid-impression {
  0%   { opacity: 0; }
  35%  { opacity: 1; }
  100% { opacity: 0; }
}
/* Backwards-compat: keep old class names neutral so nothing breaks if found */
.magnetic, .tilt-card { transition: transform .25s cubic-bezier(.2,.7,.3,1); }
/* Smooth underline for plain text links inside content */
.post-content a, .legal-content a {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size .35s cubic-bezier(.2,.7,.3,1), color .2s;
  text-decoration: none;
}
.post-content a:hover, .legal-content a:hover {
  background-size: 100% 1px;
}
@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .magnetic, .tilt-card { transform: none !important; }
  .bid-card { transition: none !important; transform: none !important; opacity: 1 !important; filter: none !important; }
  .bid-card.is-winning, .bid-card.is-dimmed { transform: none !important; opacity: 1 !important; filter: none !important; box-shadow: none !important; }
  .bid-card.is-winning::after { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.is-visible,
  .reveal-stagger > *, .reveal-stagger.is-visible > * {
    opacity: 1; transform: none; transition: none;
  }
  .nav-cta { animation: none; }
  html { scroll-behavior: auto; }
}

/* ==============================================================
   INLINE CTA PANELS - Calendly + Proposal questionnaire
   Sit beneath the Strategic Review block on every page.
   ============================================================== */
.cta-panel { animation: panel-in .4s cubic-bezier(.4,0,.2,1); }
@keyframes panel-in { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
.cta-close {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--paper); border: 1px solid var(--border);
  font-size: 22px; line-height: 1; color: var(--ink-soft);
  cursor: pointer; display: grid; place-items: center;
  transition: all .2s;
}
.cta-close:hover { background: var(--ink); color: white; border-color: var(--ink); }

.proposal-progress { display: flex; align-items: center; gap: 8px; margin-bottom: var(--s7); }
.proposal-step-dot {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--border);
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: var(--ink-mute);
  transition: all .3s; flex-shrink: 0;
}
.proposal-step-dot.is-active { background: var(--gradient); border-color: transparent; color: white; box-shadow: 0 4px 14px rgba(1,96,226,.30); }
.proposal-step-dot.is-done { background: var(--cyan); border-color: var(--cyan); color: white; }
.proposal-step-line { flex: 1; height: 2px; background: var(--border); }
.proposal-step { display: none; min-height: 240px; }
.proposal-step.is-active { display: block; }
.proposal-step-h { font-size: 22px; font-weight: 700; color: var(--ink); margin: 0 0 var(--s2); letter-spacing: -0.015em; }
.proposal-step-p { font-size: 14px; color: var(--ink-soft); margin: 0 0 var(--s5); }
.proposal-options { display: flex; flex-direction: column; gap: var(--s2); }
.proposal-option {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s4) var(--s5);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer; transition: all .2s;
  font-size: 15px; font-weight: 500; color: var(--ink);
}
.proposal-option:hover { border-color: var(--cyan); background: var(--tint-blue); }
.proposal-option input { width: 18px; height: 18px; accent-color: var(--blue); cursor: pointer; }
.proposal-option:has(input:checked) { border-color: var(--blue); background: var(--tint-blue); }
.proposal-input {
  width: 100%; padding: 14px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-family: var(--font); font-size: 15px;
  color: var(--ink); margin-bottom: var(--s3);
  transition: border-color .2s;
}
.proposal-input:focus { outline: none; border-color: var(--blue); }
textarea.proposal-input { resize: vertical; min-height: 100px; }
.proposal-nav {
  display: flex; justify-content: space-between; gap: var(--s3);
  margin-top: var(--s6); padding-top: var(--s5);
  border-top: 1px solid var(--border);
}
.proposal-nav .proposal-back { margin-right: auto; }
.proposal-nav .proposal-next, .proposal-nav .proposal-submit { margin-left: auto; }
.proposal-success { text-align: center; padding: var(--s6) 0; }
.proposal-success-icon {
  width: 64px; height: 64px; margin: 0 auto;
  border-radius: 50%; background: var(--gradient);
  display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(1,96,226,.30);
}
.proposal-error { color: #DC2626; font-size: 13px; margin: -8px 0 var(--s3); font-weight: 500; }
.btn-primary[disabled], .btn-primary.is-disabled {
  background: #C7CFDC !important; color: var(--ink-mute) !important;
  cursor: not-allowed; box-shadow: none !important;
  transform: none !important; filter: none !important; pointer-events: none;
}

@media (max-width: 700px) {
  .proposal-step-dot { width: 26px; height: 26px; font-size: 11px; border-width: 1.5px; }
  .proposal-progress { gap: 4px; margin-bottom: var(--s5); }
  .proposal-step-line { min-width: 0; }
  .proposal-step-h { font-size: 19px; }
  .proposal-options { gap: 6px; }
  .proposal-option { padding: 12px 14px; font-size: 14px; }
  .proposal-nav { flex-wrap: wrap; gap: 8px; }
  .proposal-nav .btn { padding: 12px 18px; font-size: 14px; flex: 1; min-width: 110px; }
}

/* Responsive */
@media (max-width: 1100px) {
  .footer-top { grid-template-columns: 1fr; gap: var(--s6); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s6); }
  .footer-brand { grid-column: 1 / -1; }
  .container { padding: 0 var(--s5); }
}
@media (max-width: 900px) {
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }
}
@media (max-width: 700px) {
  .header-inner { padding: 12px var(--s5); gap: var(--s4); }
  .logo img { height: 46px; }
  .mobile-menu { top: 76px; }
  .section { padding: var(--s9) 0; }
  .page-hero { padding: var(--s8) 0 var(--s7); }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-newsletter form { flex-direction: column; }
  .footer-newsletter button { width: 100%; }
  .cta-block { padding: var(--s7) var(--s5); border-radius: var(--r-lg); }
}
