/* ============================================================
   FINANFA TECH — design tokens & shared components
   Palette sampled from the brand mark (logo_finanfa.jpeg):
     brand-700 #0B2E85 (dark corner) → brand-500 #175DDF (light corner)
     cyan accent #34C4F8 (notification dot)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --brand-900: #071A4D;
  --brand-700: #0B2E85;
  --brand-600: #123FA8;
  --brand-500: #175DDF;
  --brand-400: #4C86EE;
  --cyan-400: #34C4F8;
  --cyan-300: #7ADCFB;

  --ink-900: #0A1428;
  --ink-700: #29344A;
  --ink-500: #5B6B85;
  --ink-300: #93A1B8;
  --ink-100: #DCE3EE;

  --paper-0: #FFFFFF;
  --paper-50: #F5F8FD;
  --paper-100: #EAF0FA;

  --accent: var(--cyan-400);

  --font-display: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Consolas, monospace;

  --measure: 65ch;
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 24px;
  --container: 1180px;

  --shadow-card: 0 1px 2px rgba(10, 20, 40, 0.04), 0 12px 28px -14px rgba(11, 46, 133, 0.18);
  --shadow-card-hover: 0 4px 10px rgba(10, 20, 40, 0.06), 0 20px 40px -16px rgba(11, 46, 133, 0.26);

  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--paper-0);
  color: var(--ink-900);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink-900);
  line-height: 1.15;
  margin: 0 0 0.5em;
  text-wrap: balance;
  font-weight: 700;
}
h1 { font-size: clamp(2.3rem, 4.4vw, 3.6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 2.8vw, 2.35rem); letter-spacing: -0.015em; }
h3 { font-size: 1.25rem; letter-spacing: -0.005em; }

p { margin: 0 0 1em; }
.lede { font-size: 1.15rem; color: var(--ink-700); max-width: var(--measure); }

a { color: var(--brand-500); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--brand-600); }

code, .mono { font-family: var(--font-mono); }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-500);
}
.eyebrow::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.8em 1.5em;
  border-radius: var(--radius-s);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color .15s ease;
  line-height: 1.2;
}
.btn:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 3px; }
.btn-primary {
  background: var(--brand-500);
  color: #fff;
  box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--brand-500) 70%, transparent);
}
.btn-primary:hover { background: var(--brand-600); color: #fff; transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--ink-900);
  border-color: var(--ink-100);
}
.btn-ghost:hover { border-color: var(--brand-400); color: var(--brand-600); }
.btn-on-dark {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-color: rgba(255,255,255,0.22);
  backdrop-filter: blur(6px);
}
.btn-on-dark:hover { background: rgba(255,255,255,0.16); color: #fff; }

/* ---------- nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper-0) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ink-100);
}
.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink-900);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.brand .sub { font-family: var(--font-mono); font-weight: 400; font-size: 0.7rem; color: var(--ink-500); letter-spacing: 0.03em; margin-top: 2px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  color: var(--ink-700);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 14px;
  border-radius: var(--radius-s);
  transition: background .15s ease, color .15s ease;
}
.nav-links a:hover { background: var(--paper-100); color: var(--ink-900); }
.nav-links a.cta { color: #fff; background: var(--brand-500); margin-left: 8px; }
.nav-links a.cta:hover { background: var(--brand-600); }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: var(--radius-s);
  border: 1px solid var(--ink-100);
  background: var(--paper-0);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: '';
  display: block;
  width: 18px; height: 2px;
  background: var(--ink-900);
  position: relative;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); top: 0; }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); top: 0; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed;
    inset: 72px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--paper-0);
    border-bottom: 1px solid var(--ink-100);
    padding: 10px 20px 20px;
    gap: 4px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform .18s ease, opacity .18s ease;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 12px 14px; }
  .nav-links a.cta { margin-left: 0; text-align: center; }
}

/* ---------- sections & reveal ---------- */
section { padding: clamp(56px, 9vw, 108px) 0; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head .eyebrow { margin-bottom: 14px; }

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- cards ---------- */
.card {
  background: var(--paper-0);
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-card);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); border-color: color-mix(in srgb, var(--brand-400) 40%, var(--ink-100)); }

/* ---------- footer ---------- */
.site-footer {
  background: var(--ink-900);
  color: var(--ink-100);
  padding: 64px 0 28px;
}
.site-footer a { color: var(--ink-100); }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer-grid h4 {
  color: #fff;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
  font-weight: 500;
  margin-bottom: 14px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 0.94rem; }
.footer-grid ul a { text-decoration: none; }
.footer-grid ul a:hover { text-decoration: underline; }
.footer-legal {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-300);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding-top: 24px;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 18px;
  font-size: 0.85rem;
  color: var(--ink-300);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand-500);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

::selection { background: var(--brand-500); color: #fff; }
