:root {
  --bg-image: url("bk.png");
  --shine-duration: 5.8s;
  --resting-line: rgba(212, 181, 255, 0.44);
  --resting-glow: rgba(160, 92, 255, 0.22);
  --text-main: rgba(239, 229, 255, 0.96);
  --text-glow: rgba(187, 129, 255, 0.76);
  --safe-inset: clamp(1rem, 1.6vw, 2rem);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: #020107;
}

body {
  overflow: hidden;
  font-family: Orbitron, Rajdhani, Eurostile, "Segoe UI", system-ui, sans-serif;
}

.site-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  isolation: isolate;
  overflow: hidden;
  background: #020107;
}

.background {
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image: var(--bg-image);
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  transform: scale(1.01);
}

/* Adds the dark, cinematic web-page treatment over the image asset. */
.shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 47%, rgba(139, 73, 206, 0.10), transparent 31%),
    radial-gradient(circle at 50% 110%, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.86) 82%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.52), transparent 22%, transparent 78%, rgba(0, 0, 0, 0.52)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.48), transparent 42%, rgba(0, 0, 0, 0.34));
}

.hero {
  position: relative;
  z-index: 2;
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 7vmin;
  text-align: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.7rem, 1.15vw, 1.45rem);
}

.glow-text {
  position: relative;
  margin: 0;
  color: var(--text-main);
  font-weight: 400;
  line-height: 1;
  text-transform: none;
  filter: saturate(1.05);
  text-shadow:
    0 0 0.06em rgba(255, 255, 255, 0.95),
    0 0 0.22em var(--text-glow),
    0 0 0.60em rgba(145, 78, 255, 0.56),
    0 0 1.15em rgba(94, 56, 255, 0.38);
}

.coming-soon {
  letter-spacing: clamp(0.18rem, 0.82vw, 0.9rem);
  font-size: clamp(2.6rem, 6.7vw, 8.5rem);
}

.project-name {
  letter-spacing: clamp(0.12rem, 0.48vw, 0.52rem);
  font-size: clamp(1.3rem, 3.35vw, 4.25rem);
}

/* Soft duplicate glow behind the actual glyphs. */
.glow-text::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  z-index: -1;
  color: rgba(188, 134, 255, 0.45);
  filter: blur(0.18em);
  opacity: 0.58;
}

/* Animated text shimmer: the text acts like a mask for a diagonal shine bar. */
.glow-text::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  z-index: 2;
  color: transparent;
  opacity: 0;
  background:
    linear-gradient(108deg,
      transparent 0%,
      transparent 35%,
      rgba(178, 132, 255, 0.30) 43%,
      rgba(255, 255, 255, 1) 50%,
      rgba(225, 199, 255, 0.92) 56%,
      transparent 66%,
      transparent 100%);
  background-size: 240% 100%;
  background-position: 150% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow:
    0 0 0.05em rgba(255, 255, 255, 0.88),
    0 0 0.32em rgba(211, 175, 255, 0.96),
    0 0 0.85em rgba(140, 84, 255, 0.75);
}

.site-shell.is-shining .glow-text::before {
  animation: text-shine var(--shine-duration) cubic-bezier(0.18, 0.72, 0.18, 1) both;
}

.copyright {
  position: absolute;
  left: 50%;
  /* Keep the copyright above the lower edge of the clipped SVG frame.
     The frame's lower border sits slightly above the page edge, so this
     uses extra viewport-based clearance instead of hugging the border. */
  bottom: calc(var(--safe-inset) + 4.2vh + 1.15rem);
  z-index: 4;
  transform: translateX(-50%);
  color: rgba(190, 186, 199, 0.72);
  font-size: clamp(0.68rem, 0.9vw, 0.95rem);
  font-weight: 400;
  letter-spacing: 0.16em;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 0 0.55rem rgba(0, 0, 0, 0.88);
  pointer-events: none;
}

.edge-frame {
  position: absolute;
  inset: var(--safe-inset);
  z-index: 3;
  width: calc(100% - (var(--safe-inset) * 2));
  height: calc(100% - (var(--safe-inset) * 2));
  pointer-events: none;
  overflow: visible;
  mix-blend-mode: screen;
}

.frame-line,
.frame-glow,
.shine-route {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.frame-line {
  stroke: var(--resting-line);
  stroke-width: 1.05;
  opacity: 0.95;
}

.frame-glow {
  stroke: var(--resting-glow);
  stroke-width: 3;
  filter: url(#border-soft-glow);
  opacity: 0.62;
}

.shine-route {
  stroke: url(#moving-shine);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 86 1000;
  stroke-dashoffset: 1086;
  opacity: 0;
}

.shine-fat {
  stroke-width: 13;
  filter: url(#shine-blur);
}

.shine-core {
  stroke-width: 2.25;
  filter: url(#border-soft-glow);
}

.site-shell.is-shining .shine-route {
  animation: border-shine var(--shine-duration) cubic-bezier(0.2, 0.82, 0.14, 1) both;
}

.site-shell.is-shining .shine-route-b {
  animation-delay: 0.12s;
}

@keyframes border-shine {
  0% {
    stroke-dashoffset: 1086;
    opacity: 0;
  }
  9% {
    opacity: 0;
  }
  17% {
    opacity: 1;
  }
  74% {
    opacity: 1;
  }
  91% {
    opacity: 0.55;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 0;
  }
}

@keyframes text-shine {
  0%, 12% {
    opacity: 0;
    background-position: 155% 50%;
  }
  24% {
    opacity: 0.95;
  }
  66% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
    background-position: -55% 50%;
  }
}

@media (max-width: 760px) {
  :root {
    --safe-inset: 0.72rem;
  }

  .coming-soon {
    letter-spacing: clamp(0.08rem, 0.65vw, 0.22rem);
    font-size: clamp(2rem, 12vw, 4rem);
  }

  .project-name {
    letter-spacing: clamp(0.07rem, 0.48vw, 0.18rem);
    font-size: clamp(1rem, 6vw, 2rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-shell.is-shining .shine-route,
  .site-shell.is-shining .glow-text::before {
    animation: none;
  }
}
