/* ================================================================
   AYYILDIZ SPOR — SITE INTRO
   Full-screen entry splash. Shows once per browser session, on
   whichever page the visitor lands on first. Skippable at any time
   (click, Escape, or the Geç button) — never traps the user.
================================================================ */

:root {
  --intro-duration: 1700ms;
  --intro-ease: cubic-bezier(.22, .8, .2, 1);
}

/* Prevents a flash of the intro on repeat page loads within the same
   session — toggled by an inline script that runs before first paint. */
html.no-intro #siteIntro { display: none !important; }

.site-intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: var(--dark, #060d1e);
  cursor: pointer;
  opacity: 1;
  visibility: visible;
  transition: opacity .35s ease;
}

.site-intro.is-leaving {
  opacity: 0;
}

.site-intro.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

html.intro-active,
html.intro-active body {
  overflow: hidden;
  height: 100%;
}

/* ── Backdrop glow ─────────────────────────────────────────── */
.site-intro-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 22% 20%, rgba(34, 184, 199, .22), transparent 42%),
    radial-gradient(circle at 78% 82%, rgba(193, 18, 31, .34), transparent 46%);
  animation: introBreathe 6s ease-in-out infinite;
}

@keyframes introBreathe {
  0%, 100% { opacity: .75; }
  50%      { opacity: 1; }
}

/* ── Content ───────────────────────────────────────────────── */
.site-intro-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: min(480px, 88vw);
  cursor: default;
}

.site-intro-content > * {
  opacity: 0;
  transform: translateY(10px);
  animation: introRise .6s var(--intro-ease) forwards;
}
html.no-intro .site-intro-content > * {
  animation: none;
  opacity: 1;
  transform: none;
}

@keyframes introRise {
  to { opacity: 1; transform: translateY(0); }
}

.site-intro-mark    { animation-delay: .05s; }
.site-intro-rule    { animation-delay: .22s; }
.site-intro-kicker  { animation-delay: .30s; }
.site-intro-title   { animation-delay: .38s; }
.site-intro-subtitle{ animation-delay: .46s; }

/* ── Logo mark + progress ring ────────────────────────────── */
.site-intro-mark {
  position: relative;
  width: 96px;
  height: 96px;
  margin-bottom: 22px;
  display: grid;
  place-items: center;
}

.site-intro-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.site-intro-ring__track,
.site-intro-ring__progress {
  fill: none;
  stroke-width: 2;
}
.site-intro-ring__track {
  stroke: rgba(255, 255, 255, .12);
}
.site-intro-ring__progress {
  stroke: var(--primary, #c1121f);
  stroke-linecap: round;
  stroke-dasharray: 276.5;
  stroke-dashoffset: 276.5;
  animation: introRingDraw var(--intro-duration) linear forwards;
  animation-delay: .1s;
}
@keyframes introRingDraw {
  to { stroke-dashoffset: 0; }
}

.site-intro-logo {
  width: 68px;
  height: 68px;
  object-fit: contain;
  border-radius: 50%;
  background: rgba(255, 255, 255, .05);
  padding: 8px;
  filter: drop-shadow(0 6px 18px rgba(193, 18, 31, .38));
}

/* ── Red rule — recurring brand motif ─────────────────────── */
.site-intro-rule {
  width: 34px;
  height: 3px;
  margin-bottom: 16px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--primary, #c1121f), transparent);
}

/* ── Type ──────────────────────────────────────────────────── */
.site-intro-kicker {
  margin-bottom: 10px;
  font-family: "Barlow Condensed", "Oswald", sans-serif;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .5);
}

.site-intro-title {
  margin-bottom: 10px;
  font-family: "Barlow Condensed", "Oswald", sans-serif;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.1;
  color: #fff;
}

.site-intro-subtitle {
  font-size: .95rem;
  color: rgba(255, 255, 255, .6);
}

/* ── Skip button ───────────────────────────────────────────── */
.site-intro-skip {
  position: absolute;
  z-index: 3;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .78);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  cursor: pointer;
  opacity: 0;
  animation: introRise .5s var(--intro-ease) forwards;
  animation-delay: .55s;
  transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.site-intro-skip:hover,
.site-intro-skip:focus-visible {
  background: rgba(193, 18, 31, .14);
  border-color: rgba(193, 18, 31, .4);
  color: #fff;
  transform: translateY(-1px);
}
.site-intro-skip svg { flex-shrink: 0; opacity: .85; }
.site-intro-skip:focus-visible { outline: 2px solid rgba(255, 255, 255, .5); outline-offset: 2px; }

/* ── Exit state — content settles back before the backdrop clears ── */
.site-intro.is-leaving .site-intro-content,
.site-intro.is-leaving .site-intro-skip {
  opacity: 0;
  transform: translateY(-6px) scale(.98);
  transition: opacity .25s ease, transform .25s ease;
  animation: none;
}

/* ── Small screens ─────────────────────────────────────────── */
@media (max-width: 480px) {
  .site-intro-mark { width: 80px; height: 80px; margin-bottom: 18px; }
  .site-intro-logo { width: 56px; height: 56px; }
  .site-intro-skip { right: 16px; bottom: 16px; padding: 8px 14px; }
}

/* ── Reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .site-intro,
  .site-intro.is-leaving,
  .site-intro-content > *,
  .site-intro-skip {
    animation: none !important;
    transition: opacity .25s ease !important;
    transform: none !important;
  }
  .site-intro-content > *,
  .site-intro-skip { opacity: 1; }
  .site-intro-bg::before,
  .site-intro-bg::after { animation: none; opacity: .3; }
  .site-intro-ring__progress { stroke-dashoffset: 0; animation: none; }
}
