/* Qubyt Core — site footer stilleri (modüler) */

.site-footer {
  position: relative;
  margin-top: 0;
  padding: 2.75rem clamp(1rem, 4vw, 2rem) 2.25rem;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg,
      rgba(8, 10, 18, 0.98) 0%,
      var(--bg-deep) 100%),
    radial-gradient(ellipse 80% 40% at 50% 0%,
      rgba(56, 189, 248, 0.06) 0%,
      transparent 55%);
  z-index: 1;
}

.site-footer__glow {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(125, 211, 252, 0.35) 22%,
      rgba(167, 139, 250, 0.35) 78%,
      transparent 100%);
  opacity: 0.85;
  pointer-events: none;
}

.site-footer__inner {
  max-width: 64rem;
  margin: 0 auto;
  display: grid;
  gap: 1.75rem 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .site-footer__inner {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    align-items: start;
  }

  .site-footer__bottom {
    grid-column: 1 / -1;
  }
}

.site-footer__name {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
}

.site-footer__tagline {
  margin: 0;
  max-width: 30rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(155, 165, 186, 0.95);
}

.site-footer__nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}

@media (min-width: 720px) {
  .site-footer__nav {
    align-items: flex-end;
    text-align: right;
  }
}

.site-footer__link {
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(180, 200, 220, 0.95);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-footer__link:hover {
  color: rgba(200, 248, 252, 0.98);
  border-bottom-color: rgba(125, 211, 252, 0.45);
}

.site-footer__link:focus-visible {
  outline: 1px solid rgba(125, 211, 252, 0.55);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Geniş kartlar (bilimsel uyarı, politikalar) */
.site-footer__meta-wide {
  grid-column: 1 / -1;
}

/* Bilimsel sorumluluk reddi — kuantuma özel, öne çıkan kart */
.site-footer__science-note {
  margin: 0;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(167, 139, 250, 0.32);
  background:
    linear-gradient(180deg,
      rgba(167, 139, 250, 0.06) 0%,
      rgba(4, 8, 18, 0.7) 60%);
  position: relative;
  overflow: hidden;
}

.site-footer__science-note::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(ellipse 60% 60% at 0% 0%,
      rgba(167, 139, 250, 0.08) 0%,
      transparent 60%);
  pointer-events: none;
}

.site-footer__science-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(220, 215, 255, 0.96);
}

.site-footer__science-title::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #c4b5fd, #7dd3fc);
  box-shadow: 0 0 8px rgba(167, 139, 250, 0.5);
}

.site-footer__science-text {
  margin: 0 0 0.6rem;
  font-size: 0.78rem;
  line-height: 1.6;
  color: rgba(170, 180, 205, 0.95);
  position: relative;
}

.site-footer__science-text:last-child {
  margin-bottom: 0;
}

.site-footer__science-text strong {
  color: rgba(220, 215, 255, 0.96);
  font-weight: 600;
}

/* Son satır (4. paragraf) — lisans + CDN bağlamı; biraz daha sönük tutulur. */
.site-footer__science-text--meta {
  margin-top: 0.85rem;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(167, 139, 250, 0.18);
  font-size: 0.74rem;
  color: rgba(150, 165, 190, 0.92);
}

.site-footer__science-text a {
  color: rgba(130, 215, 248, 0.95);
  text-decoration: underline;
  text-decoration-color: rgba(125, 211, 252, 0.4);
  text-underline-offset: 0.2em;
  transition: color 0.18s ease, text-decoration-color 0.18s ease;
}

.site-footer__science-text a:hover {
  color: rgba(220, 240, 255, 0.98);
  text-decoration-color: rgba(125, 211, 252, 0.85);
}

/* Politikalar (collapse) */
.site-footer__policies {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .site-footer__policies {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
}

.site-footer__policy {
  margin: 0;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(55, 100, 160, 0.32);
  background: rgba(6, 10, 20, 0.65);
  overflow: hidden;
}

.site-footer__policy summary {
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(190, 210, 235, 0.96);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.site-footer__policy summary::-webkit-details-marker {
  display: none;
}

.site-footer__policy summary::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #7dd3fc, #a78bfa);
  opacity: 0.85;
}

.site-footer__policy[open] summary {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-footer__policy-body {
  padding: 0.85rem 1rem 1rem;
  font-size: 0.74rem;
  line-height: 1.6;
  color: rgba(145, 160, 185, 0.92);
}

.site-footer__policy-body p {
  margin: 0 0 0.6rem;
}

.site-footer__policy-body p:last-child {
  margin-bottom: 0;
}

.site-footer__policy-body strong {
  color: rgba(200, 218, 245, 0.96);
  font-weight: 600;
}

.site-footer__policy-date {
  margin-top: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: rgba(120, 135, 155, 0.85);
}

/* Alt çizgi: telif + statik notu */
.site-footer__bottom {
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.5rem;
  justify-content: space-between;
  align-items: center;
}

.site-footer__legal {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: rgba(130, 140, 158, 0.9);
}

/* ——— Sayfa başına dön (3B cam panel + ışıltı + halka) ——— */
.back-to-top {
  position: fixed;
  z-index: 45;
  right: clamp(0.85rem, 3vw, 1.35rem);
  bottom: clamp(0.85rem, 3vw, 1.35rem);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.35rem;
  height: 3.35rem;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(125, 211, 252, 0.16);
  border-radius: 15px;
  cursor: pointer;
  color: rgba(248, 250, 255, 0.98);
  background:
    radial-gradient(ellipse 95% 55% at 50% 12%,
      rgba(255, 255, 255, 0.12) 0%,
      transparent 52%),
    linear-gradient(165deg,
      rgba(38, 44, 58, 0.88) 0%,
      rgba(14, 16, 26, 0.94) 45%,
      rgba(5, 7, 12, 0.97) 100%);
  background-color: rgba(6, 8, 14, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.45),
    0 1px 0 rgba(255, 255, 255, 0.10) inset,
    0 -1px 0 rgba(0, 0, 0, 0.35) inset,
    0 10px 28px rgba(0, 0, 0, 0.55),
    0 4px 10px rgba(0, 0, 0, 0.40),
    0 0 22px rgba(125, 211, 252, 0.08),
    inset 0 14px 28px rgba(0, 0, 0, 0.42),
    inset 0 -2px 12px rgba(255, 255, 255, 0.03);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px) perspective(280px) rotateX(4deg);
  transform-style: preserve-3d;
  transition:
    opacity 0.28s ease,
    visibility 0.28s ease,
    transform 0.32s cubic-bezier(0.34, 1.2, 0.64, 1),
    border-color 0.22s ease,
    box-shadow 0.28s ease,
    filter 0.22s ease;
}

.back-to-top::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(125deg,
      rgba(255, 255, 255, 0.10) 0%,
      rgba(255, 255, 255, 0.02) 38%,
      transparent 52%);
  pointer-events: none;
  z-index: 0;
}

.back-to-top--visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) perspective(280px) rotateX(0deg);
}

.back-to-top--visible:hover {
  border-color: rgba(125, 211, 252, 0.36);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.40),
    0 1px 0 rgba(255, 255, 255, 0.14) inset,
    0 -1px 0 rgba(0, 0, 0, 0.30) inset,
    0 16px 36px rgba(0, 0, 0, 0.58),
    0 8px 16px rgba(0, 0, 0, 0.38),
    0 0 32px rgba(125, 211, 252, 0.16),
    0 0 22px rgba(167, 139, 250, 0.10),
    inset 0 14px 28px rgba(0, 0, 0, 0.38),
    inset 0 -2px 14px rgba(255, 255, 255, 0.04);
  transform: translateY(-3px) perspective(280px) rotateX(-2deg) scale(1.04);
  filter: brightness(1.06);
}

.back-to-top--visible:active {
  transform: translateY(0) perspective(280px) rotateX(1deg) scale(0.98);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.50),
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 4px 14px rgba(0, 0, 0, 0.55),
    inset 0 10px 22px rgba(0, 0, 0, 0.48);
  filter: brightness(0.96);
}

.back-to-top:focus-visible {
  outline: 2px solid rgba(125, 211, 252, 0.55);
  outline-offset: 3px;
}

.back-to-top__ring {
  position: absolute;
  inset: 3px;
  z-index: 1;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}

.back-to-top__ring-track,
.back-to-top__ring-progress {
  fill: none;
  stroke-linecap: round;
}

.back-to-top__ring-track {
  stroke: rgba(125, 211, 252, 0.16);
  stroke-width: 1.2;
}

.back-to-top__ring-progress {
  stroke: url(#back-to-top-grad);
  stroke-width: 1.6;
  transition: stroke-dashoffset 0.18s linear;
}

.back-to-top__icon {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.back-to-top__icon svg {
  display: block;
  margin-top: -1px;
  filter:
    drop-shadow(0 1px 1px rgba(0, 0, 0, 0.55))
    drop-shadow(0 0 8px rgba(255, 255, 255, 0.06));
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: opacity 0.2s ease, visibility 0.2s ease;
    transform: translateY(6px);
  }

  .back-to-top--visible {
    transform: none;
  }

  .back-to-top--visible:hover,
  .back-to-top--visible:active {
    transform: none;
    filter: none;
  }
}
