/* =====================================================
   ANET – COMING SOON  |  style.css
   Tasarım: Koyu lacivert + Turuncu/Sarı vinç teması
   ===================================================== */

/* ---------- RESET & TEMEL ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-deep: #0f172a;
  --bg-mid: #1e293b;
  --bg-surface: #263348;
  --crane-orange: #f97316;
  --crane-yellow: #fbbf24;
  --crane-dark: #c2550a;
  --text-primary: #e2e8f0;
  --text-muted: #94a3b8;
  --accent-glow: #f97316aa;
  --letter-color: #f8fafc;
  --letter-shadow: #fbbf24;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
}

/* ---------- ARKA PLAN ---------- */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Işık halkaları */
.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.18;
  animation: glowDrift 18s ease-in-out infinite alternate;
}

.glow-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #f97316, transparent 70%);
  top: -150px;
  left: -100px;
  animation-duration: 20s;
}

.glow-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #6366f1, transparent 70%);
  bottom: -100px;
  right: -80px;
  animation-duration: 24s;
  animation-delay: -8s;
}

@keyframes glowDrift {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(60px, 40px) scale(1.1);
  }

  100% {
    transform: translate(-30px, 80px) scale(0.95);
  }
}

/* Şehir silüeti */
.skyline {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  opacity: 0.85;
}

/* ---------- VİNÇ SAHNESİ ---------- */
.crane-scene {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  /* Vinç kule yüksekliği kadar: sahne tam ekran */
  height: 100%;
  z-index: 10;
  pointer-events: none;
  overflow: visible;
}

/* Vinç – JS tarafından konumlandırılır */
.crane {
  position: absolute;
  bottom: 0;
  /* kule tabana otursun */
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 260px;
  transition: left 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: left;
}

/* Kule */
.crane-tower {
  position: relative;
  left: 60px;
  /* jib'in altında ortalanmış */
  width: 28px;
  height: 220px;
  flex-shrink: 0;
}

.crane-tower-body {
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, var(--crane-orange), var(--crane-dark));
  border-radius: 3px 3px 0 0;
}

/* Kafes deseni */
.crane-tower-lattice {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.lattice-x {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(45deg,
      transparent,
      transparent 10px,
      rgba(0, 0, 0, 0.25) 10px,
      rgba(0, 0, 0, 0.25) 12px);
}

.lattice-x.r {
  background: repeating-linear-gradient(-45deg,
      transparent,
      transparent 10px,
      rgba(0, 0, 0, 0.25) 10px,
      rgba(0, 0, 0, 0.25) 12px);
}

/* Yatay kol (Jib) */
.crane-jib {
  position: relative;
  width: 240px;
  height: 22px;
  order: -1;
  /* kulenin üstüne çek */
  margin-left: 48px;
  /* kule merkezine hizala */
}

.crane-jib-body {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 18px;
  background: linear-gradient(to bottom, var(--crane-yellow), var(--crane-orange));
  border-radius: 2px;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

/* Karşı ağırlık kolu (sol) */
.crane-counterjib {
  position: absolute;
  right: 100%;
  top: 0;
  width: 70px;
  height: 14px;
  background: linear-gradient(to bottom, var(--crane-orange), var(--crane-dark));
  border-radius: 2px;
  transform-origin: right top;
}

/* Makine kabini (jib kök noktasına yakın) */
.crane-cab {
  position: absolute;
  left: 0;
  top: 14px;
  width: 34px;
  height: 22px;
  background: var(--crane-orange);
  border: 2px solid var(--crane-yellow);
  border-radius: 3px;
}

/* Araba (trolley) – jib üzerinde kayar */
.crane-trolley {
  position: absolute;
  top: 10px;
  left: 20px;
  /* başlangıç; JS günceller */
  width: 16px;
  height: 10px;
  background: var(--crane-dark);
  border-radius: 2px;
  transition: left 1.2s cubic-bezier(0.45, 0, 0.55, 1);
  will-change: left;
}

/* Halat */
.crane-rope {
  position: absolute;
  left: 50%;
  top: 10px;
  transform: translateX(-50%);
  width: 2px;
  background: linear-gradient(to bottom, #94a3b8, #64748b);
  height: 0;
  /* JS ile ayarlanır */
  transform-origin: top center;
  transition: height 0.6s cubic-bezier(0.4, 0, 0.6, 1);
  will-change: height;
}

/* Kanca sarmalayıcısı – salınım için */
.crane-hook-wrap {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 100%;
  /* halatın altı */
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: top center;
}

/* Kanca */
.crane-hook {
  display: flex;
  flex-direction: column;
  align-items: center;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.hook-body {
  width: 10px;
  height: 16px;
  background: #94a3b8;
  border-radius: 2px 2px 0 0;
  border: 1px solid #64748b;
}

.hook-tip {
  width: 18px;
  height: 12px;
  border: 3px solid #94a3b8;
  border-top: none;
  border-radius: 0 0 10px 10px;
}

/* Kancaya bağlı harf */
.hook-letter {
  margin-top: 6px;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  font-family: 'Arial Black', 'Arial Bold', 'Impact', sans-serif;
  letter-spacing: 0.05em;
  color: var(--letter-color);
  text-shadow:
    0 0 20px var(--crane-yellow),
    0 0 40px var(--crane-orange),
    3px 3px 0 rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.25s;
  will-change: opacity;
  line-height: 1;
  padding: 8px 14px;
  background: rgba(15, 23, 42, 0.5);
  border: 2px solid var(--crane-orange);
  border-radius: 6px;
  backdrop-filter: blur(4px);
}

.hook-letter.visible {
  opacity: 1;
}

/* ---------- SALLANIM ANİMASYONU ---------- */
.swinging {
  animation: swingPendulum 1.4s ease-in-out infinite alternate;
}

@keyframes swingPendulum {
  0% {
    transform: translateX(-50%) rotate(-5deg);
  }

  100% {
    transform: translateX(-50%) rotate(5deg);
  }
}

/* Hızlı salınım (harf bırakıldıktan sonra) */
.swing-fast {
  animation: swingFast 0.4s ease-in-out 3 alternate;
}

@keyframes swingFast {
  0% {
    transform: translateX(-50%) rotate(-8deg);
  }

  100% {
    transform: translateX(-50%) rotate(8deg);
  }
}

/* ---------- ANA İÇERİK ---------- */
.main-content {
  position: relative;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 3vh, 2rem);
  padding: 2rem;
  width: 100%;
}

/* ---------- HARF YUVALAR ---------- */
.letters-stage {
  display: flex;
  gap: clamp(8px, 2vw, 24px);
  align-items: flex-end;
  position: relative;
}

.letter-slot {
  position: relative;
  width: clamp(70px, 14vw, 140px);
  height: clamp(80px, 16vw, 160px);
  display: flex;
  align-items: center;
  justify-content: center;
  /* Zemin plakaları */
  border-bottom: 4px solid var(--bg-surface);
  /* Boş yuva göstergesi */
  background: rgba(30, 41, 59, 0.3);
  border-radius: 6px 6px 2px 2px;
  backdrop-filter: blur(2px);
  overflow: visible;
}

/* Boş yuva – hafif çerçeve */
.letter-slot::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px dashed rgba(148, 163, 184, 0.15);
  border-radius: 6px 6px 2px 2px;
  transition: border-color 0.4s;
}

/* Harf geldikten sonra çerçeveyi gizle */
.letter-slot.filled::before {
  border-color: transparent;
}

/* Asıl harf karakteri */
.letter-char {
  font-size: clamp(4rem, 12vw, 9rem);
  font-weight: 900;
  font-family: 'Arial Black', 'Arial Bold', 'Impact', sans-serif;
  letter-spacing: -0.02em;
  color: transparent;
  /* Metni sıfırdan gelecek şekilde hazırla */
  opacity: 0;
  transform: translateY(-30px) scale(0.8);
  transition:
    opacity 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
    transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: opacity, transform;
  position: relative;
  z-index: 2;
  /* Degrade metin rengi */
  background: linear-gradient(170deg,
      #f8fafc 0%,
      #e2e8f0 40%,
      #fbbf24 100%);
  -webkit-background-clip: text;
  background-clip: text;
  line-height: 1;
  filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.0));
  transition:
    opacity 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
    transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
    filter 0.5s;
}

/* Harf görünür & yerleşti */
.letter-slot.filled .letter-char {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: drop-shadow(0 0 18px rgba(251, 191, 36, 0.55));
}

/* İnişte titreşim */
.letter-slot.landing .letter-char {
  animation: letterLand 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes letterLand {
  0% {
    transform: translateY(-20px) scale(1.1);
  }

  40% {
    transform: translateY(6px) scale(0.95);
  }

  70% {
    transform: translateY(-4px) scale(1.02);
  }

  100% {
    transform: translateY(0) scale(1);
  }
}

/* Zeminde toz / çarpma efekti */
.letter-slot::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 80%;
  height: 4px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(249, 115, 22, 0.6) 0%, transparent 70%);
  transition: transform 0.3s ease-out, opacity 0.5s;
  opacity: 0;
}

.letter-slot.landing::after {
  transform: translateX(-50%) scaleX(1);
  opacity: 1;
}

.letter-slot.filled::after {
  opacity: 0;
  transition: opacity 0.8s ease 0.5s;
}

/* ---------- PARLAKLAMA OVERLAY ---------- */
.letters-flash {
  position: absolute;
  inset: -40px;
  border-radius: 20px;
  background: radial-gradient(ellipse at center, rgba(251, 191, 36, 0.7), transparent 70%);
  opacity: 0;
  pointer-events: none;
  z-index: 30;
}

.letters-flash.flash {
  animation: bigFlash 1.2s ease-out forwards;
}

@keyframes bigFlash {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }

  20% {
    opacity: 0.9;
    transform: scale(1.05);
  }

  60% {
    opacity: 0.4;
    transform: scale(1.1);
  }

  100% {
    opacity: 0;
    transform: scale(1.2);
  }
}

/* ---------- ALT SLOGAN ---------- */
.tagline {
  text-align: center;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1s ease 0.3s, transform 1s ease 0.3s;
  will-change: opacity, transform;
}

.tagline.visible {
  opacity: 1;
  transform: translateY(0);
}

.tagline-main {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.tagline-sub {
  font-size: clamp(0.75rem, 1.5vw, 0.95rem);
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* ---------- ALT ÇUBUK ---------- */
.bottom-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transition: opacity 1s ease 0.8s;
}

.bottom-bar.visible {
  opacity: 1;
}

.bar-line {
  width: clamp(40px, 8vw, 100px);
  height: 1px;
  background: linear-gradient(to right, transparent, var(--text-muted), transparent);
}

.bar-dot {
  width: 5px;
  height: 5px;
  background: var(--crane-orange);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--crane-orange);
}

.bar-label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 600px) {
  .letters-stage {
    gap: 6px;
  }

  .crane-jib {
    width: 160px;
  }

  .crane-counterjib {
    width: 50px;
  }

  .crane-tower {
    height: 160px;
  }
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}