/* Small additions that Tailwind utilities don't cover cleanly. */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }

/* Brand swoosh used under page headers (echoes the navy/orange slide banner) */
.swoosh {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 56px; pointer-events: none;
}

/* Subtle dotted texture for dark bands */
.dots {
  background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 18px 18px;
}

/* Lazy YouTube player */
.yt-lite { position: relative; aspect-ratio: 16 / 9; background: #0f0d2b; overflow: hidden; cursor: pointer; }
.yt-lite img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease, opacity .3s; opacity: .92; }
.yt-lite:hover img { transform: scale(1.03); opacity: 1; }
.yt-lite iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-lite .play {
  position: absolute; inset: 0; margin: auto; width: 68px; height: 48px; border-radius: 14px;
  background: rgba(23,20,63,.82); display: grid; place-items: center; transition: background .2s;
}
.yt-lite:hover .play, .yt-lite:focus-visible .play { background: #f7941d; }

.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Book cover */
.book-cover {
  aspect-ratio: 2 / 3;
  background:
    linear-gradient(90deg, rgba(0,0,0,.28) 0, rgba(0,0,0,0) 5%, rgba(255,255,255,.07) 6%, rgba(0,0,0,0) 9%),
    linear-gradient(160deg, #302c70 0%, #262262 55%, #17143f 100%);
  box-shadow: 0 30px 60px -20px rgba(23,20,63,.55), 0 10px 20px -10px rgba(23,20,63,.4);
  transform: perspective(1200px) rotateY(-10deg);
  transition: transform .5s ease;
}
.book-cover:hover { transform: perspective(1200px) rotateY(-2deg); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .yt-lite img, .book-cover { transition: none; }
}

/* Form field flagged by validation */
[aria-invalid="true"] { box-shadow: 0 0 0 2px #dc2626 !important; }
