/* ============================================
   Dra. Ana Matumoto — Mentoria Depoimentos
   Editorial video feature · Plyr themed
   Inherits tokens from hero.css
   ============================================ */

.testimonials {
  position: relative;
  padding: clamp(120px, 16vh, 200px) clamp(20px, 4vw, 64px);
  background: var(--bg-2);
  color: var(--ink);
  overflow: hidden;
  isolation: isolate;
}

.testimonials::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 50% at 50% 0%,
      rgba(203, 163, 107, 0.07) 0%,
      transparent 60%),
    radial-gradient(ellipse 60% 45% at 50% 100%,
      rgba(203, 163, 107, 0.055) 0%,
      transparent 60%);
  pointer-events: none;
  z-index: -1;
}

.testimonials::after {
  content: "V";
  position: absolute;
  top: clamp(40px, 8vh, 100px);
  left: -0.12em;
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 350;
  font-size: clamp(220px, 38vw, 520px);
  line-height: 0.78;
  color: rgba(203, 163, 107, 0.045);
  font-variation-settings: "opsz" 144, "SOFT" 100;
  pointer-events: none;
  user-select: none;
  z-index: -1;
  letter-spacing: -0.05em;
}

.testimonials-inner {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
}

/* ---------- Header ---------- */
.testimonials-head {
  text-align: center;
  max-width: 880px;
  margin: 0 auto clamp(64px, 9vh, 100px);
}

.testimonials-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 9px 18px 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10, 8, 7, 0.32);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  margin-bottom: clamp(28px, 4vh, 40px);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}

.testimonials-eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.testimonials-eyebrow strong {
  color: var(--ink);
  font-weight: 600;
}

.testimonials.is-revealed .testimonials-eyebrow {
  opacity: 1; transform: translateY(0);
  transition-delay: 0.05s;
}

.testimonials-title {
  font-family: var(--f-display);
  font-weight: 350;
  font-size: clamp(40px, 5.6vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.024em;
  color: var(--ink);
  font-variation-settings: "opsz" 144, "SOFT" 40;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1.2s var(--ease-out), transform 1.2s var(--ease-out);
}

.testimonials-title em {
  font-style: italic;
  color: var(--accent-2);
  font-variation-settings: "opsz" 144, "SOFT" 100;
}

.testimonials-title .period {
  color: var(--accent);
  margin-left: -0.04em;
}

.testimonials.is-revealed .testimonials-title {
  opacity: 1; transform: translateY(0);
  transition-delay: 0.2s;
}

.testimonials-lede {
  margin-top: clamp(24px, 3.5vh, 36px);
  font-family: var(--f-sans);
  font-size: clamp(15px, 1.05vw, 17.5px);
  line-height: 1.65;
  color: var(--ink-soft);
  font-weight: 300;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}

.testimonials-lede em {
  font-family: var(--f-display);
  font-style: italic;
  color: var(--ink);
  font-variation-settings: "opsz" 24, "SOFT" 100;
}

.testimonials.is-revealed .testimonials-lede {
  opacity: 1; transform: translateY(0);
  transition-delay: 0.35s;
}

/* ============================================
   VIDEO GRID
   ============================================ */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 3.5vw, 56px);
  max-width: 880px;
  margin: 0 auto;
  align-items: start;
  width: 100%;
}

.testimonial {
  position: relative;
  min-width: 0;
  max-width: 100%;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out);
}

.testimonial:nth-child(2) {
  margin-top: clamp(28px, 4vh, 56px);
}

.testimonials.is-revealed .testimonial:nth-child(1) {
  opacity: 1; transform: translateY(0);
  transition-delay: 0.5s;
}

.testimonials.is-revealed .testimonial:nth-child(2) {
  opacity: 1; transform: translateY(0);
  transition-delay: 0.68s;
}

/* ---------- Video frame ---------- */
.testimonial-frame {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  background: var(--bg-2);
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(244, 238, 227, 0.06) inset,
    0 32px 80px -28px rgba(0, 0, 0, 0.85),
    0 14px 32px -14px rgba(0, 0, 0, 0.55);
}

/* gold corner accents */
.testimonial-frame::before,
.testimonial-frame::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 1px solid var(--accent);
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.testimonial-frame::before {
  top: 12px; left: 12px;
  border-right: none; border-bottom: none;
  transform: translate(-5px, -5px);
}

.testimonial-frame::after {
  bottom: 12px; right: 12px;
  border-left: none; border-top: none;
  transform: translate(5px, 5px);
}

.testimonials.is-revealed .testimonial:nth-child(1) .testimonial-frame::before,
.testimonials.is-revealed .testimonial:nth-child(1) .testimonial-frame::after {
  opacity: 0.7; transform: translate(0, 0);
  transition-delay: 1s;
}

.testimonials.is-revealed .testimonial:nth-child(2) .testimonial-frame::before,
.testimonials.is-revealed .testimonial:nth-child(2) .testimonial-frame::after {
  opacity: 0.7; transform: translate(0, 0);
  transition-delay: 1.2s;
}

/* ---------- Caption beneath video ---------- */
.testimonial-caption {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 22px;
  padding-left: 2px;
}

.testimonial-caption .marker {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 400;
  font-size: 20px;
  line-height: 1;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
  font-variation-settings: "opsz" 36, "SOFT" 100;
}

.testimonial-caption .name {
  display: block;
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(18px, 1.5vw, 22px);
  color: var(--ink);
  letter-spacing: -0.008em;
  margin-bottom: 6px;
  font-variation-settings: "opsz" 36, "SOFT" 100;
}

.testimonial-caption .role {
  display: block;
  font-family: var(--f-sans);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-mute);
  line-height: 1.5;
}

/* ============================================
   PLYR — CUSTOM THEME
   ============================================ */
.testimonial .plyr {
  --plyr-color-main: #cba36b;
  --plyr-video-background: #15110e;
  --plyr-control-color-hover: #0a0807;
  --plyr-control-icon-size: 15px;
  --plyr-font-family: "Hanken Grotesk", sans-serif;
  --plyr-font-size-base: 13px;
  --plyr-font-size-small: 11px;
  --plyr-range-fill-background: linear-gradient(90deg, #cba36b, #e3c79c);
  --plyr-range-track-height: 2px;
  --plyr-range-thumb-height: 10px;
  --plyr-range-thumb-background: #e3c79c;
  --plyr-range-thumb-shadow: 0 0 0 3px rgba(203, 163, 107, 0.25);
  --plyr-control-radius: 999px;
  --plyr-video-controls-background: linear-gradient(transparent, rgba(10, 8, 7, 0.92));
  --plyr-tooltip-background: rgba(10, 8, 7, 0.92);
  --plyr-tooltip-color: #f4eee3;
  --plyr-tooltip-radius: 4px;

  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  aspect-ratio: 9 / 16;
  border-radius: 0;
  display: block !important;
  position: relative !important;
  overflow: hidden !important;
}

.testimonial .plyr__video-wrapper,
.testimonial .plyr__video-wrapper--fixed-ratio {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: 100% !important;
  max-height: 100% !important;
  padding: 0 !important;
  aspect-ratio: auto !important;
  background: var(--bg-2);
  overflow: hidden !important;
}

.testimonial .plyr video {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
  background: var(--bg-2);
  display: block;
}

.testimonial .plyr__poster {
  background-size: contain !important;
  background-position: center !important;
}

/* Big overlay play button — premium circular, absolutely dead-centered */
.testimonial .plyr__control--overlaid {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -50%) !important;
  margin: 0 !important;
  width: clamp(64px, 6vw, 86px) !important;
  height: clamp(64px, 6vw, 86px) !important;
  background: rgba(10, 8, 7, 0.45);
  border: 1px solid var(--accent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 50% !important;
  padding: 0 !important;
  display: block !important;
  box-shadow: 0 0 0 0 rgba(203, 163, 107, 0.4);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.6s var(--ease);
  opacity: 1;
  z-index: 5;
}

/* SVG icon positioned absolutely inside the button, optical offset for play triangle */
.testimonial .plyr__control--overlaid svg {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(calc(-50% + 2px), -50%) !important;
  width: clamp(20px, 1.8vw, 26px) !important;
  height: clamp(20px, 1.8vw, 26px) !important;
  fill: var(--accent-2);
  margin: 0 !important;
  padding: 0 !important;
  transition: fill 0.4s var(--ease);
}

/* Screen-reader label inside button shouldn't influence layout */
.testimonial .plyr__control--overlaid .plyr__sr-only,
.testimonial .plyr__control--overlaid > span:not(.plyr__sr-only) {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.testimonial .plyr__control--overlaid:hover,
.testimonial .plyr__control--overlaid:focus-visible {
  background: rgba(203, 163, 107, 0.15);
  border-color: var(--accent-2);
  box-shadow: 0 0 0 8px rgba(203, 163, 107, 0.08);
  transform: translate(-50%, -50%) scale(1.04) !important;
}

.testimonial .plyr__control--overlaid:hover svg,
.testimonial .plyr__control--overlaid:focus-visible svg {
  fill: var(--ink);
}

/* Subtle pulse halo on idle state — preserves transform for centering */
@keyframes playPulse {
  0%, 100% {
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 0 rgba(203, 163, 107, 0);
  }
  50% {
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 10px rgba(203, 163, 107, 0.06);
  }
}

.testimonial .plyr--paused .plyr__control--overlaid {
  animation: playPulse 2.6s ease-in-out infinite;
}

/* Control bar */
.testimonial .plyr__controls {
  padding: 14px 16px 14px;
  background: var(--plyr-video-controls-background);
}

.testimonial .plyr__control {
  border-radius: 999px;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

.testimonial .plyr__control:hover {
  background: var(--accent);
  color: var(--bg);
}

.testimonial .plyr__control svg {
  fill: currentColor;
}

/* Progress bar */
.testimonial .plyr__progress {
  margin: 0 12px;
}

.testimonial .plyr__progress input[type="range"]::-webkit-slider-runnable-track {
  background: rgba(244, 238, 227, 0.15);
}

/* Volume */
.testimonial .plyr__volume {
  max-width: 80px;
}

/* Time text */
.testimonial .plyr__time {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  font-size: 11px;
}

/* Hide settings/captions etc since we set controls explicitly */
.testimonial .plyr__menu {
  display: none;
}

/* ============================================
   FOOTER QUOTE
   ============================================ */
.testimonials-foot {
  max-width: 760px;
  margin: clamp(80px, 11vh, 120px) auto 0;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out);
}

.testimonials.is-revealed .testimonials-foot {
  opacity: 1; transform: translateY(0);
  transition-delay: 0.95s;
}

.testimonials-foot::before {
  content: "✦";
  display: block;
  font-size: 13px;
  color: var(--accent);
  opacity: 0.7;
  margin-bottom: 28px;
}

.foot-quote {
  font-family: var(--f-display);
  font-weight: 350;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.32;
  color: var(--ink-soft);
  font-variation-settings: "opsz" 96, "SOFT" 60;
  margin-bottom: 28px;
}

.foot-quote em {
  font-style: italic;
  color: var(--ink);
  font-variation-settings: "opsz" 96, "SOFT" 100;
}

.foot-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--accent);
  transition: gap 0.4s var(--ease), color 0.4s var(--ease);
}

.foot-cta svg {
  width: 18px;
  height: 9px;
  transition: transform 0.4s var(--ease);
}

.foot-cta:hover {
  color: var(--accent-2);
  gap: 16px;
}

.foot-cta:hover svg {
  transform: translateX(3px);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 760px) {
  .testimonials {
    padding: 80px 18px;
  }

  .testimonials::after {
    font-size: 200px;
    top: 30px;
  }

  .testimonials-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 340px;
    gap: 48px;
  }

  .testimonial:nth-child(2) {
    margin-top: 0;
  }

  .testimonials-title {
    font-size: clamp(34px, 9vw, 50px);
    line-height: 1.04;
  }

  .testimonial .plyr__controls {
    padding: 10px 12px;
  }

  .testimonial .plyr__volume {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .testimonials *,
  .testimonials *::before,
  .testimonials *::after {
    transition: none !important;
    animation: none !important;
  }
  .testimonials .testimonials-eyebrow,
  .testimonials .testimonials-title,
  .testimonials .testimonials-lede,
  .testimonials .testimonial,
  .testimonials .testimonials-foot {
    opacity: 1 !important;
    transform: none !important;
  }
}
