/* Reviews on a 3D arc. Markup in partials/testimonials.html, data and
   behaviour in assets/testimonials.js. Edit it here only. */

.kt-arc { position: relative; perspective: 1600px; padding: 1rem 0 0.5rem;
          transition: height 0.42s cubic-bezier(0.4,0,0.2,1); }
/* pointer-events:none is what makes a side review clickable at all: the track
   is a plane at z=0 while the side reviews are pushed back to z=-300, so in the
   3D sort the track sits in front of them and swallows every click. */
.kt-track { position: absolute; inset: 0; transform-style: preserve-3d; pointer-events: none; }

.kt-item {
  position: absolute; top: 50%; left: 50%;
  width: min(30rem, calc(100vw - 3rem));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: 'Heebo', sans-serif; color: #fff; text-align: center;
  background: none; border: none; padding: 1.75rem 2.25rem 1.5rem; margin: 0;
  -webkit-appearance: none; appearance: none; cursor: pointer;
  transition: transform 0.42s cubic-bezier(0.4,0,0.2,1),
              opacity 0.42s cubic-bezier(0.4,0,0.2,1),
              filter 0.42s cubic-bezier(0.4,0,0.2,1);
}
.kt-item:focus-visible { outline: 2px solid #f07316; outline-offset: 4px; }
/* the affordance instead of arrows: hovering a side review lifts it out of the
   haze, so it reads as something to click. opacity and blur are written inline
   by layout(), hence the !important. */
.kt-item:not(.on):hover { opacity: 0.8 !important; filter: blur(0.5px) !important; }

/* the two typographic marks, in the same corners they sit in today */
.kt-mark {
  position: absolute; font-size: 5rem; font-family: Georgia, serif; line-height: 1;
  color: rgba(255,255,255,0.07); user-select: none; pointer-events: none;
}
.kt-mark.s { left: 0.25rem; top: -0.4rem; }
.kt-mark.e { right: 0.25rem; bottom: 0.6rem; }

.kt-logo { margin: 0 0 1.1rem; display: flex; justify-content: center; }
/* a round mark and a stacked mark do not read at the same height, so each is
   sized by eye. The ink fixes are the ones already used on the client row. */
.kt-logo img { display: block; width: auto; height: 40px; max-width: 130px; object-fit: contain; }
.kt-logo img[data-c="extra"]   { filter: grayscale(1) brightness(2); opacity: 0.72; }
.kt-logo img[data-c="octopus"] { filter: brightness(0) invert(1); opacity: 0.82; }
.kt-logo img[data-c="ridman"]  { height: 50px; opacity: 0.95; }

.kt-q { font-size: 1.15rem; font-weight: 300; line-height: 1.7; color: #fff; margin: 0; }
.kt-q p { margin: 0 0 0.7rem; }
.kt-q p:last-child { margin-bottom: 0; }

.kt-foot { display: flex; align-items: center; justify-content: center; gap: 0.75rem; margin-top: 1.5rem; }
/* the photo carries the countdown itself, which is why there is no row of
   avatar pills under the section any more */
.kt-ava { position: relative; width: 40px; height: 40px; flex-shrink: 0; }
.kt-ava img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: block; }
.kt-ava .kt-ini {
  width: 40px; height: 40px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.55); font-family: 'Space Grotesk', sans-serif;
  font-weight: 600; font-size: 0.85rem;
}
.kt-ring { position: absolute; inset: -5px; width: 50px; height: 50px; pointer-events: none;
           opacity: 0; transition: opacity 0.3s ease; }
.kt-item.on .kt-ring { opacity: 1; }
.kt-ring circle { fill: none; stroke-width: 2; transform: rotate(-90deg);
                  transform-origin: 50% 50%; transform-box: fill-box; }
.kt-ring .tr { stroke: rgba(255,255,255,0.14); }
.kt-ring .pr { stroke: #f07316; stroke-linecap: round; }

.kt-who { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: start; }
.kt-who strong { font-size: 0.95rem; font-weight: 600; color: #fff; line-height: 1.2; }
/* plaintext, because one role is Hebrew and the others are English: the span
   takes its direction from its own first letter instead of from the page */
.kt-who span { font-size: 0.8rem; color: rgba(255,255,255,0.5); line-height: 1.3;
               unicode-bidi: plaintext; }

/* the dots are the only thing on a phone that says there is more than one
   review. they are a control as well as an indicator, so a visitor who does not
   think to swipe still has a way through. hidden on a wide screen, where all
   three reviews are on the arc and the dots would say nothing new. */
.kt-nav { display: none; }

/* the card slides sideways once, the first time the section is on screen, so a
   visitor sees the gesture instead of reading about it. it runs on the track,
   not on the review, because layout() owns the review's own transform. */
@keyframes kt-nudge {
  0%   { transform: translateX(0); }
  18%  { transform: translateX(-26px); }
  38%  { transform: translateX(0); }
  54%  { transform: translateX(-14px); }
  72%  { transform: translateX(0); }
  100% { transform: translateX(0); }
}
.kt-track.nudge { animation: kt-nudge 1.5s cubic-bezier(0.4,0,0.2,1) 1; }

@media (max-width: 900px) {
  .kt-nav { display: flex; justify-content: center; align-items: center;
            gap: 0.75rem; margin: 0.25rem 0 0; }
  .kt-arrow { display: flex; align-items: center; justify-content: center;
              position: relative; width: 30px; height: 30px; padding: 0;
              border: none; background: none; cursor: pointer;
              -webkit-appearance: none; appearance: none; }
  .kt-arrow::after { content: ''; position: absolute; left: 50%; top: 50%;
                     width: 44px; height: 44px; transform: translate(-50%, -50%); }
  .kt-arrow svg { width: 20px; height: 20px; fill: none;
                  stroke: rgba(255,255,255,0.45); stroke-width: 1.8;
                  stroke-linecap: round; stroke-linejoin: round;
                  transition: stroke 0.2s ease; }
  .kt-arrow:active svg { stroke: #f07316; }
  .kt-dots { display: flex; justify-content: center; align-items: center;
             gap: 0.5rem; margin: 0; }
  .kt-dot { width: 8px; height: 8px; padding: 0; border: none; border-radius: 99px;
            background: rgba(255,255,255,0.28); cursor: pointer; -webkit-appearance: none;
            appearance: none; transition: width 0.25s ease, background 0.25s ease; }
  .kt-dot.on { width: 22px; background: #f07316; }
  /* the tap target is 44px tall without the dot itself growing */
  .kt-dot { position: relative; }
  .kt-dot::after { content: ''; position: absolute; left: 50%; top: 50%;
                   width: 44px; height: 44px; transform: translate(-50%, -50%); }

  .kt-item { padding: 1.25rem 1rem 1rem; }
  .kt-q { font-size: 1.05rem; }
  .kt-mark { font-size: 3.5rem; }
  /* on a phone every review sits at the same spot, so the crossfade layout()
     writes put two full quotes on top of each other mid-swipe, and a long one
     spilled out of the box while it was still shrinking. the outgoing review
     leaves first and the incoming one waits for it to be gone. */
  /* the one leaving is hidden outright by layout(), so only the arriving one is
     timed here. no transition-delay swap, which is what WebKit did not honour. */
  .kt-item { transition: opacity 0.22s linear; }
  /* and the box finishes resizing before the new quote starts to appear */
  .kt-arc { transition: height 0.17s cubic-bezier(0.4,0,0.2,1); }
}
@media (prefers-reduced-motion: reduce) {
  .kt-item { transition: none; }
}
