/* ==========================================================================
   Kanatçı Serdem · hero.css  ·  tabelanın yanışı

   Katmanlar (.hero__sahne): fotoğraf · perde · neon.
   Katmanlar aynı orandaki kutuda durduğu için konumlar yüzdeyle birebir oturur.
   Tam açılış yalnızca oturumun ilk sayfasında oynar (.ilk).
   ========================================================================== */

.hero { --oran: 1717 / 916; position: relative; overflow: clip; isolation: isolate; background: #14101a; }
.hero__sahne { position: absolute; z-index: -2; transform-origin: 78% 46%; }
.hero__taban, .hero__taban img, .hero__perde, .hero__neon { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero__taban img { object-fit: cover; max-width: none; }
.hero__neon { background: center / 100% 100% no-repeat; pointer-events: none; }
.hero__perde { background: #08070c; opacity: 0; pointer-events: none; }
.hero__neon { mix-blend-mode: screen; opacity: var(--neon, 0); transition: opacity .6s; }
.hero__ic { position: relative; }
.hero h1 { font-size: var(--h1); line-height: 1.08; letter-spacing: -.038em; text-shadow: 0 1px 24px rgb(10 8 14 / .35); }
.hero__alt { margin-top: 1.125rem; max-width: 28rem; color: #efebe6; font-size: var(--govde-b); line-height: 1.6; text-wrap: balance; }
.hero .dugme-sira { margin-top: 1.75rem; }
.hero .dugme--cizgi { border-color: rgb(255 255 255 / .55); }

/* ---------- Mobil: tabelaya odaklı kadraj ---------- */
@media (max-width: 1023px) {
  .hero { padding-top: calc(3.25rem + 118vw); background: #0e0b12; }
  .hero__sahne { --amblem: ellipse(9% 9.5% at 42.8% 28.2%); left: -25vw; top: 3.25rem; width: 132vw; aspect-ratio: 807 / 916; -webkit-mask-image: linear-gradient(#0000, #000 17%, #000 60%, #0000 84%); mask-image: linear-gradient(#0000, #000 17%, #000 60%, #0000 84%); transform-origin: 50% 40%; }
  .hero__metin { padding-block: 0 var(--a5); }
  .hero__neon { background-image: url("../images/hero/kanatci-serdem-tabela-isik-mobil.webp"); background-image: image-set(url("../images/hero/kanatci-serdem-tabela-isik-mobil.avif") type("image/avif"), url("../images/hero/kanatci-serdem-tabela-isik-mobil.webp") type("image/webp")); }
  .hero .dugme-sira .dugme { flex: 1 1 auto; padding-inline: 1rem; white-space: nowrap; }
}
@media (min-width: 600px) and (max-width: 1023px) {
  .hero { padding-top: calc(3rem + 74vw); }
  .hero__sahne { left: 0; width: 100vw; top: 3rem; }
  .hero__metin { padding-bottom: var(--a8); }
  .hero .dugme-sira .dugme { flex: 0 0 auto; padding-inline: 1.625rem; }
}

/* ---------- Masaüstü: tam kadraj ---------- */
@media (min-width: 1024px) {
  .hero { --hy: clamp(43rem, calc(100svh - 5rem), min(62rem, 56vw)); min-height: var(--hy); display: grid; align-items: end; }
  .hero__sahne { --amblem: ellipse(4.2% 9.5% at 65.3% 28.2%); right: 0; top: 0; width: max(100%, calc(var(--hy) * 1.8745)); aspect-ratio: var(--oran); }
  .hero__neon { background-image: url("../images/hero/kanatci-serdem-tabela-isik.webp"); background-image: image-set(url("../images/hero/kanatci-serdem-tabela-isik.avif") type("image/avif"), url("../images/hero/kanatci-serdem-tabela-isik.webp") type("image/webp")); }
  .hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, rgb(12 9 16 / .62) 0, rgb(12 9 16 / .4) 28%, rgb(12 9 16 / 0) 50%), linear-gradient(0deg, rgb(12 9 16 / .7), rgb(12 9 16 / .28) 26%, rgb(12 9 16 / 0) 44%), linear-gradient(180deg, rgb(12 9 16 / .38), rgb(12 9 16 / 0) 24%); }
  .hero__metin { width: 43%; padding-block: 14rem clamp(3.5rem, 8.5vh, 7rem); }
  .hero h1 { font-size: clamp(2.75rem, 1.2rem + 3.1vw, 4.9rem); }
  .hero__alt { margin-top: 1.5rem; }
  .hero .dugme-sira { margin-top: 2.25rem; }
}

/* Telefon: dosya yalnızca görünen alanı içerir; kutudaki yeri kırpımla aynıdır (923,0 618×770 / 773,0 807×916) */
@media (max-width: 599px) { .hero__taban { inset: 0 auto auto 18.587%; width: 76.58%; height: 84.061%; } }

/* ---------- Hareket ---------- */
.motion .hero__sahne { translate: 0 calc(var(--p, 0) * 5rem); animation: sahne-otur 1.1s var(--e-cik); }
.motion .hero__metin { translate: calc(var(--fx, 0) * 5px) calc(var(--p, 0) * 2.5rem); opacity: calc(1 - var(--p, 0) * 1.2); }
.motion .hero__perde { animation: perde-kisa .7s ease-out; }
@keyframes sahne-otur { from { scale: 1.05; } }
@keyframes perde-kisa { from { opacity: .45; } }
@media (min-width: 1024px) {
  /* Payı ölçekle değil kutuyla ver: fotoğraf duruşta ikinci kez örneklenmez, net kalır */
  .motion :is(.hero__taban, .hero__neon) { inset: -1%; width: 102%; height: 102%; translate: calc(var(--fx, 0) * -6px) calc(var(--fy, 0) * -4px); }
}
@media (max-width: 1023px) { .motion .hero__metin { opacity: 1; translate: none; } .motion .hero__sahne { translate: 0 calc(var(--p, 0) * 2rem); } }

/* Tabelanın yanışı: amblem, sonra yazı soldan sağa, sonra bütün sahne */
.motion.ilk .hero__sahne { animation: sahne-ac 2.6s cubic-bezier(.16, 1, .3, 1); }
.motion.ilk .hero__perde { animation: perde-ac 1.5s .95s cubic-bezier(.4, 0, .2, 1) backwards; }
.motion.ilk .hero__neon { animation: neon-don 1.2s 2.1s ease-out forwards; opacity: 1; }
.motion.ilk .hero__neon--amblem { clip-path: var(--amblem); animation: amblem-yan .85s .2s backwards, neon-don 1.2s 2.1s ease-out forwards; }
.motion.ilk .hero__neon--yazi { animation: yazi-yan .95s .6s cubic-bezier(.65, 0, .35, 1) backwards, neon-don 1.2s 2.1s ease-out forwards; }
@keyframes sahne-ac { from { scale: 1.14; } }
@keyframes perde-ac { from { opacity: .93; } }
@keyframes amblem-yan { 0% { opacity: 0; } 16% { opacity: .85; } 26% { opacity: .2; } 46% { opacity: 1; } 58% { opacity: .55; } 72%, 100% { opacity: 1; } }
@keyframes yazi-yan { from { clip-path: polygon(20% 0, 34% 0, 22% 100%, 8% 100%); } to { clip-path: polygon(-10% 0, 140% 0, 128% 100%, -22% 100%); } }
@keyframes neon-don { to { opacity: var(--neon, 0); } }

/* Metin sahneyle birlikte, ama onu beklemeden */
.motion.ilk .hero .kelime > span { animation-delay: calc(.5s + var(--k, 0) * 85ms); }
.motion.ilk .hero__alt { animation-delay: .95s; }
.motion.ilk .hero .dugme-sira { animation-delay: 1.1s; }
