:root {
  --ribbon-deep: #b5121b;
  --ribbon-bright: #d71920;
  --bg-overlay: rgba(8, 10, 16, 0.62);
  --text-light: #f8f9fb;
  --accent-gold: #d4a955;
  --target-strength: 0;
  --scissors-x: 18vw;
  --scissor-tilt: 0deg;
  --ribbon-height: clamp(90px, 12vw, 132px);
  --easing-premium: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--text-light);
  background: #07080b;
  overflow: hidden;
}

.intro-stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  isolation: isolate;
  overflow: hidden;
}

.bg-screenshot,
.bg-overlay,
.confetti-canvas,
.screen-flash {
  position: absolute;
  inset: 0;
}

.bg-screenshot {
  background-image: url("assets/homepage-screenshot.jpg");
  background-position: center;
  background-size: cover;
  transform: scale(1.06);
  filter: blur(2.3px) saturate(1.05);
  opacity: 0;
  animation: bgIn 1.1s var(--easing-premium) forwards;
}

.bg-overlay {
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 244, 216, 0.11), transparent 54%),
    linear-gradient(180deg, rgba(7, 8, 12, 0.5), var(--bg-overlay));
  opacity: 0;
  animation: fadeIn 0.75s ease forwards 0.2s;
}

.confetti-canvas {
  z-index: 4;
  pointer-events: none;
}

.screen-flash {
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle, rgba(255, 245, 220, 0.75) 0%, rgba(255, 245, 220, 0) 68%);
  transition: opacity 0.45s ease;
}

.screen-flash.is-active {
  opacity: 1;
}

.launch-copy {
  position: absolute;
  top: clamp(7vh, 9vh, 12vh);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  max-width: min(860px, 92vw);
  opacity: 0;
  animation: copyIn 0.85s var(--easing-premium) forwards 0.45s;
}

.launch-kicker {
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: clamp(0.66rem, 1.2vw, 0.88rem);
  color: rgba(255, 247, 232, 0.88);
}

.launch-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.8rem, 4.2vw, 3.75rem);
  line-height: 1.1;
  text-shadow: 0 8px 26px rgba(0, 0, 0, 0.44);
}

.launch-subtitle {
  font-size: clamp(0.95rem, 1.8vw, 1.24rem);
  color: rgba(248, 249, 251, 0.87);
}

.progress-message {
  margin: 0 auto;
  min-height: 1.4em;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 244, 223, 0.93);
}

.launch-progress-wrap {
  width: min(460px, 85vw);
  margin-top: 0.65rem;
}

.launch-progress-track {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

.launch-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  transition: width 0.22s ease;
  background: linear-gradient(90deg, rgba(255, 216, 137, 0.8), rgba(212, 169, 85, 1));
}

.ribbon-zone {
  position: absolute;
  inset: 0;
  z-index: 3;
  touch-action: none;
}

.ribbon-zone:hover {
  cursor: none;
}

.ribbon {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: var(--ribbon-height);
  transform: translateY(-50%);
}

.ribbon-piece {
  position: absolute;
  top: 0;
  height: 100%;
  background:
    linear-gradient(
      180deg,
      #e22a31 0%,
      #d71920 22%,
      #b5121b 52%,
      #8f0f15 100%
    );
  box-shadow:
    inset 0 -12px 20px rgba(20, 4, 4, 0.24),
    inset 0 8px 14px rgba(255, 130, 130, 0.3),
    0 18px 30px rgba(5, 5, 7, 0.34);
  animation: wave 2.8s ease-in-out infinite;
}

.ribbon-piece::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    124deg,
    rgba(255, 255, 255, 0.22) 0%,
    rgba(255, 255, 255, 0.08) 42%,
    rgba(90, 6, 12, 0.32) 100%
  );
  mix-blend-mode: soft-light;
}

.ribbon-left {
  left: 0;
  width: 50%;
  border-right: 2px solid rgba(255, 255, 255, 0.1);
  transform-origin: right center;
}

.ribbon-right {
  right: 0;
  width: 50%;
  border-left: 2px solid rgba(255, 255, 255, 0.1);
  transform-origin: left center;
}

.ribbon-left::after,
.ribbon-right::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 42px;
  height: 42px;
  transform: translateY(-50%) rotate(45deg);
  background: linear-gradient(180deg, #8f0f15, #6d0b11);
  box-shadow: inset 0 2px 6px rgba(255, 197, 197, 0.24);
}

.ribbon-left::after {
  left: 9px;
}

.ribbon-right::after {
  right: 9px;
}

.ribbon-bow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(126px, 16vw, 186px);
  height: clamp(74px, 9vw, 108px);
  transform: translate(-50%, -50%);
  z-index: 4;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.38));
  pointer-events: none;
}

.bow-loop,
.bow-knot,
.bow-tail {
  position: absolute;
  display: block;
}

.bow-loop {
  top: 10%;
  width: 47%;
  height: 62%;
  background:
    linear-gradient(145deg, #e63238 0%, #cf1e25 38%, #a81018 100%);
  border: 1px solid rgba(104, 9, 14, 0.38);
  box-shadow:
    inset 0 7px 10px rgba(255, 170, 170, 0.25),
    inset 0 -10px 13px rgba(82, 9, 14, 0.28);
}

.bow-loop-left {
  left: 3%;
  border-radius: 68% 36% 44% 66% / 64% 40% 58% 44%;
  transform: rotate(-12deg);
}

.bow-loop-right {
  right: 3%;
  border-radius: 36% 68% 66% 44% / 40% 64% 44% 58%;
  transform: rotate(12deg);
}

.bow-knot {
  left: 50%;
  top: 30%;
  width: 23%;
  height: 40%;
  transform: translateX(-50%);
  border-radius: 40%;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 189, 189, 0.6), transparent 55%),
    linear-gradient(180deg, #d81f27 0%, #be141c 56%, #8f0e15 100%);
  border: 1px solid rgba(87, 7, 12, 0.45);
  box-shadow:
    inset 0 -5px 9px rgba(64, 4, 9, 0.32),
    0 2px 4px rgba(0, 0, 0, 0.25);
}

.bow-tail {
  bottom: -12%;
  width: 20%;
  height: 43%;
  background:
    linear-gradient(180deg, #c61a21 0%, #a70f17 100%);
  border: 1px solid rgba(84, 7, 12, 0.4);
  clip-path: polygon(14% 0%, 100% 0%, 76% 70%, 99% 100%, 0% 74%);
  box-shadow: inset 0 -6px 8px rgba(65, 5, 10, 0.24);
}

.bow-tail-left {
  left: 26%;
  transform: rotate(10deg);
}

.bow-tail-right {
  right: 26%;
  transform: scaleX(-1) rotate(10deg);
}

.cut-glow {
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 100%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(255, 222, 140, 0), rgba(255, 222, 140, 0.95), rgba(255, 222, 140, 0));
  opacity: 0;
  filter: drop-shadow(0 0 7px rgba(255, 230, 168, 0.9));
  transition: opacity 0.25s ease;
}

.cut-target {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 66px;
  height: 66px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid rgba(255, 243, 211, 0.72);
  box-shadow:
    0 0 0 5px rgba(212, 169, 85, calc(0.09 + (var(--target-strength) * 0.18))),
    0 0 calc(7px + (var(--target-strength) * 20px)) rgba(255, 214, 135, calc(0.22 + (var(--target-strength) * 0.55)));
  background: radial-gradient(circle, rgba(255, 221, 149, calc(0.13 + (var(--target-strength) * 0.18))), transparent 68%);
  animation: targetPulse 1.7s ease-in-out infinite;
}

.cut-target::after {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: inherit;
  border: 1px dashed rgba(255, 246, 224, 0.65);
}

.scissors {
  position: absolute;
  left: var(--scissors-x);
  top: 50%;
  transform: translate(-50%, -50%) rotate(var(--scissor-tilt));
  transform-origin: 50% 50%;
  width: clamp(100px, 13vw, 148px);
  aspect-ratio: 150 / 120;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  padding: 0;
  z-index: 6;
  cursor: grab;
  filter: drop-shadow(0 10px 8px rgba(0, 0, 0, 0.5));
  opacity: 0;
  animation: scissorsIn 0.7s var(--easing-premium) forwards 0.95s;
  transition: transform 0.08s ease-out, filter 0.2s ease;
}

.scissors:focus-visible {
  outline: 2px solid rgba(255, 224, 163, 0.95);
  outline-offset: 2px;
}

.scissors.dragging {
  cursor: grabbing;
  filter: drop-shadow(0 14px 16px rgba(0, 0, 0, 0.56));
}

.scissors-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.blade {
  transform-origin: 76px 60px;
  transition: transform 0.16s ease;
}

.scissors.dragging .blade-top {
  animation: bladeTop 0.3s ease-in-out infinite alternate;
}

.scissors.dragging .blade-bottom {
  animation: bladeBottom 0.3s ease-in-out infinite alternate;
}

.scissors.ready {
  filter:
    drop-shadow(0 0 14px rgba(255, 226, 162, 0.72))
    drop-shadow(0 12px 14px rgba(0, 0, 0, 0.55));
}

.skip-intro-btn {
  position: fixed;
  top: clamp(14px, 2vw, 20px);
  right: clamp(12px, 2vw, 22px);
  z-index: 10;
  border-color: rgba(255, 255, 255, 0.7);
  color: #f8f9fb;
  backdrop-filter: blur(7px);
  background: rgba(14, 16, 22, 0.35);
}

.skip-intro-btn:hover,
.skip-intro-btn:focus-visible {
  background: rgba(212, 169, 85, 0.16);
  color: #fff8e9;
  border-color: rgba(255, 242, 206, 0.9);
}

.intro-stage.ready-to-cut .ribbon-piece {
  animation-duration: 1.4s;
}

.intro-stage.ready-to-cut .ribbon {
  animation: ribbonReady 0.34s ease-in-out infinite;
}

.intro-stage.is-cutting .ribbon-piece {
  animation-play-state: paused;
}

.intro-stage.is-cutting .cut-glow {
  opacity: 1;
}

.intro-stage.cut-launched .ribbon-left {
  transform: translateX(-56vw) rotate(-7deg);
  transition: transform 1.1s var(--easing-premium);
}

.intro-stage.cut-launched .ribbon-right {
  transform: translateX(56vw) rotate(7deg);
  transition: transform 1.1s var(--easing-premium);
}

.intro-stage.cut-launched .ribbon-bow {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.78);
  transition: opacity 0.36s ease, transform 0.45s var(--easing-premium);
}

.intro-stage.cut-launched .launch-copy {
  opacity: 0;
  transform: translate(-50%, 18px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.intro-stage.cut-launched .bg-screenshot {
  filter: blur(0.6px) brightness(1.12) saturate(1.09);
  transform: scale(1.12);
  transition: filter 1s ease, transform 1.15s var(--easing-premium);
}

.intro-stage.cut-launched .bg-overlay {
  opacity: 0.24;
  transition: opacity 0.95s ease;
}

@keyframes bgIn {
  from {
    opacity: 0;
    transform: scale(1.11);
  }
  to {
    opacity: 1;
    transform: scale(1.06);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes copyIn {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes scissorsIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -35%) scale(0.9);
  }
  60% {
    opacity: 1;
    transform: translate(-50%, -54%) scale(1.04);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes wave {
  0%,
  100% {
    transform: translateY(0) skewX(0deg);
  }
  50% {
    transform: translateY(-2px) skewX(-0.6deg);
  }
}

@keyframes targetPulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.06);
  }
}

@keyframes bladeTop {
  from {
    transform: rotate(6deg);
  }
  to {
    transform: rotate(-7deg);
  }
}

@keyframes bladeBottom {
  from {
    transform: rotate(-6deg);
  }
  to {
    transform: rotate(7deg);
  }
}

@keyframes ribbonReady {
  0%,
  100% {
    transform: translateY(-50%);
  }
  40% {
    transform: translateY(calc(-50% - 0.8px));
  }
  70% {
    transform: translateY(calc(-50% + 0.8px));
  }
}

@media (max-width: 992px) {
  :root {
    --ribbon-height: clamp(84px, 11vw, 104px);
  }

  .launch-copy {
    top: clamp(6vh, 8vh, 9vh);
  }

  .cut-target {
    width: 72px;
    height: 72px;
  }
}

@media (max-width: 576px) {
  :root {
    --ribbon-height: clamp(78px, 20vw, 90px);
  }

  .launch-copy {
    top: 7vh;
  }

  .launch-title {
    font-size: clamp(1.45rem, 8vw, 2.1rem);
  }

  .launch-subtitle {
    font-size: 0.92rem;
    padding: 0 0.55rem;
  }

  .progress-message {
    font-size: 0.92rem;
  }

  .scissors {
    width: clamp(92px, 22vw, 114px);
  }

  .cut-target {
    width: 76px;
    height: 76px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .bg-screenshot {
    opacity: 1;
    transform: scale(1.02);
    filter: blur(0.2px);
  }

  .launch-copy,
  .scissors,
  .bg-overlay {
    opacity: 1;
  }
}
