/* ==========================================================================
   doc-l base.css: the base layer of the C17 white theme for the sales doc
   pages (/diligence/, /pre-call/, /90-day-pilot/).

   - Scope: every selector starts with html[data-doc="l"]. Pages without
     that attribute are untouched.
   - Load order: this file loads after the inline <style> blocks, so it can
     undo the inline "dark-brand override" block. That block uses !important,
     so its counter rules here use !important too. Everything else wins on
     specificity (html[data-doc="l"] adds 0,1,1 to each selector).
   - Ownership: base owns tokens, page, type, nav, the #claim hero, generic
     section headers, shared components, modals, the page footer, focus and
     motion. The section files (proof, process, first90, offer, calc) own the
     internals of their sections.
   - Spec: DESIGN-L.md. Token values match src/styles/globals.css theme l.
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
html[data-doc="l"] {
  color-scheme: light;
  /* Neutrals */
  --l-bg: #FFFFFF;
  --l-band: #F6F7F9;
  --l-surface: #FFFFFF;
  --l-ink: #0B1220;
  --l-ink-2: #344054;
  --l-muted: #5B6474;
  --l-subtle: #667085;
  --l-line: #E6E8EC;
  --l-line-strong: #D5DAE1;
  --l-fill-2: #F2F4F7;
  --l-fill-3: #EAECF0;
  /* Liquid brand */
  --l-blue: #2563EB;
  --l-blue-hover: #1D4ED8;
  --l-blue-soft: #EEF4FF;
  --l-blue-line: #D3E1FD;
  --l-cyan: #06B6D4;
  --l-cyan-ink: #0E7490;
  --l-cyan-soft: #E6F8FB;
  /* The blue to cyan gradient: illustrations and icon tiles only, never text */
  --l-grad: linear-gradient(135deg, #2563EB 0%, #06B6D4 100%);
  --l-hatch: repeating-linear-gradient(-50deg, rgba(11, 18, 32, 0.07) 0 1px, transparent 1px 9px);
  /* Type */
  --l-sans: 'Inter', 'Inter Variable', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  /* Radius */
  --l-r-card: 16px;
  --l-r-window: 14px;
  --l-r-inner: 10px;
  --l-r-pill: 999px;
  /* Shadows */
  --l-shadow-card: 0 1px 2px rgba(11, 18, 32, 0.04), 0 2px 6px -1px rgba(11, 18, 32, 0.04), 0 12px 24px -12px rgba(11, 18, 32, 0.08);
  --l-shadow-float: 0 1px 2px rgba(11, 18, 32, 0.05), 0 16px 32px -16px rgba(11, 18, 32, 0.16), 0 32px 64px -32px rgba(37, 99, 235, 0.22);
  --l-shadow-btn: 0 1px 2px rgba(11, 18, 32, 0.10), 0 8px 18px -8px rgba(37, 99, 235, 0.60), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  /* Modal overlay */
  --l-overlay: rgba(11, 18, 32, 0.6);
  /* Motion */
  --l-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --l-dur-ui: 160ms;
  /* Layout */
  --l-nav-h: 60px;
  background-color: var(--l-bg);
}
@media (min-width: 768px) {
  html[data-doc="l"] { --l-nav-h: 64px; }
}


/* --------------------------------------------------------------------------
   2. Page: one flat white surface. No grid, glows, mesh or noise.
   -------------------------------------------------------------------------- */
html[data-doc="l"] body,
html[data-doc="l"] body.bg-white {
  background-color: var(--l-bg) !important;
  background-image: none !important;
  color: var(--l-ink-2) !important;
  font-family: var(--l-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html[data-doc="l"] ::selection { background-color: rgba(37, 99, 235, 0.16); color: var(--l-ink); }

/* Decorative only: radial washes, blurred glow blobs, noise and grids. */
html[data-doc="l"] .bg-gradient-radial { background: none; }
html[data-doc="l"] :is(.blur-3xl, .blur-2xl).pointer-events-none,
html[data-doc="l"] :is(.bg-noise, .bg-grid, [data-body-mesh-slot]) { display: none; }
html[data-doc="l"] :is(.glow-blue, .glow-blue-sm) { box-shadow: var(--l-shadow-card); }


/* --------------------------------------------------------------------------
   3. Dark palette remaps (light equivalents)
   The inline override block sets these with !important, so the counter
   rules need it too.
   -------------------------------------------------------------------------- */
/* Text */
html[data-doc="l"] :is(.text-gray-900, .text-gray-800) { color: var(--l-ink) !important; }
html[data-doc="l"] :is(.text-gray-700, .text-gray-600) { color: var(--l-ink-2) !important; }
html[data-doc="l"] .text-gray-500 { color: var(--l-muted) !important; }
html[data-doc="l"] .text-gray-400 { color: var(--l-subtle) !important; }
html[data-doc="l"] :is(.text-gray-300, .text-slate-300, .text-slate-400) { color: var(--l-ink-2); }
html[data-doc="l"] :is(.text-blue-300, .text-blue-400) { color: var(--l-blue); }
/* White text turns ink, except on blue fills and blue buttons. */
html[data-doc="l"] .text-white:not(:is([class*="bg-blue-6"], [class*="bg-blue-7"], [class*="bg-blue-6"] *, [class*="bg-blue-7"] *)) { color: var(--l-ink); }
html[data-doc="l"] :is([class*="text-white/"]):not(:is([class*="bg-blue-6"] *, [class*="bg-blue-7"] *)) { color: var(--l-ink-2); }

/* Backgrounds */
html[data-doc="l"] .bg-white { background-color: var(--l-surface) !important; }
html[data-doc="l"] .bg-gray-50 { background-color: var(--l-band) !important; }
html[data-doc="l"] .bg-gray-100 { background-color: var(--l-fill-2) !important; }
html[data-doc="l"] .bg-gray-200 { background-color: var(--l-fill-3) !important; }
html[data-doc="l"] .bg-blue-50 { background-color: var(--l-blue-soft) !important; }
html[data-doc="l"] .bg-dark-900 { background-color: var(--l-bg); }
html[data-doc="l"] .bg-dark-800 { background-color: var(--l-band); }
html[data-doc="l"] .bg-dark-700 { background-color: var(--l-fill-2); }
html[data-doc="l"] .bg-dark-600 { background-color: var(--l-fill-3); }
html[data-doc="l"] :is(.bg-white\/5, .bg-white\/10, [class*="bg-white/["]) { background-color: var(--l-band); }
html[data-doc="l"] .glass {
  background: rgba(255, 255, 255, 0.94) !important;
  border-bottom-color: var(--l-line);
}

/* Borders and rings */
html[data-doc="l"] .border-gray-200 { border-color: var(--l-line) !important; }
html[data-doc="l"] :is(.border-dark-600, .border-dark-700, [class*="border-white/"]) { border-color: var(--l-line); }
html[data-doc="l"] [class*="ring-white/"] { --tw-ring-color: var(--l-line); }


/* --------------------------------------------------------------------------
   4. Type: Inter everywhere
   Inline rules force Fraunces on h1 and h2 with !important and set mono or
   serif families at id level (#chaptersRoot, #roi-calculator), so the
   family override needs !important to reach every element.
   -------------------------------------------------------------------------- */
html[data-doc="l"] body,
html[data-doc="l"] body * { font-family: var(--l-sans) !important; }

/* Numbers that used mono or serif keep their columns with tabular figures.
   Number-only classes: Inter's tnum also widens the hyphen, so it never
   goes on running text or headings. */
html[data-doc="l"] :is(.serif, .tabular-nums, [class*="-num"], [class*="-value"]) {
  font-variant-numeric: tabular-nums;
}

/* Headings: Inter 600 with tight tracking, as on the homepage. */
html[data-doc="l"] :is(h1, h2, h3, h4) {
  font-weight: 600;
  letter-spacing: -0.02em;
}
html[data-doc="l"] :is(h1, h2, h3) { color: var(--l-ink); }
html[data-doc="l"] h1 { letter-spacing: -0.025em; }
html[data-doc="l"] h3 { letter-spacing: -0.015em; }

/* Accent phrases: solid Liquid blue, upright, same weight. Never a gradient.
   The inline .gradient-text rule clips a gradient with !important. */
html[data-doc="l"] .gradient-text {
  background: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-fill-color: currentColor !important;
  color: var(--l-blue) !important;
}
html[data-doc="l"] :is(h1, h2, h3, h4) :is(em, i, .italic, .gradient-text) {
  font-style: normal !important;
  font-weight: inherit !important;
  color: var(--l-blue) !important;
  -webkit-text-fill-color: currentColor !important;
  padding-right: 0;
}

/* Eyebrows: the mono uppercase labels become muted Inter in sentence style.
   The words stay as written. Some carry an inline color, hence !important
   on that variant only. */
html[data-doc="l"] .eyebrow {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
  color: var(--l-muted);
}
html[data-doc="l"] .eyebrow[style*="color"] { color: var(--l-muted) !important; }
/* Brackets only on heading eyebrows: an eyebrow right before a heading, or
   the only child of a wrapper right before a heading. Stat labels and quote
   attributions that reuse .eyebrow stay plain. */
html[data-doc="l"] .eyebrow:has(+ :is(h1, h2, h3, h4))::before,
html[data-doc="l"] :has(> .eyebrow:only-child):has(+ :is(h1, h2, h3, h4)) > .eyebrow::before {
  content: "[\00a0";
  color: var(--l-subtle);
  font-weight: 400;
}
html[data-doc="l"] .eyebrow:has(+ :is(h1, h2, h3, h4))::after,
html[data-doc="l"] :has(> .eyebrow:only-child):has(+ :is(h1, h2, h3, h4)) > .eyebrow::after {
  content: "\00a0]";
  color: var(--l-subtle);
  font-weight: 400;
}


/* --------------------------------------------------------------------------
   5. Nav: white bar, 94% white with a blur and a hairline bottom.
   The hide-on-scroll transform (.nav-hidden) is untouched.
   -------------------------------------------------------------------------- */
html[data-doc="l"] .site-nav {
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(12px) saturate(1.5);
  backdrop-filter: blur(12px) saturate(1.5);
  border-bottom: 1px solid var(--l-line);
}
html[data-doc="l"] .site-nav-bar { height: var(--l-nav-h); }

/* Liquid logo: the page ships the light-on-dark PNG. Push its pixels out of
   the box and paint the dark-on-white PNG (same 900x300 canvas) behind it.
   The img keeps its alt text and its accessible name. */
html[data-doc="l"] :is(.site-nav, body > footer) img[src$="/liquid-logo.png"] {
  height: 40px;
  width: 120px;
  max-width: none;
  object-position: -9999px 0;
  background: url("/logos/liquid-logo-full.png") center / contain no-repeat;
}
html[data-doc="l"] .site-nav img[src$="/liquid-logo.png"] { margin: -5px -15px -5.6px -14.8px; }
html[data-doc="l"] .site-nav-bar > a:first-child {
  min-height: 44px;
  border-radius: 8px;
  transition: opacity var(--l-dur-ui) ease-out;
}
html[data-doc="l"] .site-nav-bar > a:first-child:hover { opacity: 0.8; }

/* Desktop links: full bar height so the active rule sits on the hairline. */
html[data-doc="l"] .site-nav .nav-link {
  color: var(--l-ink-2);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  padding: 0;
  border-bottom: 0;
  transition: color var(--l-dur-ui) ease-out, box-shadow var(--l-dur-ui) ease-out;
}
html[data-doc="l"] .site-nav-bar .nav-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--l-nav-h);
}
html[data-doc="l"] .site-nav-bar .nav-link:focus-visible { outline-offset: -10px; border-radius: 12px; padding-inline: 8px; margin-inline: -8px; }
html[data-doc="l"] .site-nav .nav-link:hover { color: var(--l-blue); }
html[data-doc="l"] .site-nav-bar .nav-link.is-active {
  color: var(--l-ink);
  box-shadow: inset 0 -2px 0 var(--l-blue);
}

/* Menu toggle: 44px tap target, ink icon. */
html[data-doc="l"] .site-nav-bar button {
  padding: 10px;
  margin-right: -10px;
  border-radius: var(--l-r-pill);
  color: var(--l-ink) !important;
}
html[data-doc="l"] .site-nav-bar button:hover { background-color: var(--l-band); }

/* Mobile menu: a white panel under the bar. */
html[data-doc="l"] .site-nav-menu {
  background-color: var(--l-bg);
  border-top: 1px solid var(--l-line);
  box-shadow: 0 24px 48px -24px rgba(11, 18, 32, 0.18);
}
html[data-doc="l"] .site-nav-menu > div { padding-block: 4px 12px; }
html[data-doc="l"] .site-nav-menu .nav-link {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0;
  border-bottom: 1px solid var(--l-line);
  font-size: 16px;
  color: var(--l-ink);
}
html[data-doc="l"] .site-nav-menu .nav-link:last-child { border-bottom: 0; }
html[data-doc="l"] .site-nav-menu .nav-link.is-active {
  color: var(--l-blue);
  box-shadow: none;
  padding-left: 0;
}


/* --------------------------------------------------------------------------
   6. Hero #claim: centred, as on the homepage hero.
   -------------------------------------------------------------------------- */
html[data-doc="l"] #claim {
  padding-top: calc(var(--l-nav-h) + 40px);
  padding-bottom: 56px;
}
@media (min-width: 768px) {
  html[data-doc="l"] #claim {
    padding-top: calc(var(--l-nav-h) + 64px);
    padding-bottom: 72px;
  }
}

/* The eyebrow pill becomes a plain bracket eyebrow. */
html[data-doc="l"] #claim .rounded-full:has(> .eyebrow:only-child) {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  margin-bottom: 16px;
}

/* Wider column so the H1 can run about 1120px across. */
html[data-doc="l"] #claim > .max-w-5xl { max-width: 1200px; }

/* H1: wide and a little smaller so it holds 3 lines or fewer on desktop.
   The forced breaks are hidden so the text wraps naturally. */
html[data-doc="l"] #claim h1 {
  font-size: clamp(1.75rem, 1.3rem + 1.9vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  width: 100%;
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 20px;
  text-wrap: balance;
}
html[data-doc="l"] #claim h1 br { display: none; }

/* Sub */
html[data-doc="l"] #claim h1 + div { max-width: 760px; margin-bottom: 24px; }
html[data-doc="l"] #claim h1 + div > p {
  font-size: clamp(1.0625rem, 1.016rem + 0.19vw, 1.1875rem);
  line-height: 1.55;
  letter-spacing: -0.005em;
  color: var(--l-ink-2) !important;
  text-wrap: pretty;
}

/* Capacity pill: a light blue chip. */
html[data-doc="l"] #claim .rounded-full.bg-dark-800 {
  gap: 8px;
  min-height: 32px;
  padding: 6px 14px;
  background-color: var(--l-blue-soft);
  border: 1px solid var(--l-blue-line);
  margin-bottom: 48px;
}
html[data-doc="l"] #claim .rounded-full.bg-dark-800 > span:last-child {
  color: var(--l-blue-hover);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}
html[data-doc="l"] #claim .rounded-full.bg-dark-800 > span:first-child {
  flex: none;
  background-color: var(--l-cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.18);
  animation: none;
}



/* --------------------------------------------------------------------------
   7. Section headers (generic: eyebrow, h2, sub). No section layout here.
   -------------------------------------------------------------------------- */
html[data-doc="l"] h2.text-3xl {
  font-size: clamp(1.875rem, 1.55rem + 1.333vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-top: 14px;
  margin-bottom: 14px;
}
html[data-doc="l"] h2.text-3xl + p {
  font-size: clamp(1.0625rem, 1.016rem + 0.19vw, 1.1875rem);
  line-height: 1.55;
  letter-spacing: -0.005em;
  color: var(--l-ink-2) !important; /* beats the .text-gray-500 remap */
  text-wrap: pretty;
}


/* --------------------------------------------------------------------------
   8. Shared components (generic only; sections own their own looks)
   -------------------------------------------------------------------------- */
/* Card surface: white, hairline, 16px radius, soft shadow. */
html[data-doc="l"] .bg-white:is(.rounded-xl, .rounded-2xl, .rounded-3xl) {
  border-radius: var(--l-r-card);
  box-shadow: var(--l-shadow-card);
}
html[data-doc="l"] .card-hover:hover {
  border-color: var(--l-line-strong) !important; /* inline hover sets a white border with !important */
  box-shadow: var(--l-shadow-float);
  transform: translateY(-2px);
}
html[data-doc="l"] .step-img { box-shadow: 0 0 0 1px var(--l-line), var(--l-shadow-card); }
html[data-doc="l"] .step-number {
  background: var(--l-blue-soft);
  color: var(--l-blue-hover);
}

/* Pills: hairline outline. */
html[data-doc="l"] .rounded-full.border:not(.bg-dark-800) { border-color: var(--l-line); }

/* "YOU GET" tags become light pills. The source rule is id-scoped, so this
   one is too. */
html[data-doc="l"] #chaptersRoot .chapter-tag {
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 10px;
  border-radius: var(--l-r-pill);
  background: var(--l-blue-soft);
  border: 1px solid var(--l-blue-line);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0;
  text-transform: none;
  color: var(--l-ink-2);
}
html[data-doc="l"] #chaptersRoot .chapter-tag svg { margin-top: 0; color: var(--l-blue); }
html[data-doc="l"] #chaptersRoot .chapter-tag-key { color: var(--l-blue-hover); font-weight: 600; }
html[data-doc="l"] #chaptersRoot .chapter-tag-sep { color: var(--l-subtle); }

/* Buttons: blue pill, white text, 44px+ tap height. */
html[data-doc="l"] :is(a, button):is(.bg-blue-500, .bg-blue-600, .bg-blue-700) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding-inline: 20px;
  border-radius: var(--l-r-pill);
  background-color: var(--l-blue);
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: var(--l-shadow-btn);
}
html[data-doc="l"] :is(a, button):is(.bg-blue-500, .bg-blue-600, .bg-blue-700):hover { background-color: var(--l-blue-hover); }
html[data-doc="l"] :is(a, button):is(.bg-blue-500, .bg-blue-600, .bg-blue-700):active { transform: translateY(1px); }

/* Inline text links inside prose. */
html[data-doc="l"] :is(p, li) > a:not([class]) {
  color: var(--l-blue);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: currentColor;
  text-underline-offset: 3px;
}
html[data-doc="l"] :is(p, li) > a:not([class]):hover { color: var(--l-blue-hover); }


/* --------------------------------------------------------------------------
   9. Modals: lightbox and fullscreen video
   -------------------------------------------------------------------------- */
html[data-doc="l"] body > div.fixed.inset-0:is([x-show="lightbox"], [x-show="videoModal"]) {
  background-color: var(--l-overlay);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
html[data-doc="l"] [x-show="lightbox"] > img {
  padding: 6px;
  background-color: var(--l-surface);
  border-radius: var(--l-r-card);
  box-shadow: 0 24px 64px -16px rgba(11, 18, 32, 0.5);
}
html[data-doc="l"] [x-show="videoModal"] iframe {
  border-radius: 12px;
  background-color: var(--l-ink);
  box-shadow: 0 0 0 6px var(--l-surface), 0 24px 64px -16px rgba(11, 18, 32, 0.5);
}
html[data-doc="l"] :is([x-show="lightbox"], [x-show="videoModal"]) > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--l-r-pill);
  background-color: var(--l-surface);
  color: var(--l-ink) !important; /* beats the .text-gray-600 remap */
  box-shadow: 0 0 0 1px var(--l-line), 0 8px 24px -8px rgba(11, 18, 32, 0.35);
}
html[data-doc="l"] :is([x-show="lightbox"], [x-show="videoModal"]) > button:hover { color: var(--l-blue) !important; }
html[data-doc="l"] :is([x-show="lightbox"], [x-show="videoModal"]) > button svg { width: 22px; height: 22px; }


/* --------------------------------------------------------------------------
   10. Footer (the page footer, not the calculator footer)
   -------------------------------------------------------------------------- */
html[data-doc="l"] body > footer {
  background-color: var(--l-bg);
  border-top: 1px solid var(--l-line);
  color: var(--l-muted);
  padding-block: 40px 32px;
}
html[data-doc="l"] body > footer img[src$="/liquid-logo.png"] {
  margin: -5px -15px -5.6px -14.8px;
}
html[data-doc="l"] body > footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  color: var(--l-ink-2);
  transition: color var(--l-dur-ui) ease-out;
}
html[data-doc="l"] body > footer a:hover { color: var(--l-blue); }
html[data-doc="l"] body > footer .text-sm { font-size: 14px; }
html[data-doc="l"] body > footer .text-sm:not(:has(a)) { color: var(--l-muted) !important; }
@media (max-width: 767px) {
  html[data-doc="l"] body > footer .flex-col { gap: 12px; }
  html[data-doc="l"] body > footer .text-sm { text-align: center; }
}


/* --------------------------------------------------------------------------
   11. Focus and motion
   -------------------------------------------------------------------------- */
/* One visible ring everywhere. The legacy rings were light blue or removed,
   so the colour, width and style are !important; offsets stay per section. */
html[data-doc="l"] :focus-visible {
  outline: 2px solid var(--l-blue) !important;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html[data-doc="l"],
  html[data-doc="l"].scroll-smooth { scroll-behavior: auto !important; }
  html[data-doc="l"] *,
  html[data-doc="l"] *::before,
  html[data-doc="l"] *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  html[data-doc="l"] :is(.reveal, .reveal-init, .l-rise) {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
  html[data-doc="l"] .card-hover:hover { transform: none; }
}
