html, body {
  margin: 0;
  min-height: 100%;
  background: #000;
  color-scheme: dark;
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 4vh;
}

/* content bg ni upar rahe */
.eyes,
.text-svg,
.red-line,
.band-svg {
  position: relative;
  z-index: 1;
}

/* cap eyes ni upar rahe jethi topi ni niche eyes dekhay ane bhag kapay nahi */
.art-cap {
  position: relative;
  z-index: 2;
}

/* ---------- eyes ---------- */
.eyes {
  display: flex;
  justify-content: center;
  gap: min(7vw, 90px);
  margin-top: -12px;
}

.eye {
  width: min(22vw, 200px, 30vh);
  overflow: visible;
  animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% {
    filter: drop-shadow(0 0 10px rgba(255, 40, 30, .45));
  }
  50% {
    filter: drop-shadow(0 0 26px rgba(255, 40, 30, .85));
  }
}

/* ---------- TEXT 1 ---------- */
.text-svg {
  width: min(66vw, 820px);
  margin-top: 3vh;
  opacity: 0;
  transition: opacity .6s ease;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, .5));
}

.text-svg.show {
  opacity: 1;
}

.text-line {
  font: 700 72px Arial, sans-serif;
}

.text-copy {
  fill: none;
  stroke-width: 2px;
  stroke-dasharray: 40 160;
}

.text-copy:nth-child(1) {
  stroke: #ffffff;
  stroke-dashoffset: 40;
}

.text-copy:nth-child(2) {
  stroke: #000000;
  stroke-dashoffset: 80;
}

.text-copy:nth-child(3) {
  stroke: #ffffff;
  stroke-dashoffset: 120;
}

.text-copy:nth-child(4) {
  stroke: #000000;
  stroke-dashoffset: 160;
}

.text-copy:nth-child(5) {
  stroke: #ffffff;
  stroke-dashoffset: 200;
}

.text-svg.play .text-copy {
  animation: stroke-offset 6s ease-in-out forwards;
}

@keyframes stroke-offset {
  0% {
    stroke-dasharray: 40 160;
  }
  40% {
    stroke-dasharray: 0 500;
    stroke-dashoffset: 200;
  }
  100% {
    stroke-dasharray: 220 0;
    stroke-dashoffset: 0;
  }
}

/* ---------- RED LINE ---------- */
.red-line {
  width: 72px;
  height: 2px;
  background: #ff2b1c;
  margin-top: 2.2vh;
  margin-bottom: 0;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.8s ease-in-out;
  box-shadow: 0 0 8px rgba(255, 43, 28, .5);
}

.red-line.draw {
  transform: scaleX(1);
}

/* ---------- TEXT 2 ---------- */
.band-svg {
  width: min(60vw, 520px);
  margin-top: 2vh;
}

.band-line {
  font-family: Arial, sans-serif;
  font-weight: 700;
  fill: none;
  stroke: #fff;
  stroke-width: 1.5px;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
}

.band-line.o-underline {
  stroke-dasharray: 45;
  stroke-dashoffset: 45;
  animation-delay: 0.6s;
}

.band-svg.draw .band-line {
  animation: draw 6s linear forwards;
}

.band-svg.draw .band-line.l2 {
  animation-delay: 1.2s;
}

@keyframes draw {
  100% {
    stroke-dashoffset: 0;
  }
}

/* ---------- screen reader ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- SVG ART ---------- */
.art {
  pointer-events: none;
}

.art svg,
.art img {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.art-cap {
  width: min(64vw, 620px);
  margin-top: 2vh;
  margin-bottom: 0;
}

/* ---------- BG FULL SCREEN ---------- */
.art-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
}

.art-bg svg,
.art-bg img {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.art-bg img {
  object-fit: cover;
  filter: invert(1);
}

/* ---------- BLACK DIM + CURSOR REVEAL ---------- */
.bg-dim {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: rgba(0, 0, 0, .7);   /* 0.5 = halku, 0.9 = ekdam dark */

  --mx: -999px;
  --my: -999px;
  --r: 0px;

  -webkit-mask-image: radial-gradient(
    circle max(var(--r), 1px) at var(--mx) var(--my),
    transparent 0%,
    rgba(0, 0, 0, .4) 55%,
    #000 100%
  );
  mask-image: radial-gradient(
    circle max(var(--r), 1px) at var(--mx) var(--my),
    transparent 0%,
    rgba(0, 0, 0, .4) 55%,
    #000 100%
  );
}

/* ---------- OUTLINE DRAW ---------- */
.art .shape {
  stroke: url(#artGradient);
  stroke-linejoin: round;
  stroke-linecap: butt;
}

.art.play .shape {
  animation: artDraw 5.5s ease-in-out forwards;
}

/* BG ONLY: dhimu draw (12s) — vadhu number = vadhu dhimu */
.art-bg.play .shape {
  animation: artDraw 12s ease-in-out forwards;
}

@keyframes artDraw {
  from {
    stroke-dashoffset: var(--len);
  }
  to {
    stroke-dashoffset: 0;
  }
}

/* ---------- CAP ---------- */
.art-cap {
  position: relative;
}

.art-cap img {
  position: absolute;
  inset: 0;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.art-cap.done img {
  opacity: 1;
}

.art-cap.done .shape {
  stroke-opacity: .5 !important;
  transition: stroke-opacity 1.2s ease;
}

.art-cap.as-img img {
  position: static;
  opacity: 1;
}

/* ---------- MOBILE ---------- */
@media (max-width: 760px) {
  body {
    min-height: 100vh;
    min-height: 100dvh;
    justify-content: center;
    padding: 2vh 0;
    box-sizing: border-box;
  }

  .text-svg {
    width: 92vw;
    margin-top: 2.5vh;
  }

  .red-line {
    width: 58px;
    margin-top: 1.8vh;
  }

  .band-svg {
    width: 80vw;
    margin-top: 1.8vh;
  }

  .art-cap {
    width: min(95vw, 370px);
    margin-top: 0;
    margin-bottom: 0;
  }

  .eyes {
    gap: min(4vw, 18px);
    margin-top: -8px;
  }

  .eye {
    width: min(30vw, 120px);
  }
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  .eye {
    animation: none;
  }

  .red-line {
    transform: scaleX(1) !important;
    transition: none !important;
  }

  .text-copy,
  .band-line {
    animation: none !important;
  }

  .text-copy {
    stroke-dasharray: 220 0;
    stroke-dashoffset: 0;
  }

  .band-line {
    stroke-dashoffset: 0;
  }

  .art .shape {
    animation: none !important;
    stroke-dashoffset: 0 !important;
  }

  .art-cap img {
    opacity: 1;
  }
}