/* ============================================================
   Section 05 — Voices. One quote, oversized.
   Signature: the opening quote glyph draws itself in red (SVG),
   then the quote enters in two cadences with a deliberate breath.
   The chamber line draws underneath, the dot lands, the attribution
   fades up. Three beats.
   ============================================================ */

.section-voices {
  padding-block: var(--section-py);
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

/* v9 — subtle navy/amber fabric wash. Testimonials feel warmer on a
   texture than on flat navy. 15% opacity — purely tonal, not figurative. */
.section-voices::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('../../assets/img/section-02-fabric.jpg');
  background-size: cover;
  background-position: 50% 50%;
  opacity: 0.18;
  pointer-events: none;
}
.section-voices::after {
  /* very gentle bottom-to-top wash so the quote glyph (top-left) stays crisp */
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(10, 12, 24, 0.5) 0%,
    rgba(10, 12, 24, 0.2) 50%,
    rgba(10, 12, 24, 0.4) 100%
  );
  pointer-events: none;
}
.section-voices > * { position: relative; z-index: 2; }

.section-voices__inner {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  max-width: 80ch;
}

.section-voices__head {
  margin-bottom: 1rem;
}

.voices__quote {
  position: relative;
  font-family: var(--font-display);
  font-size: var(--fs-quote);
  font-weight: 400;
  line-height: 1.12;
  color: var(--color-fg);
  letter-spacing: -0.015em;
  max-width: 22ch;
  padding-left: 0.1em;
  /* the glyph SVG is absolutely positioned at -0.5em left */
}

/* ---------- The opening quote glyph (SVG, draws itself) ---------- */

.voices__glyph {
  position: absolute;
  left: -0.55em;
  top: -0.5em;
  width: 1.4em;
  height: 1.4em;
  overflow: visible;
  pointer-events: none;
}

.voices__glyph-path {
  fill: var(--color-red);
  fill-opacity: 0;
  stroke: var(--color-red);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: fill-opacity 300ms var(--ease-out);
  /* draw effect — dashoffset animated from full length → 0 in JS,
     then fill swaps in on completion */
}

.voices__glyph-path.is-filled {
  fill-opacity: 0.85;
}

@media (prefers-reduced-motion: reduce) {
  .voices__glyph-path {
    fill-opacity: 0.85 !important;
    stroke: none !important;
  }
}

/* ---------- The two quote groups ---------- */

.voices__group {
  display: block;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 320ms var(--ease-out),
    transform 320ms var(--ease-out);
}

.voices__group.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Chamber line (draws in via SVG) ---------- */

.voices__line {
  width: 240px;
  height: 8px;
  display: block;
  margin-top: 0.5rem;
}

.voices__line-stroke {
  fill: none;
  stroke: rgba(233, 69, 96, 0.4);
  stroke-width: 1;
  stroke-dasharray: 240;
  stroke-dashoffset: 240;
  transition: stroke-dashoffset 600ms var(--ease-out);
}

.voices__line.is-revealed .voices__line-stroke {
  stroke-dashoffset: 0;
}

.voices__line-dot {
  fill: var(--color-red);
  opacity: 0;
  transform-origin: center;
  transition: opacity 200ms var(--ease-out),
    transform 280ms var(--ease-out);
}
.voices__line-dot.is-revealed {
  opacity: 1;
  /* arrival pulse via CSS @keyframes for the snap */
  animation: voices-dot-snap 280ms var(--ease-out);
}

@keyframes voices-dot-snap {
  0%   { transform: scale(0.4); opacity: 0; }
  60%  { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* ---------- Attribution ---------- */

.voices__attribution {
  /* v10 — bumped from 13px → 14px and contrast from muted-soft → muted
     so the line reads as a confident byline, not a caption afterthought. */
  font-size: 0.875rem;
  color: var(--color-muted);
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 400ms var(--ease-out),
    transform 400ms var(--ease-out);
}

.voices__attribution.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.voices__attribution strong {
  /* v10 — strong gets a step up too: bolder weight + brighter color */
  color: var(--color-fg);
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .voices__group,
  .voices__line-stroke,
  .voices__line-dot,
  .voices__attribution {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
  .voices__line-stroke { stroke-dashoffset: 0 !important; }
}
