/* listemde.app ana sayfası. Yasal sayfalar styles.css kullanmaya devam eder.
 *
 * Kaydırmaya bağlı sahneler: her [data-scene] kendi yüksekliği boyunca
 * ekrana yapışan bir .stage taşır; site.js sahnenin 0–1 ilerlemesini
 * --p olarak yazar ve bütün hareket bu tek değerden CSS ile türetilir.
 */

:root {
  color-scheme: dark;
  --black: #000;
  --ink: #f5f5f7;
  --gray: #86868b;
  --gray-2: #a1a1a6;
  --line: rgba(255, 255, 255, 0.12);
  --purple: #8a6bff;
  --pink: #e65bac;
  --solved: #2e9e5b;
  --flame: #ff7a1a;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--black);
  color: var(--ink);
  font: 19px/1.47 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Helvetica Neue", sans-serif;
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

.display {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Helvetica Neue", sans-serif;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.grad {
  background: linear-gradient(90deg, #b8a5ff, var(--pink) 60%, #ffb38a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Üst bar ---------- */

.top {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  height: 48px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.top .inner {
  width: min(1000px, calc(100% - 44px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  letter-spacing: -0.01em;
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; font-size: 17px; }
.brand img { width: 24px; height: 24px; border-radius: 6px; }
.top nav { display: flex; align-items: center; gap: 28px; }
.top nav a { text-decoration: none; color: #d2d2d7; opacity: 0.85; transition: opacity 0.2s; }
.top nav a:hover { opacity: 1; }
.top nav .pill { padding: 5px 13px; border-radius: 999px; background: #0071e3; color: #fff; opacity: 1; }

/* ---------- Ortak ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.3s var(--ease-out), background 0.3s;
}
.btn:hover { transform: scale(1.03); }
.btn-blue { background: #0071e3; color: #fff; }
.btn-blue:hover { background: #0077ed; }
.btn-line { border: 1px solid rgba(255, 255, 255, 0.35); color: var(--ink); }
.btn svg { width: 20px; height: 20px; }
.btn span { text-align: left; line-height: 1.1; }
.btn small { display: block; font-size: 11px; opacity: 0.75; }
.stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

.link-arrow { color: #2997ff; text-decoration: none; font-size: 19px; }
.link-arrow:hover { text-decoration: underline; }

/* Kaydırma sahnesi: yükseklik kadar kaydırma, ekrana yapışan sahne. */
[data-scene] { position: relative; --p: 0; }
.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

/* Telefon */
.phone {
  position: relative;
  aspect-ratio: 1320 / 2868;
  padding: 2.4%;
  border-radius: 14% / 6.5%;
  background: linear-gradient(150deg, #3a3a3f, #111 55%);
  box-shadow:
    0 0 0 1.5px #2b2b2f inset,
    0 50px 120px rgba(0, 0, 0, 0.8);
}
.phone .screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 12% / 5.6%;
  overflow: hidden;
  background: #000;
}
.phone .screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.phone::after {
  content: "";
  position: absolute;
  top: 4.2%;
  left: 50%;
  width: 30%;
  height: 3.2%;
  border-radius: 99px;
  background: #000;
  transform: translateX(-50%);
}

/* ---------- 1. Hero ---------- */

.hero { height: 240vh; }
.hero .stage { display: grid; place-items: center; }

.hero-glow {
  position: absolute;
  inset: auto -20% -30% -20%;
  height: 90%;
  background:
    radial-gradient(closest-side at 35% 60%, rgba(138, 107, 255, 0.55), transparent),
    radial-gradient(closest-side at 70% 55%, rgba(230, 91, 172, 0.4), transparent);
  filter: blur(40px);
  opacity: calc(0.25 + var(--p) * 0.9);
  transform: translateY(calc((1 - var(--p)) * 20%));
}

.hero-copy {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 0 24px;
  /* Kaydırdıkça geri çekilip söner. */
  opacity: clamp(0, calc(1 - var(--p) * 2.4), 1);
  transform: scale(calc(1 - var(--p) * 0.18)) translateY(calc(var(--p) * -14vh));
  filter: blur(calc(var(--p) * 14px));
}
.hero-copy .eyebrow { color: var(--gray-2); font-size: 21px; font-weight: 600; margin: 0 0 6px; }
.hero-copy h1 { font-size: clamp(56px, 10vw, 128px); margin: 0; }
.hero-copy p { color: var(--gray-2); font-size: clamp(19px, 2.2vw, 26px); margin: 22px auto 34px; max-width: 640px; font-weight: 500; }
.scroll-hint {
  margin-top: 48px;
  color: var(--gray);
  font-size: 13px;
  animation: hint 2.4s var(--ease) infinite;
}
@keyframes hint { 50% { transform: translateY(6px); opacity: 0.5; } }

.hero-phone {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(360px, 66vw);
  /* Aşağıdan yükselip ekranın ortasına oturur. */
  transform:
    translateX(-50%)
    translateY(calc(70% - min(var(--p) * 1.5, 1) * 82%))
    scale(calc(0.86 + min(var(--p) * 1.5, 1) * 0.14));
}

/* ---------- 2. Hikâye ---------- */

.story { height: 560vh; }
.story .stage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  /* Sahne tam genişlik; ışıma kenarda kesilmesin, içerik ortada kalsın. */
  padding-inline: max(22px, calc((100% - 1040px) / 2));
}
.story .stage > * { min-width: 0; }

.steps { position: relative; height: 60vh; }
.step {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  transform: translateY(40px);
  filter: blur(6px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out), filter 0.7s var(--ease-out);
  pointer-events: none;
}
.step.on { opacity: 1; transform: none; filter: none; pointer-events: auto; }
.step.past { transform: translateY(-40px); }
.step .kicker { font-size: 17px; font-weight: 600; color: var(--tint); margin: 0 0 10px; }
.step h2 { font-size: clamp(36px, 4.8vw, 56px); margin: 0 0 18px; }
.step p { color: var(--gray-2); font-size: 21px; margin: 0; max-width: 460px; }

.story-phone {
  justify-self: center;
  width: min(330px, 30vw);
  /* Adımlar arasında hafif dönüş ve süzülme. */
  transform:
    perspective(1400px)
    rotateY(calc(sin(var(--p) * 12.566rad) * 9deg))
    rotateX(calc(cos(var(--p) * 12.566rad) * 3deg))
    translateY(calc(sin(var(--p) * 25.13rad) * 10px));
}
.story-phone .screen img {
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 0.6s var(--ease), transform 1.1s var(--ease-out);
}
.story-phone .screen img.on { opacity: 1; transform: none; }

.story-glow {
  position: absolute;
  width: 46vw;
  aspect-ratio: 1;
  right: 2vw;
  top: 50%;
  border-radius: 50%;
  background: var(--glow, var(--purple));
  filter: blur(120px);
  opacity: 0.32;
  transform: translateY(-50%);
  transition: background 0.8s var(--ease);
}

.progress {
  position: absolute;
  left: 50%;
  bottom: 34px;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}
.progress i {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.25);
  transition: width 0.4s var(--ease-out), background 0.4s;
}
.progress i.on { width: 28px; background: var(--ink); }

/* ---------- 3. Kelime kelime metin ---------- */

.words { height: 260vh; }
.words .stage { display: grid; place-items: center; }
.words p {
  width: min(980px, calc(100% - 44px));
  margin: 0;
  font-size: clamp(36px, 6vw, 80px);
  text-align: left;
}
.words .w {
  /* --i/--n: kelimenin sırası; ilerleme o kelimeye gelince yanar. */
  opacity: clamp(0.14, calc((var(--p) * 1.25 * var(--n) - var(--i)) * 0.9), 1);
  transition: opacity 0.12s linear;
}
.words .accent { color: transparent; background: linear-gradient(90deg, #b8a5ff, var(--pink)); -webkit-background-clip: text; background-clip: text; }

/* ---------- 4. Ülkele ---------- */

.ulkele { height: 460vh; }
.ulkele .stage { display: grid; place-items: center; }
.ulkele-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  align-items: center;
  gap: 44px;
  width: min(1100px, calc(100% - 44px));
}
.ulkele-grid { position: relative; }
.ulkele-grid > * { min-width: 0; }
.ulkele-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 70% 50%, rgba(198, 40, 40, calc(0.08 + var(--p) * 0.22)), transparent),
    linear-gradient(180deg, #000, #0a0f24 30%, #140a2a 70%, #000);
}
.ulkele .kicker { color: var(--flame); font-weight: 600; font-size: 17px; margin: 0 0 10px; }
.ulkele h2 { font-size: clamp(40px, 5vw, 64px); margin: 0 0 18px; }
.ulkele .copy p { color: var(--gray-2); font-size: 20px; margin: 0 0 26px; }

.meter { margin: 6px 0 22px; }
.meter .row { display: flex; justify-content: space-between; color: var(--gray); font-size: 13px; margin-bottom: 8px; }
.meter .bar {
  position: relative;
  height: 8px;
  border-radius: 99px;
  background: linear-gradient(90deg, #fff4e6, #fcddb0, #f9a94b, #ef6c3a, #c62828, #7f0000);
}
.meter .dot {
  position: absolute;
  top: 50%;
  left: calc(var(--warm, 0) * 100%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--dot, #fff4e6);
  border: 3px solid #000;
  transform: translate(-50%, -50%);
  transition: left 0.8s cubic-bezier(0.34, 1.4, 0.64, 1), background 0.5s;
}
.status { display: flex; align-items: baseline; gap: 14px; }
.status strong { font-size: 30px; font-weight: 700; }
.status span { color: var(--gray); font-size: 15px; }

.map-frame {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: #10151d;
  box-shadow: 0 0 0 1px var(--line), 0 60px 140px rgba(0, 0, 0, 0.7);
}
.ulkele-map {
  display: block;
  width: 100%;
  height: auto;
  /* Kaydırdıkça İtalya'ya yakınlaşır. */
  transform-origin: 35% 55%;
  transform: scale(calc(1 + var(--p) * 0.55));
}
.ulkele-map path {
  fill: #232a34;
  stroke: rgba(255, 255, 255, 0.09);
  stroke-width: 0.6;
  stroke-linejoin: round;
  transition: fill 0.5s var(--ease);
}
.ulkele-map .g.on { fill: var(--c); animation: flash 0.9s var(--ease-out); }
.ulkele-map .answer.on { fill: var(--solved); animation: flash 0.9s var(--ease-out), glow 1.8s ease-in-out 0.9s infinite; }
@keyframes flash { 0% { fill: #fff; } 100% { fill: var(--c, var(--solved)); } }
@keyframes glow { 50% { filter: drop-shadow(0 0 8px rgba(46, 158, 91, 0.95)); } }

.guess-tag {
  position: absolute;
  left: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: 16px;
  transition: opacity 0.3s;
}
.guess-tag i { width: 12px; height: 12px; border-radius: 50%; background: var(--c, #fff); }
.guess-tag em { font-style: normal; color: var(--gray); font-weight: 500; }
.guess-tag.found em { color: var(--solved); }

/* ---------- 5. Kapanış ---------- */

.finale { height: 200vh; }
.finale .stage { display: grid; place-content: center; text-align: center; padding: 0 24px; }
.finale .icon {
  width: 120px;
  height: 120px;
  margin: 0 auto 30px;
  border-radius: 27px;
  box-shadow: 0 30px 80px rgba(138, 107, 255, calc(var(--p) * 0.7));
  transform: scale(calc(0.4 + min(var(--p) * 1.6, 1) * 0.6)) rotate(calc((1 - min(var(--p) * 1.6, 1)) * -18deg));
  opacity: clamp(0, calc(var(--p) * 2.5), 1);
}
.finale h2 { font-size: clamp(48px, 8vw, 96px); margin: 0 0 16px; }
.finale p { color: var(--gray-2); font-size: 21px; margin: 0 auto 34px; max-width: 520px; }
.finale .fade { opacity: clamp(0, calc(var(--p) * 2.4 - 0.5), 1); transform: translateY(calc((1 - min(var(--p) * 2, 1)) * 30px)); }

footer {
  border-top: 1px solid var(--line);
  padding: 26px 0 40px;
  color: var(--gray);
  font-size: 12px;
}
footer .inner { width: min(1000px, calc(100% - 44px)); margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; }
footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Mobil ---------- */

@media (max-width: 820px) {
  .top nav a:not(.pill) { display: none; }

  .story .stage {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
    align-items: end;
    gap: 0;
    padding: 64px 22px;
  }
  .story-phone { width: min(250px, 58vw); align-self: center; grid-row: 1; }
  .steps { grid-row: 2; height: 210px; text-align: center; }
  .step { align-items: center; justify-content: flex-start; }
  .step h2 { font-size: 32px; margin-bottom: 10px; }
  .step p { font-size: 17px; }
  .story-glow { width: 90vw; right: 5vw; top: 38%; }
  .progress { bottom: 22px; }

  .ulkele-grid { grid-template-columns: 1fr; gap: 22px; text-align: center; }
  .ulkele .copy p { display: none; }
  .ulkele h2 { font-size: 34px; }
  .status { justify-content: center; }
}

/* Hareketi azalt: sahneler sabitlenmez, her şey son hâlinde görünür. */
@media (prefers-reduced-motion: reduce) {
  [data-scene] { height: auto !important; --p: 1 !important; }
  .stage { position: relative; height: auto; min-height: 100vh; padding: 90px 0; }
  .hero-copy { position: relative; opacity: 1; transform: none; filter: none; height: auto; padding-top: 40px; }
  .hero-phone { position: relative; left: auto; transform: none; margin: 40px auto 0; }
  .step { position: relative; opacity: 1; transform: none; filter: none; margin-bottom: 40px; }
  .steps { height: auto; }
  .ulkele-map .g { fill: var(--c); }
  .ulkele-map .answer { fill: var(--solved); }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
