/* ============================================================
   CINEMATIC INTRO LOADER
   Uses your existing --ink, --accent, --font-display, --font-mono
   variables so it automatically matches your palette.
   ============================================================ */

#intro-loader {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: #0a0a0d; /* fixed dark — intentionally NOT var(--ink), since --ink
                          flips to a light color in the dark-premium theme and
                          would make this background invisible */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: clip-path 1.4s cubic-bezier(0.76, 0, 0.24, 1);
  clip-path: circle(150% at 50% 50%);
}

#intro-loader.wiping {
  clip-path: circle(0% at 50% 50%);
}

#intro-loader.done {
  display: none;
}

#intro-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.intro-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.intro-ring-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.75rem;
}

.intro-ring {
  position: absolute;
  inset: 0;
}

.intro-ring circle {
  fill: none;
  stroke: var(--accent, #3654d6);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
  animation: introRingDraw 2s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes introRingDraw {
  to { stroke-dashoffset: 0; }
}

.intro-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  color: white;
  opacity: 0;
  transform: scale(0.6);
  animation: introMarkIn 0.6s ease forwards;
  animation-delay: 1.7s;
}

@keyframes introMarkIn {
  to { opacity: 1; transform: scale(1); }
}

.intro-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 4vw, 2rem);
  color: white;
  display: flex;
  overflow: hidden;
}

.intro-name span {
  display: inline-block;
  opacity: 0;
  transform: translateY(100%);
  animation: introLetterIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

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

.intro-tagline {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--accent, #3654d6);
  margin-top: 0.9rem;
  min-height: 1.2em;
}

.intro-tagline::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 0.9em;
  background: var(--accent, #3654d6);
  margin-left: 2px;
  animation: introBlink 0.8s step-end infinite;
  vertical-align: middle;
}

@keyframes introBlink {
  50% { opacity: 0; }
}

.intro-progress-track {
  width: 180px;
  height: 2px;
  background: rgba(255,255,255,0.15);
  border-radius: 999px;
  margin-top: 2rem;
  overflow: hidden;
}

.intro-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent, #3654d6);
  border-radius: 999px;
}

.intro-percent {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: rgba(255,255,255,0.5);
  margin-top: 0.6rem;
  letter-spacing: 0.05em;
}

.intro-skip {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  z-index: 3;
  background: none;
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.6);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.intro-skip:hover { border-color: white; color: white; }

@media (max-width: 480px) {
  .intro-ring-wrap { width: 90px; height: 90px; }
  .intro-skip { bottom: 1.25rem; right: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  #intro-loader { display: none !important; }
}