/* Gerçekçi sürme cam balkon açılış animasyonu */
.glass-intro {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: all;
  overflow: hidden;
  background: transparent;
}
.glass-intro.is-done {
  pointer-events: none;
  visibility: hidden;
}

/* Dış cephe / balkon boşluğu hafif karartma */
.glass-intro-sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 70% at 50% 45%, transparent 20%, rgba(8, 12, 22, 0.35) 100%),
    linear-gradient(180deg, rgba(8, 12, 22, 0.2), rgba(8, 12, 22, 0.45));
  opacity: 1;
  transition: opacity 0.85s ease;
  pointer-events: none;
}
.glass-intro.is-open .glass-intro-sky { opacity: 0; }

.glass-intro-brand {
  position: absolute;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
  z-index: 8;
  text-align: center;
  color: #fff;
  opacity: 0;
  letter-spacing: 0.12em;
  pointer-events: none;
  padding: 1rem 1.4rem;
  border-radius: 4px;
  background: rgba(15, 20, 32, 0.28);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}
.glass-intro-logo {
  display: block;
  width: clamp(84px, 16vw, 120px);
  height: auto;
  margin: 0 auto 0.55rem;
  border-radius: 10px;
  background: #eceae6;
  box-shadow: 0 8px 28px rgba(0,0,0,0.35);
}
.glass-intro-brand .brand-word,
.glass-intro-brand strong {
  display: block;
  font-size: clamp(1.7rem, 5.5vw, 3rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
}
.glass-intro-brand small {
  display: block;
  margin-top: 0.4rem;
  font-size: clamp(0.7rem, 1.8vw, 0.9rem);
  font-weight: 700;
  color: #d6b896;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.glass-intro.is-ready .glass-intro-brand {
  animation: gi-brand-in 0.75s ease forwards;
}
.glass-intro.is-open .glass-intro-brand {
  animation: gi-brand-out 0.5s ease forwards;
}

/* Alüminyum kasa — antrasit profil */
.glass-intro-shell {
  position: absolute;
  left: 3%;
  right: 3%;
  top: 6%;
  bottom: 7%;
  z-index: 3;
  border: 10px solid #2a3140;
  border-radius: 2px;
  box-shadow:
    0 0 0 2px #1a1f2a,
    0 20px 60px rgba(0,0,0,0.45),
    inset 0 0 0 1px rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(20, 26, 38, 0.15), transparent 30%);
  overflow: hidden;
}
.glass-intro-shell::before {
  /* üst kasa vurgusu */
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 8px;
  background: linear-gradient(180deg, #4a5568, #2a3140);
  z-index: 7;
  pointer-events: none;
}
.glass-intro-shell::after {
  /* alt kasa / eşik */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 12px;
  background: linear-gradient(180deg, #3d4658, #1e2430 55%, #4a5568);
  z-index: 7;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.12);
  pointer-events: none;
}

/* Üst ray + tekerlek yuvası */
.glass-intro-rail {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 6;
  pointer-events: none;
}
.glass-intro-rail-top {
  top: 8px;
  height: 16px;
  background:
    linear-gradient(180deg, #5a6578 0%, #2f3748 40%, #1c2230 70%, #3a4456 100%);
  box-shadow: inset 0 -1px 0 rgba(0,0,0,0.5), 0 2px 4px rgba(0,0,0,0.3);
}
.glass-intro-rail-top::before {
  content: "";
  position: absolute;
  left: 4%;
  right: 4%;
  top: 5px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #111827, #6b7280, #111827);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.35);
}
.glass-intro-rail-bot {
  bottom: 12px;
  height: 18px;
  background:
    linear-gradient(180deg, #3a4456, #1c2230 45%, #4b5568);
  box-shadow: inset 0 2px 3px rgba(0,0,0,0.45);
}
.glass-intro-rail-bot::before {
  content: "";
  position: absolute;
  left: 3%;
  right: 3%;
  top: 6px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, #0f141f, #525b6c, #0f141f);
}

.glass-intro-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 24px;
  bottom: 30px;
  display: flex;
  z-index: 4;
  overflow: hidden;
  gap: 0;
}

/* ——— Kanat (panel) ——— */
.glass-panel {
  flex: 1 1 0;
  position: relative;
  min-width: 0;
  padding: 0 3px;
  transform: translateX(0);
  transition: transform 1.25s cubic-bezier(0.55, 0.05, 0.25, 1);
  will-change: transform;
}

.gp-frame {
  position: relative;
  height: 100%;
  border: 7px solid #323947;
  border-radius: 1px;
  background: linear-gradient(180deg, #3d4656, #252b38);
  box-shadow:
    0 8px 20px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.18),
    inset 0 -1px 0 rgba(0,0,0,0.4);
  overflow: hidden;
}

/* Dikey profil çizgileri (kanat kasası) */
.gp-frame::before,
.gp-frame::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 8px;
  z-index: 3;
  background: linear-gradient(90deg, #1a1f2a, #4b5568 35%, #2a3140 70%, #1a1f2a);
  pointer-events: none;
}
.gp-frame::before { left: 0; }
.gp-frame::after { right: 0; }

.gp-glass {
  position: absolute;
  inset: 8px 8px 10px;
  z-index: 1;
  overflow: hidden;
  background:
    linear-gradient(155deg,
      rgba(255,255,255,0.55) 0%,
      rgba(255,255,255,0.08) 18%,
      rgba(160, 200, 230, 0.18) 42%,
      rgba(255,255,255,0.05) 62%,
      rgba(180, 210, 235, 0.28) 100%),
    linear-gradient(180deg,
      rgba(200, 225, 245, 0.42),
      rgba(140, 175, 205, 0.28) 50%,
      rgba(110, 145, 175, 0.35));
  backdrop-filter: blur(7px) saturate(1.15);
  -webkit-backdrop-filter: blur(7px) saturate(1.15);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.35),
    inset 0 -30px 40px rgba(30, 50, 70, 0.12);
}

/* Cam yansıma şeritleri */
.gp-shine {
  position: absolute;
  top: -10%;
  left: 8%;
  width: 42%;
  height: 120%;
  background: linear-gradient(105deg,
    transparent 0%,
    rgba(255,255,255,0.08) 35%,
    rgba(255,255,255,0.5) 48%,
    rgba(255,255,255,0.1) 58%,
    transparent 75%);
  transform: skewX(-12deg);
  pointer-events: none;
  animation: gi-shine 2.4s ease-in-out infinite;
}
.gp-shine-2 {
  left: auto;
  right: 5%;
  width: 18%;
  opacity: 0.45;
  animation-delay: 0.4s;
}

/* Mıknatıs / fitil çizgisi */
.gp-seal {
  position: absolute;
  top: 8px;
  bottom: 10px;
  width: 3px;
  z-index: 4;
  background: linear-gradient(180deg, #1e293b, #0f172a);
  box-shadow: 1px 0 0 rgba(255,255,255,0.1);
  pointer-events: none;
}
.glass-panel.is-left .gp-seal { right: 7px; }
.glass-panel.is-right .gp-seal { left: 7px; }

/* Tutamak — metalik */
.gp-handle {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 10px;
  height: 72px;
  margin-top: -36px;
  border-radius: 3px;
  background:
    linear-gradient(90deg, #8a919e, #e8eaed 40%, #6b7280 70%, #9ca3af);
  box-shadow:
    0 2px 6px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.6);
  pointer-events: none;
}
.glass-panel.is-left .gp-handle { right: 14px; }
.glass-panel.is-right .gp-handle { left: 14px; }
.gp-handle::before {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: 8px;
  bottom: 8px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(0,0,0,0.25), transparent 50%, rgba(255,255,255,0.2));
}

/* Üst/alt makara (tekerlek) */
.gp-wheel {
  position: absolute;
  left: 50%;
  z-index: 5;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #d1d5db, #4b5563 55%, #1f2937);
  box-shadow: 0 1px 3px rgba(0,0,0,0.5), inset 0 1px 1px rgba(255,255,255,0.35);
  pointer-events: none;
}
.gp-wheel-top { top: 2px; }
.gp-wheel-bot { bottom: 2px; }

/* Açılış yönleri — sürme gibi istiflenerek kayar */
.glass-intro.is-open .glass-panel.is-left {
  transform: translateX(-108%);
}
.glass-intro.is-open .glass-panel.is-right {
  transform: translateX(108%);
}
/* Ortadan dışa doğru sırayla */
.glass-intro.is-open .glass-panel:nth-child(3) { transition-delay: 0.02s; }
.glass-intro.is-open .glass-panel:nth-child(2),
.glass-intro.is-open .glass-panel:nth-child(4) { transition-delay: 0.16s; }
.glass-intro.is-open .glass-panel:nth-child(1),
.glass-intro.is-open .glass-panel:nth-child(5) { transition-delay: 0.32s; }

.glass-intro.is-fade {
  opacity: 0;
  transition: opacity 0.6s ease 0.1s;
}

body.glass-intro-lock { overflow: hidden; }

body.glass-intro-played .home-hero .wrap {
  animation: gi-hero-rise 0.95s cubic-bezier(0.22, 1, 0.36, 1) both;
}
body.glass-intro-played .home-hero .hero-slides {
  animation: gi-hero-zoom 1.5s ease both;
}

@keyframes gi-brand-in {
  from { opacity: 0; transform: translate(-50%, -40%) scale(0.96); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes gi-brand-out {
  from { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  to { opacity: 0; transform: translate(-50%, -62%) scale(1.05); }
}
@keyframes gi-shine {
  0%, 100% { opacity: 0.75; transform: skewX(-12deg) translateX(0); }
  50% { opacity: 1; transform: skewX(-12deg) translateX(8%); }
}
@keyframes gi-hero-rise {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes gi-hero-zoom {
  from { transform: scale(1.1); }
  to { transform: scale(1); }
}

@media (max-width: 720px) {
  .glass-intro-shell { left: 2%; right: 2%; top: 5%; bottom: 5%; border-width: 7px; }
  .glass-panel:nth-child(5) { display: none; }
  .gp-handle { height: 56px; margin-top: -28px; width: 8px; }
  .gp-frame { border-width: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .glass-intro { display: none !important; }
  body.glass-intro-lock { overflow: auto; }
  .gp-shine { animation: none; }
}
