/* Rayist 3B arka plan katmani. Yalnizca html.r3d-on varken devreye girer;
   harita yuklenemezse site eski gorunumunde kalir. */

#r3d-map,
#r3d-veil {
  position: fixed;
  inset: 0 0 auto 0;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  pointer-events: none;
  z-index: 0;
}
#r3d-map {
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(.22, 1, .36, 1);
  background: #07030d;
}
html.r3d-ready #r3d-map { opacity: 1; }
#r3d-map .maplibregl-canvas { outline: none; }

/* Okunabilirlik icin karartma: masaustunde metnin oldugu sol taraf daha koyu. */
#r3d-veil {
  opacity: 0;
  transition: opacity 1.2s ease;
  background:
    linear-gradient(180deg, rgba(7, 3, 13, .78) 0%, rgba(7, 3, 13, .12) 22%, rgba(7, 3, 13, .1) 70%, rgba(7, 3, 13, .82) 100%),
    linear-gradient(90deg, rgba(7, 3, 13, .8) 0%, rgba(7, 3, 13, .42) 36%, rgba(7, 3, 13, 0) 60%, rgba(7, 3, 13, .08) 100%);
}
html.r3d-ready #r3d-veil { opacity: 1; }
@media (max-width: 899px) {
  #r3d-veil {
    background:
      linear-gradient(180deg, rgba(7, 3, 13, .7) 0%, rgba(7, 3, 13, .38) 30%, rgba(7, 3, 13, .45) 70%, rgba(7, 3, 13, .85) 100%);
  }
}

html.r3d-on body { background: transparent; }
html.r3d-on main,
html.r3d-on footer,
html.r3d-on .site-footer { position: relative; z-index: 1; }

/* Hero: izgara ve parlama haritanin uzerinde hafifler. */
html.r3d-ready .hero-grid { opacity: .18; }
html.r3d-ready .hero-glow { opacity: .55; }

/* Kartlar cam gibi: haritayi arkadan hafifce gosterir. */
html.r3d-ready .card,
html.r3d-ready .cta-box,
html.r3d-ready details,
html.r3d-ready .faq-item {
  background: rgba(15, 10, 24, .74);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
}
html.r3d-ready .marquee-wrap {
  background: rgba(7, 3, 13, .55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
html.r3d-ready .site-footer {
  background: linear-gradient(180deg, rgba(7, 3, 13, .55), #07030d 40%);
}

/* Masaustu: metin solda, telefon sagda; harita ortada gorunur kalir. */
@media (min-width: 1100px) {
  html.r3d-on .hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    column-gap: 3rem;
    align-items: center;
    align-content: center;
    justify-items: start;
    text-align: left;
    max-width: 76rem;
    width: 100%;
  }
  html.r3d-on .hero-inner > :not(.device-stage) { grid-column: 1; }
  html.r3d-on .hero-inner .hero-desc { margin-left: 0; }
  html.r3d-on .hero h1 { font-size: clamp(2.8rem, 4.9vw, 4.9rem); }
  html.r3d-on .hero-inner .hero-cta { justify-content: flex-start; }
  html.r3d-on .hero-inner .device-stage {
    grid-column: 2;
    grid-row: 1 / span 4;
    margin-top: 0;
    justify-self: center;
    transform: scale(.86);
    transform-origin: center center;
  }
  html[dir="rtl"].r3d-on .hero-inner { text-align: right; }
  html[dir="rtl"].r3d-on .hero-inner .hero-desc { margin-right: 0; margin-left: auto; }
}

/* ---- Hat ilerleme listesi (masaustu sag kenar) ---- */
#r3d-rail {
  position: fixed;
  z-index: 40;
  inset-inline-end: 1.25rem;
  top: 50%;
  transform: translateY(-50%) translateX(12px);
  padding: .9rem .95rem .9rem .8rem;
  border-radius: 1.25rem;
  background: rgba(10, 6, 18, .62);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 18px 50px rgba(0, 0, 0, .35);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  font: 500 .74rem/1.2 var(--sans, system-ui);
  color: rgba(245, 243, 247, .55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .5s ease, transform .5s cubic-bezier(.22, 1, .36, 1);
}
html.r3d-ready.r3d-following #r3d-rail { opacity: 1; transform: translateY(-50%); }
html.r3d-at-footer #r3d-rail,
html.r3d-at-footer #r3d-chip { opacity: 0 !important; }
#r3d-rail ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .52rem; position: relative; }
#r3d-rail li { display: flex; align-items: center; gap: .55rem; white-space: nowrap; transition: color .3s; }
#r3d-rail .r3d-dot {
  width: .62rem;
  height: .62rem;
  border-radius: 50%;
  flex: none;
  background: #07030d;
  box-shadow: inset 0 0 0 2px rgba(233, 251, 233, .55);
  position: relative;
  z-index: 1;
  transition: background .3s, box-shadow .3s;
}
#r3d-rail li.is-passed { color: rgba(245, 243, 247, .82); }
#r3d-rail li.is-passed .r3d-dot { background: #ff6b2c; box-shadow: inset 0 0 0 2px #ffb37a; }
#r3d-rail li.is-current { color: #fff; font-weight: 700; }
#r3d-rail li.is-current .r3d-dot { background: #ff6b2c; box-shadow: 0 0 0 4px rgba(255, 107, 44, .25), 0 0 14px rgba(255, 107, 44, .8); }
#r3d-rail li.is-current .r3d-name {
  padding: .18rem .5rem;
  margin-inline-start: -.2rem;
  border-radius: .5rem;
  color: #1a0d05;
  background: linear-gradient(135deg, #ffb37a, #ff6b2c);
}
#r3d-rail .r3d-fill {
  position: absolute;
  inset-inline-start: calc(.8rem + .31rem - 1px);
  top: calc(.9rem + .3rem);
  width: 2px;
  height: var(--r3d-fill, 0);
  background: linear-gradient(180deg, #8400ff, #ff6b2c);
  border-radius: 2px;
}
#r3d-rail::before {
  content: "";
  position: absolute;
  inset-inline-start: calc(.8rem + .31rem - 1px);
  top: 1.2rem;
  bottom: 1.2rem;
  width: 2px;
  background: rgba(233, 251, 233, .16);
}
/* Icerik ile kenar arasinda yer azsa yalnizca noktalar ve o anki durak gorunur. */
@media (max-width: 1599px) {
  #r3d-rail { padding: .8rem .55rem; }
  #r3d-rail li .r3d-name { display: none; }
  #r3d-rail li.is-current .r3d-name {
    display: block;
    position: absolute;
    inset-inline-end: calc(100% + .7rem);
    margin: 0;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .35);
  }
  #r3d-rail li { position: relative; }
  #r3d-rail .r3d-fill, #r3d-rail::before { inset-inline-start: calc(.55rem + .31rem - 1px); }
}
@media (max-width: 1279px) { #r3d-rail { display: none; } }

/* ---- Ust bilgi cipi (hat, durak, sonraki durak) ---- */
#r3d-chip {
  position: fixed;
  z-index: 45;
  left: 50%;
  top: calc(env(safe-area-inset-top, 0px) + 5.1rem);
  transform: translate(-50%, -8px);
  display: flex;
  align-items: center;
  gap: .6rem;
  max-width: calc(100vw - 2rem);
  padding: .42rem .8rem .42rem .42rem;
  border-radius: 999px;
  background: rgba(10, 6, 18, .7);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 12px 34px rgba(0, 0, 0, .35);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  color: #f5f3f7;
  font-family: var(--sans, system-ui);
  opacity: 0;
  pointer-events: none;
  transition: opacity .45s ease, transform .45s cubic-bezier(.22, 1, .36, 1);
}
html.r3d-ready.r3d-following #r3d-chip { opacity: 1; transform: translate(-50%, 0); }
#r3d-chip .r3d-chip-line {
  display: grid;
  place-items: center;
  min-width: 2.2rem;
  height: 1.7rem;
  padding: 0 .45rem;
  border-radius: 999px;
  font: 800 .78rem/1 var(--mono, ui-monospace);
  color: #04130a;
  background: #1fd47a;
}
#r3d-chip .r3d-chip-body { display: grid; min-width: 0; }
#r3d-chip .r3d-chip-title { font-size: .84rem; line-height: 1.15; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#r3d-chip .r3d-chip-sub { font-size: .7rem; line-height: 1.2; color: rgba(245, 243, 247, .62); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#r3d-chip.is-arrived .r3d-chip-line { background: linear-gradient(135deg, #ffb37a, #ff6b2c); color: #1a0d05; }
#r3d-chip.is-arrived .r3d-chip-sub { color: #ffb37a; font-weight: 700; }
@media (max-width: 640px) {
  #r3d-chip { top: calc(env(safe-area-inset-top, 0px) + 4.6rem); }
}

/* ---- Hattaki tren isareti ---- */
.r3d-train { position: relative; width: 0; height: 0; pointer-events: none; transition: opacity .5s ease; }
html:not(.r3d-following) .r3d-train > * { opacity: 0; }
.r3d-train > * { transition: opacity .5s ease; }
.r3d-train-pulse,
.r3d-train-core { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); border-radius: 999px; }
.r3d-train-pulse {
  width: 46px;
  height: 46px;
  background: radial-gradient(circle, rgba(255, 107, 44, .55), rgba(255, 107, 44, 0) 70%);
  animation: r3dPulse 1.8s ease-out infinite;
}
.r3d-train-core {
  display: grid;
  place-items: center;
  width: 30px;
  height: 22px;
  font: 800 10px/1 var(--mono, ui-monospace);
  color: #1a0d05;
  background: linear-gradient(135deg, #ffd2b0, #ff6b2c);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 0 22px rgba(255, 107, 44, .9);
}
.r3d-train-label {
  position: absolute;
  left: 0;
  top: -18px;
  transform: translate(-50%, -100%);
  padding: .3rem .55rem;
  border-radius: .55rem;
  white-space: nowrap;
  font: 700 12px/1.1 var(--sans, system-ui);
  color: #fff;
  background: rgba(10, 6, 18, .82);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}
.r3d-train-label:empty { display: none; }
@keyframes r3dPulse {
  0% { transform: translate(-50%, -50%) scale(.55); opacity: .9; }
  100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

#r3d-credit {
  margin: 1.25rem auto 0;
  padding: 0 1.25rem 1.25rem;
  max-width: 72rem;
  font-size: .62rem;
  color: rgba(245, 243, 247, .28);
  text-align: center;
}
#r3d-credit a { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  #r3d-map, #r3d-veil, #r3d-rail, #r3d-chip { transition: none; }
  .r3d-train-pulse { animation: none; }
}

/* Ana sayfa: ust bilgi karti kullanilmiyor (sade arka plan). */
#r3d-chip { display: none !important; }
