/* =================================================================
   HATAY DİJİTAL VİTRİN — Sinematik Scroll Intro
   Scroll-driven, sticky stage → doğal şekilde hero'ya bağlanır.
   GSAP ScrollTrigger ile sürülür; JS yoksa / reduced-motion'da
   tek sahnelik zarif statik fallback gösterilir.
   ================================================================= */

.cinematic-intro {
  position: relative;
  z-index: 1;
  isolation: isolate;
}

/* Tall scroll track is only created once JS confirms it can drive the scenes.
   Without intro-ready the section stays short and shows the final message. */
.cinematic-intro.intro-ready { height: 260vh; }

.intro-stage {
  position: sticky; top: 0;
  min-height: 100vh; height: 100vh;
  display: grid; place-items: center;
  overflow: hidden;
  text-align: center;
}
.cinematic-intro:not(.intro-ready) .intro-stage { min-height: 92vh; height: auto; padding: 140px 0 80px; }

/* ---------- Atmosphere layers ---------- */
.atmosphere-layer { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

.atmosphere-bg {
  position: absolute; inset: -6%;
  background: var(--bg);
  background-image: url("/assets/cinematic-bg-poster.webp");
  background-size: cover; background-position: center;
  opacity: 0.55;
  will-change: transform;
}
/* darken + tint the poster so foreground copy stays readable */
.atmosphere-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 30%, rgba(4,6,15,0.7) 100%),
    linear-gradient(180deg, rgba(6,10,24,0.55), rgba(4,6,15,0.85));
}

.atmosphere-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity 1.2s ease;
}
.atmosphere-video.is-playing { opacity: 0.5; }

.atmosphere-fog {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 50% 60%, rgba(60,134,255,0.18), transparent 70%),
    radial-gradient(40% 40% at 20% 30%, rgba(139,123,255,0.14), transparent 70%);
  filter: blur(10px);
  animation: introFog 16s ease-in-out infinite alternate;
}
@keyframes introFog { 0%{transform:translate3d(0,0,0) scale(1)} 100%{transform:translate3d(2%,-2%,0) scale(1.06)} }

/* light beams */
.light-beam { position: absolute; top: -20%; width: 2px; height: 140%; opacity: 0.5; pointer-events: none; filter: blur(1px); }
.light-beam--1 { left: 28%; background: linear-gradient(transparent, rgba(69,210,255,0.6), transparent); animation: beamSlide 9s ease-in-out infinite; }
.light-beam--2 { left: 62%; background: linear-gradient(transparent, rgba(139,123,255,0.5), transparent); animation: beamSlide 11s ease-in-out infinite 1.5s; }
.light-beam--3 { left: 45%; background: linear-gradient(transparent, rgba(60,134,255,0.45), transparent); animation: beamSlide 13s ease-in-out infinite .8s; }
@keyframes beamSlide { 0%,100%{transform:translateY(-6%); opacity:.25} 50%{transform:translateY(6%); opacity:.6} }

/* drifting particles */
.scene-particle { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); opacity: 0.7; }
.scene-particle:nth-child(odd) { background: var(--violet); box-shadow: 0 0 12px var(--violet); }
.sp1{top:20%;left:15%;animation:spDrift 12s ease-in-out infinite}
.sp2{top:70%;left:25%;animation:spDrift 15s ease-in-out infinite 1s}
.sp3{top:35%;left:80%;animation:spDrift 13s ease-in-out infinite .5s}
.sp4{top:60%;left:70%;animation:spDrift 17s ease-in-out infinite 2s}
.sp5{top:45%;left:50%;animation:spDrift 14s ease-in-out infinite 1.5s}
.sp6{top:80%;left:85%;animation:spDrift 16s ease-in-out infinite}
.sp7{top:15%;left:60%;animation:spDrift 18s ease-in-out infinite .8s}
.sp8{top:55%;left:8%;animation:spDrift 11s ease-in-out infinite 1.2s}
@keyframes spDrift { 0%,100%{transform:translate(0,0)} 50%{transform:translate(14px,-22px)} }

/* WebGL / canvas (optional, behind copy, above atmosphere) */
.intro-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; display: block; pointer-events: none; }

/* =================================================================
   SCENES
   ================================================================= */
.intro-scene {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px; padding: 0 24px;
  width: 100%; text-align: center;
}
/* Fallback (no JS / reduced motion): show only the closing message, stacked normally */
.cinematic-intro:not(.intro-ready) .intro-scene { position: relative; inset: auto; }
.cinematic-intro:not(.intro-ready) .intro-scene--1,
.cinematic-intro:not(.intro-ready) .intro-scene--2 { display: none; }

/* ---- Scene 1: logo + lead line ---- */
.intro-logo { position: relative; display: inline-grid; place-items: center; }
.intro-logo img {
  /* ~%25 daha büyük — masaüstünde daha güçlü, mobilde taşmadan */
  width: clamp(150px, 22vw, 250px); height: auto;
  filter: drop-shadow(0 10px 50px rgba(69,210,255,0.55));
  animation: introLogoFloat 6s ease-in-out infinite;
}
.intro-logo::after {
  content: ""; position: absolute; width: 130%; height: 130%; border-radius: 50%;
  background: radial-gradient(circle, rgba(69,210,255,0.30), transparent 65%);
  filter: blur(20px); z-index: -1;
}
@keyframes introLogoFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }

.intro-copy {
  font-family: var(--ff-head); color: var(--text);
  font-size: clamp(1.05rem, 2.6vw, 1.9rem); font-weight: 500;
  letter-spacing: -0.01em; max-width: min(720px, 100%);
  text-shadow: 0 6px 50px rgba(56,182,255,0.35);
}
.intro-copy .ac { color: var(--cyan); }
.intro-copy--lead { color: var(--text-soft); }

/* ---- Scene 2: floating sector panels ---- */
.premium-orbit {
  position: relative;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 22px);
  width: min(760px, 92vw);
  perspective: 1200px;
}
/* faint floating-glass-panels render reinforces the concept behind the tiles */
.premium-orbit::before {
  content: ""; position: absolute; inset: -22% -10%;
  background: url("/assets/glass-panels.webp") center/cover no-repeat;
  opacity: 0.16; filter: blur(2px) saturate(120%);
  border-radius: 28px; z-index: -1; pointer-events: none;
  mask-image: radial-gradient(70% 70% at 50% 50%, #000 35%, transparent 80%);
  -webkit-mask-image: radial-gradient(70% 70% at 50% 50%, #000 35%, transparent 80%);
}
.cinematic-panel {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  padding: 18px 18px 20px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.03));
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(14px);
  box-shadow: 0 30px 70px -30px rgba(0,0,0,0.9), inset 0 1px 0 rgba(255,255,255,0.14);
  transform-style: preserve-3d;
  text-align: left;
}
.cinematic-panel__ico {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  font-size: 1.3rem; line-height: 1;
  background: linear-gradient(160deg, rgba(69,210,255,0.22), rgba(139,123,255,0.14));
  border: 1px solid var(--border-strong);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 0 22px -8px rgba(69,210,255,0.7);
}
.cinematic-panel b { font-family: var(--ff-head); font-size: 0.92rem; font-weight: 600; color: var(--text); }
.cinematic-panel span { font-size: 0.74rem; color: var(--text-dim); }
.cinematic-panel__glow { position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 40px -6px rgba(69,210,255,0.0); transition: box-shadow .4s; pointer-events: none; }

/* ---- Scene 3: closing headline + CTA ---- */
.intro-eyebrow {
  font-family: var(--ff-head); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.28em; color: var(--cyan);
  padding: 8px 18px; border-radius: 999px;
  background: rgba(69,210,255,0.10); border: 1px solid rgba(69,210,255,0.28);
}
.intro-headline {
  font-family: var(--ff-display); font-weight: 600;
  font-size: clamp(1.9rem, 5.2vw, 4rem); line-height: 1.08; letter-spacing: -0.02em;
  color: var(--text); max-width: min(18ch, 100%);
  text-shadow: 0 10px 60px rgba(60,134,255,0.3);
}
.intro-headline .line { display: block; }
.intro-headline .line.gradient-text { text-shadow: 0 10px 60px rgba(69,210,255,0.35); }
.intro-sub { color: var(--text-soft); font-size: clamp(1rem, 1.5vw, 1.18rem); max-width: min(540px, 100%); }
.intro-scene--3 .btn { margin-top: 6px; }

/* per-character / per-word reveal helper */
.intro-headline .word, .intro-copy .word { display: inline-block; will-change: transform; }

/* ---------- Intro progress indicator ---------- */
.intro-progress {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  width: 140px; height: 3px; border-radius: 999px; overflow: hidden; z-index: 3;
  background: rgba(255,255,255,0.12);
}
.intro-progress > span { display: block; height: 100%; width: 0%; background: var(--grad); box-shadow: 0 0 12px rgba(69,210,255,0.8); }
.cinematic-intro:not(.intro-ready) .intro-progress { display: none; }

/* scroll hint on the very first frame */
.intro-scroll-hint {
  position: absolute; bottom: 54px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 3;
  font-family: var(--ff-head); font-size: 0.72rem; letter-spacing: 0.16em; color: var(--text-dim);
}
.intro-scroll-hint__mouse { width: 24px; height: 38px; border: 2px solid var(--border-strong); border-radius: 14px; display: flex; justify-content: center; padding-top: 6px; }
.intro-scroll-hint__mouse span { width: 3px; height: 7px; background: var(--cyan); border-radius: 2px; animation: scrollwheel 1.8s ease-in-out infinite; }
.cinematic-intro:not(.intro-ready) .intro-scroll-hint { display: none; }

/* =================================================================
   RESPONSIVE
   ================================================================= */
@media (max-width: 768px) {
  .cinematic-intro.intro-ready { height: 240vh; }
  .premium-orbit { grid-template-columns: repeat(2, 1fr); width: min(420px, 92vw); }
  .cinematic-panel { padding: 14px; }
  .atmosphere-bg { opacity: 0.45; }
  .intro-canvas { display: none; } /* mobile: drop WebGL, keep CSS atmosphere */
}

@media (max-width: 540px) {
  .premium-orbit { gap: 10px; }
  .cinematic-panel span { display: none; }
  .intro-headline { font-size: clamp(1.7rem, 8vw, 2.4rem); }
  /* keep the lead line comfortably inside the viewport (wraps to 2 lines) */
  .intro-copy { font-size: clamp(1rem, 4.6vw, 1.3rem); max-width: 20ch; }
}

/* =================================================================
   REDUCED MOTION — intro collapses to a single calm static scene
   ================================================================= */
@media (prefers-reduced-motion: reduce) {
  .cinematic-intro.intro-ready { height: auto; }
  .intro-stage { position: relative; height: auto; min-height: 90vh; padding: 140px 0 80px; }
  .intro-scene { position: relative; inset: auto; opacity: 1 !important; transform: none !important; }
  .intro-scene--1, .intro-scene--2 { display: none; }
  .atmosphere-fog, .light-beam, .scene-particle, .intro-logo img { animation: none; }
  .intro-canvas { display: none; }
  .intro-progress, .intro-scroll-hint { display: none; }
}
