/* PWA açılış ekranı (26 Kas 2026). Yalnız ana ekrana eklenmiş uygulamada,
   oturum başına bir kez görünür; tarayıcıdaki siteyi etkilemez. */
:root {
  --acilis-ink: #0c0a08;
  --acilis-gold: #c9a24b;
  --acilis-gold-hi: #e7c46a;
  --acilis-sure: 1900ms;
  --acilis-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html.pwa-acilis { background: var(--acilis-ink); }
html.pwa-acilis body { overflow: hidden; }

.acilis {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  background:
    radial-gradient(60vmax 60vmax at 50% 42%, rgba(201, 162, 75, 0.16), transparent 62%),
    radial-gradient(120vmax 80vmax at 50% 120%, rgba(192, 90, 46, 0.10), transparent 60%),
    var(--acilis-ink);
  transition: opacity 520ms var(--acilis-ease), transform 520ms var(--acilis-ease);
}

.acilis--cikis { opacity: 0; transform: scale(1.04); pointer-events: none; }

.acilis__ic {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(18px, 4vh, 34px);
  padding: 0 16px;
}

/* Halka + monogram */
.acilis__muhur {
  position: relative;
  width: min(46vw, 210px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.acilis__halka {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(201, 162, 75, 0.28);
  opacity: 0;
  transform: scale(0.82);
  animation: acilis-halka 1100ms var(--acilis-ease) 120ms forwards;
}

.acilis__halka::after {
  content: "";
  position: absolute;
  inset: 9%;
  border-radius: 50%;
  border: 1px solid rgba(201, 162, 75, 0.14);
}

.acilis__monogram {
  width: 70%;
  height: auto;
  opacity: 0;
  transform: translateY(10px) scale(0.92);
  filter: drop-shadow(0 10px 28px rgba(201, 162, 75, 0.28));
  animation: acilis-gir 900ms var(--acilis-ease) 200ms forwards;
}

/* Monogram üzerinden geçen ışık */
.acilis__parilti {
  position: absolute;
  inset: 15%;
  border-radius: 50%;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask: url("/platform/assets/pwa/monogram-20261126a.png") center / contain no-repeat;
  mask: url("/platform/assets/pwa/monogram-20261126a.png") center / contain no-repeat;
}

.acilis__parilti::before {
  content: "";
  position: absolute;
  inset: -20% auto -20% -60%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 244, 214, 0.75), transparent);
  transform: skewX(-18deg) translateX(0);
  animation: acilis-parilti 1100ms ease-in-out 900ms forwards;
}

.acilis__yazi {
  width: min(78vw, 360px);
  height: auto;
  opacity: 0;
  transform: translateY(8px);
  animation: acilis-gir 800ms var(--acilis-ease) 520ms forwards;
}

.acilis__cizgi {
  width: min(40vw, 150px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--acilis-gold), transparent);
  transform: scaleX(0);
  animation: acilis-cizgi 1200ms var(--acilis-ease) 700ms forwards;
}

@keyframes acilis-gir { to { opacity: 1; transform: none; } }
@keyframes acilis-halka { to { opacity: 1; transform: scale(1); } }
@keyframes acilis-cizgi { to { transform: scaleX(1); } }
@keyframes acilis-parilti { to { transform: skewX(-18deg) translateX(420%); } }

@media (prefers-reduced-motion: reduce) {
  .acilis__halka, .acilis__monogram, .acilis__yazi, .acilis__cizgi {
    animation: none; opacity: 1; transform: none;
  }
  .acilis__parilti { display: none; }
  .acilis { transition: opacity 200ms linear; }
  .acilis--cikis { transform: none; }
}

/* ───────── Uygulama kabuğu: üst çubuk + alt sekme menüsü ─────────
   Yalnız html.pwa (ana ekrandan açılan uygulama) altında geçerli. */
html.pwa {
  --uyg-ust-h: 52px;
  --uyg-alt-h: 60px;
  --uyg-alt-guvenli: env(safe-area-inset-bottom, 0px);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

/* Sitenin tarayıcı menüsü, alt bilgisi ve eski üst çubuğu uygulamada gizli */
html.pwa #nav,
html.pwa .footer,
html.pwa header.ust { display: none !important; }

html.pwa body {
  padding-bottom: calc(var(--uyg-alt-h) + var(--uyg-alt-guvenli));
  -webkit-user-select: none;
  user-select: none;
}
html.pwa body input,
html.pwa body textarea,
html.pwa body [contenteditable],
html.pwa body p,
html.pwa body li { -webkit-user-select: text; user-select: text; }

html.pwa #v1 { padding-top: var(--uyg-ust-h); }

.uyg-ust {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  height: var(--uyg-ust-h);
  display: grid;
  place-items: center;
  background: rgba(12, 10, 8, 0.86);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid rgba(201, 162, 75, 0.14);
}
.uyg-ust img { height: 22px; width: auto; display: block; }

.uyg-alt {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 900;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: calc(var(--uyg-alt-h) + var(--uyg-alt-guvenli));
  padding-bottom: var(--uyg-alt-guvenli);
  background: rgba(16, 13, 10, 0.92);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
  backdrop-filter: saturate(140%) blur(18px);
  border-top: 1px solid rgba(201, 162, 75, 0.18);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.35);
}

.uyg-alt a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #8a7d63;
  text-decoration: none;
  font: 500 10.5px/1.1 "Inter", system-ui, -apple-system, sans-serif;
  letter-spacing: 0.02em;
  transition: color 160ms ease, transform 160ms ease;
}
.uyg-alt a:active { transform: scale(0.92); }
.uyg-alt svg {
  width: 23px; height: 23px;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.uyg-alt a[aria-current="page"] { color: var(--acilis-gold-hi); }
.uyg-alt a[aria-current="page"]::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  width: 28px; height: 2px;
  border-radius: 0 0 2px 2px;
  background: var(--acilis-gold);
  transform: translateX(-50%);
  box-shadow: 0 0 12px rgba(231, 196, 106, 0.6);
}
.uyg-alt a:focus-visible { outline: 2px solid var(--acilis-gold); outline-offset: -4px; border-radius: 10px; }

/* Yüzen düğmeler (YA AI, destek) alt menünün üstüne çıkar */
html.pwa .yaai,
html.pwa .dstk { bottom: calc(var(--uyg-alt-h) + var(--uyg-alt-guvenli) + 12px) !important; }
html.pwa body:has(.dstk) .yaai { bottom: calc(var(--uyg-alt-h) + var(--uyg-alt-guvenli) + 76px) !important; }
html.pwa .ya-cerez { bottom: calc(var(--uyg-alt-h) + var(--uyg-alt-guvenli) + 10px) !important; }
