/* ============================================================
   Design Testimonial – a Vanilla-CSS port of the React component
   ============================================================ */

/* === Section wrapper ======================================= */
.trm-design-testimonial {
  position: relative;
  padding: 80px 0 100px;
  overflow: hidden;
  background: #fafbff;
  transition: background 0.35s ease;
}

body.dark-mode-on .trm-design-testimonial {
  background: #0e0f14;
}

/* === Inner container ======================================= */
.trm-dt-container {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 48px);
}

/* === Oversized background number =========================== */
.trm-dt-bg-number {
  position: absolute;
  left: -30px;
  top: 50%;
  transform: translateY(-50%);
  font-size: clamp(10rem, 22vw, 22rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.06em;
  color: rgba(30, 35, 65, 0.03);
  user-select: none;
  pointer-events: none;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), color 0.35s ease;
  will-change: transform;
  z-index: 0;
}

body.dark-mode-on .trm-dt-bg-number {
  color: rgba(255, 255, 255, 0.03);
}

/* Number reveal animation */
.trm-dt-bg-number span {
  display: block;
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), filter 0.5s ease;
}

.trm-dt-bg-number span.trm-dt-exit {
  opacity: 0;
  transform: scale(1.1);
  filter: blur(10px);
}

.trm-dt-bg-number span.trm-dt-enter {
  opacity: 0;
  transform: scale(0.8);
  filter: blur(10px);
}

/* === Main asymmetric layout ================================ */
.trm-dt-layout {
  position: relative;
  display: flex;
  z-index: 1;
}

/* Left sidebar – vertical text + progress */
.trm-dt-sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-right: 48px;
  border-right: 1px solid rgba(30, 35, 65, 0.1);
  transition: border-color 0.35s ease;
}

body.dark-mode-on .trm-dt-sidebar {
  border-right-color: rgba(255, 255, 255, 0.1);
}

.trm-dt-sidebar__label {
  font-size: 0.65rem;
  font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', monospace;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(30, 35, 65, 0.45);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transition: color 0.35s ease;
}

body.dark-mode-on .trm-dt-sidebar__label {
  color: rgba(255, 255, 255, 0.35);
}

/* Vertical progress bar */
.trm-dt-progress-track {
  position: relative;
  width: 2px;
  height: 120px;
  margin-top: 28px;
  background: rgba(30, 35, 65, 0.08);
  border-radius: 1px;
  transition: background 0.35s ease;
}

body.dark-mode-on .trm-dt-progress-track {
  background: rgba(255, 255, 255, 0.08);
}

.trm-dt-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(180deg, #4e5ded, #315fe9);
  border-radius: 1px;
  transform-origin: top;
  transition: height 0.5s cubic-bezier(0.22, 1, 0.36, 1), background 0.35s ease;
  box-shadow: 0 0 8px rgba(78, 93, 237, 0.4);
}

body.dark-mode-on .trm-dt-progress-fill {
  background: linear-gradient(180deg, #7b8aff, #4e5ded);
  box-shadow: 0 0 8px rgba(123, 138, 255, 0.4);
}

/* === Content column ======================================== */
.trm-dt-content {
  flex: 1;
  padding-left: 48px;
  padding-top: 12px;
  padding-bottom: 12px;
}

/* Company / "Researcher" badge */
.trm-dt-badge-wrap {
  margin-bottom: 24px;
  min-height: 30px;
}

.trm-dt-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.68rem;
  font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', monospace;
  color: rgba(30, 35, 65, 0.5);
  border: 1px solid rgba(30, 35, 65, 0.12);
  border-radius: 999px;
  padding: 5px 14px;
  transition: opacity 0.35s ease, transform 0.35s ease, color 0.35s ease,
    border-color 0.35s ease, box-shadow 0.35s ease;
}

.trm-dt-badge:hover {
  border-color: rgba(78, 93, 237, 0.35);
  box-shadow: 0 0 12px rgba(78, 93, 237, 0.12);
}

body.dark-mode-on .trm-dt-badge {
  color: rgba(255, 255, 255, 0.45);
  border-color: rgba(255, 255, 255, 0.12);
}

body.dark-mode-on .trm-dt-badge:hover {
  border-color: rgba(123, 138, 255, 0.35);
  box-shadow: 0 0 12px rgba(123, 138, 255, 0.15);
}

.trm-dt-badge.trm-dt-exit {
  opacity: 0;
  transform: translateX(20px);
}

.trm-dt-badge.trm-dt-enter {
  opacity: 0;
  transform: translateX(-20px);
}

.trm-dt-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4e5ded;
  animation: trm-dt-pulse 2s ease-in-out infinite;
}

@keyframes trm-dt-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(78, 93, 237, 0.5); }
  50%      { box-shadow: 0 0 0 4px rgba(78, 93, 237, 0); }
}

/* Counter (01 / 08) */
.trm-dt-counter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
  font-size: 0.68rem;
  font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', monospace;
  color: rgba(30, 35, 65, 0.35);
  transition: color 0.35s ease;
}

body.dark-mode-on .trm-dt-counter {
  color: rgba(255, 255, 255, 0.3);
}

.trm-dt-counter__current {
  color: #4e5ded;
  font-weight: 600;
}

body.dark-mode-on .trm-dt-counter__current {
  color: #7b8aff;
}

/* Dot indicators */
.trm-dt-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
}

.trm-dt-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(30, 35, 65, 0.15);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease, width 0.3s ease;
}

.trm-dt-dot:hover {
  background: rgba(78, 93, 237, 0.4);
  transform: scale(1.3);
}

.trm-dt-dot.trm-dt-dot--active {
  width: 20px;
  border-radius: 3px;
  background: #4e5ded;
}

body.dark-mode-on .trm-dt-dot {
  background: rgba(255, 255, 255, 0.12);
}

body.dark-mode-on .trm-dt-dot:hover {
  background: rgba(123, 138, 255, 0.4);
}

body.dark-mode-on .trm-dt-dot.trm-dt-dot--active {
  background: #7b8aff;
}

/* Quote area */
.trm-dt-quote-area {
  position: relative;
  min-height: 120px;
  margin-bottom: 36px;
}

.trm-dt-quote {
  font-size: clamp(1.15rem, 2.8vw, 1.75rem);
  font-weight: 300;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: #1e2341;
  margin: 0;
  transition: color 0.35s ease;
}

body.dark-mode-on .trm-dt-quote {
  color: #e8eaf4;
}

/* Individual word spans for stagger animation */
.trm-dt-quote .trm-dt-word {
  display: inline-block;
  margin-right: 0.25em;
  opacity: 0;
  transform: translateY(14px) perspective(500px) rotateX(40deg);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.trm-dt-quote .trm-dt-word.trm-dt-visible {
  opacity: 1;
  transform: translateY(0) perspective(500px) rotateX(0);
}

.trm-dt-quote .trm-dt-word.trm-dt-exit {
  opacity: 0;
  transform: translateY(-8px);
  transition-duration: 0.18s;
}

/* Author row */
.trm-dt-author-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.trm-dt-author {
  display: flex;
  align-items: center;
  gap: 14px;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.trm-dt-author.trm-dt-exit {
  opacity: 0;
  transform: translateY(-16px);
}

.trm-dt-author.trm-dt-enter {
  opacity: 0;
  transform: translateY(16px);
}

.trm-dt-author__line {
  width: 28px;
  height: 1px;
  background: #4e5ded;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.3s, background 0.35s ease;
}

.trm-dt-author__line.trm-dt-visible {
  transform: scaleX(1);
}

body.dark-mode-on .trm-dt-author__line {
  background: #7b8aff;
}

.trm-dt-author__name {
  font-size: 0.9rem;
  font-weight: 500;
  color: #1e2341;
  margin: 0;
  transition: color 0.35s ease;
}

body.dark-mode-on .trm-dt-author__name {
  color: #e8eaf4;
}

.trm-dt-author__role {
  font-size: 0.78rem;
  color: rgba(30, 35, 65, 0.5);
  margin: 2px 0 0;
  transition: color 0.35s ease;
}

body.dark-mode-on .trm-dt-author__role {
  color: rgba(255, 255, 255, 0.4);
}

/* Navigation buttons */
.trm-dt-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.trm-dt-nav-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(30, 35, 65, 0.15);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.15s ease, box-shadow 0.3s ease;
}

body.dark-mode-on .trm-dt-nav-btn {
  border-color: rgba(255, 255, 255, 0.15);
}

/* Circular fill on hover */
.trm-dt-nav-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #4e5ded;
  transform: scale(0);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

body.dark-mode-on .trm-dt-nav-btn::before {
  background: #7b8aff;
}

.trm-dt-nav-btn:hover::before {
  transform: scale(1);
}

.trm-dt-nav-btn:hover {
  border-color: #4e5ded;
  box-shadow: 0 0 16px rgba(78, 93, 237, 0.25);
}

body.dark-mode-on .trm-dt-nav-btn:hover {
  border-color: #7b8aff;
  box-shadow: 0 0 16px rgba(123, 138, 255, 0.25);
}

.trm-dt-nav-btn:active {
  transform: scale(0.92);
}

.trm-dt-nav-btn svg {
  position: relative;
  z-index: 1;
  width: 16px;
  height: 16px;
  color: #1e2341;
  transition: color 0.3s ease;
}

body.dark-mode-on .trm-dt-nav-btn svg {
  color: #e2e4f0;
}

.trm-dt-nav-btn:hover svg {
  color: #fff;
}

/* === Bottom ticker ========================================= */
.trm-dt-ticker-wrap {
  position: absolute;
  bottom: -20px;
  left: 0;
  right: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.05;
}

.trm-dt-ticker {
  display: flex;
  white-space: nowrap;
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #1e2341;
  animation: trm-dt-scroll 25s linear infinite;
  transition: color 0.35s ease;
}

body.dark-mode-on .trm-dt-ticker {
  color: #e2e4f0;
}

.trm-dt-ticker span {
  margin: 0 28px;
}

@keyframes trm-dt-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* === Responsive ============================================ */
@media (max-width: 768px) {
  .trm-design-testimonial {
    padding: 50px 0 70px;
  }

  .trm-dt-sidebar {
    display: none;
  }

  .trm-dt-content {
    padding-left: 0;
  }

  .trm-dt-bg-number {
    left: -10px;
    font-size: 8rem;
  }

  .trm-dt-quote-area {
    min-height: 80px;
  }

  .trm-dt-author-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .trm-dt-nav {
    align-self: flex-start;
  }

  .trm-dt-dots {
    margin-top: 16px;
  }
}

/* ==========================================================================
   HOMEPAGE CONSISTENCY NORMALIZATION (2026-08-20)
   Section rhythm + container gutter to design-system tokens; pure-white
   content text in dark mode.
   ========================================================================== */

.trm-design-testimonial {
  padding: var(--section-space-desktop) 0;
}

@media (max-width: 1024px) {
  .trm-design-testimonial {
    padding: var(--section-space-tablet) 0;
  }
}

@media (max-width: 768px) {
  .trm-design-testimonial {
    padding: var(--section-space-mobile) 0;
  }
}

.trm-dt-container {
  max-width: var(--container-max);
  padding: 0 var(--container-px-desktop);
}

@media (max-width: 1024px) {
  .trm-dt-container {
    padding: 0 var(--container-px-tablet);
  }
}

@media (max-width: 768px) {
  .trm-dt-container {
    padding: 0 var(--container-px-mobile);
  }
}

@media (max-width: 374px) {
  .trm-dt-container {
    padding: 0 16px;
  }
}

body.dark-mode-on .trm-dt-quote,
body.dark-mode-on .trm-dt-author__name {
  color: #fff;
}

body.dark-mode-on .trm-dt-author__role {
  color: #fff;
}
