/* "Nasıl" bölümü — üç adım, her biri küçük bir canlandırmayla (2026-10-02).
   01 oda: arkadaşın odaya gelir, aynı frekansa bağlanırsınız; mikrofonu kapalı
   arkadaş da sayılır. 02 kor: konuştukça sayaç artar, günlük çubuk 60'a dolar.
   03 dükkân: imleç RaidCall Feneri'ni seçer, bakiye düşer, ürün senin olur.
   Sahnelerde dil metni yok (yalnız sayı ve simge) — 9 dilde aynen çalışır. */

@property --hw-n { syntax: '<integer>'; inherits: false; initial-value: 41; }

.how.how-flow { display: block; padding: 40px 0 56px; }
.how-flow .steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.how-flow .steps article.step {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(160deg, #1f1727, #100e18 72%);
  border: 1px solid #3c2e3e;
  border-radius: 12px;
}
.how-flow .step-copy { padding: 18px 20px 22px; }
.how-flow .step-no { color: #d59a63; font-size: 11px; font-weight: 600; letter-spacing: 1.5px; }
.how-flow .steps h3 { margin: 6px 0 0; }
.how-flow .steps p { margin: 8px 0 0; }

.how-flow .scene {
  position: relative;
  height: 170px;
  overflow: hidden;
  direction: ltr;
  background:
    radial-gradient(60% 70% at 50% 42%, rgba(255, 174, 97, 0.1), transparent 70%),
    linear-gradient(180deg, #1a1422, #120f19);
  border-bottom: 1px solid rgba(237, 198, 152, 0.1);
}
.how-flow .scene > * { position: absolute; }

/* ── 01 · Oda ─────────────────────────────────────────────────────────── */
.step-room .room-ring {
  top: 50%;
  left: 50%;
  width: 150px;
  height: 150px;
  margin: -75px 0 0 -75px;
  border: 1px dashed rgba(255, 174, 97, 0.28);
  border-radius: 50%;
  animation: hwRing 40s linear infinite;
}
.step-room .av {
  top: 50%;
  left: 50%;
  width: 52px;
  height: 52px;
  margin-top: -26px;
  background: radial-gradient(circle at 50% 30%, #4a3a58, #231a2d 70%);
  border: 2px solid #5b4466;
  border-radius: 50%;
}
/* Siluet: baş + omuz */
.step-room .av::before,
.step-room .av::after { position: absolute; left: 50%; content: ''; background: rgba(249, 241, 230, 0.55); }
.step-room .av::before { top: 11px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; }
.step-room .av::after { bottom: 7px; width: 28px; height: 12px; margin-left: -14px; border-radius: 14px 14px 4px 4px; }
.step-room .av-you { margin-left: -74px; animation: hwTalk 1.6s ease-out infinite; }
.step-room .av-friend { margin-left: 22px; opacity: 0; animation: hwArrive 7s cubic-bezier(0.2, 0.8, 0.2, 1) infinite; }
/* Mikrofonu kapalı arkadaş da sayılır — küçük çizgili mikrofon. */
.step-room .muted-mic {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 18px;
  height: 18px;
  background: #2a2031;
  border: 1.5px solid #8a6f93;
  border-radius: 50%;
}
.step-room .muted-mic::before {
  position: absolute;
  top: 3px;
  left: 6px;
  width: 4px;
  height: 7px;
  content: '';
  border: 1.5px solid #d8c8de;
  border-radius: 3px;
}
.step-room .muted-mic::after {
  position: absolute;
  top: 7px;
  left: 2px;
  width: 12px;
  height: 1.5px;
  content: '';
  background: #ff8f73;
  transform: rotate(-45deg);
}
/* Aynı frekans: iki avatar arasında akan ses dalgası */
.step-room .link { top: 50%; left: 50%; display: flex; gap: 2px; margin: -9px 0 0 -15px; opacity: 0; animation: hwLink 7s ease infinite; }
.step-room .link i {
  width: 9px;
  height: 18px;
  border: 2px solid transparent;
  border-right-color: #ffae61;
  border-radius: 50%;
  animation: hwWave 1.2s ease-in-out infinite;
}
.step-room .link i:nth-child(2) { animation-delay: 0.2s; }
.step-room .link i:nth-child(3) { animation-delay: 0.4s; }
.step-room .spark { top: 44%; left: 50%; color: #ffb36c; font-size: 14px; text-shadow: 0 0 10px #ff9a3c; opacity: 0; animation: hwSpark 7s ease-out infinite; }
.step-room .spark + .spark { animation-delay: 1.4s; }

@keyframes hwRing { to { transform: rotate(360deg); } }
@keyframes hwTalk {
  0% { box-shadow: 0 0 0 0 rgba(255, 174, 97, 0.5); }
  100% { box-shadow: 0 0 0 12px rgba(255, 174, 97, 0); }
}
@keyframes hwArrive {
  0%, 16% { opacity: 0; transform: translateX(80px); }
  30%, 86% { opacity: 1; transform: none; }
  95%, 100% { opacity: 0; transform: none; }
}
@keyframes hwLink {
  0%, 30% { opacity: 0; }
  36%, 84% { opacity: 1; }
  92%, 100% { opacity: 0; }
}
@keyframes hwWave { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
@keyframes hwSpark {
  0%, 38% { opacity: 0; transform: translate(-50%, 0) scale(0.6); }
  44% { opacity: 1; }
  62%, 100% { opacity: 0; transform: translate(-50%, -54px) scale(1.1); }
}

/* ── 02 · Kor ─────────────────────────────────────────────────────────── */
.step-ember .counter { top: 24px; left: 50%; display: flex; gap: 8px; align-items: baseline; transform: translateX(-50%); }
.step-ember .counter i { color: #ffae61; font-size: 26px; font-style: normal; text-shadow: 0 0 18px #e28b5288; }
.step-ember .count {
  min-width: 2ch;
  color: #ffd0a0;
  font-size: 34px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  counter-reset: hwn var(--hw-n);
  animation: hwCount 8s steps(8, end) infinite;
}
.step-ember .count::after { content: counter(hwn); }
.step-ember .plus { position: absolute; top: -2px; right: -26px; color: #ffbf86; font-size: 12px; font-weight: 700; opacity: 0; animation: hwPlus 1s ease-out infinite; }
.step-ember .eq { bottom: 34px; left: 50%; display: flex; gap: 4px; align-items: flex-end; height: 30px; transform: translateX(-50%); }
.step-ember .eq i { width: 5px; height: 100%; background: linear-gradient(0deg, #8453ac, #ffad65); border-radius: 3px; transform-origin: bottom; animation: hwEq 0.9s ease-in-out infinite alternate; }
.step-ember .eq i:nth-child(2n) { animation-delay: -0.3s; }
.step-ember .eq i:nth-child(3n) { animation-delay: -0.55s; }
.step-ember .eq i:nth-child(4n) { animation-delay: -0.15s; }
.step-ember .eq i:nth-child(5n) { animation-delay: -0.7s; }
.step-ember .rise { bottom: 62px; left: 50%; width: 70px; height: 50px; margin-left: -35px; }
.step-ember .rise i { position: absolute; bottom: 0; width: 4px; height: 4px; background: #ffc081; border-radius: 50%; box-shadow: 0 0 8px #ffb86c; opacity: 0; animation: hwRise 1.6s ease-out infinite; }
.step-ember .rise i:nth-child(1) { left: 6px; }
.step-ember .rise i:nth-child(2) { left: 22px; animation-delay: 0.32s; }
.step-ember .rise i:nth-child(3) { left: 36px; animation-delay: 0.64s; }
.step-ember .rise i:nth-child(4) { left: 50px; animation-delay: 0.96s; }
.step-ember .rise i:nth-child(5) { left: 63px; animation-delay: 1.28s; }
.step-ember .day { right: 22px; bottom: 16px; left: 22px; display: flex; gap: 8px; align-items: center; }
.step-ember .day span { position: relative; flex: 1; height: 4px; overflow: hidden; background: #292331; border-radius: 9px; }
.step-ember .day span::after { position: absolute; inset: 0 auto 0 0; width: 0; content: ''; background: linear-gradient(90deg, #8453ac, #ffad65); border-radius: 9px; animation: hwDay 8s linear infinite; }
.step-ember .day small { color: #a99bb0; font-size: 10px; font-variant-numeric: tabular-nums; }

@keyframes hwCount { from { --hw-n: 41; } to { --hw-n: 49; } }
@keyframes hwPlus {
  0% { opacity: 0; transform: translateY(6px); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-12px); }
}
@keyframes hwEq { from { transform: scaleY(0.25); } to { transform: scaleY(1); } }
@keyframes hwRise {
  0% { opacity: 0; transform: translateY(0); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-46px); }
}
@keyframes hwDay { from { width: 8%; } to { width: 100%; } }

/* ── 03 · Dükkân ──────────────────────────────────────────────────────── */
.step-shop .wallet { top: 14px; right: 16px; display: grid; grid-template-columns: auto auto; column-gap: 5px; align-items: baseline; padding: 4px 10px; color: #ffd0a0; font-size: 13px; font-variant-numeric: tabular-nums; background: #ffffff08; border: 1px solid #4a3846; border-radius: 999px; }
.step-shop .wallet i { grid-area: 1 / 1; color: #ffae61; font-style: normal; }
/* İki tutar üst üste durur; alımda biri söner, öteki yanar. */
.step-shop .wallet b { grid-area: 1 / 2; font-weight: 600; text-align: end; }
.step-shop .w-before { animation: hwBefore 7s step-end infinite; }
.step-shop .w-after { opacity: 0; animation: hwAfter 7s step-end infinite; }
.step-shop .tiles { top: 50%; left: 50%; display: flex; gap: 12px; margin-top: 6px; transform: translate(-50%, -50%); }
.step-shop .tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  width: 66px;
  padding: 8px 0 7px;
  background: linear-gradient(150deg, #22192a, #100e18 70%);
  border: 1px solid #3c2e3e;
  border-radius: 9px;
  animation: hwDim 7s ease infinite;
}
.step-shop .tile img { width: 42px; height: 42px; object-fit: contain; filter: drop-shadow(0 5px 8px #0008); }
.step-shop .tile small { color: #f1b782; font-size: 10px; white-space: nowrap; }
.step-shop .tile-pick { animation: hwPick 7s ease infinite; }
.step-shop .tick {
  position: absolute;
  top: -8px;
  right: -8px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: #26170f;
  font-size: 12px;
  background: #e9a466;
  border: 1.5px solid #ffd5a4;
  border-radius: 50%;
  opacity: 0;
  animation: hwTick 7s ease infinite;
}
/* İmleç (ok biçimi) */
.step-shop .pointer {
  top: 50%;
  left: 50%;
  width: 16px;
  height: 22px;
  background: #f9f1e6;
  clip-path: polygon(0 0, 0 78%, 26% 60%, 44% 100%, 58% 94%, 41% 56%, 76% 56%);
  filter: drop-shadow(0 2px 3px #000a);
  animation: hwPointer 7s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes hwBefore { 0% { opacity: 1; } 46% { opacity: 0; } 96% { opacity: 1; } }
@keyframes hwAfter { 0% { opacity: 0; } 46% { opacity: 1; } 96% { opacity: 0; } }
@keyframes hwPointer {
  0% { opacity: 0; transform: translate(90px, 60px); }
  8% { opacity: 1; transform: translate(80px, 52px); }
  22% { transform: translate(-70px, 16px); }
  34% { transform: translate(6px, 14px) scale(1); }
  40% { transform: translate(6px, 14px) scale(0.82); }
  44% { transform: translate(6px, 14px) scale(1); }
  86% { opacity: 1; transform: translate(6px, 14px); }
  94%, 100% { opacity: 0; transform: translate(6px, 14px); }
}
@keyframes hwPick {
  0%, 38% { border-color: #3c2e3e; box-shadow: none; transform: none; }
  44% { transform: scale(1.1); }
  50%, 88% { border-color: #e9a466; box-shadow: 0 0 22px #e9934055; transform: scale(1.06); }
  96%, 100% { border-color: #3c2e3e; box-shadow: none; transform: none; }
}
@keyframes hwDim { 0%, 44% { opacity: 1; } 50%, 88% { opacity: 0.45; } 96%, 100% { opacity: 1; } }
@keyframes hwTick {
  0%, 44% { opacity: 0; transform: scale(0.4); }
  50% { opacity: 1; transform: scale(1.15); }
  56%, 88% { opacity: 1; transform: none; }
  96%, 100% { opacity: 0; transform: none; }
}

/* ── Yerleşim ─────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .how-flow .steps { grid-template-columns: minmax(0, 1fr); }
  .how-flow .scene { height: 156px; }
}

/* Hareket azaltılmışsa sahneler son karede durur. */
@media (prefers-reduced-motion: reduce) {
  .how-flow .scene *,
  .how-flow .scene *::after { animation: none !important; }
  .step-room .av-friend,
  .step-room .link { opacity: 1; }
  .step-room .spark,
  .step-shop .pointer { display: none; }
  .step-ember .count { --hw-n: 48; }
  .step-ember .day span::after { width: 72%; }
  .step-shop .w-before { opacity: 0; }
  .step-shop .w-after { opacity: 1; }
  .step-shop .tile:not(.tile-pick) { opacity: 0.45; }
  .step-shop .tile-pick { border-color: #e9a466; box-shadow: 0 0 22px #e9934055; }
  .step-shop .tick { opacity: 1; }
}
