/* ============================================================================
   Poolr — Design tokens
   Modern SaaS · playful · bento-grid-first
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Brand purple ramp */
  --p-50:  #F4F2FC;
  --p-100: #E7E3F7;
  --p-200: #CFC8F0;
  --p-300: #B0A7E5;
  --p-400: #8F83D9;
  --p-500: #6E60CA;
  --p-600: #534AB7;
  --p-700: #3E3690;
  --p-800: #2B256A;
  --p-900: #1C1849;

  /* Playful accents */
  --teal:   #2DB4A0;
  --teal-50:#E0F5F1;
  --mint:   #C9F0D9;
  --amber:  #F0B64A;
  --amber-50:#FBECCC;
  --peach:  #FFD5C2;
  --sky:    #A9C8F5;
  --sky-50: #E3ECFA;

  /* Warm neutrals */
  --cream:   #F6F3EB;
  --cream-2: #EFEADC;
  --paper:   #FFFFFF;
  --ink:     #161421;
  --ink-2:   #2A2640;
  --ink-3:   #4A4566;
  --muted:   #6C6683;
  --muted-2: #9A95AD;
  --line:    #E5E0D0;
  --line-2:  #EFECE0;

  /* Type */
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans:  'Inter', system-ui, -apple-system, sans-serif;

  /* Scale */
  --fs-display: clamp(44px, 6.2vw, 84px);
  --fs-h2:      clamp(32px, 4vw, 54px);
  --fs-h3:      24px;
  --fs-lead:    18px;
  --fs-body:    16px;
  --fs-sm:      14px;
  --fs-xs:      12.5px;

  /* Radius */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(22,20,33,0.04);
  --shadow-sm: 0 2px 8px rgba(22,20,33,0.05), 0 1px 2px rgba(22,20,33,0.04);
  --shadow-md: 0 12px 30px rgba(22,20,33,0.08), 0 2px 6px rgba(22,20,33,0.04);
  --shadow-lg: 0 30px 60px rgba(22,20,33,0.14), 0 8px 20px rgba(22,20,33,0.06);
  --shadow-purple: 0 20px 50px rgba(83,74,183,0.22);

  /* Spacing */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px;
  --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px;
  --sp-16: 64px; --sp-20: 80px; --sp-24: 96px; --sp-32: 128px;

  /* Container */
  --container: 1200px;

  /* Motion */
  --e:   cubic-bezier(0.4, 0, 0.2, 1);
  --eo:  cubic-bezier(0.16, 1, 0.3, 1);
  --eb:  cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  font-feature-settings: "ss01";
  overflow-x: hidden;
}
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; padding: 0; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--p-200); color: var(--p-900); }

/* Container */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* Eyebrow */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--p-700);
  padding: 6px 12px;
  background: var(--p-50);
  border-radius: var(--r-pill);
  border: 1px solid var(--p-100);
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--p-600);
  box-shadow: 0 0 0 4px rgba(83,74,183,0.15);
  animation: pulse 2s var(--e) infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%     { opacity: .5; transform: scale(1.3); }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px;
  border-radius: var(--r-pill);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: transform 150ms var(--e), background 150ms var(--e), color 150ms var(--e), border-color 150ms var(--e), box-shadow 200ms var(--e);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--ink);
  color: var(--cream);
  box-shadow: 0 4px 0 0 var(--p-800), 0 8px 24px rgba(22,20,33,0.15);
}
.btn-primary:hover {
  background: var(--p-600);
  box-shadow: 0 4px 0 0 var(--p-800), 0 12px 28px rgba(83,74,183,0.25);
  transform: translateY(-1px);
}
.btn-accent {
  background: var(--p-600);
  color: #fff;
  box-shadow: 0 4px 0 0 var(--p-800);
}
.btn-accent:hover { transform: translateY(-1px); background: var(--p-700); }
.btn-secondary {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--ink);
  box-shadow: 0 4px 0 0 var(--ink);
}
.btn-secondary:hover { transform: translateY(-1px); }
.btn-ghost { color: var(--ink); }
.btn-ghost:hover { color: var(--p-600); }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }

.arrow { transition: transform 200ms var(--eo); }
.btn:hover .arrow, a:hover .arrow { transform: translateX(3px); }

/* Focus-visible (klavesnicova navigace) — konzistentni pres celou app */
*:focus { outline: none; }
*:focus-visible {
  outline: 3px solid var(--p-300);
  outline-offset: 2px;
  border-radius: 6px;
}
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline-offset: 3px;
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  /* form fields use existing :focus border-color + box-shadow */
}

/* Lepsi prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   Mobile drawer (sidebar overlay) — pouzit ve vsech app strankach
   1. Pridat class="drawer" na .side
   2. Pridat <button class="mobile-trigger" data-drawer-trigger> do topbar
   3. Pridat <div class="drawer-backdrop"></div> nekde v body
   4. Includovat <script src="app.js" defer></script>
   ============================================================ */
.mobile-trigger { display: none; }
/* drawer-backdrop is fixed-positioned so it doesn't take grid space.
   Hidden by default via opacity+pointer-events. Only flips visible on mobile. */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(22,20,33,0.4);
  z-index: 55;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms var(--eo);
}

@media (max-width: 820px) {
  .mobile-trigger {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--paper);
    border: 1px solid var(--line);
    color: var(--ink-3);
    cursor: pointer;
    transition: background 140ms var(--e), color 140ms var(--e);
    flex-shrink: 0;
  }
  .mobile-trigger:hover { background: var(--line-2); color: var(--ink); }
  .mobile-trigger svg { width: 20px; height: 20px; }

  /* Override stranek, ktere maji .side { display: none } na mobile —
     ta uz by mela mit class="drawer" misto, ale toto je fallback */
  .side.drawer {
    display: flex !important;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 280px;
    z-index: 60;
    transform: translateX(-100%);
    transition: transform 240ms var(--eo);
    box-shadow: 0 0 60px rgba(22,20,33,0.2);
    height: 100vh !important;
  }
  .side.drawer.open { transform: translateX(0); }
}

/* drawer-backdrop.show works at any viewport (fallback for tablet) */
.drawer-backdrop.show { opacity: 1; pointer-events: auto; }
