/* ==========================================================================
   Belge ve Onay — kapsam kartları
   of-kapsam.css ile aynı ölçüler.
   ========================================================================== */

.bokapsam {
  background: var(--bg-tint);
  border-bottom: 1px solid var(--line-soft);
}

.bokapsam__head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.bokapsam__eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--indigo);
}

.bokapsam__title {
  font-weight: 800;
  font-size: clamp(40px, 4.2vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 16px 0 0;
}

.bokapsam__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.bokapsam__card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  padding: 26px 26px 0;
  overflow: hidden;
}

.bokapsam__icon {
  display: inline-flex;
  color: var(--indigo);
  margin-bottom: 18px;
}

.bokapsam__icon svg {
  width: 22px;
  height: 22px;
}

.bokapsam__card-title {
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}

.bokapsam__card-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
  text-wrap: pretty;
}

/* --- mockup illüstrasyonları ------------------------------------------------ */

.bokapsam__mock {
  background: var(--white);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  margin-top: 24px;
  padding: 16px;
}

/* kart 1: sözleşmeni hazırla (belge şablonu önizlemesi) */

.bokapsam__mock--doc {
  position: relative;
  aspect-ratio: 16 / 9.5;
  margin-top: 28px;
}

.bokapsam__mock-digisig {
  position: absolute;
  right: 12px;
  bottom: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px 5px 7px;
  border-radius: var(--r-pill);
  border: 1px solid var(--indigo);
  background: var(--pink-tint);
  color: var(--indigo);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  transform: scale(.4) rotate(-14deg);
  opacity: 0;
  transition: transform .45s cubic-bezier(.34, 1.56, .64, 1), opacity .3s ease;
}

.bokapsam__mock-digisig svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.bokapsam__card--group:hover .bokapsam__mock-digisig {
  transform: scale(1) rotate(-6deg);
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .bokapsam__mock-digisig {
    transition: none;
    transform: scale(1) rotate(-6deg);
    opacity: 1;
  }
}

.bokapsam__mock-dochead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 16px;
}

.bokapsam__mock-doctag {
  font-size: 11px;
  font-weight: 700;
  color: var(--indigo);
  background: var(--pink-tint);
  padding: 3px 9px;
  border-radius: var(--r-pill);
}

.bokapsam__mock-doclines {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bokapsam__mock-doclines span {
  display: block;
  height: 7px;
  width: 100%;
  border-radius: 99px;
  background: var(--line-2);
}

/* kart 2: imza sürecini takip et (adım adım süreç takibi) */

.bokapsam__mock--track {
  transform: translateY(10px);
  transition: transform .3s ease;
}

.bokapsam__card--group:hover .bokapsam__mock--track {
  transform: translateY(0);
}

.bokapsam__mock-step {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-bottom: 18px;
}

.bokapsam__mock-step:last-child {
  padding-bottom: 0;
}

.bokapsam__mock-step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 20px;
  width: 1px;
  height: calc(100% - 12px);
  background: var(--line-2);
}

.bokapsam__mock-step-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-tint);
  border: 1.5px solid var(--line-2);
  flex-shrink: 0;
  z-index: 1;
}

.bokapsam__mock-step-dot svg {
  width: 11px;
  height: 11px;
  opacity: 0;
  transform: scale(.5);
}

.bokapsam__mock-step-body {
  display: flex;
  flex-direction: column;
  padding-top: 1px;
}

.bokapsam__mock-step-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  transition: color .2s ease;
}

.bokapsam__mock-step-time {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 1px;
}

/* aşamalar sırayla işaretlenir: Gönderildi → Görüntülendi → İmza bekleniyor,
   ardından hepsi sıfırlanıp döngü tekrar başlar. */

.bokapsam__mock--track .bokapsam__mock-step-dot,
.bokapsam__mock--track .bokapsam__mock-step-dot svg,
.bokapsam__mock--track .bokapsam__mock-step-label {
  animation-duration: 5s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
}

.bokapsam__mock-step:nth-child(1) .bokapsam__mock-step-dot { animation-name: bokapsam-dot-done-1; }
.bokapsam__mock-step:nth-child(1) .bokapsam__mock-step-dot svg { animation-name: bokapsam-check-1; }
.bokapsam__mock-step:nth-child(1) .bokapsam__mock-step-label { animation-name: bokapsam-label-1; }

.bokapsam__mock-step:nth-child(2) .bokapsam__mock-step-dot { animation-name: bokapsam-dot-done-2; }
.bokapsam__mock-step:nth-child(2) .bokapsam__mock-step-dot svg { animation-name: bokapsam-check-2; }
.bokapsam__mock-step:nth-child(2) .bokapsam__mock-step-label { animation-name: bokapsam-label-2; }

.bokapsam__mock-step:nth-child(3) .bokapsam__mock-step-dot { animation-name: bokapsam-dot-current-3; }
.bokapsam__mock-step:nth-child(3) .bokapsam__mock-step-label { animation-name: bokapsam-label-3; }

@keyframes bokapsam-dot-done-1 {
  0%, 8% { background: var(--bg-tint); border-color: var(--line-2); box-shadow: none; }
  14%, 88% { background: #1E6B37; border-color: #1E6B37; color: var(--white); box-shadow: none; }
  94%, 100% { background: var(--bg-tint); border-color: var(--line-2); color: transparent; box-shadow: none; }
}

@keyframes bokapsam-check-1 {
  0%, 8% { opacity: 0; transform: scale(.5); }
  14% { opacity: 1; transform: scale(1.15); }
  18%, 88% { opacity: 1; transform: scale(1); }
  94%, 100% { opacity: 0; transform: scale(.5); }
}

@keyframes bokapsam-label-1 {
  0%, 8% { color: var(--muted); }
  14%, 88% { color: var(--ink); }
  94%, 100% { color: var(--muted); }
}

@keyframes bokapsam-dot-done-2 {
  0%, 28% { background: var(--bg-tint); border-color: var(--line-2); box-shadow: none; }
  34%, 88% { background: #1E6B37; border-color: #1E6B37; color: var(--white); box-shadow: none; }
  94%, 100% { background: var(--bg-tint); border-color: var(--line-2); color: transparent; box-shadow: none; }
}

@keyframes bokapsam-check-2 {
  0%, 28% { opacity: 0; transform: scale(.5); }
  34% { opacity: 1; transform: scale(1.15); }
  38%, 88% { opacity: 1; transform: scale(1); }
  94%, 100% { opacity: 0; transform: scale(.5); }
}

@keyframes bokapsam-label-2 {
  0%, 28% { color: var(--muted); }
  34%, 88% { color: var(--ink); }
  94%, 100% { color: var(--muted); }
}

@keyframes bokapsam-dot-current-3 {
  0%, 50% { background: var(--white); border-color: var(--line-2); box-shadow: none; }
  56%, 88% { background: var(--white); border-color: var(--indigo); box-shadow: 0 0 0 3px var(--pink-tint); }
  94%, 100% { background: var(--white); border-color: var(--line-2); box-shadow: none; }
}

@keyframes bokapsam-label-3 {
  0%, 50% { color: var(--muted); }
  56%, 88% { color: var(--indigo); }
  94%, 100% { color: var(--muted); }
}

@media (prefers-reduced-motion: reduce) {
  .bokapsam__mock--track .bokapsam__mock-step-dot,
  .bokapsam__mock--track .bokapsam__mock-step-dot svg,
  .bokapsam__mock--track .bokapsam__mock-step-label {
    animation: none;
  }

  .bokapsam__mock-step:nth-child(1) .bokapsam__mock-step-dot,
  .bokapsam__mock-step:nth-child(2) .bokapsam__mock-step-dot {
    background: #1E6B37;
    border-color: #1E6B37;
    color: var(--white);
  }

  .bokapsam__mock-step:nth-child(1) .bokapsam__mock-step-dot svg,
  .bokapsam__mock-step:nth-child(2) .bokapsam__mock-step-dot svg {
    opacity: 1;
    transform: none;
  }

  .bokapsam__mock-step:nth-child(1) .bokapsam__mock-step-label,
  .bokapsam__mock-step:nth-child(2) .bokapsam__mock-step-label {
    color: var(--ink);
  }

  .bokapsam__mock-step:nth-child(3) .bokapsam__mock-step-dot {
    border-color: var(--indigo);
    box-shadow: 0 0 0 3px var(--pink-tint);
  }

  .bokapsam__mock-step:nth-child(3) .bokapsam__mock-step-label {
    color: var(--indigo);
  }
}

/* kart 3: faturanı oluştur (mini fatura dökümü) */

.bokapsam__mock--invoice {
  transform: translateY(10px);
  transition: transform .3s ease;
}

.bokapsam__card--group:hover .bokapsam__mock--invoice {
  transform: translateY(0);
}

.bokapsam__mock-invoicehead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line-2);
}

.bokapsam__mock-invoiceno {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.bokapsam__mock-invoicerow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 6px;
}

.bokapsam__mock-invoicetotal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  margin-top: 4px;
  border-top: 1px solid var(--line-2);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

@media (max-width: 860px) {
  .bokapsam__grid {
    grid-template-columns: 1fr;
  }

  /* Mobilde hover olmadığı için, görünür olunca (IntersectionObserver ile
     eklenen .is-inview) hover ile aynı efektler otomatik oynar. */
  .bokapsam__card--group.is-inview .bokapsam__mock-digisig {
    transform: scale(1) rotate(-6deg);
    opacity: 1;
  }

  .bokapsam__card--group.is-inview .bokapsam__mock--track,
  .bokapsam__card--group.is-inview .bokapsam__mock--invoice {
    transform: translateY(0);
  }
}
