/* Kontakty.biz — light platform aesthetic, aligned with the in-app look. */
:root {
  --bg: #f4f6f8;        /* page bg, matches app --content-bg */
  --bg-1: #ffffff;      /* card surface */
  --bg-2: #ffffff;      /* card surface */
  --bg-3: #f4f6f8;      /* chip/source bg */
  --bg-4: #edf0f3;      /* alt subtle bg */
  --line: #e8ecef;      /* card border, matches app --card-border */
  --line-2: #dde2e8;    /* input border, matches app --input-border */
  --line-3: #cfd6dc;    /* hover/strong border */
  --ink: #2c3e50;       /* primary text, matches app --text-primary */
  --ink-2: #34495e;     /* slightly muted */
  --ink-3: #7f8c8d;     /* muted, matches app --text-muted */
  --ink-4: #95a5a6;     /* very muted */
  --amber: #1abc9c;     /* primary accent, matches app --green */
  --amber-2: #16a085;   /* accent darker, matches app --green-dark */
  --amber-soft: rgba(26, 188, 156, 0.10);
  --amber-line: rgba(26, 188, 156, 0.32);
  --green: #22c55e;
  --green-soft: rgba(34, 197, 94, 0.12);
  --blue: #3b82f6;
  --blue-soft: rgba(59, 130, 246, 0.10);
  --red: #ef4444;
  --red-soft: rgba(239, 68, 68, 0.10);
  --violet: #8b5cf6;
  --shadow-1: 0 1px 2px rgba(44, 62, 80, 0.04);
  --shadow-2: 0 8px 24px -8px rgba(44, 62, 80, 0.12), 0 2px 4px rgba(44, 62, 80, 0.04);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --font-sans: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  letter-spacing: -0.005em;
  overflow-x: hidden;
}

/* Soft tinted radial — much subtler than the dark version. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 600px at 80% -100px, rgba(26,188,156,0.06), transparent 60%),
    radial-gradient(900px 500px at 10% 10%, rgba(59,130,246,0.04), transparent 60%);
  z-index: 0;
}

main, nav, footer, section { position: relative; z-index: 1; }

/* Type scale */
h1, h2, h3, h4, h5 { margin: 0; font-weight: 500; letter-spacing: -0.02em; line-height: 1.05; }
p { margin: 0; }

.h-display { font-size: clamp(44px, 6.4vw, 88px); letter-spacing: -0.035em; line-height: 0.98; font-weight: 480; }
.h-1 { font-size: clamp(36px, 4.4vw, 60px); letter-spacing: -0.03em; line-height: 1.02; font-weight: 480; }
.h-2 { font-size: clamp(28px, 3vw, 40px); letter-spacing: -0.025em; line-height: 1.08; font-weight: 480; }
.h-3 { font-size: 22px; letter-spacing: -0.015em; font-weight: 500; }
.h-4 { font-size: 17px; font-weight: 500; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.eyebrow .dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--amber); margin-right: 8px; vertical-align: middle; box-shadow: 0 0 10px var(--amber); }
.muted { color: var(--ink-3); }
.text-amber { color: var(--amber); }
.mono { font-family: var(--font-mono); }

/* Layout */
.container { max-width: 1480px; margin: 0 auto; padding: 0 32px; }
.section { padding: 120px 0; }
.section-tight { padding: 80px 0; }
@media (max-width: 720px) { .section { padding: 72px 0; } .section-tight { padding: 56px 0; } }

.section-head { display: flex; flex-direction: column; gap: 16px; max-width: 760px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; align-items: center; text-align: center; }
.section-head p { color: var(--ink-2); font-size: 18px; line-height: 1.5; }

/* Section background variants — visual rhythm between long sections.
   Dark variant re-defines --ink/--bg/--line tokens so every nested
   card, table, eyebrow, and inline-styled element inverts automatically
   without per-component overrides. */
.section-bg-white { background: #ffffff; }
.section-bg-tinted {
  background: linear-gradient(180deg, rgba(26, 188, 156, 0.06), rgba(26, 188, 156, 0.015));
}
.section-bg-dark {
  --ink: #f1f5f9;
  --ink-2: #cbd5e1;
  --ink-3: #94a3b8;
  --ink-4: #64748b;
  --bg-1: rgba(255, 255, 255, 0.04);
  --bg-2: rgba(255, 255, 255, 0.025);
  --bg-3: rgba(255, 255, 255, 0.06);
  --bg-4: rgba(255, 255, 255, 0.10);
  --line: rgba(255, 255, 255, 0.10);
  --line-2: rgba(255, 255, 255, 0.16);
  --line-3: rgba(255, 255, 255, 0.22);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 14px 32px -10px rgba(0, 0, 0, 0.55);
  background: linear-gradient(180deg, #1a2733 0%, #111922 100%);
  color: var(--ink);
}
.section-bg-dark .section-head p,
.section-bg-dark p { color: var(--ink-2); }
.section-bg-dark .pill { color: var(--ink-2); }
.section-bg-dark .source-chip { color: var(--ink-2); }
.section-bg-dark .tbl th { background: rgba(255, 255, 255, 0.03); }
.section-bg-dark .tbl tr:hover td { background: rgba(26, 188, 156, 0.08); }
.section-bg-dark .card { box-shadow: var(--shadow-1); }
.section-bg-dark .skel { background: linear-gradient(90deg, rgba(255,255,255,0.04) 0, rgba(255,255,255,0.10) 40%, rgba(255,255,255,0.04) 80%); background-size: 400px 100%; }
.section-bg-dark .pill-amber { color: #5dd8be; }
.section-bg-dark .text-amber { color: #5dd8be; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  height: 42px;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--amber);
  color: #ffffff;
  border-color: var(--amber);
  box-shadow: 0 8px 20px -8px rgba(26,188,156,0.55), inset 0 1px 0 rgba(255,255,255,0.2);
}
.btn-primary:hover { background: var(--amber-2); border-color: var(--amber-2); transform: translateY(-1px); }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-2);
}
.btn-secondary:hover { border-color: var(--line-3); background: var(--bg-2); }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: transparent; }
.btn-ghost:hover { color: var(--ink); background: var(--bg-2); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn-lg { height: 50px; padding: 0 22px; font-size: 15px; }

/* Cards */
.card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  box-shadow: var(--shadow-1);
}
.card-glow::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg, rgba(26,188,156,0.10), transparent 40%);
  -webkit-mask: linear-gradient(#000,#000) content-box, linear-gradient(#000,#000);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

/* Pills / badges */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
}
.pill-amber { background: var(--amber-soft); border-color: var(--amber-line); color: var(--amber-2); }
.pill-green { background: var(--green-soft); border-color: rgba(34,197,94,0.32); color: #16a34a; }
.pill-blue { background: var(--blue-soft); border-color: rgba(59,130,246,0.32); color: #1d4ed8; }
.pill-red { background: var(--red-soft); border-color: rgba(239,68,68,0.32); color: #b91c1c; }
.pill .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill-amber .dot { box-shadow: 0 0 8px rgba(26,188,156,0.5); }

/* Source chip */
.source-chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 20px; padding: 0 7px;
  border-radius: 4px;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-2);
  letter-spacing: 0.01em;
}
.source-chip .sw { width: 6px; height: 6px; border-radius: 1px; }

/* Divider */
.hr { height: 1px; background: var(--line); border: 0; margin: 0; }

/* Glass */
.glass {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

/* Tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-4);
  font-weight: 500;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
}
.tbl td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  vertical-align: middle;
}
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: rgba(26,188,156,0.04); }

/* Caret animation */
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.caret { display: inline-block; width: 2px; height: 16px; background: var(--amber); vertical-align: -3px; margin-left: 2px; animation: blink 1.1s steps(1) infinite; }

/* Row appear */
@keyframes row-in {
  from { opacity: 0; transform: translateY(6px); background: rgba(26,188,156,0.10); }
  to { opacity: 1; transform: none; background: transparent; }
}
.row-in { animation: row-in 0.6s ease both; }

/* Skeleton */
@keyframes shimmer { 0% { background-position: -200px 0; } 100% { background-position: 200px 0; } }
.skel { background: linear-gradient(90deg, var(--bg-4) 0, var(--bg-3) 40%, var(--bg-4) 80%); background-size: 400px 100%; animation: shimmer 1.4s infinite linear; border-radius: 4px; height: 10px; }

/* Glowing dot */
@keyframes pulse-dot { 0%, 100% { box-shadow: 0 0 0 0 rgba(26,188,156,0.55); } 50% { box-shadow: 0 0 0 6px rgba(26,188,156,0); } }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); animation: pulse-dot 2s infinite; }

/* Grid helpers */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1000px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-6 { grid-template-columns: repeat(2, 1fr); }
}

.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; }

/* Token counter */
.token-bar { height: 6px; border-radius: 3px; background: var(--bg-3); overflow: hidden; position: relative; }
.token-bar-fill { height: 100%; background: linear-gradient(90deg, var(--amber), var(--amber-2)); border-radius: 3px; box-shadow: 0 0 10px rgba(26,188,156,0.45); transition: width 0.6s ease; }

/* Subtle reveal */
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.reveal { animation: fade-up 0.7s ease both; }

/* Selectable utility */
::selection { background: var(--amber); color: #ffffff; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--line-3); }

/* Number ticker */
.nums { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* Hero command bar */
.cmd {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 18px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  box-shadow: var(--shadow-2), 0 0 0 4px rgba(26,188,156,0.04);
  transition: all 0.2s;
}
.cmd:focus-within { border-color: var(--amber-line); box-shadow: var(--shadow-2), 0 0 0 4px rgba(26,188,156,0.12); }
.cmd input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  padding: 14px 0;
}
.cmd input::placeholder { color: var(--ink-4); }

/* Chip */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.chip:hover { border-color: var(--amber-line); color: var(--ink); background: var(--bg-3); }
.chip.active { background: var(--amber-soft); border-color: var(--amber-line); color: var(--amber-2); }

/* Subtle dot grid bg */
.dot-grid {
  background-image: radial-gradient(rgba(44,62,80,0.06) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* Sparkline */
.spark { height: 38px; width: 100%; }

/* Section labels */
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* Hover lift */
.lift { transition: transform 0.2s, border-color 0.2s; }
.lift:hover { transform: translateY(-2px); border-color: var(--line-3); }

/* Sticky scroll cta */
.sticky-cta {
  position: fixed; right: 24px; bottom: 24px;
  z-index: 100;
  display: none;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 6px 6px 6px 14px;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-2);
}
.sticky-cta.visible { display: flex; }

/* Mobile bottom CTA bar */
.mobile-cta {
  display: none;
  position: fixed; left: 12px; right: 12px; bottom: 12px;
  z-index: 100;
  padding: 10px 10px 10px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  box-shadow: 0 12px 32px -12px rgba(44, 62, 80, 0.25);
  align-items: center;
  gap: 10px;
}
@media (max-width: 720px) { .mobile-cta { display: flex; } body { padding-bottom: 80px; } }

/* Chart bars */
.bar { height: 100%; background: var(--bg-4); border-radius: 2px 2px 0 0; }
.bar.amber { background: linear-gradient(180deg, var(--amber-2), var(--amber)); }

/* Anchor offset for sticky nav */
section[id] { scroll-margin-top: 80px; }
