:root {
  --night: #070b1f;
  --night-2: #0d1538;
  --ink: #eef0ff;
  --muted: #b9bfe0;
  --gold: #f3d58a;
  --gold-2: #ffe9b0;
  --rose: #f2a38a;
  --glass: rgba(10, 14, 40, .45);
  --line: rgba(243, 213, 138, .28);
  --dawn: 0;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --arabic: "Amiri", "Noto Naskh Arabic", serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--night);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* Gökyüzü katmanları: gece sabit, şafak kaydırmayla belirir */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.bg-night {
  background:
    radial-gradient(120% 70% at 50% 0%, #1a2360 0%, transparent 60%),
    linear-gradient(180deg, #050818 0%, var(--night) 45%, var(--night-2) 100%);
}
.bg-dawn {
  opacity: var(--dawn);
  background:
    linear-gradient(180deg, #16183f 0%, #3b2d6b 38%, #8a4a78 62%, #d7775e 84%, #f4b26f 100%);
}

#sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: calc(1 - var(--dawn) * .8);
  pointer-events: none;
}

.sun {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: 70vmin;
  height: 70vmin;
  margin-left: -35vmin;
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 228, 160, .95) 0%, rgba(255, 190, 110, .55) 22%, rgba(255, 150, 90, .18) 48%, transparent 70%);
  transform: translateY(calc(75% - var(--sunrise, 0) * 40%));
  opacity: var(--sunrise, 0);
}

main { position: relative; z-index: 1; overflow-x: hidden; }
@supports (overflow: clip) { main { overflow-x: clip; } }

section {
  min-height: 100vh;
  min-height: 100svh;
  padding: 88px 22px 72px;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

h1, h2 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: .01em;
  margin: 0 0 .6em;
}
h2 { font-size: clamp(2rem, 8vw, 2.8rem); color: var(--gold-2); }
p { margin: 0 0 1em; }
em { font-style: italic; color: var(--gold-2); }
small { color: var(--muted); }

.kicker {
  font-size: .78rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .8em;
}
.soft { color: var(--muted); font-size: 1rem; }
.hint { color: var(--muted); font-size: .9rem; text-align: center; }

/* ---------- Hero ---------- */
.hero { text-align: center; align-items: center; padding-top: 56px; }
.crescent {
  width: min(52vw, 230px);
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 0 24px rgba(255, 233, 170, .35));
  animation: moonIn 2.4s cubic-bezier(.2, .8, .2, 1) both, float 9s ease-in-out 2.4s infinite;
}
.moon-bite { animation: bite 3s cubic-bezier(.3, .7, .2, 1) .3s both; }
.moon-halo { animation: halo 5s ease-in-out infinite; transform-origin: center; }
@keyframes moonIn { from { opacity: 0; transform: translateY(24px) scale(.9); } }
@keyframes bite { from { transform: translate(70px, 20px); } }
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes halo { 50% { opacity: .55; transform: scale(1.06); } }

.besmele {
  font-family: var(--arabic);
  font-size: clamp(1.9rem, 8.5vw, 2.8rem);
  line-height: 1.8;
  margin: .5em 0 0;
  color: var(--gold-2);
  text-shadow: 0 0 18px rgba(243, 213, 138, .35);
  clip-path: inset(0 0 0 100%);
  animation: sweep 2.8s ease-in-out 1.2s forwards;
}
@keyframes sweep { to { clip-path: inset(0 0 0 0); } }
.besmele-meal {
  color: var(--muted);
  font-size: .95rem;
  opacity: 0;
  animation: fadeUp 1.2s ease 3.4s forwards;
}
.title {
  font-size: clamp(3rem, 15vw, 5rem);
  margin: .35em 0 .3em;
  opacity: 0;
  animation: fadeUp 1.6s ease 3.9s forwards;
}
.title em { color: var(--gold); display: inline-block; }
.lead { color: var(--muted); max-width: 30ch; opacity: 0; animation: fadeUp 1.4s ease 4.6s forwards; }
/* Giriş animasyonları bitince katmanları serbest bırak (mobilde daha hafif). */
.hero.settled .besmele, .hero.settled .besmele-meal, .hero.settled .title, .hero.settled .lead, .hero.settled .scroll-cue { animation: none; opacity: 1; clip-path: none; transform: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.scroll-cue {
  margin-top: 28px;
  width: 26px;
  height: 42px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  position: relative;
  opacity: 0;
  animation: fadeUp 1s ease 5.4s forwards;
}
.scroll-cue span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--gold);
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue { 60% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- Bölüm göstergesi ---------- */
.dots {
  position: fixed;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 5;
}
.dots a {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(238, 240, 255, .25);
  transition: background .4s, transform .4s;
}
.dots a.on { background: var(--gold); transform: scale(1.5); box-shadow: 0 0 10px var(--gold); }

/* ---------- Görünür olunca belirme ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s ease, transform 1s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Alıntılar ---------- */
blockquote {
  margin: 1.4em 0 0;
  padding: 18px 20px;
  border-left: 2px solid var(--gold);
  background: var(--glass);
  border-radius: 0 14px 14px 0;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
blockquote p { font-family: var(--serif); font-size: 1.32rem; line-height: 1.45; margin-bottom: .5em; }
blockquote.small p { font-size: 1.5rem; color: var(--gold-2); }
cite { display: block; font-style: normal; font-size: .8rem; letter-spacing: .06em; color: var(--gold); }

/* ---------- Nefes ---------- */
.breath {
  position: relative;
  width: 240px;
  height: 240px;
  margin: 12px auto 18px;
  display: grid;
  place-items: center;
}
.breath-ring, .breath-core { position: absolute; border-radius: 50%; }
.breath-ring {
  inset: 0;
  border: 1.5px solid var(--line);
  animation: ring 12s ease-in-out infinite;
}
.breath-core {
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(255, 233, 176, .9) 0%, rgba(243, 213, 138, .35) 45%, rgba(243, 213, 138, 0) 72%);
  animation: core 12s ease-in-out infinite;
}
.breath-word {
  position: relative;
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--night);
  font-weight: 600;
  transition: opacity .6s;
}
@keyframes core {
  0% { transform: scale(.7); }
  33% { transform: scale(1.8); }
  50% { transform: scale(1.8); }
  100% { transform: scale(.7); }
}
@keyframes ring {
  0% { transform: scale(.6); opacity: .3; }
  33% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1); opacity: 1; }
  100% { transform: scale(.6); opacity: .3; }
}

/* ---------- 99 İsim ---------- */
.esma-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 520px;
  margin: 8px auto 0;
}
#esma { width: 100%; height: 100%; display: block; touch-action: manipulation; cursor: pointer; }
.esma-card {
  text-align: center;
  padding: 18px 16px 14px;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.esma-no { font-size: .75rem; letter-spacing: .2em; color: var(--muted); }
.esma-ar { font-family: var(--arabic); font-size: 3rem; line-height: 1.6; color: var(--gold-2); text-shadow: 0 0 22px rgba(243, 213, 138, .5); }
.esma-tr { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; }
.esma-mean { color: var(--muted); max-width: 32ch; min-height: 3.2em; }
.esma-card.swap .esma-ar, .esma-card.swap .esma-tr, .esma-card.swap .esma-mean { animation: swapIn .7s ease both; }
@keyframes swapIn { from { opacity: 0; transform: translateY(8px); filter: blur(4px); } }
.esma-nav { display: flex; gap: 10px; margin-top: 10px; }
.esma-nav button, .ghost-btn, .step-btn {
  font: 500 .95rem var(--sans);
  color: var(--ink);
  background: rgba(243, 213, 138, .08);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 18px;
  min-height: 44px;
  cursor: pointer;
  transition: background .3s, transform .2s;
}
.esma-nav button:active, .ghost-btn:active, .step-btn:active { transform: scale(.96); }
.esma-nav button[aria-label] { width: 44px; padding: 0; font-size: 1.5rem; line-height: 1; }
.esma-nav button.on { background: rgba(243, 213, 138, .25); }

/* ---------- Rahmet ---------- */
.mercy-stage { position: relative; width: 100%; aspect-ratio: 3 / 4; max-height: 70vh; margin: 0 auto 8px; }
#mercy { width: 100%; height: 100%; display: block; }
.ghost-btn { display: block; margin: 8px auto 0; }
.mercy-stage { margin-bottom: 56px; }
.mercy-stage .ghost-btn { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); margin: 6px 0 0; font-size: .85rem; padding: 8px 14px; opacity: .85; }

/* ---------- Yakınlık ---------- */
.steps { text-align: center; }
.steps-track {
  position: relative;
  height: 160px;
  margin: 8px 0 14px;
  border-bottom: 1px dashed var(--line);
}
.step-you {
  position: absolute;
  bottom: 10px;
  left: 8%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 14px #fff;
  transition: left .8s cubic-bezier(.3, .7, .2, 1);
}
.step-wave {
  position: absolute;
  bottom: -50%;
  right: -30%;
  width: 110%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 228, 160, .8) 0%, rgba(243, 213, 138, .25) 40%, transparent 70%);
  transform: scale(var(--wave, .15));
  transform-origin: 80% 60%;
  transition: transform 1.2s cubic-bezier(.2, .8, .2, 1);
}
.steps-text { list-style: none; padding: 0; margin: 0 0 16px; font-family: var(--serif); font-size: 1.35rem; line-height: 1.45; min-height: 7.5em; }
.steps-text li { opacity: .12; transition: opacity .8s, color .8s; }
.steps-text li.on { opacity: 1; }
.steps-text li:last-child.on { color: var(--gold-2); text-shadow: 0 0 16px rgba(243, 213, 138, .6); }
.step-btn { font-size: 1.05rem; padding: 12px 26px; }
.steps-cite { margin-top: 12px; }

/* ---------- Kolaylık ---------- */
.knot { width: 100%; height: auto; margin: 6px 0 18px; overflow: visible; }
.knot path { fill: none; stroke-linecap: round; }
.knot-dark { stroke: rgba(185, 191, 224, .55); stroke-width: 3; stroke-dasharray: 1200; stroke-dashoffset: 0; transition: stroke-dashoffset 2.6s ease-in-out .4s, opacity 1s ease 2.4s; }
.knot-light { stroke: var(--gold); stroke-width: 3; stroke-dasharray: 300; stroke-dashoffset: 300; filter: drop-shadow(0 0 6px var(--gold)); transition: stroke-dashoffset 2s ease-in-out 2.2s; }
.knot-dawn { fill: var(--gold-2); opacity: 0; transition: opacity 1s ease 3.8s; filter: drop-shadow(0 0 10px var(--gold)); }
.knot.in .knot-dark { stroke-dashoffset: -1200; opacity: 0; }
.knot.in .knot-light { stroke-dashoffset: 0; }
.knot.in .knot-dawn { opacity: 1; animation: pulse 2.4s ease-in-out 4.8s infinite; }
@keyframes pulse { 50% { r: 11; } }
.twice p { font-family: var(--serif); font-size: 1.55rem; line-height: 1.35; margin-bottom: .4em; }
.twice p.glow { color: var(--gold-2); text-shadow: 0 0 18px rgba(243, 213, 138, .55); transition-delay: .5s; }
.twice cite { margin: .6em 0 1.4em; }

/* ---------- Kartlar ---------- */
.cards {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 6px 22px 18px;
  margin: 0 -22px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.cards::-webkit-scrollbar { display: none; }
.card {
  flex: 0 0 80%;
  scroll-snap-align: center;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px 20px;
  background: linear-gradient(160deg, rgba(243, 213, 138, .12), rgba(10, 14, 40, .5));
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  min-height: 280px;
  display: flex;
  flex-direction: column;
}
.card svg { width: 64px; height: 64px; margin-bottom: 14px; }
.card svg * { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.card svg .fill { fill: var(--gold); stroke: none; }
.card .draw { stroke-dasharray: 260; stroke-dashoffset: 260; transition: stroke-dashoffset 2s ease .3s; }
.cards.in .draw { stroke-dashoffset: 0; }
.card p { font-family: var(--serif); font-size: 1.45rem; line-height: 1.35; flex: 1; }

/* ---------- Tesbih ---------- */
.tesbih {
  all: unset;
  position: relative;
  display: block;
  width: 100%;
  text-align: center;
  cursor: pointer;
  padding: 4px 0 10px;
  border-radius: 24px;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.tesbih:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.tesbih svg { width: 100%; height: auto; overflow: visible; }
.t-string { fill: none; stroke: rgba(243, 213, 138, .35); stroke-width: 1.5; }
.bead { fill: url(#beadGrad); transition: transform .35s cubic-bezier(.3, .7, .2, 1); }
.t-count { position: absolute; left: 0; right: 0; top: 24%; font-family: var(--serif); font-size: 3.6rem; line-height: 1; color: var(--gold-2); pointer-events: none; }
.t-word { display: block; font-family: var(--serif); font-size: 1.7rem; margin-top: 6px; }
.t-mean { display: block; color: var(--muted); font-size: .9rem; min-height: 1.5em; }
.tesbih.tick .t-count { animation: tick .35s ease; }
@keyframes tick { 40% { transform: scale(1.18); text-shadow: 0 0 20px var(--gold); } }
.tesbih.done .t-word { color: var(--gold); }
.center { margin: 14px auto 0; }

/* ---------- Final ---------- */
.finale { text-align: left; }
.finale blockquote { background: rgba(20, 16, 50, .5); }
.more {
  margin-top: 1.6em;
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(20, 16, 50, .5);
  border: 1px solid var(--line);
}
.more a {
  display: inline-block;
  color: var(--gold-2);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  margin-bottom: .8em;
}
.small-note { font-size: .9rem; color: var(--ink); margin: 0; }
.salam { font-family: var(--arabic); font-size: 2.6rem; text-align: center; margin: 1.2em 0 0; color: #fff4d6; text-shadow: 0 0 24px rgba(255, 220, 150, .8); }
.salam-tr { text-align: center; color: #fff; }

footer {
  position: relative;
  z-index: 1;
  text-align: center;
  font-size: .78rem;
  color: rgba(255, 255, 255, .75);
  padding: 24px 22px 48px;
  max-width: 640px;
  margin: 0 auto;
}
footer p { margin: .3em 0; }

@media (min-width: 900px) {
  body { font-size: 18px; }
  .dots { right: 24px; }
  .card { flex-basis: 46%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .besmele { clip-path: none; }
  .breath-core { transform: scale(1.3); }
}
