/* ============================================================
   Karel Salák -- finanční poradce
   Design tokens + navigation + motion primitives
   ============================================================ */

:root {
  /* -- Colors -- */
  --color-primary: #12293f;
  --color-primary-light: #1e3d5c;
  --color-primary-dark: #0b1a2a;
  --color-accent: #b8863b;

  --color-bg: #faf9f6;
  --color-bg-alt: #f2efe9;
  --color-text: #1a2433;
  --color-text-muted: #5c6779;
  --color-border: #e2ddd4;

  /* -- Typography -- */
  --font-heading: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* -- Layout -- */
  --max-width: 1200px;

  /* ── Standard Tokens (auto-injected) ── */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --radius-default: 4px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
}

html {
  scroll-behavior: smooth;
}

/* ============================================================
   Icons
   ============================================================ */

.icon {
  display: inline-block;
  width: 1.25em;
  height: 1.25em;
  vertical-align: -0.15em;
  flex-shrink: 0;
}

.icon.hidden { display: none; }

.icon-sm { display: inline-block; width: 1em; height: 1em; vertical-align: -0.12em; flex-shrink: 0; }
.icon-lg { display: inline-block; width: 1.5em; height: 1.5em; vertical-align: -0.2em; flex-shrink: 0; }
.icon-xl { display: inline-block; width: 2em; height: 2em; vertical-align: -0.25em; flex-shrink: 0; }
.icon-sm.hidden, .icon-lg.hidden, .icon-xl.hidden { display: none; }

/* ============================================================
   Header / desktop navigation
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10000;
  background-color: rgba(250, 249, 246, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(18, 41, 63, 0.07);
  transition: background-color 0.3s ease, box-shadow 0.3s cubic-bezier(0.33, 1, 0.68, 1);
}

.site-header.is-scrolled {
  background-color: rgba(250, 249, 246, 0.97);
  box-shadow: 0 1px 28px rgba(18, 41, 63, 0.09);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav-logo {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  text-decoration: none;
  color: var(--color-primary);
}

.nav-logo span:first-child {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.005em;
}

.nav-logo span:last-child {
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: 0.3rem;
}

.nav-desktop { display: none; }

.nav-link {
  position: relative;
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.015em;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: 0.45rem 0;
  transition: color 0.25s cubic-bezier(0.33, 1, 0.68, 1);
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 0;
  background-color: var(--color-accent);
  transition: width 0.35s cubic-bezier(0.33, 1, 0.68, 1);
}

.nav-link:hover { color: var(--color-primary); }
.nav-link:hover::after { width: 100%; }

.nav-link[aria-current="page"] {
  color: var(--color-primary);
  font-weight: 600;
}
.nav-link[aria-current="page"]::after { width: 100%; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--color-primary);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.8rem 1.4rem;
  border-radius: 3px;
  text-decoration: none;
  transition: background-color 0.25s cubic-bezier(0.33, 1, 0.68, 1),
              transform 0.25s cubic-bezier(0.33, 1, 0.68, 1);
}

.nav-cta:hover {
  background-color: var(--color-accent);
  transform: translateY(-1px);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-right: -0.6rem;
  color: var(--color-primary);
}

@media (min-width: 900px) {
  .nav-desktop { display: flex; align-items: center; gap: 2.25rem; }
  .nav-toggle { display: none; }
}

/* ============================================================
   Mobile menu
   ============================================================ */

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  background-color: var(--color-primary);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 7rem 1.75rem 3rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.33, 1, 0.68, 1);
}

.mobile-menu.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-link {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 8vw, 2.6rem);
  font-weight: 400;
  line-height: 1.2;
  color: #ffffff;
  text-decoration: none;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: color 0.25s ease, padding-left 0.25s cubic-bezier(0.33, 1, 0.68, 1);
}

.mobile-nav-link:hover,
.mobile-nav-link[aria-current="page"] {
  color: var(--color-accent);
  padding-left: 0.5rem;
}

.mobile-menu-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 2.5rem;
  padding: 1.05rem 1.5rem;
  background-color: var(--color-accent);
  color: #0b1a2a;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: 3px;
  text-decoration: none;
}

/* ============================================================
   Scroll reveal
   ============================================================ */

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal-stagger].is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal-stagger].is-visible > *:nth-child(1) { transition-delay: 0ms; }
[data-reveal-stagger].is-visible > *:nth-child(2) { transition-delay: 80ms; }
[data-reveal-stagger].is-visible > *:nth-child(3) { transition-delay: 160ms; }
[data-reveal-stagger].is-visible > *:nth-child(4) { transition-delay: 240ms; }
[data-reveal-stagger].is-visible > *:nth-child(5) { transition-delay: 320ms; }
[data-reveal-stagger].is-visible > *:nth-child(6) { transition-delay: 400ms; }
[data-reveal-stagger].is-visible > *:nth-child(7) { transition-delay: 480ms; }
[data-reveal-stagger].is-visible > *:nth-child(8) { transition-delay: 560ms; }

/* ============================================================
   Keyframes
   ============================================================ */

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes scrollBob {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50% { transform: translateY(7px); opacity: 1; }
}

/* ============================================================
   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;
  }
}body { margin: 0; }

.mobile-menu-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: inherit;
  padding: 0.5rem;
  line-height: 1;
  z-index: 1;
}
