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

:root {
  /* ── Colors ── */
  --bg: #F8F9FA;
  --bg-alt: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-elevated: #F0F1F3;
  --text: #1A1A1A;
  --text-secondary: #6B7280;
  --primary: #4F46E5;
  --primary-hover: #4338CA;
  --primary-light: rgba(79, 70, 229, 0.08);
  --primary-glow: rgba(79, 70, 229, 0.15);
  --accent: #F59E0B;
  --accent-hover: #D97706;
  --success: #10B981;
  --border: #E5E7EB;
  --border-strong: #D1D5DB;

  /* ── Shadows (layered, dual-layer) ── */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04), 0 1px 4px rgba(0,0,0,0.03);
  --shadow-md: 0 2px 4px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 8px rgba(0,0,0,0.04), 0 12px 32px rgba(0,0,0,0.08);
  --shadow-xl: 0 8px 16px rgba(0,0,0,0.06), 0 20px 48px rgba(0,0,0,0.1);

  /* ── Border radius scale ── */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* ── Typography ── */
  --font: 'Nunito', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-display: 'Baloo 2', 'Nunito', cursive;

  /* ── Layout ── */
  --max-width: 1120px;
  --section-padding: 6rem 1.5rem;

  /* ── Spacing system (8px base) ── */
  --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;

  /* ── Motion ── */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-elastic: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;

  /* ── Gradients ── */
  --gradient-primary: linear-gradient(135deg, #6366F1, #8B5CF6);
  --gradient-accent: linear-gradient(135deg, #F59E0B, #F97316);
  --gradient-fun: linear-gradient(135deg, #6366F1, #EC4899);

  /* ── Playful colors ── */
  --fun-yellow: #FCD34D;
  --fun-green: #34D399;
  --fun-pink: #F472B6;
  --fun-blue: #60A5FA;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== FOCUS ACCESSIBILITY ===== */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}

/* ===== VIEWS ===== */
.view--hidden {
  display: none;
}

.view__inner {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ===== SECTION DIVIDER ===== */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  max-width: 80%;
  margin: 0 auto;
  border: none;
}

/* ===== SHARED SECTION TITLES ===== */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.5rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 3.5rem;
  line-height: 1.6;
}

.label-caps {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* ===== MARKETING BUTTONS ===== */
.btn--primary {
  background: var(--gradient-primary);
  color: #fff;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--duration-normal) var(--ease-out), box-shadow var(--duration-normal) var(--ease-out), filter var(--duration-normal) var(--ease-out);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
  position: relative;
  overflow: hidden;
}

.btn--primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.btn--primary:hover::after {
  left: 100%;
}

.btn--primary:hover {
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.45);
  transform: translateY(-3px);
  filter: brightness(1.1);
}

.btn--primary:active {
  transform: translateY(0) scale(0.96);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
  transition-duration: 0.1s;
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  padding: 0.875rem 2rem;
  font-size: 1rem;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--duration-normal) var(--ease-out), border-color var(--duration-normal) var(--ease-out), color var(--duration-normal) var(--ease-out), transform var(--duration-normal) var(--ease-out), box-shadow var(--duration-normal) var(--ease-out);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-weight: 500;
  -webkit-tap-highlight-color: transparent;
}

.btn--ghost:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-light);
}

.btn--large {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  border-radius: var(--radius-lg);
}

/* ===== STICKY NAV ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0.75rem 1.5rem;
  transition: background 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), padding 0.4s var(--ease-out);
  will-change: background, box-shadow;
}

/* Nav on hero – uses default dark text colors, no overrides needed */

.nav--solid {
  background: rgba(248, 249, 250, 0.97);
  box-shadow: 0 1px 0 var(--border), var(--shadow-sm);
}

.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav__logo-img {
  height: auto;
  width: 140px;
  object-fit: contain;
}

.nav__logo-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  background: linear-gradient(90deg, #6366F1, #8B5CF6, #EC4899, #F59E0B, #6366F1);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: logoColorShift 6s ease-in-out infinite;
}

@keyframes logoColorShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .nav__logo-text {
    animation: none;
    background-position: 0% 50%;
  }
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.25s var(--ease-out);
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-fun);
  border-radius: 1px;
  transition: width 0.3s var(--ease-out);
}

.nav__link:hover {
  color: var(--text);
}

.nav__link:hover::after {
  width: 100%;
}

.nav__cta::after {
  display: none;
}

.btn--sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
  border-radius: 8px;
}

.nav__cta {
  color: #fff !important;
}

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  -webkit-tap-highlight-color: transparent;
}

.nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.35s var(--ease-out), opacity 0.35s var(--ease-out);
}

.nav__hamburger.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav__hamburger.is-active span:nth-child(2) {
  opacity: 0;
}
.nav__hamburger.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== HERO ===== */
.hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

/* WebGL shader canvas */
.hero__shader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* Hide fallback gradient orbs when WebGL shader is active */
.webgl-ok .hero::before,
.webgl-ok .hero::after {
  display: none;
}

/* Fallback gradient orbs when WebGL not available */
.hero::before {
  content: '';
  position: absolute;
  width: 900px;
  height: 900px;
  top: -250px;
  left: 50%;
  transform: translateX(-50%) translateZ(0);
  background: radial-gradient(
    circle,
    rgba(99, 102, 241, 0.12) 0%,
    rgba(139, 92, 246, 0.08) 25%,
    rgba(236, 72, 153, 0.04) 45%,
    transparent 70%
  );
  pointer-events: none;
  animation: pulse-soft 8s ease-in-out infinite;
  z-index: 0;
  will-change: transform, opacity;
}

.hero::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  bottom: -150px;
  right: -100px;
  background: radial-gradient(
    circle,
    rgba(245, 158, 11, 0.08) 0%,
    rgba(249, 115, 22, 0.04) 40%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

.hero__inner {
  max-width: 660px;
  position: relative;
  z-index: 1;
}

/* Noise texture overlay for visual depth */
.hero__inner::before {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.hero__badge {
  display: inline-block;
  padding: 0.4rem 1.1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: 999px;
  margin-bottom: 1.75rem;
  animation: fadeInUp 0.8s var(--ease-out) both;
  position: relative;
  overflow: hidden;
}

.hero__badge::after {
  content: '';
  position: absolute;
  top: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.15), transparent);
  animation: shimmer 3s ease-in-out infinite;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 8vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 1.25rem;
  color: var(--text);
  letter-spacing: -0.03em;
  animation: fadeInUp 0.8s var(--ease-out) 0.08s both;
}

.hero__accent {
  background: linear-gradient(135deg, #6366F1, #8B5CF6, #EC4899, #6366F1);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 6s ease infinite;
  position: relative;
}

.hero__subtitle {
  font-size: clamp(1.1rem, 2.8vw, 1.35rem);
  color: var(--text);
  font-weight: 500;
  max-width: 520px;
  margin: 0 auto 2.5rem;
  line-height: 1.75;
  animation: fadeInUp 0.8s var(--ease-out) 0.16s both;
  text-shadow: 0 1px 12px rgba(255, 255, 255, 0.8);
}

.hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s var(--ease-out) 0.24s both;
}

/* Ghost button – uses default light theme styles */

/* Hero stats */
.hero__stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-top: 3.5rem;
  animation: fadeInUp 0.8s var(--ease-out) 0.36s both;
}

.hero__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.hero__stat-number {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.hero__stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

.hero__stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}

/* ===== WHY US / USP ===== */
.why-us {
  padding: var(--section-padding);
  background: var(--bg);
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}

.why-us__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.feature {
  padding: 2rem 1.75rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: border-color var(--duration-normal) var(--ease-out),
              background var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out),
              transform var(--duration-normal) var(--ease-out);
}

.feature:hover {
  border-color: transparent;
  background:
    linear-gradient(var(--bg-alt), var(--bg-alt)) padding-box,
    linear-gradient(135deg, #6366F1, #8B5CF6, #EC4899) border-box;
  border: 1px solid transparent;
  box-shadow: var(--shadow-lg), 0 0 20px rgba(99, 102, 241, 0.12);
  transform: translateY(-4px);
}

.feature__icon {
  margin-bottom: 1.25rem;
  display: inline-flex;
  transition: transform 0.5s var(--ease-elastic);
}

.feature:hover .feature__icon {
  animation: wiggle 0.5s ease;
}

.feature__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.feature__desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Staggered features */
.features .feature:nth-child(2) { transition-delay: 0.08s; }
.features .feature:nth-child(3) { transition-delay: 0.16s; }
.features .feature:nth-child(4) { transition-delay: 0.24s; }

/* ===== BOOKSHELF SECTION ===== */
.bookshelf {
  padding: var(--section-padding);
  background: #fff;
  position: relative;
  overflow: hidden;
  content-visibility: auto;
  contain-intrinsic-size: auto 800px;
}

/* Floating decorative orbs – GPU-promoted, reduced blur */
.bookshelf::before,
.bookshelf::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(40px);
  opacity: 0.12;
  z-index: 0;
  will-change: transform;
  transform: translateZ(0);
}

.bookshelf::before {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #6366F1 0%, #8B5CF6 40%, transparent 70%);
  top: -80px;
  right: -100px;
  animation: bookshelfOrbFloat 14s ease-in-out infinite;
}

.bookshelf::after {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #EC4899 0%, #A855F7 40%, transparent 70%);
  bottom: -60px;
  left: -80px;
  animation: bookshelfOrbFloat 18s ease-in-out infinite reverse;
}

@keyframes bookshelfOrbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.1); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

.bookshelf__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ===== SHELF ROW ===== */
.shelf {
  margin-bottom: 4.5rem;
}

.shelf__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: transparent;
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #EC4899 100%);
  -webkit-background-clip: text;
  background-clip: text;
  margin-bottom: 1.25rem;
  padding-left: 0.25rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  position: relative;
}
.shelf__label .filter-icon {
  flex-shrink: 0;
}

.shelf__label::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0.25rem;
  width: 24px;
  height: 2px;
  background: linear-gradient(90deg, #6366F1, #EC4899);
  border-radius: 1px;
}

.shelf__books {
  display: flex;
  gap: 1.5rem;
  padding: 0 0.5rem 3rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

.shelf__books::-webkit-scrollbar {
  display: none;
}

/* Modern gradient shelf line */
.shelf__books::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    #6366F1 15%,
    #8B5CF6 35%,
    #EC4899 65%,
    #8B5CF6 85%,
    transparent 100%
  );
  border-radius: 2px;
  opacity: 0.35;
  z-index: 2;
}

/* Soft glow under shelf line */
.shelf__books::before {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 10%;
  right: 10%;
  height: 8px;
  background: radial-gradient(ellipse, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
  z-index: 1;
  pointer-events: none;
}

/* ===== BOOK CARD ===== */
.book-card {
  flex: 0 0 auto;
  width: 140px;
  cursor: pointer;
  text-align: center;
  position: relative;
  z-index: 1;
  transition: transform 0.5s var(--ease-elastic), z-index 0s;
  transform-origin: bottom center;
  background: none;
  border: none;
  font-family: var(--font);
  color: var(--text);
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  will-change: transform;
}

.book-card:hover {
  transform: translateY(-18px) scale(1.08);
  z-index: 10;
}

.book-card:hover .book-card__cover {
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.22),
    -8px 4px 16px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(79, 70, 229, 0.12);
  transform: perspective(500px) rotateY(-8deg) rotateX(2deg);
}

/* Animated shine sweep on hover */
.book-card:hover .book-card__shine {
  background: linear-gradient(
    120deg,
    transparent 0%,
    transparent 30%,
    rgba(255, 255, 255, 0.4) 48%,
    rgba(255, 255, 255, 0.1) 52%,
    transparent 70%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shineSweep 0.7s var(--ease-out) forwards;
}

/* Hover shadow on the shelf surface */
.book-card::after {
  content: '';
  position: absolute;
  bottom: 12px;
  left: 50%;
  width: 80%;
  height: 10px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.15) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
  pointer-events: none;
  z-index: 0;
}

.book-card:hover::after {
  opacity: 1;
}

/* Title glow on hover */
.book-card:hover .book-card__title {
  color: var(--primary);
}

.book-card--soon {
  cursor: default;
}

.book-card--soon:hover {
  transform: translateY(-4px) scale(1.01);
  z-index: 1;
}

.book-card--soon:hover .book-card__cover {
  transform: perspective(600px) rotateY(-2deg);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.1),
    -4px 0 8px rgba(0, 0, 0, 0.05);
}

.book-card--soon:hover .book-card__title {
  color: var(--text-secondary);
}

.book-card--soon .book-card__cover {
  opacity: 0.5;
  filter: grayscale(0.3);
}

.book-card__cover {
  width: 120px;
  height: 170px;
  margin: 0 auto 0.75rem;
  background: linear-gradient(145deg, var(--bg-elevated) 0%, #E8E9EC 100%);
  border-radius: 4px 10px 10px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.12),
    -4px 0 8px rgba(0, 0, 0, 0.06),
    inset -1px 0 0 rgba(255, 255, 255, 0.1);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
  overflow: hidden;
  /* 3D perspective tilt for book feel */
  transform: perspective(600px) rotateY(-2deg);
  transform-style: preserve-3d;
}

/* Photo cover image */
.book-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px 10px 10px 4px;
  z-index: 1;
}

/* Spine — left edge highlight simulating book binding */
.book-card__spine {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 12px;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.12) 30%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(0, 0, 0, 0.05) 70%,
    transparent 100%
  );
  border-radius: 4px 0 0 4px;
  z-index: 3;
  pointer-events: none;
}

/* Glossy shine overlay */
.book-card__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0.03) 30%,
    transparent 50%,
    rgba(0, 0, 0, 0.02) 80%,
    rgba(0, 0, 0, 0.05) 100%
  );
  border-radius: 4px 10px 10px 4px;
  z-index: 4;
  pointer-events: none;
  transition: background 0.4s var(--ease-out);
}

/* Page edges visible on the right side */
.book-card__cover::after {
  content: '';
  position: absolute;
  right: 0;
  top: 4px;
  bottom: 4px;
  width: 6px;
  background: repeating-linear-gradient(
    180deg,
    #f0f0f5 0px,
    #f0f0f5 1px,
    #e8e8f0 1px,
    #e8e8f0 2px
  );
  border-radius: 0 2px 2px 0;
  z-index: 0;
  opacity: 0.7;
}

.book-card__title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  max-width: 130px;
  margin: 0 auto;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.3s var(--ease-out);
}

.book-card--soon .book-card__title {
  color: var(--text-secondary);
}

.book-card__badge {
  position: absolute;
  top: 8px;
  right: -2px;
  background: var(--accent);
  color: #fff;
  font-size: 0.6rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 5;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* ===== HOW IT WORKS ===== */
.how-it-works {
  padding: var(--section-padding);
  background: var(--bg);
  content-visibility: auto;
  contain-intrinsic-size: auto 700px;
}

.how-it-works__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

@property --border-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

.step {
  text-align: center;
  padding: 2.25rem 1.75rem;
  background:
    linear-gradient(var(--bg-alt), var(--bg-alt)) padding-box,
    conic-gradient(from var(--border-angle), transparent 30%, #6366F1 38%, #8B5CF6 45%, #EC4899 52%, transparent 60%) border-box;
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  position: relative;
  transition: box-shadow var(--duration-normal) var(--ease-out), transform var(--duration-normal) var(--ease-out);
  animation: borderTravel 6s linear infinite;
}

.step:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.step:nth-child(2) {
  animation-delay: -1.3s;
}
.step:nth-child(3) {
  animation-delay: -2.6s;
}

@keyframes borderTravel {
  to { --border-angle: 360deg; }
}

.step__number {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  background: var(--gradient-primary);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.4);
}

.step__icon {
  margin-bottom: 1rem;
  margin-top: 0.5rem;
  display: inline-flex;
}

.step__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.step__desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== ANIMATION LAYOUT – why-us & how-it-works ===== */
.why-us {
  position: relative;
  overflow: hidden;
}

.why-us .why-us__inner {
  position: relative;
  z-index: 2;
}

.how-it-works {
  position: relative;
  overflow: hidden;
}

.how-it-works .how-it-works__inner {
  position: relative;
  z-index: 2;
}

/* ===== BACKGROUND BEAMS (why-us) ===== */
.beams-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.beam {
  position: absolute;
  top: -100px;
  width: 3px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(99, 102, 241, 0) 10%,
    rgba(99, 102, 241, 0.55) 30%,
    rgba(139, 92, 246, 0.7) 50%,
    rgba(236, 72, 153, 0.55) 70%,
    rgba(236, 72, 153, 0) 90%,
    transparent 100%
  );
  border-radius: 2px;
  opacity: 0.85;
  animation: beam-fall var(--beam-duration, 7s) linear infinite;
  animation-play-state: paused;
  will-change: transform;
}

.beam__inner {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(99, 102, 241, 0.25),
    transparent
  );
  border-radius: inherit;
}

@keyframes beam-fall {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  5% {
    opacity: 0.9;
  }
  90% {
    opacity: 0.9;
  }
  100% {
    transform: translateY(var(--section-height, 800px));
    opacity: 0;
  }
}

/* Beam collision particles */
.beam-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  animation: particle-burst 0.65s ease-out forwards;
  will-change: transform, opacity;
}

@keyframes particle-burst {
  0% {
    opacity: 0.7;
    transform: translate(0, 0) scale(1);
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 0;
    transform: translate(var(--px, 20px), var(--py, -30px)) scale(0);
  }
}

/* Beam impact glow */
.beam-glow {
  position: absolute;
  width: 40px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(139, 92, 246, 0.55), transparent);
  transform: translate(-50%, -100%);
  pointer-events: none;
  animation: glow-fade 0.45s ease-out forwards;
}

@keyframes glow-fade {
  0% {
    opacity: 1;
    transform: translate(-50%, -100%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -100%) scale(2);
  }
}

/* ===== GRADIENT BLOBS (how-it-works) ===== */
.gradient-blobs__filter {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.gradient-blobs {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
  filter: url(#goo-filter) blur(18px);
  transform: translateZ(0);
}

.gradient-blob {
  position: absolute;
  border-radius: 50%;
  mix-blend-mode: multiply;
  opacity: 0.45;
  animation-play-state: paused;
  will-change: transform;
}

.gradient-blob--1 {
  width: 400px;
  height: 400px;
  top: -10%;
  left: -5%;
  background: radial-gradient(circle at center, rgba(99, 102, 241, 0.9) 0%, transparent 70%);
  animation: blob-orbit-1 14s ease-in-out infinite;
}

.gradient-blob--2 {
  width: 350px;
  height: 350px;
  top: 10%;
  right: -5%;
  background: radial-gradient(circle at center, rgba(139, 92, 246, 0.9) 0%, transparent 70%);
  animation: blob-orbit-2 18s ease-in-out infinite;
}

.gradient-blob--3 {
  width: 300px;
  height: 300px;
  bottom: -5%;
  left: 15%;
  background: radial-gradient(circle at center, rgba(236, 72, 153, 0.9) 0%, transparent 70%);
  animation: blob-orbit-3 12s ease-in-out infinite;
}

.gradient-blob--4 {
  width: 250px;
  height: 250px;
  top: 40%;
  left: 40%;
  background: radial-gradient(circle at center, rgba(79, 70, 229, 0.9) 0%, transparent 70%);
  animation: blob-orbit-4 16s ease-in-out infinite;
}

.gradient-blob--5 {
  width: 320px;
  height: 320px;
  bottom: 10%;
  right: 10%;
  background: radial-gradient(circle at center, rgba(167, 139, 250, 0.9) 0%, transparent 70%); /* light purple – kniha palette */
  animation: blob-orbit-5 20s ease-in-out infinite;
}

.gradient-blob--interactive {
  width: 350px;
  height: 350px;
  top: 50%;
  left: 50%;
  margin-top: -175px;
  margin-left: -175px;
  background: radial-gradient(circle at center, rgba(139, 92, 246, 0.8) 0%, transparent 70%);
  opacity: 0.3;
}

@keyframes blob-orbit-1 {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(60px, 40px) scale(1.1); }
  66%  { transform: translate(-40px, 60px) scale(0.95); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes blob-orbit-2 {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(-50px, 30px) scale(0.9); }
  66%  { transform: translate(40px, -50px) scale(1.05); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes blob-orbit-3 {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(30px, -60px) scale(1.15); }
  66%  { transform: translate(-60px, 20px) scale(0.9); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes blob-orbit-4 {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(-40px, -40px) scale(1.05); }
  66%  { transform: translate(50px, 50px) scale(0.95); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes blob-orbit-5 {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(50px, -30px) scale(0.9); }
  66%  { transform: translate(-30px, -40px) scale(1.1); }
  100% { transform: translate(0, 0) scale(1); }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  .beam,
  .beam-particle,
  .beam-glow {
    display: none !important;
  }

  .gradient-blob,
  .hero__decor,
  .hero::before,
  .hero::after,
  .bookshelf::before,
  .bookshelf::after,
  .hero__accent,
  .newsletter__inner::before,
  .cta-section,
  .step {
    animation: none !important;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* ===== CTA SECTION ===== */
.cta-section {
  padding: var(--section-padding);
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 30%, #EC4899 70%, #F59E0B 100%);
  background-size: 300% 300%;
  animation: gradientShift 8s ease infinite;
  text-align: center;
  position: relative;
  overflow: hidden;
  content-visibility: auto;
  contain-intrinsic-size: auto 400px;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 50% 100%,
    rgba(255, 255, 255, 0.08) 0%,
    transparent 60%
  );
  pointer-events: none;
}

.cta-section__inner {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.cta-section__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #fff 0%, #fff 50%, rgba(245, 158, 11, 0.9) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 6s ease infinite;
}

.cta-section__desc {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.cta-section .btn--primary {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.cta-section .btn--primary:hover {
  background: #fff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transform: translateY(-3px);
}

/* ===== TESTIMONIALS ===== */
.testimonials {
  padding: var(--section-padding);
  background: var(--bg-alt);
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
}

.testimonials__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.testimonials__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.testimonial {
  padding: 2rem 2rem 2rem 2.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out),
              border-color var(--duration-normal) ease;
}

.testimonial::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gradient-primary);
  border-radius: 4px 0 0 4px;
}
.testimonial:nth-child(1)::before { background: linear-gradient(180deg, #6366F1, #8B5CF6); }
.testimonial:nth-child(2)::before { background: linear-gradient(180deg, #10B981, #059669); }
.testimonial:nth-child(3)::before { background: linear-gradient(180deg, #F59E0B, #F97316); }

.testimonial:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.testimonial__quote {
  font-size: 3rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.7;
  font-family: Georgia, serif;
  margin-bottom: -0.5rem;
}

.testimonial__text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text);
  font-style: italic;
  margin-bottom: 1.25rem;
}

.testimonial__rating {
  color: #F59E0B;
  font-size: 0.9rem;
  letter-spacing: 2px;
  margin-bottom: 0.75rem;
  transition: text-shadow 0.3s ease, transform 0.3s ease;
}

.testimonial:hover .testimonial__rating {
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
  transform: scale(1.05);
}

.testimonial__footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.testimonial__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.testimonial__author strong {
  display: block;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}

.testimonial__author span {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Staggered testimonials */
.testimonials__grid .testimonial:nth-child(2) { transition-delay: 0.1s; }
.testimonials__grid .testimonial:nth-child(3) { transition-delay: 0.2s; }

/* ===== NEWSLETTER ===== */
.newsletter {
  padding: var(--section-padding);
  background: var(--bg);
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
}

.newsletter__inner {
  max-width: 540px;
  margin: 0 auto;
  text-align: center;
  padding: 3rem 2rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.newsletter__inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #6366F1, #8B5CF6, #EC4899, #F59E0B, #10B981);
  background-size: 200% auto;
  animation: gradientShift 4s ease infinite;
}

.newsletter__icon {
  display: inline-flex;
  margin-bottom: 1rem;
}

.newsletter__title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3.5vw, 1.75rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.newsletter__desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.newsletter__form {
  display: flex;
  gap: 0.5rem;
  max-width: 420px;
  margin: 0 auto;
}

.newsletter__input {
  flex: 1;
  padding: 0.875rem 1rem;
  font-size: 0.95rem;
  font-family: var(--font);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  outline: none;
  transition: border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.newsletter__input::placeholder {
  color: var(--text-secondary);
}

.newsletter__input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2), 0 0 0 6px rgba(139, 92, 246, 0.08);
}

.newsletter__btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.newsletter__success {
  display: none;
  margin-top: 1rem;
  color: var(--success);
  font-size: 0.9rem;
  font-weight: 600;
}

.newsletter__success.is-visible {
  display: block;
  animation: fadeInUp 0.5s var(--ease-out);
}

/* ===== SITE FOOTER ===== */
.site-footer {
  background: var(--text);
  color: rgba(255, 255, 255, 0.7);
  padding: 3.5rem 1.5rem 0;
  position: relative;
  content-visibility: auto;
  contain-intrinsic-size: auto 400px;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 5%, #6366F1 25%, #8B5CF6 40%, #EC4899 60%, #F59E0B 75%, transparent 95%);
  opacity: 0.7;
}

.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.site-footer__logo {
  width: 100px;
  height: auto;
  object-fit: contain;
}

.site-footer__logo-text {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  background: linear-gradient(90deg, #a5b4fc, #c4b5fd, #f9a8d4, #fcd34d);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: logoColorShift 6s ease-in-out infinite;
}

.site-footer__heading {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #fff;
}

.site-footer__text {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.6;
  max-width: 280px;
}

.site-footer__link {
  display: block;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  padding: 0.25rem 0;
  transition: color 0.25s var(--ease-out);
}

.site-footer__link:hover {
  color: #fff;
}

.site-footer__social {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.site-footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  transition: color 0.25s var(--ease-out), background 0.25s var(--ease-out), border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}

.site-footer__social-link:hover {
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
}
.site-footer__social-link:nth-child(1):hover { background: linear-gradient(135deg, #E4405F, #FD1D1D); }
.site-footer__social-link:nth-child(2):hover { background: linear-gradient(135deg, #1877F2, #3B5998); }
.site-footer__social-link:nth-child(3):hover { background: linear-gradient(135deg, #1DA1F2, #14171A); }

.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.25rem 0;
  text-align: center;
}

.site-footer__bottom p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.35);
}

/* ===== BOOK CARD TOOLTIP ===== */
.book-card__tooltip {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: var(--text);
  color: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  width: 200px;
  font-size: 0.78rem;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  z-index: 10;
  box-shadow: var(--shadow-xl);
}

.book-card__tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--text);
}

.book-card:hover .book-card__tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== SCROLL ANIMATIONS ===== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity var(--duration-slow) var(--ease-out), transform var(--duration-slow) var(--ease-out);
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children utility */
.stagger-children > *:nth-child(1) { transition-delay: 0ms; }
.stagger-children > *:nth-child(2) { transition-delay: 60ms; }
.stagger-children > *:nth-child(3) { transition-delay: 120ms; }
.stagger-children > *:nth-child(4) { transition-delay: 180ms; }
.stagger-children > *:nth-child(5) { transition-delay: 240ms; }
.stagger-children > *:nth-child(6) { transition-delay: 300ms; }

/* Staggered delay for steps */
.steps .step:nth-child(2) { transition-delay: 0.12s; }
.steps .step:nth-child(3) { transition-delay: 0.24s; }

/* Staggered delay for books on shelf */
.shelf.is-visible .book-card { opacity: 1; transform: translateY(0); }
.shelf .book-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.shelf.is-visible .book-card:nth-child(1) { transition-delay: 0s; }
.shelf.is-visible .book-card:nth-child(2) { transition-delay: 0.06s; }
.shelf.is-visible .book-card:nth-child(3) { transition-delay: 0.12s; }
.shelf.is-visible .book-card:nth-child(4) { transition-delay: 0.18s; }
.shelf.is-visible .book-card:nth-child(5) { transition-delay: 0.24s; }
.shelf.is-visible .book-card:nth-child(6) { transition-delay: 0.3s; }

/* ===== READER HEADER ===== */
.header {
  padding: 1.5rem 0 1rem;
  text-align: center;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .header {
    padding: 0.75rem 0 0.5rem;
  }
}

.header__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

/* ===== PROGRESS BAR ===== */
.progress {
  width: 100%;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px;
  overflow: hidden;
}

.progress__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  transition: width 0.5s var(--ease-out);
}

/* ===== READER ===== */

/* Full-width reader on desktop — single viewport, no scroll */
@media (min-width: 768px) {
  #view-reader .view__inner {
    max-width: 100%;
    padding: 0 3rem;
    height: 100dvh;
    overflow: hidden;
  }
}

@media (min-width: 1200px) {
  #view-reader .view__inner {
    padding: 0 5rem;
  }
}

.reader {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0;
}

/* Desktop: book-spread layout — image left, text+choices right */
@media (min-width: 768px) {
  .reader {
    flex-direction: row;
    gap: 2.5rem;
    align-items: stretch;
    min-height: 0;
    padding: 1rem 0;
  }
}

/* Scene illustration */
.reader__image {
  width: 100%;
  max-height: 280px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  position: relative;
}

@media (min-width: 768px) {
  .reader__image {
    flex: 1 1 50%;
    max-height: 100%;
    margin-bottom: 0;
    border-radius: var(--radius-xl);
    min-height: 0;
  }
}

.reader__image.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.reader__image:empty {
  display: none;
}

.reader__image-img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

@media (min-width: 768px) {
  .reader__image-img {
    max-height: 100%;
    height: 100%;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    object-fit: cover;
  }
}

/* Subtle vignette overlay on the image */
.reader__image::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  box-shadow: inset 0 -40px 40px -20px rgba(0, 0, 0, 0.12);
  pointer-events: none;
}

@media (min-width: 768px) {
  .reader__image::after {
    border-radius: var(--radius-xl);
  }
}

/* Body wrapper — text + choices */
.reader__body {
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .reader__body {
    flex: 1 1 50%;
    padding-top: 0.5rem;
    min-height: 0;
    overflow-y: auto;
    max-height: 100%;
  }
}

.reader__text {
  background: var(--bg-alt);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  font-size: 1.125rem;
  line-height: 1.8;
  min-height: 120px;
  cursor: pointer;
  user-select: none;
  transition: background 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
  animation: fadeIn 0.4s var(--ease-out);
  box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
  .reader__text {
    font-size: 1.15rem;
    line-height: 1.85;
    padding: 2rem;
    border-radius: var(--radius-xl);
    border: none;
    background: transparent;
    box-shadow: none;
    min-height: 0;
  }

  .reader__text:hover {
    border-color: transparent;
    box-shadow: none;
  }
}

.reader__text:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* ===== CHOICES ===== */
.reader__choices {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* ===== READER BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.25rem;
  font-size: 1rem;
  font-family: var(--font);
  font-weight: 500;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out), transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}

/* Choice color palette */
.btn--choice-0 { --choice-color: #22c55e; }
.btn--choice-1 { --choice-color: #3b82f6; }
.btn--choice-2 { --choice-color: #f59e0b; }
.btn--choice-3 { --choice-color: #ef4444; }

.btn--choice {
  background: var(--bg-alt);
  color: var(--text);
  border: 2px solid var(--choice-color, var(--border));
  text-align: left;
  width: 100%;
  font-weight: 500;
}
.btn--choice::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--choice-color, var(--border));
  margin-right: 8px;
  flex-shrink: 0;
}

.btn--choice:hover {
  background: var(--choice-color, var(--primary));
  border-color: var(--choice-color, var(--primary));
  color: #fff;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--choice-color, var(--primary)) 30%, transparent);
  transform: translateY(-2px);
}
.btn--choice:hover::before {
  background: #fff;
}

.btn--choice:active {
  transform: translateY(0) scale(0.98);
}

.btn--restart {
  border-color: var(--primary);
  color: var(--primary);
}

.btn--restart:hover {
  background: var(--primary);
  color: #fff;
}

.btn--back {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
}

.btn--back:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--border-strong);
}

.btn--back:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.btn--library {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
}

.btn--library:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

/* ===== RESTART BUTTON (footer) ===== */
#btn-restart {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast) ease;
  font-size: 0.85rem;
}
#btn-restart:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
}
/* Mobile: icon only */
@media (max-width: 600px) {
  #btn-restart {
    width: 40px;
    padding: 0;
  }
  .restart-label { display: none; }
}

/* ===== TTS BUTTON ===== */
.btn--tts {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--duration-fast) ease,
              border-color var(--duration-fast) ease,
              background var(--duration-fast) ease,
              box-shadow var(--duration-fast) ease;
  margin-left: auto;
  margin-right: 0.5rem;
}
.btn--tts:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
}

/* State-driven icon visibility */
.tts-icon { display: none; }
[data-tts-state="idle"] .tts-icon--idle,
[data-tts-state="loading"] .tts-icon--loading,
[data-tts-state="playing"] .tts-icon--playing,
[data-tts-state="paused"] .tts-icon--paused,
[data-tts-state="error"] .tts-icon--idle { display: block; }

/* Loading spinner */
[data-tts-state="loading"] .tts-icon--loading {
  animation: tts-spin 1s linear infinite;
}
@keyframes tts-spin {
  to { transform: rotate(360deg); }
}

/* Active glow when playing/paused */
[data-tts-state="playing"].btn--tts,
[data-tts-state="paused"].btn--tts {
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* ===== READER FOOTER ===== */
.footer {
  display: flex;
  justify-content: flex-start;
  padding: 1rem 0 1.5rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .footer {
    padding: 0.5rem 0 0.75rem;
  }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shineSweep {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

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

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

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(-6deg); }
  40% { transform: rotate(6deg); }
  60% { transform: rotate(-4deg); }
  80% { transform: rotate(4deg); }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 200%; }
}

@keyframes pulse-soft {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.9; }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes bounceIn {
  0% { opacity: 0; transform: translateY(40px) scale(0.95); }
  60% { opacity: 1; transform: translateY(-6px) scale(1.01); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== ICON BUBBLES ===== */
.icon-bubble {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  color: #fff;
  transition: transform 0.3s var(--ease-out);
}

.icon-bubble--purple { background: linear-gradient(135deg, #6366F1, #8B5CF6); }
.icon-bubble--blue { background: linear-gradient(135deg, #3B82F6, #6366F1); }
.icon-bubble--amber { background: linear-gradient(135deg, #F59E0B, #F97316); }
.icon-bubble--pink { background: linear-gradient(135deg, #EC4899, #F43F5E); }
.icon-bubble--green { background: linear-gradient(135deg, #10B981, #34D399); }
.icon-bubble--indigo { background: linear-gradient(135deg, #4F46E5, #6366F1); }

/* ===== HERO DECORATIONS ===== */
.hero__decor {
  position: absolute;
  pointer-events: none;
  font-size: 1.5rem;
  opacity: 0.25;
  color: rgba(165, 160, 255, 0.8);
  z-index: 1;
  will-change: transform;
  transform: translateZ(0);
}

.hero__decor--1 {
  top: 12%;
  left: 8%;
  animation: float 6s ease-in-out infinite;
  font-size: 2rem;
  color: #8B5CF6;
}

.hero__decor--2 {
  top: 20%;
  right: 10%;
  animation: float-reverse 7s ease-in-out infinite;
  font-size: 1.25rem;
  color: #EC4899;
}

.hero__decor--3 {
  bottom: 25%;
  left: 12%;
  animation: float 8s ease-in-out 1s infinite;
  font-size: 1rem;
  color: #F59E0B;
}

.hero__decor--4 {
  bottom: 18%;
  right: 15%;
  animation: float-reverse 6.5s ease-in-out 0.5s infinite;
  font-size: 1.75rem;
  color: #6366F1;
}

.hero__decor--5 {
  top: 40%;
  right: 5%;
  animation: float 9s ease-in-out 2s infinite;
  font-size: 1rem;
  color: #10B981;
}

/* ===== RESPONSIVE ===== */

/* Mobile hamburger */
@media (max-width: 768px) {
  .nav__links {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100dvh;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease-out);
    border-left: 1px solid var(--border);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.08);
    z-index: 999;
  }

  .nav__links.is-open {
    transform: translateX(0);
  }

  .nav__hamburger {
    display: flex;
    z-index: 1001;
  }

  .nav__link {
    font-size: 1.05rem;
  }
}

@media (max-width: 480px) {
  :root {
    --section-padding: 4rem 1rem;
  }

  .hero {
    min-height: 90dvh;
    padding: 5rem 1rem 2rem;
  }

  .hero__decor {
    display: none;
  }

  .hero__stats {
    gap: 1rem;
  }

  .hero__stat-number {
    font-size: 1.35rem;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .book-card__cover {
    width: 100px;
    height: 140px;
  }

  .book-card {
    width: 120px;
  }

  .shelf__books {
    gap: 1rem;
  }

  .newsletter__form {
    flex-direction: column;
  }

  .newsletter__btn {
    width: 100%;
  }

  .newsletter__inner {
    padding: 2rem 1.25rem;
  }

  .reader__text {
    font-size: 1rem;
    padding: 1.25rem;
  }

  .header__title {
    font-size: 1.1rem;
  }

  .book-card__tooltip {
    display: none;
  }
}

@media (min-width: 640px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }

  .testimonials__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .site-footer__inner {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

@media (min-width: 641px) {
  .view__inner {
    padding: 0 2rem;
  }

  .reader__text {
    font-size: 1.125rem;
    padding: 2rem;
  }
}

@media (min-width: 768px) {
  .shelf__books {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .hero {
    padding-top: 2rem;
  }
}

@media (min-width: 1024px) {
  .features {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ===================================================
   AUTH & PAYMENTS - modaly, formuláře, user menu
   =================================================== */

/* ===== MODAL OVERLAY ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--bg-alt);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  max-width: 440px;
  width: calc(100% - 2rem);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  animation: fadeInUp 0.3s var(--ease-out);
}

.modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-fun);
}

.modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
}

.modal__close:hover {
  background: var(--bg-elevated);
  color: var(--text);
}

.modal__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--text);
}

/* ===== AUTH FORM ===== */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-form__input {
  padding: 0.875rem 1rem;
  font-size: 1rem;
  font-family: var(--font);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-form__input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.auth-form__submit {
  margin-top: 0.5rem;
  width: 100%;
}

.auth-form__error {
  color: #EF4444;
  font-size: 0.85rem;
  min-height: 1.2em;
}

.auth-form__consent {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
  padding: 0.25rem 0;
}

.auth-form__consent input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--primary);
  flex-shrink: 0;
  cursor: pointer;
}

.auth-form__consent span {
  user-select: none;
}

/* ===== CONSENT DIALOG ===== */
.modal--consent {
  max-width: 420px;
  text-align: center;
  padding: 2.5rem 2rem 2rem;
}

.consent-dialog__icon {
  margin-bottom: 1rem;
}

.consent-dialog__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.consent-dialog__text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.consent-dialog__text strong {
  color: var(--text);
  font-weight: 600;
}

.consent-dialog__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.consent-dialog__actions .btn--primary {
  width: 100%;
}

.consent-dialog__actions .btn--ghost {
  width: 100%;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.consent-dialog__actions .btn--ghost:hover {
  color: var(--text);
}

.inapp-dialog__copied {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
  margin-top: 0.75rem;
  animation: fadeIn 0.3s ease;
}

.inapp-dialog__steps {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.inapp-dialog__step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.4;
}

.inapp-dialog__step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-form__divider {
  text-align: center;
  margin: 1.25rem 0;
  position: relative;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.auth-form__divider::before,
.auth-form__divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border);
}

.auth-form__divider::before { left: 0; }
.auth-form__divider::after { right: 0; }

.btn--google {
  width: 100%;
  padding: 0.875rem;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: background 0.2s, border-color 0.2s;
}

.btn--google:hover {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
}

.auth-form__toggle {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.auth-form__toggle a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.auth-form__toggle a:hover {
  text-decoration: underline;
}

/* ===== NAV LOGIN BUTTON ===== */
.nav__login {
  margin-left: 0.5rem;
}

.btn--ghost {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn--ghost:hover {
  background: var(--primary-light);
}

/* ===== NAV USER MENU ===== */
.nav__user {
  display: flex;
  align-items: center;
  position: relative;
  margin-left: 0.5rem;
}

.nav__user-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.65rem 0.35rem 0.35rem;
  cursor: pointer;
  font-family: var(--font);
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}

.nav__user-btn:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.nav__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.nav__username {
  font-size: 0.85rem;
  font-weight: 600;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1;
  padding: 0 0.1rem;
}

.nav__chevron {
  opacity: 0.5;
  transition: transform 0.2s var(--ease-out);
  flex-shrink: 0;
}

.nav__user-btn.is-open .nav__chevron {
  transform: rotate(180deg);
}

.nav__dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
  min-width: 200px;
  display: none;
  z-index: 100;
  overflow: hidden;
  padding: 0.375rem 0;
}

.nav__dropdown.is-open {
  display: block;
  animation: slideDown 0.25s var(--ease-out);
}

.nav__dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: var(--font);
}

.nav__dropdown-icon {
  width: 1.25rem;
  height: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-secondary);
  transition: color 0.15s;
}

.nav__dropdown-icon svg {
  width: 16px;
  height: 16px;
}

.nav__dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 0.25rem 0.75rem;
}

.nav__dropdown-item:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.nav__dropdown-item:hover .nav__dropdown-icon {
  color: var(--primary);
}

.nav__dropdown-item--danger:hover {
  background: rgba(239, 68, 68, 0.08);
  color: #DC2626;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.nav__dropdown-backdrop {
  display: none;
}

/* ===== BOOK CARD BADGES ===== */
.book-card__badge--locked {
  background: #6B7280;
  font-size: 0.7rem;
}

.book-card__badge--free {
  background: var(--success);
  animation: pulse-soft 3s ease-in-out infinite;
}

.book-card--locked .book-card__cover {
  opacity: 0.7;
  filter: grayscale(20%);
}

.book-card--locked:hover .book-card__cover {
  opacity: 0.85;
  filter: none;
}

/* ===== PURCHASE MODAL ===== */
.modal__book-title {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2rem;
}

/* ===== SUBSCRIPTION MANAGEMENT ===== */
.modal--subscription {
  max-width: 480px;
}

/* --- No subscription state --- */
.sub-empty {
  text-align: center;
  padding: 1rem 0;
}

.sub-empty__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}
.sub-empty__icon svg {
  filter: drop-shadow(0 4px 12px rgba(139, 92, 246, 0.25));
}

.sub-empty__name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.sub-empty__trial-badge {
  display: inline-block;
  background: var(--gradient-primary);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.3rem 1rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.sub-empty__disclaimer {
  margin-top: 1rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* --- Plan toggle (monthly / yearly) --- */
.plan-toggle {
  display: flex;
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 1.25rem;
  gap: 4px;
}

.plan-toggle__btn {
  flex: 1;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
}

.plan-toggle__btn:hover {
  color: var(--text);
}

.plan-toggle__btn--active {
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.plan-toggle__save {
  display: inline-block;
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  letter-spacing: 0.01em;
}

.sub-empty__price {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
}

.sub-empty__price small {
  font-size: 0.9rem;
  font-weight: 500;
  -webkit-text-fill-color: var(--text-secondary);
}

.sub-empty__perks {
  list-style: none;
  text-align: left;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sub-empty__perks li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--text);
}

.sub-empty__perks li::before {
  content: '✓';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.sub-empty .btn--primary {
  width: 100%;
}

/* --- Active subscription state --- */
.sub-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.sub-status__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.35rem 0.875rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.sub-status__badge--active {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.sub-status__badge--canceling {
  background: rgba(245, 158, 11, 0.12);
  color: #D97706;
}

.sub-status__badge--past-due {
  background: rgba(239, 68, 68, 0.12);
  color: #DC2626;
}

.sub-status__badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.sub-info {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.sub-info__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
}

.sub-info__row + .sub-info__row {
  border-top: 1px solid var(--border);
}

.sub-info__label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.sub-info__value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.sub-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn--portal {
  background: var(--bg);
  color: var(--text);
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn--portal:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.btn--danger-ghost {
  background: transparent;
  color: #DC2626;
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1.5px solid rgba(239, 68, 68, 0.3);
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.btn--danger-ghost:hover {
  background: rgba(239, 68, 68, 0.08);
  border-color: #DC2626;
}

.btn--danger-ghost:disabled,
.btn--portal:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== TOAST NOTIFIKACE ===== */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text);
  color: #fff;
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-xl);
  z-index: 3000;
  transition: transform 0.4s var(--ease-out);
  max-width: calc(100% - 2rem);
  text-align: center;
}

.toast.is-visible {
  transform: translateX(-50%) translateY(0);
}

/* ===== FAVORITE HEART BUTTON ===== */
.book-card__fav {
  position: absolute;
  bottom: 8px;
  left: 4px;
  width: 30px;
  height: 30px;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 6;
  color: var(--text-secondary);
  transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out), color 0.25s var(--ease-out);
  opacity: 0;
  transform: scale(0.8);
  padding: 0;
}

.book-card:hover .book-card__fav,
.book-card__fav--active {
  opacity: 1;
  transform: scale(1);
}

.book-card__fav:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: scale(1.15);
}

.book-card__fav--active {
  color: #EF4444;
  opacity: 1;
  transform: scale(1);
}

.book-card__fav--active:hover {
  transform: scale(1.15);
}

@keyframes heartPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.book-card__fav--active svg {
  animation: heartPulse 0.35s ease-out;
}

/* ===== FAVORITES SHELF ===== */
.shelf--favorites .shelf__label {
  color: #EF4444;
}

.shelf--favorites .shelf__label::before {
  content: '\2665 ';
}

/* ===== LIBRARY TOOLBAR ===== */
.library-toolbar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.library-toolbar__search {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.library-toolbar__search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
}

.library-toolbar__input {
  width: 100%;
  padding: 0.7rem 0.875rem 0.7rem 2.5rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.9rem;
  background: #fff;
  color: var(--text);
  transition: border-color 0.3s, box-shadow 0.3s;
  outline: none;
  box-sizing: border-box;
}

.library-toolbar__input:focus {
  border-color: #8B5CF6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15), 0 0 16px rgba(139, 92, 246, 0.08);
}

.library-toolbar__input::placeholder {
  color: var(--text-secondary);
}

/* ===== FILTER ICONS (SVG) ===== */
.filter-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  transition: color 0.2s ease;
}

/* ── Per-age icon colors (inactive state) ── */
.age-tab[data-age="3-5"] .filter-icon  { color: #CA8A04; }
.age-tab[data-age="5-7"] .filter-icon  { color: #D97706; }
.age-tab[data-age="7-10"] .filter-icon { color: #059669; }

/* ===== AGE TABS ===== */
.age-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 0.25rem 0;
  flex-shrink: 0;
}
.age-tabs::-webkit-scrollbar { display: none; }

.age-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 1.1rem;
  border-radius: 2rem;
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--duration-fast) ease,
              color var(--duration-fast) ease,
              border-color var(--duration-fast) ease,
              box-shadow var(--duration-fast) ease;
  outline: none;
}
.age-tab:hover {
  border-color: var(--tab-color, var(--border-strong));
  box-shadow: 0 2px 8px var(--tab-glow, rgba(0,0,0,0.06));
}

/* Per-age-group colors (tinted active approach) */
.age-tab[data-age=""]    { --tab-color: var(--primary); --tab-bg: rgba(79, 70, 229, 0.10); --tab-glow: rgba(79, 70, 229, 0.18); }
.age-tab[data-age="3-5"] { --tab-color: #CA8A04;        --tab-bg: rgba(234, 179, 8, 0.12);  --tab-glow: rgba(234, 179, 8, 0.20); }
.age-tab[data-age="5-7"] { --tab-color: #D97706;        --tab-bg: rgba(245, 158, 11, 0.12); --tab-glow: rgba(245, 158, 11, 0.20); }
.age-tab[data-age="7-10"]{ --tab-color: #059669;        --tab-bg: rgba(52, 211, 153, 0.12); --tab-glow: rgba(52, 211, 153, 0.20); }

.age-tab--active {
  background: var(--tab-bg);
  color: var(--tab-color);
  border-color: var(--tab-color);
  box-shadow: 0 2px 10px var(--tab-glow);
  font-weight: 700;
}
.age-tab--active .filter-icon {
  color: var(--tab-color);
}
.age-tab--active:hover {
  background: var(--tab-bg);
  border-color: var(--tab-color);
}

/* ===== ALL BOOKS LINK (in toolbar) ===== */
.btn-all-books {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.55rem 1.1rem;
  border-radius: 2rem;
  border: 2px solid transparent;
  background: var(--gradient-primary);
  color: #fff;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
  margin-left: auto;
}
.btn-all-books:hover {
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
}
.btn-all-books svg {
  transition: transform 0.2s ease;
}
.btn-all-books:hover svg {
  transform: translateX(2px);
}

/* ===== ALL BOOKS PAGE ===== */
.allbooks-page {
  padding: 6rem 1.5rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.allbooks-header {
  text-align: center;
  margin-bottom: 2rem;
}

.allbooks-header__title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  background: var(--gradient-fun);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0 0 0.25rem;
}
.allbooks-header__title svg {
  stroke: url(#allbooks-title-gradient);
  color: var(--primary);
  flex-shrink: 0;
}

.allbooks-header__count {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0.25rem 0 0;
}

/* ── Filters ── */
.allbooks-filters {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.allbooks-filters__section {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.allbooks-filters__section--search {
  max-width: 400px;
}

.allbooks-filters__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.allbooks-pills {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.allbooks-pills::-webkit-scrollbar { display: none; }

.allbooks-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.85rem;
  border-radius: 2rem;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--duration-fast) ease,
              color var(--duration-fast) ease,
              border-color var(--duration-fast) ease,
              box-shadow var(--duration-fast) ease;
  outline: none;
}
.allbooks-pill:hover {
  border-color: var(--pill-color, var(--primary));
  color: var(--pill-color, var(--primary));
}

/* ── Per-age/theme pill colors ── */
.allbooks-pill--age[data-age="3-5"]  { --pill-color: #CA8A04; --pill-bg: rgba(234, 179, 8, 0.12); }
.allbooks-pill--age[data-age="5-7"]  { --pill-color: #D97706; --pill-bg: rgba(245, 158, 11, 0.12); }
.allbooks-pill--age[data-age="7-10"] { --pill-color: #059669; --pill-bg: rgba(52, 211, 153, 0.12); }
.allbooks-pill--theme[data-theme="detske"]      { --pill-color: #DB2777; --pill-bg: rgba(244, 114, 182, 0.12); }
.allbooks-pill--theme[data-theme="dobrodruzne"] { --pill-color: #D97706; --pill-bg: rgba(245, 158, 11, 0.12); }
.allbooks-pill--theme[data-theme="fantasy"]     { --pill-color: #7C3AED; --pill-bg: rgba(167, 139, 250, 0.12); }
.allbooks-pill--theme[data-theme="scifi"]       { --pill-color: #2563EB; --pill-bg: rgba(96, 165, 250, 0.12); }
.allbooks-pill--theme[data-theme="zahadne"]     { --pill-color: #059669; --pill-bg: rgba(52, 211, 153, 0.12); }

/* ── Inactive icon colors ── */
.allbooks-pill--age[data-age="3-5"] .filter-icon  { color: #EAB308; }
.allbooks-pill--age[data-age="5-7"] .filter-icon  { color: #F59E0B; }
.allbooks-pill--age[data-age="7-10"] .filter-icon { color: #34D399; }
.allbooks-pill--theme[data-theme="detske"] .filter-icon      { color: #F472B6; }
.allbooks-pill--theme[data-theme="dobrodruzne"] .filter-icon  { color: #F59E0B; }
.allbooks-pill--theme[data-theme="fantasy"] .filter-icon      { color: #A78BFA; }
.allbooks-pill--theme[data-theme="scifi"] .filter-icon        { color: #60A5FA; }
.allbooks-pill--theme[data-theme="zahadne"] .filter-icon      { color: #34D399; }

/* ── Active state: tinted background, preserve icon color ── */
.allbooks-pill--active {
  background: var(--pill-bg, rgba(79, 70, 229, 0.10));
  color: var(--pill-color, var(--primary));
  border-color: var(--pill-color, var(--primary));
  font-weight: 600;
}
.allbooks-pill--active .filter-icon {
  color: var(--pill-color, var(--primary));
}
.allbooks-pill--active:hover {
  background: var(--pill-bg, rgba(79, 70, 229, 0.10));
  color: var(--pill-color, var(--primary));
}

/* ── Grid ── */
.allbooks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1.25rem;
  animation: fadeInUp 0.3s ease;
}

/* ── Empty state ── */
.allbooks-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
}
.allbooks-empty__icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}
.allbooks-empty__title {
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
}
.allbooks-empty__text {
  font-size: 0.9rem;
  margin: 0;
}

/* ===== EMPTY STATE (žádné výsledky) ===== */
.library-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
}

.library-empty__icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.library-empty__text {
  font-size: 1rem;
}

/* ===== RESPONSIVE - AUTH & PURCHASE ===== */
@media (max-width: 480px) {
  .modal {
    padding: 1.75rem;
    border-radius: var(--radius-lg);
  }

  .nav__login {
    margin-left: 0;
    margin-top: 0.5rem;
    width: 100%;
  }

  .nav__user {
    margin-left: 0;
    margin-top: 0.5rem;
  }

  .library-toolbar {
    flex-direction: column;
  }

  .library-toolbar__search {
    min-width: 100%;
  }

  .age-tabs {
    width: 100%;
  }

  .btn-all-books {
    width: 100%;
    justify-content: center;
    margin-left: 0;
  }

  .allbooks-page {
    padding: 5rem 0.75rem 2rem;
  }

  .allbooks-header__title {
    font-size: 1.25rem;
  }

  .allbooks-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
  }

  .allbooks-filters__section--search {
    max-width: 100%;
  }

  /* Heart always visible on mobile (no hover) */
  .book-card__fav {
    opacity: 1;
    transform: scale(1);
  }

  /* Dropdown → bottom sheet on mobile */
  .nav__dropdown {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    min-width: 100%;
    padding: 0.75rem 0 calc(0.75rem + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
  }

  .nav__dropdown.is-open {
    animation: slideUp 0.3s var(--ease-out);
  }

  .nav__dropdown-item {
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }

  .nav__dropdown-icon {
    font-size: 1.15rem;
    width: 1.5rem;
  }

  /* Backdrop overlay for bottom sheet */
  .nav__dropdown-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 99;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }

  .nav__dropdown-backdrop.is-open {
    display: block;
  }
}

/* ===== FAVORITES PAGE ===== */
.favorites-page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 6rem 1.5rem 3rem;
}

/* Header */
.favorites-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.favorites-header__back {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.5rem 0;
  margin-bottom: 1rem;
  transition: color 0.2s;
}

.favorites-header__back:hover {
  color: var(--primary);
}

.favorites-header__title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
}

.favorites-header__heart {
  color: #ef4444;
  flex-shrink: 0;
}

.favorites-header__count {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

/* Search */
.favorites-search {
  max-width: 400px;
  margin: 0 auto 2rem;
}

.favorites-search__inner {
  position: relative;
  display: flex;
  align-items: center;
}

.favorites-search__icon {
  position: absolute;
  left: 0.85rem;
  color: var(--text-secondary);
  pointer-events: none;
}

.favorites-search__input {
  width: 100%;
  padding: 0.65rem 0.85rem 0.65rem 2.5rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: var(--font);
  background: var(--bg-card);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.favorites-search__input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.favorites-search__input::placeholder {
  color: var(--text-secondary);
}

/* Grid */
.favorites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 2rem 1.5rem;
  justify-items: center;
}

/* Card removing animation */
.favorites-card--removing {
  animation: favCardRemove 0.3s ease forwards;
}

@keyframes favCardRemove {
  to {
    opacity: 0;
    transform: scale(0.85);
  }
}

/* Empty state */
.favorites-empty {
  text-align: center;
  padding: 4rem 1rem;
}

.favorites-empty__icon {
  color: var(--text-secondary);
  opacity: 0.4;
  margin-bottom: 1.5rem;
}

.favorites-empty__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.favorites-empty__text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.favorites-empty__cta {
  font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 600px) {
  .favorites-page {
    padding: 5rem 1rem 2rem;
  }

  .favorites-header__title {
    font-size: 1.4rem;
  }

  .favorites-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1.5rem 1rem;
  }
}

/* ===== PLAYFUL ENHANCEMENTS ===== */

/* --- Icon bubble pop on hover --- */
.feature:hover .icon-bubble,
.step:hover .icon-bubble {
  transform: scale(1.1) rotate(-3deg);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
}

/* --- Testimonials floating decorations --- */
.testimonials {
  position: relative;
  overflow: hidden;
}
.testimonials::after {
  content: '';
  position: absolute;
  top: 10%;
  right: -40px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.06) 0%, transparent 70%);
  animation: float 8s ease-in-out infinite;
  pointer-events: none;
}

/* --- Section title gradient text reveal --- */
.section-title {
  background: linear-gradient(135deg, var(--text) 0%, var(--text) 50%, #6366F1 70%, #8B5CF6 90%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-position: 100% 0;
}
.section-title.is-visible {
  animation: titleGradientReveal 1.2s var(--ease-out) forwards;
}

@keyframes titleGradientReveal {
  0% { background-position: 100% 0; }
  100% { background-position: 0% 0; }
}

/* --- Scroll animation variants --- */
.animate-on-scroll--left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity var(--duration-slow) var(--ease-out), transform var(--duration-slow) var(--ease-out);
}
.animate-on-scroll--left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.animate-on-scroll--right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity var(--duration-slow) var(--ease-out), transform var(--duration-slow) var(--ease-out);
}
.animate-on-scroll--right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.animate-on-scroll--scale {
  opacity: 0;
  transform: scale(0.85);
  transition: opacity var(--duration-slow) var(--ease-out), transform var(--duration-slow) var(--ease-elastic);
}
.animate-on-scroll--scale.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* --- Hero scroll indicator --- */
.hero__scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 2;
  text-decoration: none;
  animation: fadeInUp 0.8s var(--ease-out) 0.8s both;
  transition: opacity 0.5s ease;
}

.hero__scroll-hint-text {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 600;
  background: linear-gradient(90deg, #6366F1, #EC4899, #F59E0B);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 3s ease infinite;
}

.hero__scroll-hint-arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid transparent;
  background:
    linear-gradient(var(--bg), var(--bg)) padding-box,
    linear-gradient(135deg, #6366F1, #8B5CF6, #EC4899, #F59E0B) border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: scrollBounce 2s ease-in-out infinite;
  transition: box-shadow 0.3s ease;
  cursor: pointer;
}

.hero__scroll-hint-arrow:hover {
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.hero__scroll-hint-arrow svg {
  color: var(--primary);
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* --- Stagger animation delays for cards --- */
.features .feature:nth-child(2) { transition-delay: 0.1s; }
.features .feature:nth-child(3) { transition-delay: 0.2s; }
.features .feature:nth-child(4) { transition-delay: 0.3s; }
.steps .step:nth-child(2) { transition-delay: 0.15s; }
.steps .step:nth-child(3) { transition-delay: 0.3s; }
.testimonials__grid .testimonial:nth-child(2) { transition-delay: 0.1s; }
.testimonials__grid .testimonial:nth-child(3) { transition-delay: 0.2s; }
.section-subtitle.animate-on-scroll {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease-out) 0.15s, transform 0.6s var(--ease-out) 0.15s;
}
.section-subtitle.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== PRICING ===== */
.pricing {
  padding: var(--section-padding);
  background: var(--bg);
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}

.pricing__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.pricing__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.pricing__toggle-label {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.3s ease;
}

.pricing__toggle-label--active {
  color: var(--text);
  font-weight: 600;
}

.pricing__toggle-switch {
  width: 52px;
  height: 28px;
  background: var(--border-strong);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  position: relative;
  transition: background 0.3s ease;
}

.pricing__toggle-switch.is-yearly {
  background: var(--gradient-primary);
}

.pricing__toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s var(--ease-out);
  box-shadow: var(--shadow-sm);
}

.pricing__toggle-switch.is-yearly .pricing__toggle-knob {
  transform: translateX(24px);
}

.pricing__save-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--success), #059669);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-left: 0.4rem;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.pricing__cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 720px;
  margin: 0 auto;
}

.pricing__card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  text-align: center;
  transition: transform var(--duration-normal) var(--ease-out), box-shadow var(--duration-normal) var(--ease-out);
  position: relative;
}

.pricing__card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.pricing__card--featured {
  border-color: transparent;
  background:
    linear-gradient(var(--bg-alt), var(--bg-alt)) padding-box,
    linear-gradient(135deg, #6366F1, #8B5CF6, #EC4899) border-box;
  border: 2px solid transparent;
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.3),
              0 8px 32px rgba(99, 102, 241, 0.12);
}

.pricing__card-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pricing__card-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.pricing__card-price {
  margin-bottom: 0.5rem;
}

.pricing__amount {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text);
}

.pricing__period {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.pricing__discount {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
  animation: fadeInUp 0.3s var(--ease-out);
}

.pricing__original-price {
  font-size: 1rem;
  color: var(--text-secondary);
  text-decoration: line-through;
  font-weight: 500;
}

.pricing__discount-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--success), #059669);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.pricing__trial {
  font-size: 0.85rem;
  color: var(--success);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.pricing__features {
  list-style: none;
  text-align: left;
  margin: 1.5rem 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.pricing__features li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

@media (max-width: 600px) {
  .pricing__cards {
    grid-template-columns: 1fr;
  }
}

/* ===== ONBOARDING ===== */
.modal--onboarding {
  max-width: 480px;
  text-align: center;
  padding: 2.5rem 2rem 2rem;
}

.onboarding__header {
  margin-bottom: 1.5rem;
}

.onboarding__emoji {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 0.75rem;
}

.onboarding__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.onboarding__subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.onboarding__features {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
  text-align: left;
}

.onboarding__feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  background: var(--surface);
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--text);
}

.onboarding__feature-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.onboarding__age-section {
  margin-bottom: 1.25rem;
}

.onboarding__age-label {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 1rem;
}

.onboarding__age-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.onboarding__age-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  padding: 1rem 0.75rem;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.3s var(--ease-elastic);
}

.onboarding__age-btn:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.15);
}

.onboarding__age-btn:active {
  transform: scale(0.96);
}

.onboarding__age-emoji {
  font-size: 2rem;
  line-height: 1;
}

.onboarding__age-range {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.onboarding__footer {
  margin-top: 0.5rem;
}

.onboarding__footer .btn--ghost {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 0.5rem 1.25rem;
}

@media (max-width: 480px) {
  .modal--onboarding {
    padding: 2rem 1.25rem 1.5rem;
  }
  .onboarding__age-buttons {
    flex-direction: column;
  }
  .onboarding__age-btn {
    flex-direction: row;
    padding: 0.75rem 1rem;
    gap: 0.75rem;
  }
  .onboarding__age-emoji {
    font-size: 1.5rem;
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  .hero__scroll-hint,
  .hero__scroll-hint-text,
  .hero__scroll-hint-arrow {
    animation: none !important;
  }
  .animate-on-scroll--left,
  .animate-on-scroll--right,
  .animate-on-scroll--scale,
  .animate-on-scroll {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .section-title.is-visible {
    animation: none !important;
    background-position: 0% 0 !important;
  }
  .section-subtitle.animate-on-scroll {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .testimonials::after,
  .newsletter__inner::before {
    animation: none !important;
  }
  .cta-section__title {
    animation: none !important;
    background-position: 0% center !important;
  }
  .hero__scroll-hint-text {
    animation: none !important;
  }
  .feature:hover .icon-bubble,
  .step:hover .icon-bubble {
    transform: none !important;
  }
  /* Global catch-all: disable all remaining animations & transitions */
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== MOBILE TWEAKS ===== */
@media (max-width: 480px) {
  .hero__scroll-hint {
    display: none;
  }
}
