/* Aurora Borealis - When the Sky Dances */
/* CSS Art Piece showcasing keyframe animations and layered gradients */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --aurora-green: #00ff87;
  --aurora-teal: #00d4aa;
  --aurora-blue: #00bcd4;
  --aurora-purple: #9c27b0;
  --aurora-pink: #e91e63;
  --sky-dark: #0a0a1a;
  --sky-mid: #0d1025;
  --star-color: #ffffff;
}

html, body {
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background: var(--sky-dark);
  color: #e0e0e0;
  line-height: 1.8;
}

/* Scene Container */
.scene {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: linear-gradient(
    to bottom,
    var(--sky-dark) 0%,
    var(--sky-mid) 50%,
    #0f1530 100%
  );
}

/* Stars */
.stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70%;
  pointer-events: none;
  z-index: 1;
}

.star {
  position: absolute;
  background: var(--star-color);
  border-radius: 50%;
  animation: twinkle 3s ease-in-out infinite;
}

.star:nth-child(1) { width: 2px; height: 2px; top: 5%; left: 15%; animation-delay: 0s; }
.star:nth-child(2) { width: 3px; height: 3px; top: 12%; left: 45%; animation-delay: 0.5s; }
.star:nth-child(3) { width: 2px; height: 2px; top: 8%; left: 72%; animation-delay: 1s; }
.star:nth-child(4) { width: 1px; height: 1px; top: 20%; left: 25%; animation-delay: 1.5s; }
.star:nth-child(5) { width: 2px; height: 2px; top: 15%; left: 88%; animation-delay: 0.3s; }
.star:nth-child(6) { width: 3px; height: 3px; top: 25%; left: 55%; animation-delay: 2s; }
.star:nth-child(7) { width: 1px; height: 1px; top: 30%; left: 10%; animation-delay: 0.8s; }
.star:nth-child(8) { width: 2px; height: 2px; top: 18%; left: 35%; animation-delay: 1.2s; }
.star:nth-child(9) { width: 2px; height: 2px; top: 35%; left: 78%; animation-delay: 0.6s; }
.star:nth-child(10) { width: 1px; height: 1px; top: 8%; left: 62%; animation-delay: 1.8s; }
.star:nth-child(11) { width: 3px; height: 3px; top: 40%; left: 20%; animation-delay: 2.2s; }
.star:nth-child(12) { width: 2px; height: 2px; top: 22%; left: 92%; animation-delay: 0.4s; }
.star:nth-child(13) { width: 1px; height: 1px; top: 45%; left: 48%; animation-delay: 1.6s; }
.star:nth-child(14) { width: 2px; height: 2px; top: 10%; left: 5%; animation-delay: 2.5s; }
.star:nth-child(15) { width: 2px; height: 2px; top: 28%; left: 68%; animation-delay: 0.9s; }
.star:nth-child(16) { width: 1px; height: 1px; top: 50%; left: 82%; animation-delay: 1.4s; }
.star:nth-child(17) { width: 3px; height: 3px; top: 6%; left: 30%; animation-delay: 2.8s; }
.star:nth-child(18) { width: 2px; height: 2px; top: 38%; left: 42%; animation-delay: 0.2s; }
.star:nth-child(19) { width: 1px; height: 1px; top: 16%; left: 58%; animation-delay: 1.1s; }
.star:nth-child(20) { width: 2px; height: 2px; top: 48%; left: 8%; animation-delay: 2.3s; }
.star:nth-child(21) { width: 2px; height: 2px; top: 3%; left: 50%; animation-delay: 0.7s; }
.star:nth-child(22) { width: 1px; height: 1px; top: 32%; left: 95%; animation-delay: 1.9s; }
.star:nth-child(23) { width: 3px; height: 3px; top: 55%; left: 65%; animation-delay: 2.6s; }
.star:nth-child(24) { width: 2px; height: 2px; top: 42%; left: 3%; animation-delay: 0.1s; }
.star:nth-child(25) { width: 1px; height: 1px; top: 14%; left: 80%; animation-delay: 1.3s; }
.star:nth-child(26) { width: 2px; height: 2px; top: 52%; left: 38%; animation-delay: 2.1s; }
.star:nth-child(27) { width: 2px; height: 2px; top: 24%; left: 12%; animation-delay: 0.55s; }
.star:nth-child(28) { width: 1px; height: 1px; top: 36%; left: 52%; animation-delay: 1.7s; }
.star:nth-child(29) { width: 3px; height: 3px; top: 4%; left: 85%; animation-delay: 2.4s; }
.star:nth-child(30) { width: 2px; height: 2px; top: 58%; left: 28%; animation-delay: 0.85s; }

@keyframes twinkle {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* Aurora Borealis */
.aurora {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70%;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.aurora-layer {
  position: absolute;
  width: 200%;
  height: 100%;
  left: -50%;
  opacity: 0.6;
  filter: blur(30px);
  mix-blend-mode: screen;
}

/* Layer 1 - Main green aurora */
.aurora-1 {
  background: linear-gradient(
    180deg,
    transparent 0%,
    transparent 20%,
    rgba(0, 255, 135, 0.4) 35%,
    rgba(0, 255, 135, 0.6) 45%,
    rgba(0, 212, 170, 0.4) 55%,
    transparent 70%
  );
  animation: aurora-wave-1 8s ease-in-out infinite;
}

/* Layer 2 - Teal undertone */
.aurora-2 {
  background: linear-gradient(
    180deg,
    transparent 0%,
    transparent 25%,
    rgba(0, 188, 212, 0.3) 40%,
    rgba(0, 212, 170, 0.5) 50%,
    rgba(0, 188, 212, 0.3) 60%,
    transparent 75%
  );
  animation: aurora-wave-2 12s ease-in-out infinite;
  animation-delay: -2s;
}

/* Layer 3 - Purple accent */
.aurora-3 {
  background: linear-gradient(
    180deg,
    transparent 0%,
    transparent 30%,
    rgba(156, 39, 176, 0.3) 45%,
    rgba(156, 39, 176, 0.4) 50%,
    rgba(103, 58, 183, 0.3) 60%,
    transparent 75%
  );
  animation: aurora-wave-3 10s ease-in-out infinite;
  animation-delay: -4s;
}

/* Layer 4 - Pink highlights */
.aurora-4 {
  background: linear-gradient(
    180deg,
    transparent 0%,
    transparent 35%,
    rgba(233, 30, 99, 0.2) 45%,
    rgba(233, 30, 99, 0.3) 52%,
    transparent 65%
  );
  animation: aurora-wave-4 15s ease-in-out infinite;
  animation-delay: -1s;
  filter: blur(40px);
}

/* Layer 5 - Bright green curtain */
.aurora-5 {
  background: linear-gradient(
    180deg,
    transparent 0%,
    transparent 25%,
    rgba(0, 255, 135, 0.2) 30%,
    rgba(0, 255, 135, 0.5) 40%,
    rgba(0, 255, 135, 0.7) 45%,
    rgba(0, 212, 170, 0.5) 55%,
    rgba(0, 188, 212, 0.3) 65%,
    transparent 80%
  );
  animation: aurora-wave-5 6s ease-in-out infinite;
  filter: blur(20px);
}

@keyframes aurora-wave-1 {
  0%, 100% {
    transform: translateX(-10%) skewX(-5deg) scaleY(1);
    opacity: 0.5;
  }
  25% {
    transform: translateX(5%) skewX(3deg) scaleY(1.1);
    opacity: 0.7;
  }
  50% {
    transform: translateX(10%) skewX(-2deg) scaleY(0.9);
    opacity: 0.6;
  }
  75% {
    transform: translateX(-5%) skewX(5deg) scaleY(1.05);
    opacity: 0.55;
  }
}

@keyframes aurora-wave-2 {
  0%, 100% {
    transform: translateX(5%) skewX(3deg) scaleY(1);
    opacity: 0.4;
  }
  33% {
    transform: translateX(-8%) skewX(-4deg) scaleY(1.15);
    opacity: 0.6;
  }
  66% {
    transform: translateX(12%) skewX(2deg) scaleY(0.95);
    opacity: 0.45;
  }
}

@keyframes aurora-wave-3 {
  0%, 100% {
    transform: translateX(-5%) skewX(-2deg) scaleY(1);
    opacity: 0.35;
  }
  50% {
    transform: translateX(8%) skewX(4deg) scaleY(1.2);
    opacity: 0.55;
  }
}

@keyframes aurora-wave-4 {
  0%, 100% {
    transform: translateX(0%) skewX(0deg);
    opacity: 0.2;
  }
  25% {
    transform: translateX(-12%) skewX(-6deg);
    opacity: 0.35;
  }
  50% {
    transform: translateX(8%) skewX(3deg);
    opacity: 0.25;
  }
  75% {
    transform: translateX(-5%) skewX(-2deg);
    opacity: 0.4;
  }
}

@keyframes aurora-wave-5 {
  0%, 100% {
    transform: translateX(-3%) skewX(-8deg) scaleY(1);
    opacity: 0.4;
  }
  50% {
    transform: translateX(3%) skewX(8deg) scaleY(1.1);
    opacity: 0.65;
  }
}

/* Content */
.content {
  position: relative;
  z-index: 10;
  max-width: 700px;
  margin: 0 auto;
  padding: 8vh 2rem 30vh;
}

.title-section {
  text-align: center;
  margin-bottom: 4rem;
}

h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 400;
  letter-spacing: 0.05em;
  color: #fff;
  text-shadow:
    0 0 40px rgba(0, 255, 135, 0.5),
    0 0 80px rgba(0, 255, 135, 0.3);
  margin-bottom: 0.5rem;
  animation: title-glow 4s ease-in-out infinite;
}

@keyframes title-glow {
  0%, 100% {
    text-shadow:
      0 0 40px rgba(0, 255, 135, 0.5),
      0 0 80px rgba(0, 255, 135, 0.3);
  }
  50% {
    text-shadow:
      0 0 60px rgba(0, 255, 135, 0.7),
      0 0 100px rgba(0, 212, 170, 0.4),
      0 0 140px rgba(156, 39, 176, 0.2);
  }
}

.subtitle {
  font-style: italic;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
}

.story {
  background: rgba(10, 10, 26, 0.7);
  backdrop-filter: blur(10px);
  padding: 2.5rem;
  border-radius: 4px;
  border: 1px solid rgba(0, 255, 135, 0.1);
  box-shadow:
    0 0 60px rgba(0, 255, 135, 0.05),
    inset 0 0 60px rgba(0, 0, 0, 0.3);
}

.story p {
  margin-bottom: 1.5rem;
  text-align: justify;
  hyphens: auto;
}

.story p:last-child {
  margin-bottom: 0;
}

.opening {
  font-size: 1.1rem;
}

.opening em {
  color: var(--aurora-green);
  font-style: italic;
}

blockquote {
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  border-left: 3px solid var(--aurora-green);
  background: rgba(0, 255, 135, 0.05);
  font-style: italic;
  color: rgba(255, 255, 255, 0.9);
}

.reflection {
  color: rgba(255, 255, 255, 0.85);
  font-style: italic;
}

.closing {
  text-align: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.location {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.coordinates {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  color: var(--aurora-teal);
  opacity: 0.7;
}

/* Landscape Silhouette */
.landscape {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 25vh;
  z-index: 5;
  pointer-events: none;
}

.mountains {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 100%;
}

.mountain {
  position: absolute;
  bottom: 0;
  width: 0;
  height: 0;
  border-style: solid;
}

.mountain-1 {
  left: -5%;
  border-width: 0 25vw 18vh 25vw;
  border-color: transparent transparent #0a0a12 transparent;
}

.mountain-2 {
  left: 15%;
  border-width: 0 20vw 22vh 20vw;
  border-color: transparent transparent #08080f transparent;
}

.mountain-3 {
  left: 40%;
  border-width: 0 22vw 16vh 22vw;
  border-color: transparent transparent #0c0c15 transparent;
}

.mountain-4 {
  left: 60%;
  border-width: 0 25vw 20vh 25vw;
  border-color: transparent transparent #070710 transparent;
}

.mountain-5 {
  left: 80%;
  border-width: 0 20vw 14vh 20vw;
  border-color: transparent transparent #0b0b14 transparent;
}

/* Trees */
.trees {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 15vh;
}

.tree {
  position: absolute;
  bottom: 0;
  background: #050508;
}

.tree::before,
.tree::after {
  content: '';
  position: absolute;
  background: #050508;
}

/* Tree shapes using clip-path */
.tree {
  width: 2px;
  height: 8vh;
}

.tree::before {
  bottom: 30%;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 1.5vw solid transparent;
  border-right: 1.5vw solid transparent;
  border-bottom: 6vh solid #050508;
  background: transparent;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.tree::after {
  bottom: 15%;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 2vw solid transparent;
  border-right: 2vw solid transparent;
  border-bottom: 5vh solid #050508;
  background: transparent;
}

.tree-1 { left: 3%; height: 7vh; }
.tree-2 { left: 8%; height: 9vh; }
.tree-3 { left: 12%; height: 6vh; }
.tree-4 { left: 18%; height: 8vh; }
.tree-5 { left: 25%; height: 10vh; }
.tree-6 { left: 35%; height: 7vh; }
.tree-7 { left: 55%; height: 9vh; }
.tree-8 { left: 65%; height: 6vh; }
.tree-9 { left: 75%; height: 8vh; }
.tree-10 { left: 82%; height: 10vh; }
.tree-11 { left: 88%; height: 7vh; }
.tree-12 { left: 95%; height: 8vh; }

.ground {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 3vh;
  background: linear-gradient(
    to bottom,
    #080810 0%,
    #050508 100%
  );
}

/* Responsive Design */
@media (max-width: 768px) {
  .content {
    padding: 6vh 1.5rem 35vh;
  }

  .story {
    padding: 1.5rem;
  }

  blockquote {
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
  }

  .aurora-layer {
    filter: blur(20px);
  }

  .landscape {
    height: 20vh;
  }

  .tree::before {
    border-left-width: 3vw;
    border-right-width: 3vw;
  }

  .tree::after {
    border-left-width: 4vw;
    border-right-width: 4vw;
  }
}

@media (max-width: 480px) {
  .content {
    padding: 4vh 1rem 40vh;
  }

  .story {
    padding: 1.25rem;
  }

  .opening {
    font-size: 1rem;
  }

  .story p {
    text-align: left;
  }

  blockquote {
    padding: 1rem;
    margin: 1rem 0;
  }

  .tree::before {
    border-left-width: 4vw;
    border-right-width: 4vw;
  }

  .tree::after {
    border-left-width: 5vw;
    border-right-width: 5vw;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .aurora-layer,
  .star,
  h1 {
    animation: none;
  }

  .aurora-layer {
    opacity: 0.5;
  }

  .star {
    opacity: 0.6;
  }
}
