/* ============================================================
   INDEX.CSS — Ana sayfa kart yığını stilleri
   ============================================================ */

/* ── Layout ───────────────────────────────────────────────── */
#main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: var(--nav-h);
}

/* ── Hero başlık ──────────────────────────────────────────── */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2.5rem 2rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.hero-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-scroll-hint {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.scroll-arrow {
  font-size: 1.2rem;
  color: var(--text-muted);
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(6px); }
}

/* ── Kart yığını bölümü ───────────────────────────────────── */
.card-stack-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  gap: 2rem;
}

/* ── Perspektif kapsayıcı ─────────────────────────────────── */
.card-stack {
  perspective: 1200px;
  perspective-origin: 50% 40%;
  position: relative;
  width: min(420px, 100%);
  height: 520px;
}

/* ── Kart temel stili ─────────────────────────────────────── */
.pf-card {
  position: absolute;
  inset: 0;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  overflow: hidden;
  will-change: transform, opacity;
  transition:
    transform 0.65s var(--ease-out),
    opacity   0.65s var(--ease-out),
    border-color 0.3s;
  transform-origin: 50% 100%;

  /* Her kartın z-index'i JS tarafından atanır */
}

.pf-card:hover { border-color: var(--border-light); }
.pf-card:focus-visible {
  outline: 1px solid var(--text);
  outline-offset: 3px;
}

/* Kart durumları (JS bu class'ları ekleyip çıkarır) */
.pf-card.state-front {
  transform: translateZ(0px) translateY(0px) scale(1);
  opacity: 1;
  z-index: 4;
}

.pf-card.state-mid-1 {
  transform: translateZ(-80px) translateY(18px) scale(0.97);
  opacity: 0.85;
  z-index: 3;
}

.pf-card.state-mid-2 {
  transform: translateZ(-160px) translateY(34px) scale(0.94);
  opacity: 0.65;
  z-index: 2;
}

.pf-card.state-back {
  transform: translateZ(-240px) translateY(48px) scale(0.91);
  opacity: 0.4;
  z-index: 1;
}

/* Kart gönderiliyor (arkaya fırlatılıyor) */
.pf-card.state-exit {
  transform: translateZ(-500px) translateY(80px) scale(0.8) rotateX(8deg);
  opacity: 0;
  z-index: 0;
  pointer-events: none;
  transition:
    transform 0.55s var(--ease-in),
    opacity   0.4s var(--ease-in);
}

/* ── Kart içeriği ─────────────────────────────────────────── */
.card-bg-num {
  position: absolute;
  bottom: -0.2em;
  right: -0.05em;
  font-size: 11rem;
  line-height: 1;
  color: var(--bg-3);
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.04em;
}

.card-content {
  position: relative;
  z-index: 1;
  padding: 2.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1rem;
}

.card-tag {
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: auto;
}

.card-title {
  font-size: clamp(3rem, 9vw, 4.5rem);
  color: var(--text);
  line-height: 0.95;
  letter-spacing: 0.02em;
}

.card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 28ch;
  font-weight: 400;
}

.card-cta {
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s, gap 0.3s var(--ease-out);
}

.pf-card:hover .card-cta {
  color: var(--text);
  gap: 0.7rem;
}

.cta-arrow {
  transition: transform 0.3s var(--ease-out);
}
.pf-card:hover .cta-arrow { transform: translateX(4px); }

/* Köşe işareti */
.card-corner-mark {
  position: absolute;
  top: 0; right: 0;
  width: 0; height: 0;
  border-top: 32px solid var(--bg-3);
  border-left: 32px solid transparent;
  transition: border-color 0.3s;
}
.pf-card.state-front .card-corner-mark {
  border-top-color: var(--border-light);
}

/* ── İlerleme çubuğu ──────────────────────────────────────── */
.stack-progress {
  width: min(420px, 100%);
  height: 1px;
  background: var(--border);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--text-muted);
  transition: width 0.5s var(--ease-out);
  width: 25%;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 480px) {
  .card-stack {
    height: 440px;
  }
  .card-content { padding: 2rem; }
  .card-bg-num { font-size: 8rem; }
}