/* ============================================================
   TESTIMONIALS — Scroll-driven video canvas
   ============================================================ */

/* ── Section: 500vh gives ample scroll room for 4 cards ──── */
.ts-section {
  position: relative;
  height: 500vh;
}

/* ── Sticky 100vh viewport ───────────────────────────────── */
.ts-sticky {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #060d18;
}

/* ── Canvas — cover fit ──────────────────────────────────── */
#ts-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

#ts-canvas.loaded {
  opacity: 1;
}

/* ── Cinematic vignette ──────────────────────────────────── */
.ts-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    linear-gradient(to bottom,
      rgba(6,13,24,0.70) 0%,
      rgba(6,13,24,0.20) 25%,
      rgba(6,13,24,0.20) 65%,
      rgba(6,13,24,0.80) 100%
    ),
    radial-gradient(ellipse 120% 100% at 50% 50%,
      transparent 40%,
      rgba(6,13,24,0.45) 100%
    );
}

/* ── Everything above canvas ─────────────────────────────── */
.ts-header,
.ts-cards-area,
.ts-dots,
.ts-hint {
  position: absolute;
  z-index: 2;
}

/* ── Header ──────────────────────────────────────────────── */
.ts-header {
  top: clamp(60px, 10vh, 100px);
  left: 0;
  right: 0;
  text-align: center;
}

.ts-title {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.ts-title-label {
  display: block;
  font-family: 'Bebas Neue', 'Impact', sans-serif;
  font-size: clamp(1.1rem, 2.0vw, 2.2rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  line-height: 1;
  color: #83C1C6;
  margin-bottom: 4px;
}

.ts-title-top {
  display: block;
  font-family: 'Bebas Neue', 'Impact', sans-serif;
  font-size: clamp(2.0rem, 3.8vw, 4.4rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
  color: #ffffff;
}

.ts-title-bot {
  display: block;
  font-family: 'Bangond', Georgia, serif;
  font-size: clamp(2.8rem, 6.0vw, 7.2rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: -0.025em;
  line-height: 0.9;
  color: #ffffff;
}

/* ── Cards area — centres cards in the viewport ──────────── */
.ts-cards-area {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 14vh;
  pointer-events: none;
}

/* ── Individual card — liquid glass ─────────────────────── */
.ts-card {
  position: absolute;
  width: min(460px, 86vw);
  padding: 30px 30px 26px;
  border-radius: 20px;
  will-change: opacity, transform;
  pointer-events: none;

  /* Liquid glass */
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(180, 220, 240, 0.07) 55%,
    rgba(131, 193, 198, 0.04) 100%
  );
  backdrop-filter: blur(40px) saturate(200%) brightness(1.1);
  -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(1.1);

  border: 1px solid rgba(131, 193, 198, 0.45);
  border-top-color: rgba(180, 230, 240, 0.65);
  border-left-color: rgba(160, 215, 230, 0.50);

  box-shadow:
    0 0 0 1px rgba(131, 193, 198, 0.12),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.55),
    inset 1px 0 0 rgba(255, 255, 255, 0.25),
    inset 0 0 30px rgba(131, 193, 198, 0.07),
    0 28px 72px rgba(0, 0, 0, 0.55),
    0  8px 24px rgba(0, 0, 0, 0.35);

  /* Hidden by default */
  opacity: 0;
  transform: translateY(40px) scale(0.97);
  transition:
    opacity  0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Active card — fully visible */
.ts-card.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Exiting card — flies up */
.ts-card.exit-up {
  opacity: 0;
  transform: translateY(-40px) scale(0.97);
  transition:
    opacity  0.50s ease,
    transform 0.50s ease;
}

/* ── Stars ───────────────────────────────────────────────── */
.ts-stars {
  display: flex;
  gap: 3px;
  margin-bottom: 16px;
}

.ts-star {
  width: 14px;
  height: 14px;
  color: #FBBF24;
  flex-shrink: 0;
}

/* ── Tag ─────────────────────────────────────────────────── */
.ts-tag {
  display: inline-block;
  margin-bottom: 12px;
  padding: 3px 11px;
  background: rgba(131, 193, 198, 0.12);
  border: 1px solid rgba(131, 193, 198, 0.35);
  border-radius: 9999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #83C1C6;
}

/* ── Quote ───────────────────────────────────────────────── */
.ts-quote {
  font-size: clamp(0.88rem, 1.6vw, 0.98rem);
  line-height: 1.70;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 22px;
  font-style: italic;
}

/* ── Author ──────────────────────────────────────────────── */
.ts-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ts-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 1.5px solid rgba(131, 193, 198, 0.55);
  box-shadow: 0 0 0 2.5px rgba(131, 193, 198, 0.14);
}

.ts-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ts-author-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
}

.ts-author-origin {
  font-size: 0.74rem;
  color: #83C1C6;
  margin-top: 2px;
}

/* ── Progress dots ───────────────────────────────────────── */
.ts-dots {
  bottom: clamp(28px, 5vh, 48px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.ts-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(131, 193, 198, 0.22);
  border: 1px solid rgba(131, 193, 198, 0.30);
  transition: background 0.35s, transform 0.35s;
}

.ts-dot.active {
  background: #83C1C6;
  transform: scale(1.4);
}

/* ── Scroll hint ─────────────────────────────────────────── */
.ts-hint {
  bottom: clamp(58px, 9vh, 86px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(131, 193, 198, 0.50);
  pointer-events: none;
  animation: ts-bob 2.2s ease-in-out infinite;
  transition: opacity 0.6s ease;
}

.ts-hint span {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.ts-hint-chevron {
  width: 12px;
  height: 12px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-top: -2px;
}

@keyframes ts-bob {
  0%, 100% { opacity: 0.50; transform: translateX(-50%) translateY(0);   }
  55%       { opacity: 0.75; transform: translateX(-50%) translateY(7px); }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .ts-section { height: 450vh; }
  .ts-card     { padding: 24px 20px 20px; }
}
