/* ============================================================
   Paar — fintech-modern design system
   Geist + Geist Mono. Tight, monoish, confident.
   ============================================================ */

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

/* ---------- tokens ---------- */
:root {
  /* surfaces */
  --bg:        #f7f7f4;
  --surface:   #ffffff;
  --surface-2: #fbfbf9;
  --surface-3: #efefea;
  --line:      #e5e5df;
  --line-2:    #d6d6cf;

  /* ink */
  --ink:       #0a0a0a;
  --ink-2:     #2a2a2a;
  --muted:     #6b6b66;
  --muted-2:   #8c8c87;

  /* brand */
  --accent:        #0a5c4c;   /* deep emerald */
  --accent-bright: #14a37f;
  --accent-soft:   #e3f1ec;
  --gold:          #b48a3a;
  --gold-soft:     #f4ecd9;

  /* semantic */
  --green:  #11875e;
  --red:    #c7372d;

  /* type */
  --font-sans: 'Geist', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* shape */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;

  /* shadow */
  --shadow-sm: 0 1px 0 rgba(10,10,10,0.04), 0 1px 2px rgba(10,10,10,0.04);
  --shadow:    0 1px 0 rgba(10,10,10,0.05), 0 4px 12px rgba(10,10,10,0.05);
  --shadow-lg: 0 1px 0 rgba(10,10,10,0.06), 0 24px 48px -16px rgba(10,10,10,0.18);

  /* transitions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

:root[data-theme="dark"] {
  --bg:        #0a0a0c;
  --surface:   #131316;
  --surface-2: #18181c;
  --surface-3: #1f1f24;
  --line:      #26262b;
  --line-2:    #34343b;

  --ink:       #f5f5f3;
  --ink-2:     #d8d8d4;
  --muted:     #8a8a90;
  --muted-2:   #6b6b72;

  --accent:        #14b89a;
  --accent-bright: #2dd4bf;
  --accent-soft:   #0f2d2a;
  --gold:          #d4a45a;
  --gold-soft:     #2a2418;

  --green:  #14b89a;
  --red:    #ff6f63;

  --shadow-sm: 0 1px 0 rgba(0,0,0,0.5), 0 1px 2px rgba(0,0,0,0.4);
  --shadow:    0 1px 0 rgba(0,0,0,0.6), 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 1px 0 rgba(0,0,0,0.7), 0 24px 48px -16px rgba(0,0,0,0.6);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
input, button, select, textarea { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* tabular numbers everywhere by default for the mono parts */
.mono, .num, code, kbd {
  font-family: var(--font-mono);
  font-feature-settings: 'tnum', 'zero';
  font-variant-numeric: tabular-nums slashed-zero;
}

/* ---------- container ---------- */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
}
.container-narrow {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- top nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 60px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.logo-mark {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--bg);
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: -0.04em;
  position: relative;
}
.logo-mark::after {
  content: '';
  position: absolute;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent-bright);
  right: 3px; top: 3px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  padding: 7px 12px;
  border-radius: var(--r-sm);
  transition: all 0.15s var(--ease-out);
}
.nav-links a:hover { color: var(--ink); background: var(--surface-3); }
.nav-spacer { flex: 1; }
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 9px 14px;
  height: 36px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s var(--ease-out), background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--ink);
  color: var(--bg);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 1px 2px rgba(0,0,0,0.15);
}
.btn-primary:hover { background: var(--ink-2); }

.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 1px 2px rgba(0,0,0,0.12);
}
.btn-accent:hover { background: var(--accent-bright); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-2);
}
.btn-ghost:hover { background: var(--surface); border-color: var(--ink); }

.btn-quiet {
  background: transparent;
  color: var(--muted);
}
.btn-quiet:hover { color: var(--ink); background: var(--surface-3); }

.btn-lg {
  height: 44px;
  padding: 0 20px;
  font-size: 14.5px;
  border-radius: var(--r-md);
}
.btn-xl {
  height: 52px;
  padding: 0 24px;
  font-size: 15px;
  border-radius: var(--r-md);
}
.btn-full { width: 100%; }

.btn .arr {
  transition: transform 0.2s var(--ease-out);
}
.btn:hover .arr { transform: translateX(2px); }

/* ---------- common surfaces ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.card-elev {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}

/* ---------- pills / tags ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 4px 10px 4px 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 100px;
}
.eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-bright) 25%, transparent);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 3px 7px;
  background: var(--surface-3);
  border-radius: 4px;
}

/* ---------- typography utilities ---------- */
.display {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
}
.display-xl { font-size: clamp(44px, 6vw, 76px); }
.display-lg { font-size: clamp(36px, 4.5vw, 56px); }
.display-md { font-size: clamp(28px, 3vw, 40px); }
.display-sm { font-size: clamp(22px, 2.2vw, 28px); }

.lede {
  font-size: 17px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 56ch;
}

/* ---------- form fields ---------- */
.field {
  display: block;
  margin-bottom: 14px;
}
.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.field-label .hint {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted-2);
}
.input, .select {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 14px;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:hover, .select:hover { border-color: var(--line-2); }
.input:focus, .select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.input.mono { font-family: var(--font-mono); letter-spacing: 0.01em; }
.input-lg { height: 48px; font-size: 15px; }

/* ---------- divider ---------- */
.divider {
  height: 1px;
  background: var(--line);
  margin: 32px 0;
}

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  margin-top: 96px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 56px;
  padding: 64px 0 32px;
}
.footer-tail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0 32px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
  font-family: var(--font-mono);
}
.footer-col h4 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 16px;
  font-family: var(--font-mono);
}
.footer-col a {
  display: block;
  font-size: 13.5px;
  color: var(--ink-2);
  padding: 5px 0;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--accent); }
.footer-blurb {
  font-size: 13.5px;
  color: var(--muted);
  max-width: 30ch;
  margin-top: 14px;
  line-height: 1.5;
}

/* ---------- theme toggle ---------- */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--surface);
  transition: all 0.15s var(--ease-out);
}
.theme-toggle:hover { color: var(--ink); border-color: var(--line-2); }
.theme-toggle svg { width: 16px; height: 16px; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .moon,
:root:not([data-theme="dark"]) .theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }

/* ---------- grid bg pattern ---------- */
.grid-bg {
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--line) 60%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--line) 60%, transparent) 1px, transparent 1px);
  background-size: 56px 56px;
}
.dot-bg {
  background-image: radial-gradient(circle, color-mix(in srgb, var(--line-2) 80%, transparent) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* ---------- helpers ---------- */
.row { display: flex; align-items: center; }
.col { display: flex; flex-direction: column; }
.between { justify-content: space-between; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.muted { color: var(--muted); }
.ink { color: var(--ink); }
.accent { color: var(--accent); }
.green { color: var(--green); }
.red { color: var(--red); }
.txt-sm { font-size: 13px; }
.txt-xs { font-size: 12px; }
.center { text-align: center; }
.mt-1{margin-top:4px;}.mt-2{margin-top:8px;}.mt-3{margin-top:12px;}.mt-4{margin-top:16px;}.mt-6{margin-top:24px;}.mt-8{margin-top:32px;}.mt-12{margin-top:48px;}.mt-16{margin-top:64px;}
.mb-1{margin-bottom:4px;}.mb-2{margin-bottom:8px;}.mb-3{margin-bottom:12px;}.mb-4{margin-bottom:16px;}.mb-6{margin-bottom:24px;}.mb-8{margin-bottom:32px;}

/* ---------- scrollbar polish ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 100px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--muted-2); }

/* ---------- selection ---------- */
::selection { background: var(--accent); color: #fff; }

/* ---------- focus visible ---------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
button:focus { outline: none; }

/* ---------- reveal (decorative entry) ---------- */
/* Content is always visible. The entry animation is a light embellishment
   that runs only when JS confirms IO support — never blocks render. */
.reveal { opacity: 1; transform: none; }
.reveal.in {
  animation: revealUp 0.65s var(--ease-out) both;
}
@keyframes revealUp {
  0%   { opacity: 0; transform: translateY(14px); }
  100% { opacity: 1; transform: translateY(0); }
}
.reveal[data-delay="1"].in{ animation-delay: 0.06s; }
.reveal[data-delay="2"].in{ animation-delay: 0.12s; }
.reveal[data-delay="3"].in{ animation-delay: 0.18s; }
.reveal[data-delay="4"].in{ animation-delay: 0.24s; }
.reveal[data-delay="5"].in{ animation-delay: 0.30s; }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--ink) 50%, transparent);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease-out);
}
.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.modal {
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: 32px;
  transform: translateY(12px) scale(0.98);
  opacity: 0;
  transition: transform 0.32s var(--ease-spring), opacity 0.32s var(--ease-out);
}
.modal-backdrop.open .modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  color: var(--muted);
}
.modal-close:hover { background: var(--surface-3); color: var(--ink); }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .container, .nav-inner { padding: 0 20px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 40px; }
  .nav-links { display: none; }
}
@media (max-width: 520px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-tail { flex-direction: column; gap: 12px; }
}
@media (max-width: 400px) {
  .nav-actions { gap: 6px; }
  .nav-actions .btn { padding: 8px 11px; font-size: 12.5px; }
  .nav-actions .btn-ghost { display: none; }
}
