/* ============================================================
   Segmental AI — Editorial-institutional design system
   Source of truth: ../../DESIGN.md
   ============================================================ */

:root {
  /* ----------------------------------------------------------------
     Palette: HARBOR (cool marine slate + steel-blue accent).
     Source: ux_language/06-color-and-theming.md — the system default,
     "precise and financial, the safest default for a fund-services
     product." This replaces the deprecated warm "Anthropic Original"
     paper/oxblood ramp, which that spec bans as an anti-pattern.

     Token NAMES are retained (--paper-*, --oxblood-*) because every page
     references them; only their VALUES change — exactly the "override the
     semantic tier, never touch components" theming model the spec defines.
     Despite the legacy names, --paper-* now carries cool slate and
     --oxblood-* now carries Harbor's steel blue. Hexes in comments are the
     source Harbor values; OKLCH is used per the system's color law.
     ---------------------------------------------------------------- */

  /* Neutral ramp — Harbor cool slate (surfaces step DOWN from the page
     for tonal layering, no shadows; the editorial relationship is kept). */
  --paper-canvas: oklch(0.991 0.002 248);   /* near-white page, cool-tinted (#fbfcfd) */
  --paper-elevated: oklch(0.957 0.005 248); /* Harbor panel #eef1f4 — raised surfaces */
  --paper-tint: oklch(0.941 0.009 248);     /* #e7ecf1 — table-row alt, figure fills */
  --paper-divider: oklch(0.929 0.009 248);  /* Harbor hair #e3e8ed — subtle dividers */
  --paper-rule: oklch(0.888 0.012 248);     /* Harbor hair-2 #d4dbe2 — canonical 1px rule */

  /* Ink ramp — Harbor cool slate text (all verified WCAG AA on every surface) */
  --ink-primary: oklch(0.239 0.024 249);    /* Harbor ink #16202a — 16:1 on canvas */
  --ink-secondary: oklch(0.371 0.030 245);  /* Harbor ink-2 #33424f — 10:1 */
  --ink-tertiary: oklch(0.522 0.023 246);   /* Harbor muted #5f6b76 — ≥4.5:1 incl. small mono */
  --ink-faint: oklch(0.719 0.021 246);      /* Harbor muted-2 #9aa6b1 — decoration/disabled only */

  /* The one accent — Harbor steel-blue. Darkened ~3% L from the source
     #2d7cb0 to #2972a3 so it clears the spec's own ≥4.5:1-as-text rule on
     this site's lighter surfaces (CTA labels, links, footnote refs). */
  --oxblood: oklch(0.530 0.105 242);        /* steel blue #2972a3 — CTA, links, focus, active nav */
  --oxblood-deep: oklch(0.397 0.058 240);   /* Harbor frame #284b63 — hover/active fills, anchors */
  --oxblood-soft: oklch(0.692 0.083 241);   /* mid steel #6ba3cb — focus outline, annotations */
  --oxblood-tint: oklch(0.952 0.015 235);   /* Harbor accent-soft #e6f1f8 — pills, callout, selection */

  /* Highlight — honey-amber emphasis underline, retained as the single warm
     spark. Aligns with the system's amber "attention" family and stays
     independent of the (now cool) accent, as the spec requires. */
  --highlight: oklch(0.920 0.090 90);

  /* Type families */
  --font-serif: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
  --font-sans: 'Manrope', system-ui, -apple-system, sans-serif;
  --font-mono: 'Fragment Mono', 'Roboto Mono', ui-monospace, 'SF Mono', monospace;

  /* Spacing scale */
  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 16px;
  --sp-lg: 24px;
  --sp-xl: 32px;
  --sp-2xl: 48px;
  --sp-3xl: 64px;
  --sp-4xl: 96px;
  --sp-5xl: 144px;
  --sp-6xl: 192px;

  /* Edra-rhythm breathing tokens — for hero, major section transitions,
     and pre-pilot whitespace. Use these where institutional silence is
     load-bearing; --sp-5xl / --sp-6xl remain for tighter sequences. */
  --sp-air-1: clamp(96px, 9vw, 160px);
  --sp-air-2: clamp(140px, 12vw, 200px);

  --measure: 68ch;
  --col-main: 720px;
  --col-margin: 200px;
  --container: 1200px;

  /* Motion */
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
  --d-quick: 180ms;
  --d-standard: 220ms;
  --d-deliberate: 600ms;
}

/* ============================================================
   Reset + base
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  font-feature-settings: 'kern' 1, 'liga' 1;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  background: var(--paper-canvas);
  color: var(--ink-primary);
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.68;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, p, ul, ol, figure {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--oxblood-tint);
  color: var(--oxblood-deep);
}

/* ============================================================
   Layout primitives
   ============================================================ */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--sp-3xl);
  padding-right: var(--sp-3xl);
}

@media (max-width: 768px) {
  .container { padding-left: var(--sp-lg); padding-right: var(--sp-lg); }
}

.measure {
  max-width: var(--col-main);
}

/* Document grid for long-form pages — two columns: kicker margin + main reading column */
.doc-grid {
  display: grid;
  grid-template-columns: var(--col-margin) minmax(0, var(--col-main));
  gap: var(--sp-xl);
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--sp-3xl);
  padding-right: var(--sp-3xl);
}

@media (max-width: 1023px) {
  .doc-grid {
    grid-template-columns: 1fr;
    padding-left: var(--sp-lg);
    padding-right: var(--sp-lg);
  }
}

/* ============================================================
   Navigation
   ============================================================ */

.ds-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper-canvas);
  border-bottom: 1px solid var(--paper-rule);
  height: 72px;
  display: flex;
  align-items: center;
  /* Documented exception to the "don't animate layout properties"
     rule: this height change fires at most once per scroll-threshold
     crossing (scrollY=80), not per frame, so the layout cost is
     bounded. The alternative (transform: scaleY with two stacked
     elements) would add markup complexity for no perceived benefit. */
  transition: height var(--d-standard) var(--ease-out-quart);
}

.ds-nav.is-contracted {
  height: 56px;
}

.ds-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-xl);
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-3xl);
}

.ds-nav-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink-primary);
  letter-spacing: -0.002em;
  text-decoration: none;
}

.ds-nav-mark {
  height: 21px;
  width: auto;
  display: block;
  flex: none;
}

.ds-nav-items {
  display: flex;
  gap: var(--sp-xl);
  list-style: none;
  margin: 0;
  padding: 0;
}

.ds-nav-link {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-secondary);
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: color var(--d-quick) var(--ease-out-quart),
              border-color var(--d-quick) var(--ease-out-quart);
}

.ds-nav-link:hover {
  color: var(--ink-primary);
}

/* Keyboard focus gets the active-state underline pattern (1px oxblood
   at 4px below baseline) on top of the color shift, so focused-but-not-
   active links still read as the focused element. WCAG 2.4.7. */
.ds-nav-link:focus-visible {
  color: var(--ink-primary);
  border-bottom-color: var(--oxblood);
  outline: none;
}

.ds-nav-link.is-active {
  color: var(--ink-primary);
  border-bottom-color: var(--oxblood);
}

.ds-nav-mobile-trigger {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  /* 12px padding + 22px SVG = 46px effective touch target, meeting
     WCAG 2.5.5 AAA target-size minimum on touch devices. */
  padding: 12px;
  color: var(--ink-primary);
}

@media (max-width: 900px) {
  .ds-nav-items { display: none; }
  .ds-nav-mobile-trigger { display: inline-flex; }
  .ds-nav-inner { padding: 0 var(--sp-lg); }
  /* Scoped to .ds-nav-inner on purpose. The bar CTA also carries
     .ds-btn-primary, whose `display: inline-flex` is declared further
     down this file; at equal specificity that later rule wins and the
     button stays visible next to the hamburger, squeezing the
     wordmark. The extra class outranks it whatever the source order.
     Only the bar CTA is hidden — .ds-nav-mobile-cta inside the sheet
     is a different element and must stay visible. */
  .ds-nav-inner .ds-nav-cta { display: none; }
}

/* ============================================================
   Mobile nav sheet — slide-down panel triggered by the hamburger.
   Only visible below 900px; desktop nav-items handle navigation
   directly. Closes on ESC, outside tap, and link click.
   ============================================================ */

.ds-nav-mobile-sheet {
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  z-index: 49;
  background: var(--paper-canvas);
  border-bottom: 1px solid var(--paper-rule);
  padding: var(--sp-xl) var(--sp-lg) var(--sp-lg);
  display: none;
}

/* When the nav contracts on scroll, the sheet's anchor point follows it. */
.ds-nav.is-contracted ~ .ds-nav-mobile-sheet {
  top: 56px;
}

.ds-nav-mobile-sheet.is-open {
  display: block;
}

@media (prefers-reduced-motion: no-preference) {
  .ds-nav-mobile-sheet.is-open {
    animation: ds-nav-sheet-in 240ms var(--ease-out-quart);
  }
}

@keyframes ds-nav-sheet-in {
  from { transform: translateY(-12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.ds-nav-mobile-items {
  list-style: none;
  margin: 0 0 var(--sp-lg) 0;
  padding: 0;
}

.ds-nav-mobile-items li + li {
  border-top: 1px solid var(--paper-divider);
}

.ds-nav-mobile-items a {
  display: block;
  padding: 14px 0;
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 500;
  color: var(--ink-primary);
  text-decoration: none;
  transition: color var(--d-quick) var(--ease-out-quart);
}

.ds-nav-mobile-items a:hover {
  color: var(--oxblood);
}

.ds-nav-mobile-items a:focus-visible {
  outline: 2px solid var(--oxblood-soft);
  outline-offset: 2px;
}

.ds-nav-mobile-items a.is-active {
  color: var(--oxblood);
}

.ds-nav-mobile-cta {
  width: 100%;
  justify-content: center;
}

/* Above 900px the sheet is irrelevant; force it hidden so a stale
   .is-open class from a prior viewport doesn't leak into desktop. */
@media (min-width: 901px) {
  .ds-nav-mobile-sheet,
  .ds-nav-mobile-sheet.is-open {
    display: none;
  }
}

/* ============================================================
   Buttons
   ============================================================ */

.ds-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--paper-canvas);
  color: var(--oxblood);
  border: 1px solid var(--oxblood);
  padding: 14px 26px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 0;
  cursor: pointer;
  transition: background-color var(--d-quick) var(--ease-out-quart),
              color var(--d-quick) var(--ease-out-quart);
  text-decoration: none;
}

.ds-btn-primary:hover {
  background: var(--oxblood);
  color: var(--paper-canvas);
}

.ds-btn-primary:focus-visible {
  background: var(--oxblood);
  color: var(--paper-canvas);
  outline: 2px solid var(--oxblood-soft);
  outline-offset: 2px;
}

.ds-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--paper-canvas);
  color: var(--ink-primary);
  border: 1px solid var(--paper-rule);
  padding: 14px 26px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 0;
  cursor: pointer;
  transition: border-color var(--d-quick) var(--ease-out-quart),
              color var(--d-quick) var(--ease-out-quart);
  text-decoration: none;
}

.ds-btn-secondary:hover {
  border-color: var(--ink-primary);
}

.ds-btn-secondary:focus-visible {
  border-color: var(--ink-primary);
  outline: 2px solid var(--oxblood-soft);
  outline-offset: 2px;
}

/* ============================================================
   Tertiary / inline link

   DESIGN.md §5 specifies this as the third button tier: "Ink Primary
   text with a 1px underline in Paper Rule. Hover shifts the underline
   to Accent. No button shape; reads as inline text." Implemented as
   border-bottom rather than text-decoration so the rule sits at a
   consistent 3px below the baseline and picks up the same 180ms
   transition as the nav and footer links.
   ============================================================ */

.ds-link {
  color: var(--ink-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--paper-rule);
  padding-bottom: 1px;
  transition: color var(--d-quick) var(--ease-out-quart),
              border-color var(--d-quick) var(--ease-out-quart);
}

.ds-link:hover {
  border-bottom-color: var(--oxblood);
}

.ds-link:focus-visible {
  color: var(--oxblood);
  border-bottom-color: var(--oxblood);
  outline: 2px solid var(--oxblood-soft);
  outline-offset: 3px;
}

/* ============================================================
   Kicker (mono caps) + pill
   ============================================================ */

.ds-kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  /* Inline-flex sizes to max-content; without a cap, a long kicker
     forces the document wider than small viewports. */
  max-width: 100%;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--oxblood);
}

.ds-kicker-dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: var(--oxblood);
  display: inline-block;
  flex-shrink: 0;
}

.ds-kicker--quiet {
  color: var(--ink-tertiary);
}
.ds-kicker--quiet .ds-kicker-dot {
  background: var(--ink-tertiary);
}

/* ============================================================
   Typography utility classes
   ============================================================ */

.ds-display {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5.5vw, 4rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.012em;
  color: var(--ink-primary);
  text-wrap: balance;
}

.ds-headline {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.008em;
  color: var(--ink-primary);
  /* Even out multi-line breaks; prevents short orphan lines like
     "...deduplicated / and templatized." */
  text-wrap: balance;
}

.ds-title {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.002em;
  color: var(--ink-primary);
}

.ds-body-lead {
  font-family: var(--font-serif);
  font-size: 1.1875rem;
  font-weight: 400;
  line-height: 1.62;
  color: var(--ink-secondary);
  max-width: var(--measure);
  text-wrap: pretty;
}

.ds-body {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.68;
  color: var(--ink-primary);
  max-width: var(--measure);
  text-wrap: pretty;
}

.ds-body--quiet {
  color: var(--ink-secondary);
}

/* Highlight gesture — honey-amber underline behind a single emphasized
   word. Box-decoration-break: clone keeps the highlight intact when the
   word breaks across lines. Used in display and headline contexts only.
   On load the band sweeps in left-to-right, beginning at 900ms (just
   after the hero ds-reveal stagger completes). Reduced-motion renders
   the final filled state instantly. */
.ds-highlight {
  background: linear-gradient(180deg,
    transparent 62%,
    var(--highlight) 62%,
    var(--highlight) 92%,
    transparent 92%);
  background-repeat: no-repeat;
  background-size: 0% 100%;
  padding: 0 0.04em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

@media (prefers-reduced-motion: no-preference) {
  .ds-highlight {
    animation: ds-highlight-draw 700ms var(--ease-out-quart) 900ms forwards;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ds-highlight {
    background-size: 100% 100%;
  }
}

@keyframes ds-highlight-draw {
  to { background-size: 100% 100%; }
}

/* ============================================================
   Section opener (§N numeral + headline + rule)
   ============================================================ */

.ds-section-opener {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: var(--sp-xl);
  row-gap: var(--sp-2xl);
  align-items: baseline;
  margin-bottom: var(--sp-2xl);
}

.ds-section-num {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--oxblood);
  letter-spacing: 0;
}

.ds-section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.008em;
  color: var(--ink-primary);
  margin: 0;
}

.ds-section-rule {
  grid-column: 1 / -1;
  margin: 0;
  border: none;
  border-top: 1px solid var(--paper-rule);
  width: 100%;
}

/* ============================================================
   Stats band
   ============================================================ */

.ds-stats-band {
  background: var(--paper-elevated);
  border-top: 1px solid var(--paper-rule);
  border-bottom: 1px solid var(--paper-rule);
  padding: var(--sp-4xl) 0;
}

.ds-stats-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-3xl);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3xl);
}

.ds-stat {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
  border-top: 1px solid var(--paper-rule);
  padding-top: var(--sp-lg);
}

.ds-stat-figure {
  font-family: var(--font-mono);
  font-size: clamp(40px, 5.5vw, 72px);
  font-weight: 500;
  line-height: 1;
  color: var(--oxblood);
  font-variant-numeric: tabular-nums slashed-zero;
  letter-spacing: -0.015em;
}

.ds-stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
  max-width: 28ch;
}

@media (max-width: 768px) {
  .ds-stats-inner { grid-template-columns: 1fr; gap: var(--sp-2xl); padding: 0 var(--sp-lg); }
  .ds-stats-band { padding: var(--sp-3xl) 0; }
}

/* ============================================================
   Pilot Kit callout (Paper Elevated panel)
   ============================================================ */

.ds-pilot-kit {
  background: var(--paper-elevated);
  border: 1px solid var(--paper-rule);
  padding: var(--sp-2xl);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-3xl);
  align-items: center;
}

.ds-pilot-copy {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.ds-pilot-headline {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.005em;
  color: var(--ink-primary);
  margin: 0;
  max-width: 32ch;
}

.ds-pilot-body {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.68;
  color: var(--ink-secondary);
  margin: 0;
  max-width: 56ch;
}

@media (max-width: 768px) {
  .ds-pilot-kit {
    grid-template-columns: 1fr;
    gap: var(--sp-lg);
    padding: var(--sp-xl);
  }
}

/* ============================================================
   Footnote refs + sidenotes
   ============================================================ */

.ds-fn-ref {
  font-family: var(--font-mono);
  font-size: 0.65em;
  line-height: 0;
  vertical-align: super;
  margin-left: 1px;
}

.ds-fn-ref a {
  color: var(--oxblood);
  text-decoration: none;
  transition: color var(--d-quick) var(--ease-out-quart);
}

.ds-fn-ref a:hover,
.ds-fn-ref a:focus-visible {
  color: var(--oxblood-deep);
  text-decoration: underline;
}

.ds-sidenote {
  display: flex;
  gap: var(--sp-sm);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-secondary);
}

.ds-sidenote-mark {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--oxblood);
  font-weight: 500;
  flex-shrink: 0;
  padding-top: 2px;
}

/* ============================================================
   Footer
   ============================================================ */

.ds-footer {
  background: var(--paper-canvas);
  border-top: 1px solid var(--paper-rule);
  padding: var(--sp-4xl) 0 var(--sp-2xl);
}

.ds-footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-3xl);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--sp-2xl);
}

.ds-footer-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  align-self: flex-start;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.012em;
  color: var(--ink-primary);
  text-decoration: none;
  transition: color var(--d-quick) var(--ease-out-quart);
}

.ds-footer-mark {
  height: clamp(30px, 3.3vw, 41px);
  width: auto;
  display: block;
  flex: none;
}

.ds-footer-wordmark:hover,
.ds-footer-wordmark:focus-visible {
  color: var(--oxblood);
  outline: none;
}

.ds-footer-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-2xl);
  flex-wrap: wrap;
  padding-top: var(--sp-md);
  border-top: 1px solid var(--paper-divider);
}

.ds-footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--sp-xl);
}

.ds-footer-nav a {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink-secondary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color var(--d-quick) var(--ease-out-quart),
              border-color var(--d-quick) var(--ease-out-quart);
}

.ds-footer-nav a:hover {
  color: var(--oxblood);
}

/* Keyboard focus adds a 1px oxblood underline on top of the color
   shift so the focused link is distinguishable from hover. WCAG 2.4.7. */
.ds-footer-nav a:focus-visible {
  color: var(--oxblood);
  border-bottom-color: var(--oxblood);
  outline: none;
}

/* Footer Solutions group — vertical-specific landing pages that sit
   outside the five-item primary nav. A mono caps label over the link
   list, so the group reads as a separate index rather than as more
   nav items. Sits between the footer nav and the CTA in .ds-footer-row. */

.ds-footer-solutions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.ds-footer-solutions-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
}

.ds-footer-solutions ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--sp-lg);
}

.ds-footer-solutions a {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink-secondary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color var(--d-quick) var(--ease-out-quart),
              border-color var(--d-quick) var(--ease-out-quart);
}

.ds-footer-solutions a:hover {
  color: var(--oxblood);
}

.ds-footer-solutions a:focus-visible {
  color: var(--oxblood);
  border-bottom-color: var(--oxblood);
  outline: none;
}

.ds-footer-meta {
  max-width: var(--container);
  margin: var(--sp-3xl) auto 0;
  padding: var(--sp-lg) var(--sp-3xl) 0;
  border-top: 1px solid var(--paper-rule);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
}

@media (max-width: 768px) {
  .ds-footer-inner { padding: 0 var(--sp-lg); gap: var(--sp-xl); }
  .ds-footer-meta { padding: var(--sp-lg) var(--sp-lg) 0; flex-direction: column; gap: var(--sp-sm); }
  .ds-footer-row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-lg);
  }
  /* Mobile touch-target sizing: footer nav links get more vertical padding
     so each row meets WCAG 2.5.8 (Minimum) on touch devices. */
  .ds-footer-nav ul {
    flex-direction: column;
    gap: 0;
  }
  .ds-footer-nav a {
    padding: 6px 0 8px;
  }
  .ds-footer-solutions a {
    padding: 6px 0 8px;
  }
  /* CTA buttons get more vertical padding on mobile so they meet
     WCAG 2.5.5 (Enhanced) 44px target size on touch. */
  .ds-btn-primary,
  .ds-btn-secondary {
    padding: 18px 26px;
  }
}

/* ============================================================
   Page-load reveal (respects reduced-motion)
   ============================================================ */

@media (prefers-reduced-motion: no-preference) {
  .ds-reveal {
    opacity: 0;
    transform: translateY(8px);
    animation: ds-reveal-up var(--d-deliberate) var(--ease-out-quart) forwards;
  }
  .ds-reveal[data-stagger="1"] { animation-delay: 80ms; }
  .ds-reveal[data-stagger="2"] { animation-delay: 160ms; }
  .ds-reveal[data-stagger="3"] { animation-delay: 240ms; }
  .ds-reveal[data-stagger="4"] { animation-delay: 320ms; }
}

@keyframes ds-reveal-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   Print stylesheet — first-class output for IC review
   ============================================================ */

@media print {
  :root {
    --paper-canvas: #fdfdfe;
    --paper-elevated: #fdfdfe;
    --ink-primary: #16202a;
    --oxblood: #284b63;
  }
  .ds-nav,
  .ds-nav-mobile-trigger,
  .ds-btn-primary,
  .ds-btn-secondary,
  .ds-pilot-kit .ds-pilot-actions {
    display: none !important;
  }
  body { font-size: 11pt; line-height: 1.55; }
  .ds-display { font-size: 28pt; }
  .ds-headline, .ds-section-title { font-size: 18pt; page-break-after: avoid; }
  .ds-section-opener { page-break-before: avoid; page-break-after: avoid; }
  .ds-stats-band, .ds-pilot-kit { background: transparent !important; border: 1px solid #16202a; }
  a { color: inherit; text-decoration: none; }
  .ds-fn-ref a { color: #284b63; }
  @page { margin: 18mm 16mm; }
  /* The inquiry dialog never prints. */
  .ds-modal-overlay { display: none !important; }
}

/* ============================================================
   Demo inquiry dialog
   Injected into <body> by site.js (demoInquiryDialog module) and
   opened by every "Book a Demo" CTA. Hidden until .is-open is set.
   ============================================================ */

.ds-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: var(--sp-2xl) var(--sp-md);
  background: oklch(0.239 0.024 249 / 0.55);
  overflow-y: auto;
}

.ds-modal-overlay.is-open {
  display: flex;
}

.ds-modal-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: auto;
  background: var(--paper-canvas);
  border: 1px solid var(--paper-rule);
  padding: var(--sp-2xl) var(--sp-2xl) var(--sp-xl);
}

.ds-modal-close {
  position: absolute;
  top: var(--sp-md);
  right: var(--sp-md);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: var(--ink-tertiary);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: color var(--d-quick) var(--ease-out-quart);
}

.ds-modal-close:hover {
  color: var(--ink-primary);
}

.ds-modal-close:focus-visible {
  outline: 2px solid var(--oxblood-soft);
  outline-offset: 2px;
}

.ds-modal-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--oxblood);
  margin: 0 0 var(--sp-sm);
}

.ds-modal-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  line-height: 1.2;
  color: var(--ink-primary);
  margin: 0 0 var(--sp-sm);
}

.ds-modal-intro {
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-secondary);
  margin: 0 0 var(--sp-xl);
}

.ds-modal-field {
  margin-bottom: var(--sp-lg);
}

.ds-modal-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-secondary);
  margin-bottom: var(--sp-sm);
}

.ds-modal-label .ds-modal-optional {
  color: var(--ink-faint);
}

.ds-modal-input,
.ds-modal-textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--paper-canvas);
  border: 1px solid var(--paper-rule);
  border-radius: 0;
  padding: 12px 14px;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ink-primary);
  transition: border-color var(--d-quick) var(--ease-out-quart);
}

.ds-modal-textarea {
  resize: vertical;
  min-height: 88px;
}

.ds-modal-input:focus,
.ds-modal-textarea:focus {
  outline: none;
  border-color: var(--oxblood);
}

.ds-modal-field.has-error .ds-modal-input,
.ds-modal-field.has-error .ds-modal-textarea {
  border-color: var(--oxblood-deep);
}

.ds-modal-error {
  display: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--oxblood-deep);
  margin-top: 6px;
}

.ds-modal-field.has-error .ds-modal-error {
  display: block;
}

/* Honeypot: visually removed but still in the DOM so bots fill it.
   Not display:none / type=hidden — those are skipped by smarter bots. */
.ds-modal-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.ds-modal-actions {
  margin-top: var(--sp-xl);
}

.ds-modal-actions .ds-btn-primary {
  width: 100%;
}

.ds-modal-actions .ds-btn-primary[disabled] {
  opacity: 0.55;
  cursor: default;
}

/* Status region — success / network-error messages after submit. */
.ds-modal-status {
  margin-top: var(--sp-md);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-align: center;
  min-height: 1em;
}

.ds-modal-status.is-error {
  color: var(--oxblood-deep);
}

/* Success state swaps the form for a confirmation message. */
.ds-modal-success {
  display: none;
  text-align: center;
  padding: var(--sp-md) 0 var(--sp-sm);
}

.ds-modal-card.is-sent .ds-modal-form,
.ds-modal-card.is-sent .ds-modal-intro {
  display: none;
}

.ds-modal-card.is-sent .ds-modal-success {
  display: block;
}

.ds-modal-success-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.4rem;
  color: var(--ink-primary);
  margin: 0 0 var(--sp-sm);
}

.ds-modal-success-text {
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-secondary);
  margin: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .ds-modal-overlay.is-open {
    animation: ds-modal-fade var(--d-quick) var(--ease-out-quart);
  }
  .ds-modal-overlay.is-open .ds-modal-card {
    animation: ds-modal-rise var(--d-standard) var(--ease-out-quart);
  }
}

@keyframes ds-modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes ds-modal-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  .ds-modal-card {
    padding: var(--sp-xl) var(--sp-lg) var(--sp-lg);
  }
}
