/* ==========================================================
   TeachersDigitalContent — Main Stylesheet
   Structure:
     1. Design tokens (:root)
     2. Base
     3. Utilities / animations
     4. Components (marquee, carousel, reveal)
     5. Accessibility & scrollbar
   Tailwind handles layout; this file holds custom CSS only.
   ========================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  --navy-900: #0f2341;
  --navy-800: #162e52;
  --coral-500: #ff6b5b;
  --coral-600: #f05240;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;
  --cream: #faf9f6;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- 2. Base ---------- */
body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--teal-500);
  color: #fff;
}

/* ---------- 3. Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .float-slow,
  .float-slower,
  .marquee-track {
    animation: none !important;
  }
}

/* ---------- 4. Floating animation (hero cards) ---------- */
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

.float-slow {
  animation: float 6s ease-in-out infinite;
  will-change: transform;
}

.float-slower {
  animation: float 8s ease-in-out infinite;
  will-change: transform;
}

/* ---------- 5. Logo marquee ---------- */
@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.marquee-track {
  animation: marquee 22s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

/* ---------- 6. Testimonial carousel ---------- */
.testimonial-slide {
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Dotted pattern overlay used in stats section */
.dot-grid {
  background-image: radial-gradient(rgba(255, 255, 255, 1) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* ---------- 7. Accessibility ---------- */
:focus-visible {
  outline: 3px solid var(--teal-500);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- 8. Custom scrollbar ---------- */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--cream);
}
::-webkit-scrollbar-thumb {
  background: var(--navy-900);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--navy-800);
}
