/* ─────────────────────────────────────────────
   Line Reveal Testimonials — Premium
   ───────────────────────────────────────────── */

:root {
  --bg: #e6ddd0;
  --bg-deep: #d9cfc0;
  --ink: #14120f;
  --ink-soft: rgba(20, 18, 15, 0.58);
  --ink-faint: rgba(20, 18, 15, 0.38);
  --line: rgba(20, 18, 15, 0.12);
  --line-strong: rgba(20, 18, 15, 0.22);
  --glass: rgba(255, 252, 247, 0.42);
  --glass-hover: rgba(255, 252, 247, 0.72);
  --accent: #2c2420;
  --radius-btn: 0.7rem;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-serif: "Instrument Serif", "Times New Roman", Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

img {
  max-width: 100%;
  display: block;
}

/* ── Stage ─────────────────────────────────── */

.page {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  min-height: 100dvh;
  padding: clamp(1.75rem, 5vw, 4.5rem);
  overflow: hidden;
  background:
    radial-gradient(
      120% 90% at 50% 0%,
      #f3ebe0 0%,
      var(--bg) 48%,
      var(--bg-deep) 100%
    );
}

.page__glow {
  position: absolute;
  inset: auto;
  width: min(70vw, 48rem);
  height: min(70vw, 48rem);
  left: 50%;
  top: 42%;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 248, 238, 0.7) 0%,
    rgba(255, 248, 238, 0) 68%
  );
  pointer-events: none;
  z-index: 0;
}

.page__grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.28;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* ── Layout ────────────────────────────────── */

.testimonial-lines {
  position: relative;
  z-index: 2;
  display: flex;
  flex-flow: wrap;
  justify-content: flex-start;
  align-items: flex-start;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  width: min(100%, 72rem);
}

.testimonial-lines__controls {
  display: flex;
  flex-flow: row;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 0.55em;
  width: 28%;
  min-width: 6.5rem;
}

/* ── Premium nav buttons ───────────────────── */

.testimonial-lines__button {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 2.85em;
  height: 2.85em;
  padding: 0;
  color: var(--ink);
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.55) inset,
    0 8px 24px -12px rgba(40, 28, 16, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition:
    background 0.35s var(--ease-out),
    border-color 0.35s var(--ease-out),
    box-shadow 0.35s var(--ease-out),
    transform 0.3s var(--ease-out);
}

.testimonial-lines__button:hover {
  background: var(--glass-hover);
  border-color: var(--line-strong);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 12px 28px -10px rgba(40, 28, 16, 0.22);
  transform: translateY(-1px);
}

.testimonial-lines__button:active {
  transform: translateY(0) scale(0.96);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 4px 12px -8px rgba(40, 28, 16, 0.2);
}

.testimonial-lines__button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.testimonial-lines__arrow {
  width: 0.78em;
  opacity: 0.88;
}

/* ── Main column ───────────────────────────── */

.testimonial-lines__main {
  display: flex;
  flex-flow: column;
  flex: 1;
  justify-content: flex-start;
  align-items: flex-start;
  gap: clamp(2.75rem, 6vw, 4.75rem);
  min-width: 0;
}

.testimonial-lines__main-details {
  display: flex;
  flex-flow: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 1.25em 1.75em;
  width: 100%;
}

.testimonial-lines__meta {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 3.5rem;
}

/* ── Counter + odometer ────────────────────── */

.testimonial-lines__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: baseline;
  width: 1.15ch;
  height: 1.2em;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  overflow: clip;
  position: relative;
}

.testimonial-lines__count-sep {
  margin: 0 0.2em;
  opacity: 0.55;
}

[data-odometer-part="mask"] {
  display: inline-block;
  overflow: clip;
  height: 1.2em;
  line-height: 1.2;
  width: 1ch;
  text-align: center;
}

[data-odometer-part="roller"] {
  display: block;
  white-space: pre;
  text-align: center;
  line-height: 1.2;
  will-change: transform;
}

/* Autoplay progress */
.testimonial-lines__progress {
  position: relative;
  width: 2.75rem;
  height: 1.5px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
}

.testimonial-lines__progress-bar {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--ink);
  transform-origin: left center;
  transform: scaleX(0);
}

.testimonial-lines__p {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.testimonial-lines__p.is--faded,
.testimonial-lines__role.is--faded {
  color: var(--ink-soft);
  font-weight: 400;
}

.testimonial-lines__label {
  color: var(--ink-soft);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.testimonial-lines__label::after {
  content: "";
}

/* ── Quote stage ───────────────────────────── */

.testimonial-lines__collection {
  width: 100%;
}

.testimonial-lines__list {
  display: grid;
  position: relative;
  width: 100%;
}

.testimonial-lines__item {
  display: flex;
  flex-flow: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: clamp(2.25rem, 4.5vw, 3.75rem);
  grid-area: 1 / 1;
  width: 100%;
  position: relative;
  opacity: 0;
  visibility: hidden;
}

.testimonial-lines__item.is--active {
  opacity: 1;
  visibility: visible;
}

.testimonial-lines__h {
  width: min(100%, 38ch);
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 3.6vw, 3.15rem);
  font-weight: 400;
  font-style: normal;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-wrap: pretty;
}

/* SplitText mask:lines — avoid descender clipping */
.text-line,
.text-line-mask {
  padding-bottom: 0.18em;
  margin-bottom: -0.18em;
}

/* ── Author ────────────────────────────────── */

.testimonial-lines__item-details {
  display: flex;
  flex-flow: row;
  justify-content: flex-start;
  align-items: center;
  gap: 1.1em;
}

.testimonial-lines__item-visual {
  position: relative;
  aspect-ratio: 1;
  width: 3.65em;
  border-radius: 100em;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(20, 18, 15, 0.06);
  box-shadow:
    0 0 0 1.5px rgba(255, 255, 255, 0.55),
    0 0 0 2.5px rgba(20, 18, 15, 0.08),
    0 10px 28px -8px rgba(40, 28, 16, 0.28);
}

.testimonial-lines__item-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.testimonial-lines__person {
  display: flex;
  flex-direction: column;
  gap: 0.2em;
  min-width: 0;
}

.testimonial-lines__name {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--ink);
}

.testimonial-lines__role {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 1.3;
}

/* ── Mobile ────────────────────────────────── */

@media screen and (max-width: 767px) {
  .page {
    padding: 1.5rem 1.25rem 2rem;
    align-items: flex-start;
    padding-top: clamp(2.5rem, 12vh, 4rem);
  }

  .testimonial-lines {
    gap: 2.25rem;
  }

  .testimonial-lines__controls {
    order: 9999;
    width: 100%;
  }

  .testimonial-lines__main {
    gap: 2.5rem;
  }

  .testimonial-lines__h {
    font-size: clamp(1.55rem, 6.5vw, 2rem);
    width: 100%;
  }

  .testimonial-lines__item {
    gap: 2rem;
  }

  .testimonial-lines__item-visual {
    width: 3.15em;
  }

  .testimonial-lines__p,
  .testimonial-lines__name {
    font-size: 0.875rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .testimonial-lines__button {
    transition: none;
  }

  .testimonial-lines__button:hover {
    transform: none;
  }
}
