:root {
  --scene: #000000;
  --black: #000000;
  --ink: #0a0a0a;
  --white: #e6e6e6;
  --gray-mid: rgba(255, 255, 255, 0.06);
  --vhs-tint: rgba(0, 0, 0, 0.34);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
  background: var(--black);
}

body {
  margin: 0;
  min-height: 100%;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  background: var(--black);
  color: var(--white);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: relative;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 55;
  pointer-events: none;
  background: #ffffff;
  mix-blend-mode: overlay;
  opacity: 0;
  animation: site-white-flicker 5.4s steps(1, end) infinite;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--black);
}

#stars {
  position: absolute;
  inset: -8%;
  width: 116%;
  height: 116%;
  filter: blur(1.5px);
  opacity: 0.92;
}

.bg-fog {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 78% 62% at 50% 42%, rgba(255, 255, 255, 0.055) 0%, transparent 58%),
    radial-gradient(ellipse 90% 60% at 50% 40%, var(--gray-mid) 0%, transparent 50%),
    radial-gradient(ellipse 100% 80% at 50% 100%, rgba(0, 0, 0, 0.55) 0%, transparent 45%),
    linear-gradient(180deg, #000000 0%, #050505 50%, #000000 100%);
}

.bg-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse 80% 74% at 50% 46%,
    transparent 0%,
    transparent 48%,
    rgba(0, 0, 0, 0.22) 82%,
    rgba(0, 0, 0, 0.62) 100%
  );
  box-shadow:
    inset 0 0 min(140px, 20vw) min(44px, 7vw) rgba(0, 0, 0, 0.48),
    inset 0 0 min(40px, 6vw) rgba(0, 0, 0, 0.22);
}

.stage {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  width: 100%;
  min-height: 0;
  padding: 0 0 4.75rem;
}

.hero-3d {
  position: relative;
  flex: 1;
  width: 100%;
  min-height: min(72vh, 100%);
  margin: 0;
  /* Opak siyah: alttaki #stars + .bg-fog tamamen kaybolur; WebGL alpha ile şeffaf olmalı */
  background: transparent;
}

.three-root {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  background: transparent;
}

.three-root canvas {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  outline: none;
  vertical-align: top;
  background: transparent;
}

.model-error {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 1rem;
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgba(200, 200, 200, 0.55);
  z-index: 2;
  pointer-events: none;
}

.load-veil {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: opacity 0.85s ease, visibility 0.85s ease;
}

.load-veil--hidden {
  opacity: 0;
  visibility: hidden;
}

.load-veil__spin {
  animation: load-veil-spin 20s linear infinite;
}

.load-veil__sigil {
  display: block;
  width: min(20vw, 128px);
  height: min(20vw, 128px);
  color: rgba(255, 255, 255, 0.42);
  filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.28));
  animation: load-veil-pulse 2.5s ease-in-out infinite;
}

@keyframes load-veil-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes load-veil-pulse {
  0%,
  100% {
    opacity: 0.32;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.15));
  }
  50% {
    opacity: 0.92;
    filter: drop-shadow(0 0 22px rgba(255, 255, 255, 0.45));
  }
}

.crt-shim {
  position: fixed;
  inset: 0;
  z-index: 47;
  pointer-events: none;
  background: radial-gradient(
    ellipse 94% 90% at 50% 48%,
    transparent 0%,
    transparent 42%,
    rgba(0, 0, 0, 0.22) 100%
  );
  box-shadow: inset 0 0 min(100px, 16vw) rgba(0, 0, 0, 0.34);
}

.crt-shim::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 50, 50, 0.05) 0%,
    transparent 10%,
    transparent 90%,
    rgba(50, 90, 255, 0.055) 100%
  );
  mix-blend-mode: screen;
  opacity: 0.9;
}

.easter-toast {
  position: fixed;
  left: 50%;
  bottom: 4.75rem;
  z-index: 58;
  max-width: 90vw;
  margin: 0;
  padding: 0;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(210, 210, 210, 0.5);
  text-align: center;
  opacity: 0;
  transform: translateX(-50%) translateY(10px);
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.easter-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

body.contrast-ritual .stage {
  filter: contrast(1.22) saturate(1.1);
}

.ambient-toggle {
  flex-shrink: 0;
  margin: 0;
  padding: 0.2rem 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.35);
  color: rgba(200, 200, 200, 0.55);
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  letter-spacing: 0;
  text-transform: none;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.ambient-toggle:hover:not(:disabled) {
  color: rgba(235, 235, 235, 0.85);
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
}

.ambient-toggle[aria-pressed="true"] {
  color: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 0.35);
}

.ambient-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.logo-neon-bloom {
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(90vw, 920px);
  height: min(58vh, 560px);
  max-width: 96%;
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse 62% 58% at 50% 48%,
    rgba(230, 236, 255, 0.28) 0%,
    rgba(200, 210, 240, 0.1) 38%,
    rgba(120, 130, 170, 0.04) 58%,
    transparent 78%
  );
  filter: blur(56px);
  opacity: 0.82;
  -webkit-mask-image: radial-gradient(ellipse 72% 68% at 50% 48%, #000 20%, transparent 78%);
  mask-image: radial-gradient(ellipse 72% 68% at 50% 48%, #000 20%, transparent 78%);
}

/* Yazının arkasında yumuşak beyaz: derinlik / rim hissi, okunabilirlik */
.hero-depth-glow {
  position: absolute;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
  width: min(118vw, 1240px);
  height: min(92vh, 720px);
  max-width: 100%;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 38% 36% at 50% 50%, rgba(255, 255, 255, 0.32) 0%, transparent 58%),
    radial-gradient(ellipse 58% 52% at 50% 48%, rgba(238, 242, 255, 0.2) 0%, transparent 65%),
    radial-gradient(ellipse 88% 78% at 50% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 72%);
  filter: blur(64px);
  opacity: 1;
  mix-blend-mode: screen;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.vhs {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .hero-depth-glow {
    opacity: 0.72;
    filter: blur(52px);
  }

  body::after {
    animation: none !important;
    opacity: 0 !important;
  }

  .vhs-flicker {
    animation: none !important;
    opacity: 0.4;
  }

  .vhs-noise-canvas {
    opacity: 0.02 !important;
  }

  .footer-line .pentagram {
    animation: none !important;
  }

  .load-veil__spin {
    animation: none !important;
  }

  .load-veil__sigil {
    animation: load-veil-pulse 4s ease-in-out infinite;
  }
}

@keyframes site-white-flicker {
  0%,
  100% {
    opacity: 0;
  }
  4.5% {
    opacity: 0;
  }
  4.8% {
    opacity: 0.1;
  }
  5.1% {
    opacity: 0;
  }
  18% {
    opacity: 0;
  }
  18.35% {
    opacity: 0.2;
  }
  18.7% {
    opacity: 0;
  }
  33% {
    opacity: 0;
  }
  33.25% {
    opacity: 0.14;
  }
  33.5% {
    opacity: 0;
  }
  48% {
    opacity: 0;
  }
  48.4% {
    opacity: 0.24;
  }
  48.85% {
    opacity: 0;
  }
  62% {
    opacity: 0;
  }
  62.3% {
    opacity: 0.08;
  }
  62.55% {
    opacity: 0;
  }
  76% {
    opacity: 0;
  }
  76.2% {
    opacity: 0.17;
  }
  76.5% {
    opacity: 0;
  }
  88% {
    opacity: 0;
  }
  88.4% {
    opacity: 0.11;
  }
  88.75% {
    opacity: 0;
  }
  95.5% {
    opacity: 0;
  }
  95.85% {
    opacity: 0.19;
  }
  96.2% {
    opacity: 0;
  }
}

.vhs-noise-canvas {
  position: absolute;
  inset: -6%;
  width: 112%;
  height: 112%;
  opacity: 0.07;
  mix-blend-mode: overlay;
  filter: contrast(1.06) brightness(1.04);
}

.vhs-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}

.vhs-flicker {
  position: absolute;
  inset: 0;
  background: var(--vhs-tint);
  animation: vhs-flicker 2.1s steps(11, end) infinite;
  mix-blend-mode: overlay;
  opacity: 1;
}

@keyframes vhs-flicker {
  0%,
  100% {
    opacity: 0.38;
  }
  9% {
    opacity: 0.48;
  }
  18% {
    opacity: 0.34;
  }
  27% {
    opacity: 0.46;
  }
  36% {
    opacity: 0.32;
  }
  45% {
    opacity: 0.44;
  }
  54% {
    opacity: 0.36;
  }
  63% {
    opacity: 0.5;
  }
  72% {
    opacity: 0.33;
  }
  81% {
    opacity: 0.45;
  }
  90% {
    opacity: 0.3;
  }
}

.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  padding: 1rem 1.25rem 1.4rem;
  text-align: center;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.98), transparent);
}

.footer-line {
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(220, 224, 230, 0.62);
}

.footer-text {
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.1);
}

.pentagram {
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
  color: rgba(210, 210, 210, 0.48);
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.12));
  transform-origin: 50% 50%;
}

.footer-line .pentagram:first-of-type {
  animation: pentagram-spin-cw 14s linear infinite;
}

.footer-line .pentagram:last-of-type {
  animation: pentagram-spin-ccw 14s linear infinite;
}

@keyframes pentagram-spin-cw {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes pentagram-spin-ccw {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(-360deg);
  }
}

@media (min-width: 480px) {
  .pentagram {
    width: 1.05rem;
    height: 1.05rem;
  }
}
