/* =========================================================
   Yerleşim: arka plan efektleri, imleç, navigasyon, alt bilgi
   ========================================================= */

/* ---------- Arka plan atmosferi ---------- */

.fx-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  /* Arka plan efektleri sayfa yerleşimini asla etkilemesin */
  contain: strict;
  background:
    radial-gradient(1200px 700px at 78% -10%, rgba(30, 111, 242, 0.22), transparent 62%),
    radial-gradient(900px 620px at 12% 8%, rgba(245, 196, 81, 0.1), transparent 60%),
    linear-gradient(180deg, var(--navy-900) 0%, var(--navy-950) 55%, #02030a 100%);
}

.fx-aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.42;
  mix-blend-mode: screen;
  will-change: transform;
}
.fx-aurora-1 {
  width: 58vw; height: 58vw;
  top: -18vw; left: -12vw;
  background: radial-gradient(circle, rgba(30, 111, 242, 0.75), transparent 68%);
  animation: drift-1 26s ease-in-out infinite alternate;
}
.fx-aurora-2 {
  width: 48vw; height: 48vw;
  top: 28vh; right: -14vw;
  background: radial-gradient(circle, rgba(245, 196, 81, 0.42), transparent 68%);
  animation: drift-2 32s ease-in-out infinite alternate;
}
.fx-aurora-3 {
  width: 42vw; height: 42vw;
  bottom: -14vw; left: 26vw;
  background: radial-gradient(circle, rgba(53, 208, 255, 0.4), transparent 70%);
  animation: drift-3 38s ease-in-out infinite alternate;
}

@keyframes drift-1 { to { transform: translate3d(12vw, 10vh, 0) scale(1.16); } }
@keyframes drift-2 { to { transform: translate3d(-14vw, -8vh, 0) scale(1.22); } }
@keyframes drift-3 { to { transform: translate3d(8vw, -12vh, 0) scale(0.86); } }

/* Buhar bantları — ekranı boydan boya geçen yumuşak sis katmanları */
.fx-fog {
  position: absolute;
  left: -60%;
  width: 220%;
  border-radius: 50%;
  /* Bulanıklık maliyeti alan x yarıçap ile artar; degradeler zaten yumuşak
     olduğu için düşük yarıçap yeterli. */
  filter: blur(48px);
  mix-blend-mode: screen;
  will-change: transform;
  transform: translateZ(0);
}
.fx-fog-1 {
  top: 8%;
  height: 34vh;
  background: radial-gradient(ellipse 60% 100% at 30% 50%, rgba(80, 140, 255, 0.3), transparent 70%),
    radial-gradient(ellipse 50% 90% at 72% 50%, rgba(245, 196, 81, 0.16), transparent 72%);
  opacity: 0.6;
  animation: fog-sweep-1 42s linear infinite;
}
.fx-fog-2 {
  top: 46%;
  height: 30vh;
  background: radial-gradient(ellipse 55% 100% at 60% 50%, rgba(53, 208, 255, 0.24), transparent 72%),
    radial-gradient(ellipse 45% 90% at 22% 50%, rgba(150, 110, 255, 0.2), transparent 74%);
  opacity: 0.5;
  animation: fog-sweep-2 58s linear infinite;
}
.fx-fog-3 {
  bottom: 4%;
  height: 36vh;
  background: radial-gradient(ellipse 62% 100% at 44% 50%, rgba(245, 196, 81, 0.18), transparent 72%),
    radial-gradient(ellipse 40% 90% at 82% 50%, rgba(30, 111, 242, 0.24), transparent 74%);
  opacity: 0.45;
  animation: fog-sweep-3 74s linear infinite;
}
@keyframes fog-sweep-1 {
  0% { transform: translate3d(0, 0, 0) scaleY(1); }
  50% { transform: translate3d(18%, -3vh, 0) scaleY(1.25); }
  100% { transform: translate3d(0, 0, 0) scaleY(1); }
}
@keyframes fog-sweep-2 {
  0% { transform: translate3d(12%, 0, 0) scaleY(1.1); }
  50% { transform: translate3d(-16%, 4vh, 0) scaleY(0.85); }
  100% { transform: translate3d(12%, 0, 0) scaleY(1.1); }
}
@keyframes fog-sweep-3 {
  0% { transform: translate3d(-8%, 0, 0) scaleY(0.9); }
  50% { transform: translate3d(14%, -5vh, 0) scaleY(1.3); }
  100% { transform: translate3d(-8%, 0, 0) scaleY(0.9); }
}

.fx-grid {
  position: absolute;
  inset: -50%;
  background-image:
    linear-gradient(rgba(120, 170, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 170, 255, 0.06) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: perspective(520px) rotateX(62deg) translateY(22%);
  mask-image: radial-gradient(circle at 50% 42%, #000 0%, transparent 68%);
  -webkit-mask-image: radial-gradient(circle at 50% 42%, #000 0%, transparent 68%);
  animation: grid-flow 22s linear infinite;
  opacity: 0.55;
}
@keyframes grid-flow { to { background-position: 0 64px, 64px 0; } }

.fx-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, transparent 42%, rgba(0, 0, 0, 0.62) 100%);
}

.fx-motes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ---------- Özel imleç ---------- */

.has-custom-cursor,
.has-custom-cursor * { cursor: none !important; }
.has-custom-cursor .hero-stage { cursor: none !important; }

.cursor-fx {
  position: fixed;
  top: 0; left: 0;
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.cursor-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold-300);
  box-shadow: 0 0 12px rgba(245, 196, 81, 0.9), 0 0 26px rgba(245, 196, 81, 0.45);
}
.cursor-ring {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(53, 208, 255, 0.6);
  box-shadow: 0 0 16px rgba(53, 208, 255, 0.22) inset;
  transition: width 0.28s var(--ease), height 0.28s var(--ease), border-color 0.28s var(--ease), opacity 0.25s ease, background 0.28s var(--ease);
}
.cursor-ring.is-active {
  width: 58px; height: 58px;
  border-color: var(--gold-500);
  background: rgba(245, 196, 81, 0.08);
  box-shadow: 0 0 26px rgba(245, 196, 81, 0.28);
}
.cursor-ring.is-down { width: 24px; height: 24px; border-color: var(--gold-200); }

/* ---------- Üst navigasyon ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 900;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}
.site-nav::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 196, 81, 0.5), rgba(53, 208, 255, 0.4), transparent);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.site-nav.is-scrolled {
  background: rgba(5, 8, 20, 0.82);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 18px 44px -28px rgba(0, 0, 0, 0.95);
}
.site-nav.is-scrolled::after { opacity: 1; }

.nav-progress {
  position: absolute;
  left: 0; bottom: 0;
  height: 2px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--gold-500), var(--cyan-400));
  box-shadow: 0 0 12px rgba(245, 196, 81, 0.6);
  z-index: 2;
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  height: var(--nav-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  filter: drop-shadow(0 0 10px rgba(245, 196, 81, 0.4));
  transition: transform 0.5s var(--ease);
}
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.08); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text strong {
  font-family: var(--font-display);
  font-size: 1.42rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}
.brand-text em {
  font-family: var(--font-ui);
  font-style: normal;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.44em;
  color: var(--text-dim);
  margin-top: 3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
.nav-link {
  position: relative;
  display: block;
  padding: 0.6rem 1.05rem;
  font-family: var(--font-ui);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
  border-radius: 8px;
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav-link::before {
  content: '';
  position: absolute;
  left: 50%; bottom: 4px;
  width: 0; height: 2px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, var(--gold-500), var(--cyan-400));
  border-radius: 2px;
  transition: width 0.38s var(--ease);
}
.nav-link:hover { color: var(--gold-300); background: rgba(255, 255, 255, 0.04); }
.nav-link:hover::before { width: 58%; }
.nav-link.is-active { color: var(--gold-400); }
.nav-link.is-active::before { width: 58%; box-shadow: 0 0 10px rgba(245, 196, 81, 0.7); }

/* ---------- Açılır menü grupları ---------- */

.nav-group { position: relative; }

.nav-group-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
.nav-caret {
  transition: transform 0.3s var(--ease);
  opacity: 0.7;
}
.nav-group.is-open .nav-caret { transform: rotate(180deg); opacity: 1; }
.nav-group.is-open .nav-link { color: var(--gold-300); background: rgba(255, 255, 255, 0.05); }
.nav-group.is-open .nav-link::before { width: 58%; }

.nav-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 286px;
  padding: 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 30;
  transform-origin: top center;
  /* OPAK arka plan — panel saydamligini ez */
  background: linear-gradient(180deg, #0b1230 0%, #070c22 100%) !important;
  border: 1px solid var(--line-gold);
  box-shadow: 0 24px 60px -18px rgba(0,0,0,.9), 0 0 0 1px rgba(0,0,0,.4),
              0 0 30px rgba(245,196,81,.12), inset 0 1px 0 rgba(255,255,255,.05);
  backdrop-filter: none;
  animation: drop-epic 0.34s cubic-bezier(.16,1.16,.3,1);
}
/* Fare menüyle panel arasındaki boşlukta gezerken menü kapanmasın */
.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

.nav-dropdown-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.7rem 0.7rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-500);
}

.nav-dropdown-item {
  display: block;
  padding: 0.6rem 0.75rem;
  border-radius: 4px;
  color: var(--text-soft);
  transition: background 0.24s var(--ease), padding-left 0.24s var(--ease);
}
.nav-dropdown-item strong {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
}
.nav-dropdown-item em {
  font-style: normal;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--text-dim);
}
.nav-dropdown-item:hover {
  background: rgba(245, 196, 81, 0.1);
  padding-left: 1.05rem;
}
.nav-dropdown-item:hover strong { color: var(--gold-200); }
.nav-dropdown-item.is-active {
  background: linear-gradient(90deg, rgba(245, 196, 81, 0.16), transparent);
  box-shadow: inset 2px 0 0 var(--gold-500);
}
.nav-dropdown-item.is-active strong { color: var(--gold-300); }

.nav-actions { display: flex; align-items: center; gap: 0.65rem; flex: none; }

/* Kullanıcı menüsü */
.user-menu { position: relative; }
.user-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 5px 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-family: var(--font-ui);
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.user-trigger:hover {
  border-color: var(--line-gold);
  background: rgba(245, 196, 81, 0.08);
  box-shadow: 0 0 18px rgba(245, 196, 81, 0.15);
}
.user-trigger-name { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  min-width: 250px;
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: drop-in 0.28s var(--ease);
  z-index: 20;
}
@keyframes drop-in { from { opacity: 0; transform: translateY(-10px) scale(0.97); } }
@keyframes drop-epic {
  0%   { opacity: 0; transform: translateX(-50%) translateY(-14px) scale(.9) rotateX(-12deg); filter: blur(4px); }
  60%  { opacity: 1; transform: translateX(-50%) translateY(2px) scale(1.02) rotateX(0); filter: blur(0); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1) rotateX(0); }
}
/* Emoji ve canli baglanti */
.nav-emoji { font-size: 0.95em; line-height: 1; margin-right: 0.15rem; filter: drop-shadow(0 0 4px rgba(245,196,81,.35)); }
.nav-dropdown-head .nav-emoji { font-size: 1rem; margin-right: 0.35rem; }
.nav-link.nav-canli { display: inline-flex; align-items: center; gap: 0.25rem; }
.nav-canli .nav-emoji { animation: canli-nabiz 1.6s ease-in-out infinite; }
@keyframes canli-nabiz {
  0%, 100% { opacity: 1; filter: drop-shadow(0 0 3px rgba(255,60,80,.6)); }
  50%      { opacity: .55; filter: drop-shadow(0 0 9px rgba(255,60,80,.95)); }
}

.user-dropdown-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.7rem 0.75rem 0.9rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.4rem;
}
.user-dropdown-head strong { display: block; font-family: var(--font-ui); font-size: 1rem; }
.user-dropdown-head span { font-size: 0.82rem; color: var(--text-dim); }

.user-dropdown a,
.user-dropdown button {
  display: block;
  width: 100%;
  padding: 0.62rem 0.8rem;
  text-align: left;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-soft);
  background: none;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), padding-left 0.25s var(--ease);
}
.user-dropdown a:hover,
.user-dropdown button:hover {
  background: rgba(245, 196, 81, 0.1);
  color: var(--gold-300);
  padding-left: 1.1rem;
}
.user-dropdown button.danger:hover { background: rgba(255, 95, 109, 0.12); color: #ff9aa4; }

/* Avatar */
.avatar {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  font-family: var(--font-ui);
  font-weight: 700;
  color: #0a0f1e;
  background: linear-gradient(140deg, var(--avatar-accent, #f5c451), #7a5a10);
  border: 2px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 0 18px color-mix(in srgb, var(--avatar-accent, #f5c451) 40%, transparent);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Hamburger */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.nav-burger span {
  display: block;
  height: 2px;
  background: var(--gold-400);
  border-radius: 2px;
  transition: transform 0.35s var(--ease), opacity 0.25s var(--ease);
}
.nav-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.is-open span:nth-child(2) { opacity: 0; }
.nav-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobil menü */
.nav-mobile {
  position: fixed;
  inset: var(--nav-h) 0 0;
  z-index: 880;
  padding: 2rem 1.5rem 3rem;
  background: rgba(4, 7, 18, 0.97);
  backdrop-filter: blur(20px);
  overflow-y: auto;
  display: none;
}
.nav-mobile.is-open { display: block; animation: fade-up 0.35s var(--ease); }
@keyframes fade-up { from { opacity: 0; transform: translateY(-14px); } }

.nav-mobile-group {
  margin: 1.4rem 0 0.3rem;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-500);
}
.nav-mobile-group:first-child { margin-top: 0; }

.nav-mobile ul { list-style: none; padding: 0; margin: 0 0 0.6rem; }
.nav-mobile li { border-bottom: 1px solid var(--line); }
.nav-mobile a {
  display: block;
  padding: 1.15rem 0.4rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--text);
  transition: color 0.25s var(--ease), padding-left 0.3s var(--ease);
}
.nav-mobile a:hover, .nav-mobile a.is-active { color: var(--gold-400); padding-left: 1rem; }
.nav-mobile-actions { display: flex; flex-direction: column; gap: 0.8rem; margin-top: 2rem; }

/* Mobil GPU'larda geniş bulanık katmanlar pahalı — sis kapatılır, aurora azalır */
@media (max-width: 900px) {
  .fx-fog { display: none; }
  .fx-aurora-3 { display: none; }
  .fx-aurora { filter: blur(80px); }
}
@media (prefers-reduced-motion: reduce) {
  .fx-fog { display: none; }
}

@media (max-width: 1040px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav-cta-ghost { display: none; }
}
@media (max-width: 560px) {
  .user-trigger-name { display: none; }
  .brand-text em { letter-spacing: 0.3em; }
}

/* ---------- Alt bilgi ---------- */

.site-footer {
  position: relative;
  margin-top: 5rem;
  padding-top: 4.5rem;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(6, 10, 26, 0.5), rgba(2, 3, 10, 0.95));
  overflow: hidden;
}
.footer-glow {
  position: absolute;
  top: -180px; left: 50%;
  width: 760px; height: 360px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(245, 196, 81, 0.16), transparent 68%);
  filter: blur(40px);
  pointer-events: none;
}

.footer-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 2.5rem;
  padding-bottom: 3rem;
}
.footer-brand p { font-size: 0.94rem; max-width: 38ch; margin-top: 1rem; }

.footer-social { display: flex; gap: 0.6rem; margin-top: 1.4rem; }
.social-btn {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.03);
  transition: transform 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.social-btn:hover {
  transform: translateY(-4px);
  color: var(--gold-300);
  border-color: var(--line-gold);
  box-shadow: 0 8px 22px -8px rgba(245, 196, 81, 0.6);
}

.footer-col h3 {
  font-family: var(--font-ui);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-500);
  margin-bottom: 1.1rem;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.65rem; }
.footer-col a {
  font-size: 0.94rem;
  color: var(--text-soft);
  transition: color 0.25s var(--ease), padding-left 0.25s var(--ease);
}
.footer-col a:hover { color: var(--gold-300); padding-left: 6px; }

.footer-bottom {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2rem;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--line);
}
.footer-bottom p { margin: 0; font-size: 0.85rem; color: var(--text-dim); }
.footer-disclaimer { max-width: 52ch; text-align: right; font-size: 0.78rem; }

@media (max-width: 880px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-disclaimer { text-align: left; }
}
@media (max-width: 520px) {
  .footer-inner { grid-template-columns: 1fr; }
}
