/* =========================================================
   Cadmos Finance — shared stylesheet
   Extracted from per-page inline <style> blocks (slice #8).
   Brand tokens + @font-face moved to canon (slice #9). Each
   Finance HTML page must link the canon stylesheets first:
     assets/cadmos-brand/tokens.css           (brand-core + neutrals)
     assets/cadmos-brand/fonts.css            (Avenir / Circular / JBM)
     assets/cadmos-brand/accents-finance.css  (gold / brass family)
   ========================================================= */

:root {
  /* ───── Finance-local design tokens ────────────────────────────────────
     These are intentionally NOT in canon. Each category is page-specific
     finish or a legacy alias retained to keep this slice's diff small.
     ──────────────────────────────────────────────────────────────────── */

  /* Glass — frosted/translucent surface family used by Finance hero
     cards, nav, and legal-aside. Composition (rgba stops + shadows) is
     intricate and not part of the umbrella brand chart. */
  --glass-nav-bg:       rgba(255,255,255,0.55);
  --glass-nav-border:   rgba(10,20,60,0.08);
  --glass-bg:           rgba(255,255,255,0.52);
  --glass-bg-hi:        rgba(255,255,255,0.70);
  --glass-border:       rgba(255,255,255,0.65);
  --glass-inner:        inset 0 1px 0 rgba(255,255,255,0.9), inset 0 -1px 0 rgba(0,20,106,0.04);
  --glass-shadow:       0 1px 2px rgba(0,20,106,0.05), 0 18px 40px -18px rgba(0,20,106,0.18);
  --glass-dark-bg:      rgba(10,18,50,0.42);
  --glass-dark-border:  rgba(255,255,255,0.14);
  --glass-dark-shadow:  0 1px 2px rgba(0,0,0,0.25), 0 24px 60px -24px rgba(0,0,0,0.45);

  /* Sky-gradient stops — the page-top atmosphere ramp used on Finance
     hero/legal pages. Ported from a Pay hero treatment but unique to
     Finance's chrome composition. */
  --sky-top:           #8FCEFF;
  --sky-mid:           #C4E6FF;
  --sky-low:           #E9F4FF;
  --sky-highlight:     #FFFFFF;
  --sky-ink:           #6689FA;   /* Cadmos.io wave blue, used as sky tint here */
  --sky-ink-2:         #7392F5;
  --sky-ink-3:         #6081EB;

  /* Generic positive/success accent (used sparingly on Finance). Distinct
     from canon's accents-pay.css which is reserved for Pay sub-brand
     identity — Finance must not load Pay's accent stylesheet (PRD User
     Story #8), so we keep teal local until / unless it gets promoted to
     a shared "system positive" scale. Hexes match accents-pay.css. */
  --cadmos-teal:       #00A76F;
  --cadmos-teal-100:   #E6F6EF;

  /* Operational-neutral extras not currently in canon. Small set, low-
     traffic; folding these into canon would balloon the umbrella API
     without clear cross-site demand. */
  --hair-2:     #F1F3F8;
  --white:      #FFFFFF;
  --grey-50:    #F7F8FB;

  /* Legacy aliases — Finance authored against `--font-sans` and
     `--ease-out` long before canon settled on `--font-body` and
     `--ease`. Aliasing here avoids touching ~100 var() callsites in
     this slice; consolidate on a follow-up. */
  --font-sans: var(--font-body);
  --ease-out:  var(--ease);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

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

button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 { margin: 0; text-wrap: balance; color: var(--cadmos-navy); }

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

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

.mono-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  text-transform: uppercase;
  font-weight: 600;
}

.section-marker {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 12px;
}

.section-dark .section-marker .label { color: #fff; }

.section-dark .section-marker .label::before { background: var(--cadmos-gold-hi); }

.section-dark .section-marker .index { color: rgba(255,255,255,0.55); }

.btn-arrow { transition: transform 180ms var(--ease-out); display: inline-block; }

.btn:hover .btn-arrow { transform: translateX(3px); }

.btn-primary {
  background: var(--cadmos-navy);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0,20,106,0.14), 0 10px 26px -12px rgba(0,20,106,0.5);
}

.btn-glass {
  background: rgba(255,255,255,0.55);
  color: var(--cadmos-navy);
  border: 1px solid rgba(255,255,255,0.8);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  backdrop-filter: blur(14px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 1px 2px rgba(0,20,106,0.06), 0 12px 28px -14px rgba(0,20,106,0.25);
}

.btn-glass:hover { background: rgba(255,255,255,0.72); }

.btn-ghost-light {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
}

.btn-ghost-light:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.5); }

.btn-sm { padding: 10px 16px; font-size: 14px; border-radius: 8px; }

.brand-mark {
  display: inline-block;
  height: 26px;
  width: auto;
}

.brand-mark path { fill: currentColor; }

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 150ms;
}

.nav-links a:hover { color: var(--cadmos-navy); }

.nav-contact { font-size: 14px; font-weight: 500; color: var(--ink-2); }

.page-atm-clouds {
  position: absolute;
  inset: 0 -10% 0 -10%;
  overflow: hidden;
}

.hero-inner > * { min-width: 0; }

.hero h1 .accent-brass::after {
  content: "";
  position: absolute;
  left: -2%;
  right: -10%;
  bottom: -0.04em;
  height: 0.22em;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 14' preserveAspectRatio='none'><defs><linearGradient id='b' x1='0%25' y1='0%25' x2='100%25' y2='0%25'><stop offset='0%25' stop-color='%23C89B3C' stop-opacity='0.95'/><stop offset='18%25' stop-color='%23D4A63A' stop-opacity='1'/><stop offset='45%25' stop-color='%23E0B24A' stop-opacity='0.95'/><stop offset='72%25' stop-color='%23D4A63A' stop-opacity='0.6'/><stop offset='90%25' stop-color='%23C89B3C' stop-opacity='0.25'/><stop offset='100%25' stop-color='%23C89B3C' stop-opacity='0'/></linearGradient></defs><path d='M 4 9 Q 60 4 125 6 Q 200 8 270 7 L 296 7' fill='none' stroke='url(%23b)' stroke-width='5' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: 0 50%;
  background-size: 100% 100%;
}

.section {
  padding: 120px 0;
  position: relative;
  background: #fff;
}

.section-tinted { background: var(--grey-50); }

.nav-links a.active { color: var(--cadmos-navy); font-weight: 600; }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-sans);
  font-size: 13px; letter-spacing: 0.12em;
  text-transform: uppercase; font-weight: 600;
  color: var(--cadmos-navy);
}

.final-cta .container { position: relative; z-index: 1; }

.btn-cta-white { background: #fff; color: var(--cadmos-navy); padding: 16px 28px; font-size: 16px; }

.btn-cta-white:hover { background: #F7F8FB; }

.footer-waves svg { display: block; width: 100%; height: 100%; }

.waves-parallax > use { animation: wave-move 25s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite; }

.waves-parallax > use:nth-child(1) { animation-delay: -2s; animation-duration:  9s; }

.waves-parallax > use:nth-child(2) { animation-delay: -3s; animation-duration: 12s; }

.waves-parallax > use:nth-child(3) { animation-delay: -4s; animation-duration: 16s; }

.waves-parallax > use:nth-child(4) { animation-delay: -5s; animation-duration: 22s; }

.footer-brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }

.footer-tag { opacity: 0.65; font-size: 13.5px; margin-top: 14px; max-width: 38ch; line-height: 1.55; }

.footer-col-title { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; opacity: 0.55; }

.footer-col ul { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 10px; }

.footer-col a { color: rgba(255,255,255,0.78); font-size: 13.5px; }

.footer-col a:hover { color: #fff; }

.nav-divider {
  display: inline-block;
  width: 1px; height: 16px;
  margin: 0 4px;
  background: rgba(10,20,60,0.16);
}

.nav .brand-sub { color: var(--cadmos-gold-dk); border-left-color: rgba(212,166,58,0.32); font-weight: 500; }

.nav.is-on-dark.is-scrolled {
  background: rgba(10,16,46,0.55);
  -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    inset 1px 1px 0 rgba(255,255,255,0.20),
    inset 0 0 6px rgba(255,255,255,0.10),
    0 1px 2px rgba(0,0,0,0.20),
    0 10px 30px -18px rgba(0,0,0,0.40);
}

.nav.is-on-dark .nav-brand,
.nav.is-on-dark .nav-links a { color: rgba(255,255,255,0.88); }

.nav.is-on-dark .brand-mark path { fill: #fff; }

.nav.is-on-dark .nav-brand .brand-sub { color: var(--cadmos-gold-hi); border-left-color: rgba(224,178,74,0.40); }

.nav.is-on-dark .nav-divider { background: rgba(255,255,255,0.22); }

.nav.is-on-dark .nav-links a:hover { color: #fff; }

.nav.is-on-dark .btn-primary {
  background: rgba(255,255,255,0.14);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.30);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 6px 18px -10px rgba(0,0,0,0.4);
}

.nav.is-on-dark .btn-primary:hover { background: rgba(255,255,255,0.22); }

.nav-dark-zone { position: absolute; left: 0; right: 0; pointer-events: none; }

.legal-hero { position: relative; padding: 0; background: transparent; }

.legal-hero-inner { position: relative; z-index: 1; max-width: var(--container-max); margin: 0 auto; padding: 96px 48px 56px; }

.legal-eyebrow::before { content: ""; width: 24px; height: 1px; background: linear-gradient(90deg, transparent, var(--cadmos-gold-dk)); opacity: 0.8; }

.legal-hero h1 .accent-brass { color: inherit; position: relative; display: inline-block; white-space: nowrap; padding-bottom: 0.02em; }

.legal-hero h1 .accent-brass::after {
  content: ""; position: absolute; left: -2%; right: -10%; bottom: -0.04em; height: 0.22em;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 14' preserveAspectRatio='none'><defs><linearGradient id='b' x1='0%25' y1='0%25' x2='100%25' y2='0%25'><stop offset='0%25' stop-color='%23C89B3C' stop-opacity='0.95'/><stop offset='18%25' stop-color='%23D4A63A' stop-opacity='1'/><stop offset='45%25' stop-color='%23E0B24A' stop-opacity='0.95'/><stop offset='72%25' stop-color='%23D4A63A' stop-opacity='0.6'/><stop offset='90%25' stop-color='%23C89B3C' stop-opacity='0.25'/><stop offset='100%25' stop-color='%23C89B3C' stop-opacity='0'/></linearGradient></defs><path d='M 4 9 Q 60 4 125 6 Q 200 8 270 7 L 296 7' fill='none' stroke='url(%23b)' stroke-width='5' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat; background-position: 0 50%; background-size: 100% 100%;
}

.legal-hero p { font-size: 18px; line-height: 1.6; color: var(--ink-2); margin-top: 22px; max-width: 64ch; }

.legal-meta { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 32px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.08em; color: var(--ink-3); text-transform: uppercase; }

.legal-meta span { display: inline-flex; align-items: center; gap: 8px; }

.legal-meta span::before { content: ""; width: 5px; height: 5px; background: var(--cadmos-gold-dk); border-radius: 999px; }

.legal-body {
  position: relative; z-index: 1;
  padding: 24px 0 0;
  background:
    linear-gradient(180deg,
      transparent 0%,
      #FFFFFF 240px,
      #FFFFFF calc(100% - 360px),
      #F4F7FB calc(100% - 220px),
      #ECF1F8 calc(100% - 130px),
      #E2E9F4 calc(100% - 60px),
      #DCE4F2 100%);
}

.legal-grid { display: grid; grid-template-columns: 240px 1fr 280px; gap: 48px; align-items: start; }

.legal-toc-title { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--hair); }

.legal-toc a { display: flex; gap: 10px; font-size: 13px; line-height: 1.4; color: var(--ink-2); padding: 6px 8px; border-left: 2px solid transparent; border-radius: 4px; transition: all 150ms var(--ease-out); }

.legal-toc a:hover { color: var(--cadmos-navy); border-left-color: var(--cadmos-gold-dk); background: rgba(246,236,204,0.18); }

.legal-content { font-size: 15.5px; line-height: 1.65; color: var(--ink); max-width: 720px; }

.legal-intro { padding: 24px 28px; border-radius: 14px; background: linear-gradient(135deg, rgba(0,20,106,0.04), rgba(212,166,58,0.06)); border: 1px solid rgba(212,166,58,0.18); margin-bottom: 40px; font-size: 15px; color: var(--ink-2); }

.legal-intro strong { color: var(--cadmos-navy); font-weight: 600; }

.legal-section { margin-bottom: 48px; scroll-margin-top: 100px; }

.legal-section h2 { font-size: 22px; line-height: 1.2; letter-spacing: -0.012em; font-weight: 600; color: var(--ink); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--hair); display: flex; align-items: baseline; gap: 14px; }

.legal-section h2 .num { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--cadmos-gold-dk); letter-spacing: 0.06em; }

.legal-section p { margin-bottom: 12px; color: var(--ink); }

.legal-section ul, .legal-section ol { padding-left: 22px; margin: 8px 0 16px; display: flex; flex-direction: column; gap: 6px; }

.legal-section li { color: var(--ink); }

.legal-section strong { color: var(--cadmos-navy); font-weight: 600; }

.legal-aside {
  --lg-bg-color: rgba(255, 255, 255, 0.30);
  --lg-highlight: rgba(255, 255, 255, 0.78);
  position: sticky; top: 100px;
  padding: 0;
  border-radius: 26px;
  background: transparent;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    0 6px 6px rgba(0,20,106,0.10),
    0 1px 2px rgba(0,20,106,0.05),
    0 30px 80px -36px rgba(0,20,106,0.32);
  color: var(--ink);
}

.legal-aside .glass-filter,
.legal-aside .glass-overlay,
.legal-aside .glass-specular {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.legal-aside .glass-filter {
  z-index: 0;
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
  filter: url(#lensFilter) saturate(140%) brightness(1.10);
}

.legal-aside .glass-overlay {
  z-index: 1;
  background:
    radial-gradient(140% 70% at 50% -10%, rgba(224,178,74,0.16), transparent 70%),
    radial-gradient(120% 110% at 115% 50%, rgba(143,206,255,0.20), transparent 65%),
    radial-gradient(140% 100% at -10% 115%, rgba(102,137,250,0.14), transparent 65%),
    var(--lg-bg-color);
}

.legal-aside .glass-specular {
  z-index: 2;
  box-shadow:
    inset 1px 1px 0 var(--lg-highlight),
    inset 0 0 8px var(--lg-highlight),
    inset 0 -1px 0 rgba(0,20,106,0.08);
}

.legal-aside .glass-content {
  position: relative;
  z-index: 3;
  padding: 28px;
}

.legal-aside .glass-content > *:first-child { margin-top: 0; }

.legal-aside::before {
  content: "";
  position: absolute;
  top: 0; left: 22px; right: 22px;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%, var(--cadmos-gold-hi) 18%,
    var(--cadmos-gold) 50%, var(--cadmos-gold-hi) 82%, transparent 100%);
  opacity: 0.92;
  z-index: 4;
}

.legal-aside-kicker { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cadmos-gold-dk); font-weight: 600; }

.legal-aside p { font-size: 13.5px; line-height: 1.55; color: var(--ink-2); margin-bottom: 14px; }

.legal-aside .aside-line { font-size: 13px; color: var(--ink); margin: 8px 0; }

.legal-aside .aside-line strong { color: var(--cadmos-navy); }

.legal-aside .aside-line a { color: var(--cadmos-navy); font-weight: 600; }

.legal-aside .aside-line a:hover { color: var(--cadmos-gold-dk); }

.legal-aside .btn { width: 100%; padding: 12px 14px; font-size: 14px; margin-top: 14px; }
