html,
body {
  height: 100%;
}

.stage {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
}

body.intro-active {
  overflow: hidden;
  height: 100vh;
  height: 100svh;
}

body.intro-active .stage {
  height: 100vh;
  height: 100svh;
}

body.intro-active .content {
  opacity: 0;
  pointer-events: none;
}

body.intro-active .nav-dock,
body.intro-active .business-cta-widget {
  opacity: 0;
  pointer-events: none;
}

/* 
   Wrapper for the "Paper Awakening" intro.
   It sits on top of the black body.
   It fades out at the end to reveal the simple black state.
*/
.intro-wrapper {
  position: fixed; /* Fixed so it doesn't scroll away */
  inset: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: radial-gradient(1200px 800px at 50% 45%, #ffffff 0%, #fbfbfb 55%, #f4f4f4 100%);
  z-index: 50;
  /* Start fading out after the intro completes */
  animation: fadeOutIntro 2s ease-in-out 5.8s forwards;
  pointer-events: none; /* Let clicks pass through after fade */
}

/* --- Intro Elements Styling --- */

.paper {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(900px 600px at 15% 10%, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0) 55%),
    radial-gradient(700px 500px at 85% 20%, rgba(0, 0, 0, 0.03) 0%, rgba(0, 0, 0, 0) 60%),
    linear-gradient(0deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.92));
  filter: contrast(1.02);
}

.layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.blob {
  position: absolute;
  width: 55vmax;
  height: 55vmax;
  border-radius: 999px;
  filter: blur(28px);
  transform: translate3d(0, 0, 0) scale(0);
  opacity: 0.95;
  animation: bloom 1.0s cubic-bezier(0.2, 1.4, 0.2, 1) forwards;
}

.blob.back {
  opacity: 0.7;
  filter: blur(34px);
}

/* Specific Blob Positions & Colors */
.b1 {
  left: -18vmax;
  top: -18vmax;
  background: radial-gradient(circle at 30% 30%, rgba(10, 10, 10, 0.85), rgba(10, 10, 10, 0) 65%);
  animation-delay: 0.05s;
}
.b2 {
  right: -22vmax;
  top: -10vmax;
  background: radial-gradient(circle at 55% 35%, rgba(20, 40, 85, 0.75), rgba(20, 40, 85, 0) 65%);
  animation-delay: 0.1s;
}
.b3 {
  left: -16vmax;
  bottom: -22vmax;
  background: radial-gradient(circle at 45% 60%, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0) 66%);
  animation-delay: 0.2s;
}
.f1 {
  left: -10vmax;
  top: 10vmax;
  background: radial-gradient(circle at 40% 40%, rgba(37, 99, 235, 0.46), rgba(37, 99, 235, 0) 66%);
  animation-delay: 0.4s;
}
.f2 {
  right: -12vmax;
  bottom: -16vmax;
  background: radial-gradient(circle at 55% 40%, rgba(147, 197, 253, 0.55), rgba(147, 197, 253, 0) 70%);
  animation-delay: 0.5s;
}

/* Floating Animations */
.float-a {
  animation:
    bloom 1.0s cubic-bezier(0.2, 1.4, 0.2, 1) forwards,
    floatA 10s ease-in-out 1.0s infinite alternate;
}
.float-b {
  animation:
    bloom 1.0s cubic-bezier(0.2, 1.4, 0.2, 1) forwards,
    floatB 12s ease-in-out 1.0s infinite alternate;
}
.float-c {
  animation:
    bloom 1.0s cubic-bezier(0.2, 1.4, 0.2, 1) forwards,
    floatC 14s ease-in-out 1.0s infinite alternate;
}

/* Lines Animation */
.lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
}

@media (max-width: 768px) {
  .intro-wrapper svg.lines {
    opacity: 0.3;
    transform: scale(1.5);
  }
}

.lines path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: draw 0.7s ease-in-out 0.7s forwards;
}

.lines .white {
  stroke: rgba(255, 255, 255, 0.86);
  stroke-width: 2.2;
}
.lines .black {
  stroke: rgba(0, 0, 0, 0.62);
  stroke-width: 2;
  animation-delay: 0.8s;
}

/* Ink Landscape */
.k8-landscape {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60%;
  z-index: 2;
  pointer-events: none;
  overflow: visible;
}

/* --- Welcome Text --- */
.welcome-container {
  position: absolute;
  top: 25%;
  left: 0;
  width: 100%;
  text-align: center;
  z-index: 10;
  pointer-events: none;
  padding: 0 16px;
}

.welcome-text {
  font-family: 'Playpen Sans Hebrew', 'Heebo', sans-serif;
  font-weight: 200;
  color: var(--deep-blue);
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-shadow: 0 10px 30px rgba(255, 255, 255, 0.8);
}

.line-1 {
  font-size: 2rem;
  opacity: 0;
  transform: translateY(20px);
  animation: textReveal 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 1.4s;
}

.line-2 {
  font-size: 3.5rem;
  font-weight: 700;
  opacity: 0;
  transform: translateY(20px);
  animation: textReveal 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 1.6s;
}

/* --- Landscape Timeline --- */
.mountain-outline {
  stroke-dasharray: 2000;
  stroke-dashoffset: 2000;
  opacity: 0.7;
  animation: drawLine 1.5s ease-out forwards 0.3s;
}

.mountain-fill {
  opacity: 0;
  transform-origin: bottom;
  transform: scaleY(0.9);
  animation: fillRise 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 0.6s;
}

.stream-line {
  stroke-dasharray: 2000;
  stroke-dashoffset: 2000;
  animation: drawLine 1.8s ease-out forwards 0.9s, floatWater 4s ease-in-out infinite alternate;
}

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

@keyframes fillRise {
  to {
    opacity: 1;
    transform: scaleY(1);
  }
}

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

@keyframes floatWater {
  from { transform: translateY(0); }
  to { transform: translateY(10px); }
}

@media screen and (max-width: 768px) {
  .k8-landscape {
    height: 40%;
    opacity: 0.5;
  }

  .welcome-container { top: 20%; }
  .line-1 { font-size: 1.5rem; }
  .line-2 { font-size: 2.5rem; }
}

@media screen and (max-width: 480px) {
  .blob {
    width: 70vmin;
    height: 70vmin;
    filter: blur(22px);
  }

  .b1 { left: -24vmin; top: -24vmin; }
  .b2 { right: -26vmin; top: -18vmin; }

  .welcome-container {
    top: max(14%, env(safe-area-inset-top));
  }

  .welcome-text {
    gap: 6px;
    text-shadow: 0 8px 22px rgba(255,255,255,0.85);
  }

  .line-1 { font-size: 1.25rem; }
  .line-2 { font-size: 2.05rem; }

  .k8-landscape {
    height: 46%;
    opacity: 0.6;
  }

  .mountain-outline { stroke-width: 1.6; }
  .stream-line { stroke-width: 3.2; }
}

@media screen and (max-width: 360px) {
  .line-1 { font-size: 1.1rem; }
  .line-2 { font-size: 1.85rem; }
  .k8-landscape { height: 48%; }
}
