/* Rounded Duolingo-adjacent face sitewide (Nunito) */
@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@200;300;400;500;600;700;800;900&display=swap");

/* ============================================================
   DILLY TESTIMONIALS MARQUEE
   1:1 vanilla port of components/ui/testimonials-columns-1.tsx
   + components/demo.tsx (shadcn / motion-react component).

   Tailwind → CSS mapping used here:
     p-10 = 2.5rem · rounded-3xl = 24px · gap-6 = 1.5rem
     max-w-xs = 20rem · mt-5 = 1.25rem · mt-10 = 2.5rem
     shadow-lg shadow-primary/10 → primary-tinted shadow-lg
     tracking-tighter = -0.05em · tracking-tight = -0.025em

   Usage: link this stylesheet + js/dilly-testimonials.js, then
   drop in the <section class="dt-testimonials"> snippet.
   Class names deliberately avoid the "-section" / "-card" /
   "-cta" substrings that site-revolut.css globally overrides.
   ============================================================ */

.dt-testimonials {
  position: relative;
  /* demo: bg-background my-20 - white surface, generous rhythm */
  background: #ffffff;
  color: #0a0e1c;
  padding: clamp(4rem, 10vh, 6rem) clamp(1.25rem, 4vw, 2rem);
  overflow: hidden;
}

/* ── Header (max-w-[540px] mx-auto, centered) ── */
.dt-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 540px;
  margin: 0 auto;
  /* fade-up entrance: initial {opacity:0, y:20}, 0.8s, ease [0.16,1,0.3,1] */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s,
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s;
}
.dt-head.is-in {
  opacity: 1;
  transform: none;
}

/* h2: Nunito Bold + brand navy #293F95.
   High specificity beats any leftover Inter Tight h2 rules. */
html body .dt-testimonials .dt-head h2,
.dt-testimonials .dt-head h2,
.dt-logo-headline {
  font-family: "Nunito", "Avenir Next", "Segoe UI", sans-serif !important;
  font-size: clamp(1.25rem, 1rem + 1.6vw, 2.25rem);
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
  line-height: 1.15 !important;
  margin: 0;
  color: #293F95 !important;
  -webkit-font-smoothing: antialiased;
}

/* subtitle: text-center mt-5 opacity-75 */
.dt-sub {
  margin: 1.25rem 0 0;
  font-size: 1rem;
  line-height: 1.6;
  opacity: 0.75;
}

/* ── Columns viewport (flex justify-center gap-6 mt-10,
      max-h-[740px] overflow-hidden, vertical mask fade) ── */
.dt-columns {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
  max-height: 740px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 25%, black 75%, transparent);
  mask-image: linear-gradient(to bottom, transparent, black 25%, black 75%, transparent);
}

/* Column shell: even wall up to max-w-xs; shrink together on mid-large screens */
.dt-col {
  flex: 1 1 0;
  min-width: 0;
  max-width: 20rem;
}

/* ── Infinite vertical marquee ──
   Each track holds the testimonial list twice; translating the
   track by -50% then looping reads as a seamless scroll
   (same trick as the motion/react translateY:"-50%" loop). */
.dt-track {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  /* padding-bottom equals the gap so the track is exactly
     2 × (list + gap) tall and translateY(-50%) loops seamlessly */
  padding-bottom: 1.5rem;
  background: #ffffff; /* demo: bg-background on the moving track */
  animation: dt-scroll var(--dt-duration, 10s) linear infinite;
  will-change: transform;
}

.dt-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@keyframes dt-scroll {
  to { transform: translateY(-50%); }
}

/* demo durations: 15s / 19s / 17s / 21s / 16s */
.dt-col:nth-child(1) .dt-track { --dt-duration: 15s; }
.dt-col:nth-child(2) .dt-track { --dt-duration: 19s; }
.dt-col:nth-child(3) .dt-track { --dt-duration: 17s; }
.dt-col:nth-child(4) .dt-track { --dt-duration: 21s; }
.dt-col:nth-child(5) .dt-track { --dt-duration: 16s; }

/* ── Testimonial item
      (p-10 rounded-3xl border shadow-lg shadow-primary/10 max-w-xs) ── */
.dt-item {
  width: 100%;
  /* Cap at max-w-xs; shrink with flex columns on mid-large screens.
     !important beats dilly-nav.css mobile `article { max-width: 100% !important }`. */
  max-width: min(20rem, 100%) !important;
  padding: 2.5rem;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid rgba(10, 14, 28, 0.1);
  box-sizing: border-box;
  /* Tailwind shadow-lg, tinted primary/10 (navy #293f95) */
  box-shadow:
    0 10px 15px -3px rgba(41, 63, 149, 0.1),
    0 4px 6px -4px rgba(41, 63, 149, 0.1);
}

.dt-text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: inherit;
}

/* meta row: flex items-center gap-2 mt-5 */
.dt-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.dt-meta img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

/* name: font-medium tracking-tight leading-5 */
.dt-name {
  display: block;
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: -0.025em;
  line-height: 1.25rem;
  color: inherit;
}

/* role: leading-5 opacity-60 tracking-tight */
.dt-role {
  display: block;
  font-size: 1rem;
  line-height: 1.25rem;
  letter-spacing: -0.025em;
  opacity: 0.6;
}

/* ── Responsive: 1 col mobile, 3 tablet (md+), 5 large desktop (xl+)
      (demo: cols 2-3 hidden md:block, cols 4-5 hidden xl:block) */
@media (max-width: 1279px) {
  .dt-col:nth-child(4),
  .dt-col:nth-child(5) { display: none; }
}
@media (max-width: 767px) {
  .dt-col:nth-child(2),
  .dt-col:nth-child(3) { display: none; }
}

/* ── Reduced motion: static list, no marquee, no dupes ── */
@media (prefers-reduced-motion: reduce) {
  .dt-head {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .dt-track { animation: none; }
  .dt-dup { display: none; }
  .dt-columns {
    max-height: none;
    -webkit-mask-image: none;
    mask-image: none;
  }
}
