/* =========================================================
   SB VISUALS — Design Tokens
   Jednotný systém: barvy, prostor, sklo, motion, typografie
   ========================================================= */

:root {
  /* Barvy — light */
  --bg: #f5f5f7;
  --bg-elev: #ffffff;
  --surface: #ffffff;
  --text: #1d1d1f;
  --text-secondary: #3a3a3c;
  --muted: #6e6e73;
  --line: rgba(0,0,0,.08);
  --line-strong: rgba(0,0,0,.14);
  --accent: #1d1d1f;

  /* Sklo */
  --glass-bg: rgba(255,255,255,.62);
  --glass-bg-strong: rgba(255,255,255,.78);
  --glass-edge: rgba(255,255,255,.75);
  --glass-blur: 40px;
  --glass-highlight: rgba(255,255,255,.55);

  /* Stíny */
  --shadow-sm: 0 4px 16px -8px rgba(0,0,0,.08);
  --shadow-md: 0 12px 36px -16px rgba(0,0,0,.14);
  --shadow-lg: 0 24px 64px -28px rgba(0,0,0,.18);

  /* Radius */
  --r-sm: 12px;
  --r: 20px;
  --r-lg: 28px;
  --r-pill: 980px;

  /* Spacing */
  --pad: 24px;
  --page-max: 1200px;
  --section: clamp(4.5rem, 10vw, 8rem);
  --gap: 1.25rem;

  /* Typografie */
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --fs-hero: clamp(2.4rem, 5.5vw, 4.2rem);
  --fs-h2: clamp(1.9rem, 4vw, 2.75rem);
  --fs-body: 1.05rem;
  --fs-small: .9rem;
  --lh-tight: 1.05;
  --lh-body: 1.65;

  /* Motion */
  --ease: cubic-bezier(.2,.7,.3,1);
  --dur-fast: .25s;
  --dur: .5s;
  --dur-slow: .9s;

  /* Layout */
  --header-h: 68px;
}

html[data-theme="dark"] {
  --bg: #0c0c0e;
  --bg-elev: #1c1c1e;
  --surface: #1c1c1e;
  --text: #f5f5f7;
  --text-secondary: #d0d0d4;
  --muted: #a1a1a6;
  --line: rgba(255,255,255,.1);
  --line-strong: rgba(255,255,255,.18);
  --accent: #f5f5f7;
  --glass-bg: rgba(32,32,34,.6);
  --glass-bg-strong: rgba(40,40,44,.72);
  --glass-edge: rgba(255,255,255,.14);
  --glass-highlight: rgba(255,255,255,.12);
  --shadow-sm: 0 4px 16px -8px rgba(0,0,0,.4);
  --shadow-md: 0 12px 36px -16px rgba(0,0,0,.5);
  --shadow-lg: 0 24px 64px -28px rgba(0,0,0,.6);
}

/* Základ */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--display); letter-spacing: -.03em; line-height: var(--lh-tight); font-weight: 600; }
h1 { font-size: var(--fs-hero); }
h2 { font-size: var(--fs-h2); margin: 0 0 1rem; }
a { color: inherit; }

.container { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--pad); }
section { padding: var(--section) 0; }

/* Sklo — používat střídmě */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.5);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.5);
  border: 1px solid var(--glass-edge);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg), inset 0 1px 0 var(--glass-highlight);
  position: relative;
  overflow: hidden;
}
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, var(--glass-highlight) 0%, transparent 42%);
  pointer-events: none;
}

/* Tlačítka */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .8rem 1.5rem;
  border-radius: var(--r-pill);
  font-weight: 500; text-decoration: none;
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast);
}
.btn-primary { background: var(--accent); color: var(--bg); border: 0; }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { background: transparent; border: 1px solid var(--line-strong); color: var(--text); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Karty */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
}

/* Reveal */
[data-reveal] { opacity: 0; transform: translateY(16px); }
[data-reveal].is-visible { opacity: 1; transform: none; transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

@media (max-width: 768px) {
  :root { --pad: 16px; --header-h: 60px; }
}
