/* ═══════════════════════════════════════════════════════════════
   GATE — Gizli giriş ekranı
   ═══════════════════════════════════════════════════════════════ */

.gate {
  min-height: 100vh;
  display: grid; place-items: center;
  position: relative; overflow: hidden;
  padding: 24px;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, color-mix(in srgb, var(--orange) 8%, transparent), transparent 60%),
    var(--bg);
}

/* — Arka plan dekorasyonu — */
.gate .grid-bg { opacity: .4; }
.gate .ambient {
  position: absolute; pointer-events: none; z-index: 0;
  border-radius: 50%; filter: blur(100px);
}
.gate .ambient.a1 {
  width: 700px; height: 700px;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--orange-glow-strong), transparent 62%);
  opacity: .42;
  animation: breathe 8s var(--ease) infinite;
}
.gate .ambient.a2 {
  width: 420px; height: 420px;
  top: 8%; right: 6%;
  background: radial-gradient(circle, rgba(232,67,26,.22), transparent 65%);
  opacity: .3;
  animation: breathe 10s var(--ease) 1s infinite reverse;
}
@keyframes breathe {
  0%,100% { transform: translate(-50%,-50%) scale(1); opacity: .4; }
  50%     { transform: translate(-50%,-50%) scale(1.1); opacity: .58; }
}

/* — Köşe marka — */
.gate-corner {
  position: fixed; bottom: 24px; right: 28px; z-index: 5;
  font-family: var(--font-display); font-size: .7rem; font-weight: 600;
  letter-spacing: .26em; text-transform: uppercase;
  color: var(--text-muted); opacity: .55;
}

/* — Kart — */
.gate-card {
  position: relative; z-index: 2;
  width: 100%; max-width: 380px;
  padding: 44px 38px 40px;
  background: color-mix(in srgb, var(--surface) 68%, transparent);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  box-shadow:
    0 50px 120px rgba(0,0,0,.6),
    0 0 0 1px var(--border) inset;
  animation: gateIn 1s var(--ease) both;
}
@keyframes gateIn {
  from { opacity: 0; transform: translateY(28px) scale(.95); }
  to   { opacity: 1; transform: none; }
}

/* — Logo (yatay banner, doğal oranda, büyük) — */
.gate-logo {
  display: flex; justify-content: center; align-items: center;
  margin-bottom: 48px;
}
.gate-logo img.brand-logo {
  width: auto; height: 84px;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 40px var(--orange-glow-strong)) brightness(1.08);
  animation: floaty 5s var(--ease) infinite;
}
@keyframes floaty {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-8px); }
}

/* — Input (göz butonu yok) — */
.gate-field { position: relative; margin-bottom: 16px; }
.gate-field .input-ic {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none;
  display: grid; place-items: center;
  transition: color var(--t-fast);
}
.gate-field input {
  width: 100%; padding: 15px 18px 15px 48px;
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  font-size: 1rem; letter-spacing: .03em;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.gate-field input::placeholder { color: var(--text-muted); letter-spacing: .02em; }
.gate-field input:focus {
  outline: none; border-color: var(--orange);
  background: var(--bg);
  box-shadow: 0 0 0 4px var(--orange-glow);
}
.gate-field:focus-within .input-ic { color: var(--orange); }

/* — Buton (sadece yazı, ikon yok) — */
.gate-btn {
  width: 100%; margin-top: 6px;
  padding: 15px 20px;
  font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  letter-spacing: .04em;
  border-radius: var(--r-md); border: 0;
  background: var(--grad-orange); color: #fff;
  box-shadow: 0 12px 32px var(--orange-glow);
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), opacity var(--t-fast);
}
.gate-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 18px 44px var(--orange-glow-strong); }
.gate-btn:active:not(:disabled) { transform: translateY(0); }
.gate-btn:disabled { opacity: .7; cursor: progress; }

/* — Hata mesajı — */
.gate-error {
  margin-top: 14px; margin-bottom: 4px;
  padding: 12px 14px; border-radius: var(--r-md);
  background: rgba(248,113,113,.1);
  border: 1px solid rgba(248,113,113,.35);
  color: #fca5a5; font-size: .88rem; font-weight: 500;
  display: flex; align-items: center; gap: 9px;
  animation: shake .35s ease;
}
.gate-error svg { flex-shrink: 0; color: #f87171; }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  25%     { transform: translateX(-6px); }
  75%     { transform: translateX(6px); }
}

/* — Başarılı giriş: iki bölümlü sinematik intro — */
.gate-success {
  position: fixed; inset: 0; z-index: 9998;
  display: grid; place-items: center;
  background: var(--bg);
  opacity: 0; visibility: hidden;
  transition: opacity .5s var(--ease), visibility .5s;
  overflow: hidden;
}
.gate-success.show { opacity: 1; visibility: visible; }

/* Vignette karartma */
.gate-success::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse 100% 70% at 50% 50%, transparent 30%, rgba(0,0,0,.72) 100%);
  opacity: 0; transition: opacity .7s var(--ease);
}
.gate-success.show::after { opacity: 1; }

/* Arka plan ambient glow (nefes alan) */
.gate-success .succ-bg {
  position: absolute; width: 820px; height: 820px;
  top: 50%; left: 50%;
  border-radius: 50%; filter: blur(115px);
  background: radial-gradient(circle, var(--orange-glow-strong), transparent 60%);
  opacity: 0;
  animation: succBgPulse 5s var(--ease) infinite;
}
.gate-success.show .succ-bg { animation: succBgPulse 5s var(--ease) infinite, succBgIn .9s var(--ease) forwards; }
@keyframes succBgIn { from { opacity: 0; } to { opacity: .5; } }
@keyframes succBgPulse {
  0%, 100% { transform: translate(-50%,-50%) scale(1); }
  50%      { transform: translate(-50%,-50%) scale(1.14); }
}

/* Sahne */
.gate-success .succ-stage {
  position: relative; z-index: 2;
  width: 100%; height: 100%;
  display: grid; place-items: center;
}

/* Tek metin — tam ortada, absolute */
.gate-success .succ-text {
  position: absolute;
  font-family: var(--font-display); font-weight: 700;
  letter-spacing: -.02em; line-height: 1.05;
  text-align: center;
  opacity: 0;
  white-space: nowrap;
}
.gate-success .succ-text.grad {
  background: var(--grad-orange); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* — BÖLÜM 1: boot sequence (renkli, yavaş process hissi) — */
.gate-success .succ-text.boot {
  font-size: clamp(1.05rem, 2.6vw, 1.6rem);
  font-weight: 600;
  letter-spacing: .01em;
  font-family: 'SF Mono', 'Consolas', var(--font-body);
}
/* Renk varyasyonları — her item farklı ton */
.gate-success .succ-text.boot.c-blue { color: #60a5fa; }
.gate-success .succ-text.boot.c-green { color: #34d399; }
.gate-success .succ-text.boot.c-orange { color: var(--orange); }
.gate-success .succ-text.boot.c-yellow { color: #fbbf24; }
.gate-success .succ-text.boot.c-purple { color: #c084fc; }
.gate-success .succ-text.boot.c-soft { color: var(--text-soft); }
.gate-success .succ-text.boot.visible { animation: bootIn .45s var(--ease) forwards; }
@keyframes bootIn {
  0%   { opacity: 0; transform: translateY(10px); filter: blur(4px); }
  45%  { opacity: 1; transform: translateY(0); filter: blur(0); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.gate-success .succ-text.boot.leaving { animation: bootOut .35s var(--ease) forwards; }
@keyframes bootOut {
  0%   { opacity: 1; }
  100% { opacity: 0; transform: translateY(-10px); filter: blur(4px); }
}

/* — BÖLÜM 2: sinematik final (büyük, yavaş) — */
.gate-success .succ-text.cinematic {
  font-size: clamp(2.4rem, 8vw, 5rem);
  font-weight: 700;
}
.gate-success .succ-text.cinematic.visible { animation: textCinematic 2s var(--ease) forwards; }
@keyframes textCinematic {
  0%   { opacity: 0; transform: scale(2.8) translateZ(600px); filter: blur(22px); letter-spacing: .16em; }
  28%  { opacity: 1; transform: scale(1) translateZ(0); filter: blur(0); letter-spacing: -.02em; }
  72%  { opacity: 1; transform: scale(1) translateZ(0); filter: blur(0); letter-spacing: -.02em; }
  100% { opacity: 0; transform: scale(2.8) translateZ(600px); filter: blur(22px); letter-spacing: .16em; }
}
/* Final (Avlama zamanı) — yavaşça geri */
.gate-success .succ-text.cinematic.final.visible { animation: textFinal 3s var(--ease) forwards; }
@keyframes textFinal {
  0%   { opacity: 0; transform: scale(2.8) translateZ(600px); filter: blur(22px); letter-spacing: .16em; }
  25%  { opacity: 1; transform: scale(1) translateZ(0); filter: blur(0); letter-spacing: -.02em; }
  80%  { opacity: 1; transform: scale(1) translateZ(0); filter: blur(0); letter-spacing: -.02em; }
  100% { opacity: 0; transform: scale(1.4) translateZ(300px); filter: blur(16px); }
}
