/* melihmandaci.com — ana sayfa
   Animasyonlarin tamami tarayicida calisir; barindirmayla ilgisi yoktur.
   Hareketi kapatmanin iki yolu var ve ikisi de ayni degiskene baglanir:
     - isletim sistemi ayari (prefers-reduced-motion)
     - sayfadaki "Hafif mod" dugmesi (body.lite)                              */

:root {
  --bg: #0b0c0f;
  --ink: #f4f5f7;
  --muted: #9096a2;
  --accent: #e2ff3d;
  --accent-ink: #10130a;
  --wa: #25d366;
  --line: rgba(255, 255, 255, .12);
  --max: 1180px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-loading { overflow: hidden; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.section-label {
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 14px;
}

/* ================= Acilis perdesi ================= */
.curtain {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  display: grid; place-items: center;
  transition: transform 1s var(--ease), opacity .6s ease .35s;
}
.curtain__word {
  font-size: clamp(18px, 4vw, 34px); font-weight: 800; letter-spacing: .3em;
  color: var(--ink); opacity: .9;
  animation: curtainPulse 1.4s ease-in-out infinite;
}
@keyframes curtainPulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

body.is-ready .curtain { transform: translateY(-100%); opacity: 0; pointer-events: none; }

/* ================= Ust menu ================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; gap: 28px;
  padding: 18px clamp(16px, 4vw, 48px);
  transition: background .4s ease, backdrop-filter .4s ease, padding .4s ease;
}
.nav.is-stuck {
  background: rgba(11, 12, 15, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding-top: 12px; padding-bottom: 12px;
}
.nav__brand { font-weight: 800; letter-spacing: .16em; font-size: 18px; }
.nav__links { display: flex; gap: 24px; margin-left: auto; font-size: 14px; color: var(--muted); }
.nav__links a { transition: color .25s; }
.nav__links a:hover { color: var(--ink); }
.nav__cta {
  border: 1px solid var(--line); border-radius: 100px;
  padding: 8px 18px; font-size: 13px; font-weight: 600;
  transition: background .25s, color .25s, border-color .25s;
}
.nav__cta:hover { background: var(--accent); color: var(--accent-ink); border-color: transparent; }

/* ================= HERO ================= */
/* Bolum uzun, icindeki sahne sabit: sayfa kaydikca sahne ILERLIYOR.
   Ilerleme orani JS'te hesaplanip --p (0..1) degiskenine yaziliyor. */
.hero { height: 260vh; position: relative; }

.hero__sticky {
  position: sticky; top: 0; height: 100vh;
  overflow: hidden; display: grid; place-items: center;
}

.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; }

.hero__media { position: absolute; inset: 0; }
.hero__img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 28%;
  /* Perde kalkarken buyuyerek acilir, scroll ilerledikce geri cekilir */
  transform: scale(calc(1.18 - var(--p, 0) * .1));
  filter: saturate(calc(.5 + var(--p, 0) * .5)) contrast(1.05);
  transition: transform .1s linear;
  clip-path: inset(calc((1 - var(--reveal, 0)) * 50%) round 0);
}
.hero__scrim {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 50% 10%, transparent 20%, rgba(11, 12, 15, .55) 70%),
    linear-gradient(180deg, rgba(11, 12, 15, .7) 0%, rgba(11, 12, 15, .25) 35%, rgba(11, 12, 15, .95) 100%);
}

.hero__content {
  position: relative; z-index: 3;
  width: min(var(--max), 92vw); margin: 0 auto;
  text-align: center;
  /* Sahne ilerledikce icerik hafifce yukari kayip soluyor */
  transform: translateY(calc(var(--p, 0) * -60px));
  opacity: calc(1 - var(--p, 0) * 1.15);
}

.hero__eyebrow { margin: 0 0 18px; overflow: hidden; }
.hero__eyebrow span {
  display: inline-block;
  font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: var(--accent);
  transform: translateY(120%);
  transition: transform .9s var(--ease) .55s;
}
body.is-ready .hero__eyebrow span { transform: translateY(0); }

.hero__title {
  margin: 0; font-weight: 800; letter-spacing: -.03em;
  font-size: clamp(38px, 8.2vw, 96px); line-height: .98;
}
.hero__title .line { display: block; overflow: hidden; }
.hero__title .line > span {
  display: block;
  transform: translateY(110%);
  transition: transform 1.05s var(--ease);
}
.hero__title .line:nth-child(1) > span { transition-delay: .65s; }
.hero__title .line:nth-child(2) > span { transition-delay: .76s; }
.hero__title .line:nth-child(3) > span { transition-delay: .87s; }
body.is-ready .hero__title .line > span { transform: translateY(0); }
.hero__title em { font-style: normal; color: var(--accent); }

.hero__lede {
  max-width: 52ch; margin: 24px auto 0; color: var(--muted);
  font-size: clamp(15px, 1.7vw, 18px);
  opacity: 0; transform: translateY(20px);
  transition: opacity .9s ease 1.05s, transform .9s var(--ease) 1.05s;
}
body.is-ready .hero__lede { opacity: 1; transform: none; }

.hero__actions {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 34px;
  opacity: 0; transform: translateY(20px);
  transition: opacity .9s ease 1.2s, transform .9s var(--ease) 1.2s;
}
body.is-ready .hero__actions { opacity: 1; transform: none; }

.hero__scroll {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  z-index: 3; font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted); display: grid; justify-items: center; gap: 8px;
  opacity: calc(1 - var(--p, 0) * 3);
}
.hero__scroll span {
  width: 1px; height: 38px;
  background: linear-gradient(180deg, transparent, var(--accent));
  animation: scrollHint 1.8s ease-in-out infinite;
}
@keyframes scrollHint { 0%, 100% { transform: scaleY(.4); opacity: .4; } 50% { transform: scaleY(1); opacity: 1; } }

/* ================= Dugmeler ================= */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 26px; border-radius: 100px;
  font-weight: 600; font-size: 14px; letter-spacing: .01em;
  border: 1px solid transparent;
  transition: transform .25s var(--ease), background .25s, color .25s, border-color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: #eeff7a; }
.btn--ghost { border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--lg { padding: 17px 34px; font-size: 15px; }

/* ================= Kayan serit ================= */
.marquee {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  overflow: hidden; padding: 18px 0; background: #0e1014;
}
.marquee__track { display: flex; gap: 40px; width: max-content; animation: marquee 26s linear infinite; }
.marquee__track span {
  font-size: clamp(18px, 3vw, 30px); font-weight: 700; letter-spacing: -.01em;
  text-transform: uppercase; color: transparent;
  -webkit-text-stroke: 1px rgba(244, 245, 247, .3);
  white-space: nowrap;
}
@keyframes marquee { to { transform: translateX(calc(-50% - 20px)); } }

/* ================= Sabitlenen ikinci sahne ================= */
.pin { position: relative; }
.pin__sticky {
  min-height: 100vh;
  display: grid; grid-template-columns: 1fr 1fr; align-items: center;
  gap: clamp(24px, 5vw, 72px);
  width: min(var(--max), 92vw); margin: 0 auto;
  padding: clamp(72px, 12vh, 140px) 0;
}
.pin__media { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 3 / 4; }
.pin__img {
  width: 100%; height: 100%; object-fit: cover;
  /* Parallaks: gorsel kendi kabinin icinde scroll'la kayiyor */
  transform: translateY(calc(var(--parallax, 0) * 1px)) scale(1.12);
  will-change: transform;
}
.pin__title {
  margin: 0 0 34px; font-size: clamp(28px, 4.4vw, 52px);
  font-weight: 800; letter-spacing: -.025em; line-height: 1.06;
}
.pin__steps { display: grid; gap: 22px; }
.step { border-top: 1px solid var(--line); padding-top: 18px; display: grid; gap: 6px; }
.step__no { font-size: 12px; color: var(--accent); letter-spacing: .12em; }
.step h3 { margin: 0; font-size: 18px; font-weight: 700; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

/* ================= Sayilar ================= */
.stats { border-top: 1px solid var(--line); background: #0e1014; }
.stats__inner {
  width: min(var(--max), 92vw); margin: 0 auto;
  padding: clamp(56px, 9vh, 96px) 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; text-align: center;
}
.stat { display: grid; gap: 8px; }
.stat__num {
  font-size: clamp(40px, 6vw, 72px); font-weight: 800;
  letter-spacing: -.03em; color: var(--accent); font-variant-numeric: tabular-nums;
}
.stat__label { font-size: 13px; color: var(--muted); letter-spacing: .04em; }

/* ================= Nasil calisiyoruz ================= */
.work__inner { width: min(var(--max), 92vw); margin: 0 auto; padding: clamp(72px, 12vh, 130px) 0; }
.work__title { margin: 0 0 44px; font-size: clamp(28px, 4.4vw, 52px); font-weight: 800; letter-spacing: -.025em; }
.work__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.wcard {
  border: 1px solid var(--line); border-radius: 14px; padding: 26px 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), transparent);
  transition: border-color .3s, transform .3s var(--ease);
}
.wcard:hover { border-color: rgba(226, 255, 61, .45); transform: translateY(-4px); }
.wcard__no {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--accent); color: var(--accent); font-size: 13px; font-weight: 700;
  margin-bottom: 16px;
}
.wcard h3 { margin: 0 0 8px; font-size: 17px; font-weight: 700; }
.wcard p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ================= Iletisim ================= */
.cta { border-top: 1px solid var(--line); background: radial-gradient(80% 120% at 50% 0%, #15181f 0%, var(--bg) 70%); }
.cta__inner {
  width: min(760px, 92vw); margin: 0 auto; text-align: center;
  padding: clamp(80px, 14vh, 150px) 0;
}
.cta__title { margin: 0 0 16px; font-size: clamp(30px, 5vw, 58px); font-weight: 800; letter-spacing: -.03em; line-height: 1.06; }
.cta__lede { margin: 0 0 34px; color: var(--muted); font-size: 16px; }
.cta__note { margin: 22px 0 0; font-size: 13px; color: var(--muted); }
.cta__note a { color: var(--accent); }

/* ================= Alt bilgi ================= */
.foot { border-top: 1px solid var(--line); }
.foot__inner {
  width: min(var(--max), 92vw); margin: 0 auto; padding: 28px 0;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted);
}
.foot__links { display: flex; gap: 20px; }
.foot__links a:hover { color: var(--ink); }

/* ================= Sabit WhatsApp dugmesi ================= */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--wa); color: #05270f;
  padding: 13px 18px; border-radius: 100px; font-weight: 700; font-size: 14px;
  box-shadow: 0 10px 30px rgba(37, 211, 102, .32);
  transform: translateY(120px); opacity: 0;
  transition: transform .55s var(--ease), opacity .45s ease, box-shadow .3s;
}
body.is-ready .wa-float { transform: none; opacity: 1; }
.wa-float:hover { box-shadow: 0 14px 38px rgba(37, 211, 102, .45); }

/* ================= Hafif mod anahtari ================= */
.motion-toggle {
  position: fixed; left: 20px; bottom: 20px; z-index: 90;
  background: rgba(255, 255, 255, .06); color: var(--muted);
  border: 1px solid var(--line); border-radius: 100px;
  padding: 8px 14px; font: inherit; font-size: 12px; cursor: pointer;
  backdrop-filter: blur(8px);
  transition: color .25s, border-color .25s, opacity .4s;
  opacity: 0;
}
body.is-ready .motion-toggle { opacity: .65; }
.motion-toggle:hover { opacity: 1; color: var(--ink); border-color: var(--ink); }
.motion-toggle[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }

/* ================= Kaydirma ile beliren ogeler ================= */
[data-reveal] {
  opacity: 0; transform: translateY(28px);
  transition: opacity .8s ease, transform .8s var(--ease);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ================= Dar ekran ================= */
@media (max-width: 860px) {
  .hero { height: 200vh; }
  .nav__links { display: none; }
  .nav__cta { margin-left: auto; }
  .pin__sticky { grid-template-columns: 1fr; }
  .pin__media { aspect-ratio: 4 / 5; }
  .stats__inner { grid-template-columns: 1fr; gap: 40px; }
  .wa-float__label { display: none; }
  .wa-float { padding: 14px; }
  .motion-toggle { left: 14px; bottom: 16px; }
}

/* ================= Hareket azaltma =================
   Hem isletim sistemi ayarina hem de sayfadaki dugmeye ayni yanit verilir:
   sahne kalir, hareket gider. Hicbir icerik kaybolmaz.                     */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body.lite .hero { height: 100vh; }
body.lite .hero__canvas { display: none; }
body.lite .hero__img { transform: none; clip-path: none; filter: none; transition: none; }
body.lite .hero__content { transform: none; opacity: 1; }
body.lite .marquee__track { animation: none; }
body.lite .pin__img { transform: scale(1.02); }
body.lite .curtain { display: none; }
body.lite .hero__scroll { opacity: .6; }
body.lite .hero__scroll span { animation: none; }
body.lite .curtain__word { animation: none; }
body.lite [data-reveal] { opacity: 1; transform: none; transition: none; }
body.lite .hero__eyebrow span,
body.lite .hero__title .line > span { transform: none; transition: none; }
body.lite .hero__lede,
body.lite .hero__actions { opacity: 1; transform: none; transition: none; }
body.lite .wa-float { transform: none; opacity: 1; transition: none; }
body.lite * { scroll-behavior: auto; }
