/* ===== DESIGN TOKENS ===== */
:root {
  /* Type scale (fluid) */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);

  /* Spacing (4px grid) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Brand colors */
  --navy: #1a2744;
  --navy-light: #243454;
  --navy-dark: #111b30;
  --gold: #F5A623;
  --gold-hover: #e6991a;
  --gold-active: #d08c15;
  --gold-light: #fdf3e0;
  --gold-glow: rgba(245, 166, 35, 0.15);

  /* Surfaces */
  --color-bg: #ffffff;
  --color-surface: #f8f9fc;
  --color-surface-2: #f0f2f7;
  --color-border: #e2e5ec;
  --color-divider: #ebedf2;

  /* Text */
  --color-text: #1a2744;
  --color-text-muted: #5a6578;
  --color-text-faint: #8e96a6;
  --color-text-inverse: #ffffff;

  /* Fonts */
  --font-display: 'Work Sans', 'Helvetica Neue', sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', sans-serif;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(26, 39, 68, 0.06);
  --shadow-md: 0 4px 16px rgba(26, 39, 68, 0.08);
  --shadow-lg: 0 12px 40px rgba(26, 39, 68, 0.12);
  --shadow-gold: 0 4px 24px rgba(245, 166, 35, 0.3);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1120px;
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
}

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, h6 { text-wrap: balance; line-height: 1.15; font-family: var(--font-display); }
p, li, figcaption { text-wrap: pretty; max-width: 72ch; }

::selection {
  background: rgba(245, 166, 35, 0.2);
  color: var(--navy);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

button { cursor: pointer; background: none; border: none; }

a, button, [role='button'], input, textarea, select {
  transition:
    color var(--transition-interactive),
    background var(--transition-interactive),
    border-color var(--transition-interactive),
    box-shadow var(--transition-interactive),
    transform var(--transition-interactive);
}

@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;
  }
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ===== LAYOUT ===== */
.container {
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-lg);
  white-space: nowrap;
  cursor: pointer;
  border: none;
}

.btn-gold {
  background: var(--gold);
  color: var(--navy);
  font-size: var(--text-sm);
  padding: var(--space-3) var(--space-6);
}
.btn-gold:hover {
  background: var(--gold-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
}
.btn-gold:active {
  background: var(--gold-active);
  transform: translateY(0);
  box-shadow: none;
}

.btn-lg {
  font-size: var(--text-base);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-xl);
}

.btn-xl {
  font-size: var(--text-lg);
  font-weight: 700;
  padding: var(--space-5) var(--space-10);
  border-radius: var(--radius-xl);
}

.btn-sm {
  font-size: var(--text-xs);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
}

/* ===== HEADER ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-divider);
  transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--navy);
}
.logo svg { flex-shrink: 0; }
.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: -0.02em;
}

/* ===== HERO ===== */
.hero {
  padding-top: calc(64px + var(--space-16));
  padding-bottom: clamp(var(--space-12), 8vw, var(--space-24));
  background: linear-gradient(165deg, var(--navy) 0%, var(--navy-light) 50%, #2a3f65 100%);
  color: var(--color-text-inverse);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 80%;
  height: 200%;
  background: radial-gradient(circle, rgba(245, 166, 35, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  align-items: center;
}

@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 1.2fr 1fr;
    gap: var(--space-16);
  }
}

.hero-headline {
  font-size: var(--text-2xl);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-5);
}

.hero-sub {
  font-size: var(--text-lg);
  opacity: 0.85;
  margin-bottom: var(--space-8);
  max-width: 500px;
  line-height: 1.5;
}

.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  margin-top: var(--space-8);
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  opacity: 0.75;
}
.trust-badge svg { opacity: 0.7; flex-shrink: 0; }

/* ===== BOOK MOCKUP ===== */
.hero-visual {
  display: flex;
  justify-content: center;
}

.book-mockup {
  position: relative;
  perspective: 900px;
}

.book-cover {
  width: 260px;
  height: 370px;
  background: linear-gradient(145deg, var(--navy-dark) 0%, #0d1520 100%);
  border-radius: 4px 16px 16px 4px;
  border: 1px solid rgba(245, 166, 35, 0.2);
  position: relative;
  transform: rotateY(-8deg) rotateX(2deg);
  transform-style: preserve-3d;
  box-shadow:
    -8px 8px 30px rgba(0, 0, 0, 0.4),
    inset 0 0 60px rgba(245, 166, 35, 0.03);
  overflow: hidden;
}

.book-cover::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 20px;
  background: linear-gradient(90deg, rgba(0,0,0,0.3), transparent);
}

.book-cover-inner {
  padding: var(--space-8) var(--space-6);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.book-badge {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--gold);
  background: rgba(245, 166, 35, 0.1);
  border: 1px solid rgba(245, 166, 35, 0.25);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  align-self: flex-start;
  margin-bottom: var(--space-6);
}

.book-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1.15;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.book-subtitle {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--gold);
  margin-top: var(--space-2);
}

.book-divider {
  width: 40px;
  height: 2px;
  background: var(--gold);
  margin-top: var(--space-5);
  margin-bottom: var(--space-5);
  border-radius: 1px;
}

.book-tagline {
  font-size: 0.75rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.6);
}

.book-bottom {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.book-pages {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.03em;
}

.book-format {
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold);
  background: rgba(245, 166, 35, 0.1);
  padding: 2px 8px;
  border-radius: 3px;
}

.book-shadow {
  position: absolute;
  bottom: -20px;
  left: 10%;
  right: 10%;
  height: 30px;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.25) 0%, transparent 70%);
  filter: blur(8px);
}

@media (max-width: 767px) {
  .book-cover {
    width: 200px;
    height: 285px;
    transform: rotateY(-5deg);
  }
  .book-cover-inner { padding: var(--space-6) var(--space-4); }
  .book-title { font-size: 1.2rem; }
  .book-subtitle { font-size: 0.75rem; }
}

/* ===== STATS ===== */
.stats {
  padding-block: clamp(var(--space-10), 5vw, var(--space-16));
  background: var(--color-bg);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  text-align: center;
}

.stat-item {
  padding: var(--space-6) var(--space-4);
}

.stat-number {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-2xl);
  color: var(--gold);
  line-height: 1;
  margin-bottom: var(--space-2);
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.4;
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; gap: var(--space-2); }
  .stat-item { padding: var(--space-4); }
}

/* ===== SECTION TITLES ===== */
.section-title {
  font-size: var(--text-xl);
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
  color: var(--navy);
}

.section-desc {
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--text-base);
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: var(--space-10);
}

/* ===== PRE KOHO ===== */
.for-who {
  padding-block: clamp(var(--space-12), 6vw, var(--space-24));
  background: var(--color-surface);
}

.for-who-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
}

.for-who-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  text-align: center;
}

.for-who-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-inline: auto;
  margin-bottom: var(--space-5);
}
.for-who-icon svg { display: block; }

.for-who-card h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-3);
  color: var(--navy);
}

.for-who-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.65;
  max-width: 100%;
  margin-inline: auto;
}

/* ===== ČO SA NAUČÍŠ ===== */
.learn {
  padding-block: clamp(var(--space-12), 6vw, var(--space-24));
  background: var(--color-bg);
}

.learn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-4);
  max-width: var(--content-default);
  margin-inline: auto;
}

.learn-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid transparent;
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}

.learn-item:hover {
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.learn-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-lg);
  color: var(--gold);
  flex-shrink: 0;
  line-height: 1.5;
  width: 2rem;
}

.learn-item p {
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.6;
  max-width: 100%;
}

/* ===== ACCORDION (CHAPTERS) ===== */
.chapters {
  padding-block: clamp(var(--space-12), 6vw, var(--space-24));
  background: var(--color-surface);
}

.accordion {
  max-width: var(--content-narrow);
  margin-inline: auto;
}

.accordion-item {
  border-bottom: 1px solid var(--color-divider);
}

.accordion-item summary {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5) 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--navy);
}
.accordion-item summary::-webkit-details-marker { display: none; }

.accordion-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--gold);
  background: var(--gold-light);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.accordion-title { flex: 1; }

.accordion-chevron {
  flex-shrink: 0;
  transition: transform 0.25s var(--ease-out);
  color: var(--color-text-faint);
}

.accordion-item[open] .accordion-chevron {
  transform: rotate(180deg);
}

.accordion-body {
  padding: 0 0 var(--space-5) calc(32px + var(--space-4));
}

.accordion-body p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ===== FAQ ===== */
.faq {
  padding-block: clamp(var(--space-12), 6vw, var(--space-24));
  background: var(--color-bg);
}

.faq-list {
  max-width: var(--content-narrow);
  margin-inline: auto;
}

.faq-item {
  border-bottom: 1px solid var(--color-divider);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--navy);
}
.faq-item summary::-webkit-details-marker { display: none; }

.faq-chevron {
  flex-shrink: 0;
  transition: transform 0.25s var(--ease-out);
  color: var(--color-text-faint);
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
}

.faq-body {
  padding: 0 0 var(--space-5) 0;
}

.faq-body p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ===== FINAL CTA ===== */
.final-cta {
  padding-block: clamp(var(--space-12), 8vw, var(--space-24));
  background: var(--navy);
}

.cta-box {
  text-align: center;
  max-width: 560px;
  margin-inline: auto;
}

.cta-box h2 {
  font-size: var(--text-xl);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: var(--space-6);
  letter-spacing: -0.02em;
}

.cta-price {
  margin-bottom: var(--space-6);
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: var(--space-3);
}

.price-tag {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--gold);
}

.price-note {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.5);
}

.cta-fine-print {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.45);
  margin-top: var(--space-5);
}

/* ===== FOOTER ===== */
.site-footer {
  padding-block: var(--space-8);
  background: var(--navy-dark);
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  font-size: var(--text-xs);
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(26, 39, 68, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--color-bg);
  border-radius: var(--radius-2xl);
  padding: var(--space-10) var(--space-8);
  max-width: 440px;
  width: 100%;
  position: relative;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s var(--ease-out);
  box-shadow: var(--shadow-lg);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  color: var(--color-text-faint);
  padding: var(--space-2);
  border-radius: var(--radius-md);
}
.modal-close:hover { color: var(--color-text); background: var(--color-surface); }

.modal h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: var(--space-3);
}

.modal p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  line-height: 1.6;
}

.modal-form {
  display: flex;
  gap: var(--space-3);
}

.modal-form input {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  background: var(--color-surface);
  outline: none;
}
.modal-form input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.modal-success {
  color: #2e7d32;
  font-weight: 500;
  text-align: center;
  margin-top: var(--space-4);
}

/* ===== SCROLL ANIMATIONS ===== */
.fade-in {
  opacity: 1;
}

@supports (animation-timeline: scroll()) {
  .fade-in {
    opacity: 0;
    animation: reveal-fade linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 80%;
  }
}

@keyframes reveal-fade {
  to { opacity: 1; }
}

/* Fallback for browsers without scroll-driven animations */
@supports not (animation-timeline: scroll()) {
  .fade-in {
    opacity: 0;
    transition: opacity 0.6s var(--ease-out);
  }
  .fade-in.visible {
    opacity: 1;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .container { padding-inline: var(--space-4); }
  .hero { padding-top: calc(64px + var(--space-10)); }
  .hero-headline { font-size: clamp(1.5rem, 1rem + 3vw, 2.25rem); }
  .trust-badges { gap: var(--space-3); }
  .header-cta { display: none; }
  .learn-grid { grid-template-columns: 1fr; }
  .modal-form { flex-direction: column; }
  .btn-xl { font-size: var(--text-base); padding: var(--space-4) var(--space-8); }
}
