/* ============================================================
   Nonslip Digital — Sinematik süreç bölümü (#process)
   Modlar: varsayılan (JS yok) · .cine--3d · .cine--frames · .cine--static
   ============================================================ */

/* position: sticky için: body bir kaydırma kabı olmamalı.
   overflow-x: hidden (html+body birlikte) body'yi kaydırma kabına çevirip sticky'yi bozar. */
body { overflow-x: visible; }
@media (max-width: 768px) { html, body { overflow-x: visible; } html { overflow-x: hidden; } }
@supports (overflow: clip) {
  html, body { overflow-x: clip !important; }
}

.cine-story .cine-steps { list-style: none; margin: 0; padding: 0; }
.cine-story .cine-step-note { display: none; }
.cine-story .cine-progress,
.cine-story .cine-labels { display: none; }
.cine-story .cine-poster { display: none; }
.cine-story .cine-hint { display: none; }
.cine--3d .cine-hint, .cine--frames .cine-hint { display: inline; }

/* Varsayılan (JS kapalı / modül yok): eski 4 sütunlu düzen korunur */
.cine-story:not(.cine--3d):not(.cine--frames) .cine-track { margin-top: 1rem; }
.cine-story:not(.cine--3d):not(.cine--frames) .cine-panel { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.cine-story:not(.cine--3d):not(.cine--frames) .cine-canvas-wrap { display: none; }

/* Statik mod (hareketi azalt): tek görsel + 4 adım */
.cine--static .cine-canvas-wrap { display: block !important; max-width: 1100px; margin: 0 auto 3rem; padding: 0 2rem; }
.cine--static .cine-poster { display: block; width: 100%; height: auto; border-radius: 24px; box-shadow: 0 30px 60px -30px rgba(15, 23, 42, 0.5); }

/* ---------- Gelişmiş modlar (3D ve kare dizisi) ---------- */
.cine--3d, .cine--frames { padding-bottom: 0; }
.cine--3d .cine-intro, .cine--frames .cine-intro { padding-bottom: 3rem; }

.cine--3d .cine-track, .cine--frames .cine-track {
  position: relative;
  height: 460vh;
  height: 460svh;
  background: #0B0F19;
}
.cine--3d .cine-stage, .cine--frames .cine-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: radial-gradient(ellipse at 70% 40%, #141C2E 0%, #0B0F19 60%);
  color: #fff;
}
.cine--3d .cine-canvas-wrap, .cine--frames .cine-canvas-wrap { position: absolute; inset: 0; }
.cine-canvas { display: block; width: 100%; height: 100%; }
.cine--3d .cine-poster, .cine--frames .cine-poster {
  display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 70% 50%;
  opacity: 0.55; transition: opacity 0.6s ease;
}
.cine-canvas-wrap:has(canvas) .cine-poster { opacity: 0; visibility: hidden; }
.cine--loading .cine-canvas-wrap::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 42px; height: 42px; margin: -21px;
  border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.15); border-top-color: var(--accent, #FF6A00);
  animation: cine-spin 0.9s linear infinite;
}
@keyframes cine-spin { to { transform: rotate(360deg); } }

/* Metin paneli (sol) */
.cine--3d .cine-panel, .cine--frames .cine-panel {
  position: absolute; z-index: 3;
  left: max(2rem, calc((100vw - 1200px) / 2 + 2rem));
  top: 50%; transform: translateY(-50%);
  width: min(400px, 36vw);
}
.cine--3d .cine-steps, .cine--frames .cine-steps { display: grid; grid-template-columns: 1fr; gap: 0.6rem; }
.cine--3d .cine-steps::before, .cine--frames .cine-steps::before { display: none; }
.cine--3d .cine-step, .cine--frames .cine-step {
  display: grid; grid-template-columns: 52px 1fr; gap: 1rem; align-items: start;
  text-align: left; padding: 1rem 1.1rem; border-radius: 18px; cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.45s ease, border-color 0.45s ease, opacity 0.45s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0.42;
  outline: none;
}
.cine--3d .cine-step:focus-visible, .cine--frames .cine-step:focus-visible { outline: 2px solid var(--accent, #FF6A00); outline-offset: 2px; }
.cine--3d .cine-step.is-past, .cine--frames .cine-step.is-past { opacity: 0.6; }
.cine--3d .cine-step.is-active, .cine--frames .cine-step.is-active {
  opacity: 1; background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 106, 0, 0.45);
  transform: translateX(6px);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.cine--3d .step-number, .cine--frames .step-number {
  width: 52px; height: 52px; margin: 0; font-size: 1rem; background: transparent; color: #FF8C33;
  border: 1.5px solid rgba(255, 106, 0, 0.6); box-shadow: none;
}
.cine--3d .cine-step.is-active .step-number, .cine--frames .cine-step.is-active .step-number {
  background: var(--accent, #FF6A00); color: #fff; border-color: transparent; box-shadow: 0 8px 26px rgba(255, 106, 0, 0.45);
}
.cine--3d .step-title, .cine--frames .step-title { color: #fff; font-size: 1.12rem; margin: 0.15rem 0 0.35rem; }
.cine--3d .step-desc, .cine--frames .step-desc { color: rgba(255, 255, 255, 0.72); font-size: 0.92rem; margin: 0; }
.cine--3d .cine-step-note, .cine--frames .cine-step-note {
  display: block; max-height: 0; overflow: hidden; opacity: 0; margin: 0;
  color: #FFB27A; font-size: 0.86rem; line-height: 1.55;
  transition: max-height 0.5s ease, opacity 0.5s ease, margin 0.5s ease;
}
.cine--3d .cine-step.is-active .cine-step-note, .cine--frames .cine-step.is-active .cine-step-note { max-height: 5em; opacity: 1; margin-top: 0.55rem; }

.cine--3d .cine-progress, .cine--frames .cine-progress {
  display: block; height: 3px; margin-top: 1.25rem; border-radius: 3px; background: rgba(255, 255, 255, 0.12); overflow: hidden;
}
.cine-progress span { display: block; height: 100%; background: linear-gradient(90deg, #FF6A00, #FF8C33); transform-origin: left center; transform: scaleX(0); }

/* 3D katman etiketleri */
.cine--3d .cine-labels { display: block; position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.cine-label {
  position: absolute; left: 0; top: 0; opacity: 0; white-space: nowrap;
  display: flex; align-items: center; gap: 0.5rem;
  font: 700 0.78rem/1 "Plus Jakarta Sans", system-ui, sans-serif; letter-spacing: 0.08em; text-transform: uppercase;
  color: #fff; will-change: transform, opacity;
}
.cine-label-dot { width: 9px; height: 9px; border-radius: 50%; background: #FF6A00; box-shadow: 0 0 0 4px rgba(255, 106, 0, 0.25); flex: none; }
.cine-label-text { padding: 0.4rem 0.65rem; border-radius: 999px; background: rgba(11, 15, 25, 0.75); border: 1px solid rgba(255, 106, 0, 0.45); }

/* Kare dizisi modu: görsel sağ alanda */
.cine--frames .cine-canvas-wrap { left: 38%; }

/* Yakalama (geliştirici) modu */
.cine--capture .cine-track { height: auto !important; }
.cine--capture .cine-stage { position: relative !important; width: 1280px !important; height: 800px !important; }
.cine--capture .cine-panel, .cine--capture .cine-labels { display: none !important; }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .cine--3d .cine-panel, .cine--frames .cine-panel { width: min(360px, 40vw); left: 1.5rem; }
}

/* ---------- Mobil: görsel üstte, etkin adım altta kart ---------- */
@media (max-width: 768px) {
  .cine--3d .cine-track, .cine--frames .cine-track { height: 400vh; height: 400svh; }
  .cine--3d .cine-panel, .cine--frames .cine-panel {
    left: 1rem; right: 1rem; width: auto; top: auto; bottom: 5rem; transform: none;
  }
  .cine--3d .cine-steps, .cine--frames .cine-steps { display: block; }
  .cine--3d .cine-step, .cine--frames .cine-step { display: none; transform: none; }
  .cine--3d .cine-step.is-active, .cine--frames .cine-step.is-active {
    display: grid; grid-template-columns: 44px 1fr; background: rgba(11, 15, 25, 0.82);
    animation: cine-in 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .cine--3d .step-number, .cine--frames .step-number { width: 44px; height: 44px; font-size: 0.9rem; }
  .cine--3d .step-desc, .cine--frames .step-desc { font-size: 0.88rem; }
  .cine--frames .cine-canvas-wrap { left: 0; bottom: 34%; }
  .cine--3d .cine-poster, .cine--frames .cine-poster { object-position: 50% 30%; }
  .cine--static .cine-canvas-wrap { padding: 0 1rem; }
}
@keyframes cine-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .cine-step, .cine-step-note, .cine-poster { transition: none !important; animation: none !important; }
}
