/*
 * FinFlot — shared chrome for all four pages: base, typography helpers, nav
 * (with mobile sheet, skip link and the case-line progress bar), buttons,
 * chips, callout, entity card, footer, reveal and reduced-motion rules.
 * Section-specific styles stay inline in each page. Tokens live in tokens.css.
 */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--blue); text-decoration: none; }
::selection { background: rgba(195,146,46,0.28); color: var(--ink); }
summary::-webkit-details-marker { display: none; }
input::placeholder, textarea::placeholder { color: #A9B0C0; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
main { display: block; }
main:focus { outline: none; }
svg { overflow: visible; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-soft); }
.kicker .num { color: var(--gold-ink); }
.display { font-family: var(--serif); font-weight: 550; letter-spacing: -0.015em; line-height: 1.08; margin: 0; color: var(--ink); }
.grad-word { font-style: italic; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 0.06em; }
.lede { margin: 0; color: var(--ink-soft); line-height: 1.7; text-wrap: pretty; }
.mono { font-family: var(--mono); }

/* visually hidden (screen-reader text) */
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- skip link ---- */
.skip { position: absolute; left: 16px; top: -60px; z-index: calc(var(--z-consent) + 1); background: var(--navy); color: var(--ivory); padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; transition: top 0.15s ease; }
.skip:focus { top: 12px; outline: 2px solid var(--gold); }

/* ---- nav ---- */
nav.site-nav { position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-nav); background: rgba(250,247,240,0.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line-soft); }
.nav-inner { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { display: inline-flex; flex-direction: row; align-items: center; gap: 9px; line-height: 1; }
.logo .mark { width: 26px; height: 26px; display: block; flex: none; }
.logo .word { font-size: 22px; letter-spacing: -0.015em; font-style: italic; font-weight: 700; }
.logo .fin { color: var(--logo-blue); }
.logo .flot { color: var(--logo-gold); }
.nav-right { display: flex; align-items: center; gap: 30px; }
.nav-links { display: flex; align-items: center; gap: 30px; font-size: 14.5px; margin: 0; padding: 0; list-style: none; }
.nav-links a { color: var(--ink-soft); font-weight: 500; transition: color 0.2s ease; position: relative; padding: 6px 0; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-links a[aria-current] { color: var(--ink); font-weight: 600; }
.nav-links a[aria-current]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 1px; background: var(--grad); }
.nav-burger { display: none; width: 44px; height: 44px; margin-right: -8px; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 12px; background: transparent; cursor: pointer; color: var(--ink); }
.nav-burger:hover { border-color: var(--line); background: rgba(255,255,255,0.6); }
.nav-burger svg { width: 26px; height: 26px; display: block; }
.nav-burger .bar { transition: transform 0.25s var(--ease), opacity 0.2s ease; transform-box: fill-box; transform-origin: center; }
.nav-burger[aria-expanded="true"] .bar-1 { transform: translateY(6.3px) rotate(-40deg); }
.nav-burger[aria-expanded="true"] .bar-2 { opacity: 0; }
.nav-burger[aria-expanded="true"] .bar-3 { transform: translateY(-6.3px) rotate(40deg); }
.nav-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; }
#scroll-progress { position: absolute; left: 0; top: 0; bottom: 0; width: 0%; background: var(--grad); }
.nav-ticks { position: absolute; left: 0; right: 0; top: -2px; height: 4px; }
.nav-ticks span { position: absolute; top: 0; width: 2px; height: 4px; border-radius: 1px; background: var(--gold); opacity: 0.9; }

@media (max-width: 860px) {
  .nav-right { gap: 12px; }
  .nav-burger { display: inline-flex; }
  .nav-links { display: none; }
  nav.site-nav.is-open .nav-links { display: flex; flex-direction: column; align-items: stretch; gap: 0; position: absolute; left: 0; right: 0; top: var(--nav-h); z-index: calc(var(--z-nav) + 10); background: var(--card); border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px rgba(20,36,64,0.12); padding: 8px 22px 14px; }
  nav.site-nav.is-open .nav-links li { border-top: 1px solid var(--line-soft); }
  nav.site-nav.is-open .nav-links li:first-child { border-top: none; }
  nav.site-nav.is-open .nav-links a { display: flex; align-items: center; min-height: 48px; font-size: 16px; padding: 4px 2px; }
  nav.site-nav.is-open .nav-links a[aria-current]::after { display: none; }
  nav.site-nav.is-open .nav-links a[aria-current] { color: var(--blue); }
  .nav-ticks { display: none; }
}
@media (max-width: 400px) {
  .nav-cta.btn-small { padding: 9px 14px; font-size: 13px; }
}

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; gap: 10px; border-radius: 999px; font-weight: 600; font-family: var(--sans); cursor: pointer; text-decoration: none; transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--navy); color: var(--ivory); padding: 14px 26px; font-size: 15px; border: none; box-shadow: 0 10px 24px rgba(22,41,79,0.18); }
.btn-primary:hover { transform: translateY(-2px); background: var(--navy-2); color: #FFFFFF; box-shadow: 0 14px 30px rgba(22,41,79,0.24); }
.btn-outline { border: 1px solid var(--line); color: var(--ink); padding: 13px 26px; font-size: 15px; background: transparent; font-weight: 500; }
.btn-outline:hover { border-color: var(--blue); background: rgba(36,86,200,0.05); color: var(--ink); }
.btn-small { background: var(--navy); color: var(--ivory); padding: 10px 20px; font-size: 14px; border: none; white-space: nowrap; }
.btn-small:hover { transform: translateY(-1px); background: var(--navy-2); color: #FFFFFF; }
.btn-ivory { background: var(--ivory); color: var(--navy); padding: 14px 26px; font-size: 15px; border: none; box-shadow: 0 12px 28px rgba(0,0,0,0.28); }
.btn-ivory:hover { transform: translateY(-2px); background: #FFFFFF; color: var(--navy); }
.btn-ghost-light { border: 1px solid rgba(251,248,241,0.35); color: var(--ivory); padding: 13px 26px; font-size: 15px; background: transparent; font-weight: 500; }
.btn-ghost-light:hover { border-color: var(--gold); color: #FFFFFF; background: rgba(251,248,241,0.06); }
.btn-ghost { border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 8px 14px; font-size: 13px; font-weight: 500; }
.btn-ghost:hover { border-color: var(--blue); }

.chip { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--ink-soft); border: 1px solid var(--line); background: rgba(255,255,255,0.7); border-radius: 999px; padding: 7px 15px; }
a.chip { transition: border-color 0.2s ease, color 0.2s ease; }
a.chip:hover { border-color: var(--blue); color: var(--ink); }

/* ---- shared blocks ---- */
.callout { display: flex; align-items: flex-start; gap: 16px; border: 1px dashed rgba(195,146,46,0.6); background: rgba(195,146,46,0.06); border-radius: var(--r-card); padding: 24px 28px; }
.callout .diamond { flex: none; width: 10px; height: 10px; margin-top: 7px; background: var(--gold); transform: rotate(45deg); }
.callout p { margin: 0; font-size: 15px; line-height: 1.7; color: var(--ink-soft); text-wrap: pretty; }
.callout strong { color: var(--ink); font-weight: 600; }

.entity-card { border: 1px solid var(--line); background: var(--card); border-radius: var(--r-card); padding: 24px 26px; margin: 4px 0 12px; }
.entity-card .row { display: flex; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 14.5px; }
.entity-card .row:last-child { border-bottom: none; }
.entity-card .row .k { flex: none; width: 150px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.entity-card .row .v { color: var(--ink); }

/* sprite icons: <svg class="ic"><use href="assets/icons.svg#ff-house"/></svg> */
.ic { width: 24px; height: 24px; display: inline-block; vertical-align: middle; flex: none; fill: none; color: inherit; overflow: visible; }
.ic-lg { width: 40px; height: 40px; }
.ic-xl { width: 64px; height: 64px; }

/* illustrative badge — every drawn mock carries one, visibly */
.illus { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-ink); border: 1px dashed rgba(195,146,46,0.65); border-radius: 12px; padding: 4px 10px; background: rgba(250,247,240,0.85); line-height: 1.4; max-width: 100%; }
.illus::before { content: ""; flex: none; width: 6px; height: 6px; background: var(--gold); transform: rotate(45deg); }

/* ---- footer ---- */
footer.site-footer { background: var(--navy); color: #C7D2E8; padding: 64px 0 44px; }
.foot-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; flex-wrap: wrap; margin-bottom: 38px; }
.foot-brand { display: flex; flex-direction: column; gap: 14px; max-width: 400px; }
footer .logo { --logo-blue: #FFFFFF; } /* dark-background logo variant: white + gold */
.foot-tagline { margin: 0; font-size: 14.5px; line-height: 1.65; color: #B9C5DE; }
.foot-links { display: flex; gap: 32px; font-size: 14.5px; flex-wrap: wrap; }
.foot-links a { color: #C7D2E8; transition: color 0.2s ease; }
.foot-links a:hover { color: #FFFFFF; text-decoration: none; }
.foot-links a.pro { color: var(--gold-light); }
.foot-legal { border-top: 1px solid rgba(199,210,232,0.16); padding-top: 26px; display: flex; flex-direction: column; gap: 14px; }
.foot-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot-row .mono { font-family: var(--mono); font-size: 12px; color: #8FA0C2; }
.foot-disclaimer { margin: 0; max-width: 880px; font-size: 12.5px; line-height: 1.7; color: #8FA0C2; }
.foot-rule { position: relative; height: 2px; border-radius: 1px; background: var(--grad); margin-bottom: 26px; opacity: 0.9; }
.foot-rule i { position: absolute; top: -3px; width: 2px; height: 8px; border-radius: 1px; background: var(--gold-light); }
.foot-rule i:nth-child(1) { left: 12%; } .foot-rule i:nth-child(2) { left: 31%; } .foot-rule i:nth-child(3) { left: 50%; } .foot-rule i:nth-child(4) { left: 69%; } .foot-rule i:nth-child(5) { left: 88%; }
.foot-disc-row { display: flex; align-items: flex-start; gap: 24px; }
.foot-wd { flex: none; width: 200px; height: auto; color: #C7D2E8; opacity: 0.8; --card: rgba(255,255,255,0.06); --gold-ink: #E9C267; }
@media (max-width: 680px) { .foot-wd { display: none; } }

/* ---- reveal ---- */
[data-reveal] { will-change: opacity, transform; }

@media (max-width: 680px) {
  .wrap { padding: 0 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .btn, .nav-burger .bar { transition: none; }
}
