/* 
 * Iskaira - Core Layout
 * Main layout and section styling for the Ice Queen theme
 */

/* Intro Video Overlay */
.intro-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--color-void);
  z-index: var(--z-max);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 3s cubic-bezier(0.22, 0.61, 0.36, 1);
  overflow: hidden;
}

.intro-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 30% 20%, rgba(0, 184, 204, 0.03) 0%, rgba(0, 0, 0, 0) 50%),
    radial-gradient(circle at 70% 60%, rgba(52, 33, 59, 0.03) 0%, rgba(0, 0, 0, 0) 60%);
  z-index: 1;
  pointer-events: none;
}

.intro-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.intro-video-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  overflow: hidden;
}

.intro-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.1) brightness(0.3) saturate(0.6) blur(2px);
  transform: scale(1.1);
  opacity: 0;
  transition: opacity 8s ease-in-out, filter 8s ease-in-out, transform 15s ease-in-out;
}

.intro-video.visible {
  opacity: 0.6;
  transform: scale(1.05);
}

.intro-fog {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../assets/frost_effects/frost_effect_004.png');
  background-size: 200% 200%;
  opacity: 0;
  mix-blend-mode: screen;
  animation: fogDrift 70s linear infinite;
  transition: opacity 8s ease-in-out;
  z-index: 2;
}

/* Add a second fog layer for more depth */
.intro-fog::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../assets/frost_effects/frost_effect_001.png');
  background-size: 150% 150%;
  opacity: 0.3;
  mix-blend-mode: screen;
  animation: reverseFogDrift 90s linear infinite;
}

.intro-fog.visible {
  opacity: 0.25;
}

@keyframes fogDrift {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 200% 200%;
  }
}

@keyframes reverseFogDrift {
  0% {
    background-position: 200% 200%;
  }
  100% {
    background-position: 0 0;
  }
}

.intro-vignette {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at center,
    rgba(3, 3, 5, 0.5) 0%,
    rgba(3, 3, 5, 0.95) 90%
  );
  z-index: 1;
}

.intro-content {
  position: relative;
  z-index: 10;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  /* Add haunting ice glow that changes direction */
  box-shadow: inset 0 0 100px rgba(0, 184, 204, 0);
  transition: box-shadow 2s ease;
}

.intro-overlay.visible .intro-content {
  animation: hauntedIceGlow 8s infinite alternate ease-in-out;
}

@keyframes hauntedIceGlow {
  0% {
    box-shadow: 
      inset 100px 0 100px rgba(0, 184, 204, 0.1),
      inset -20px -20px 100px rgba(0, 184, 204, 0.05);
  }
  25% {
    box-shadow: 
      inset 0 100px 100px rgba(0, 184, 204, 0.15),
      inset -50px -50px 100px rgba(0, 184, 204, 0.05);
  }
  50% {
    box-shadow: 
      inset -100px 0 100px rgba(0, 184, 204, 0.1),
      inset 20px -20px 100px rgba(0, 184, 204, 0.05);
  }
  75% {
    box-shadow: 
      inset 0 -100px 100px rgba(0, 184, 204, 0.15),
      inset 50px 50px 100px rgba(0, 184, 204, 0.05);
  }
  100% {
    box-shadow: 
      inset 100px 0 100px rgba(0, 184, 204, 0.1),
      inset -20px -20px 100px rgba(0, 184, 204, 0.05);
  }
}

/* Add magical frost particle effect */
.intro-content::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background-image: 
    radial-gradient(circle at 50% 30%, rgba(0, 184, 204, 0.05) 0%, rgba(0, 0, 0, 0) 3%),
    radial-gradient(circle at 30% 50%, rgba(0, 184, 204, 0.05) 0%, rgba(0, 0, 0, 0) 4%),
    radial-gradient(circle at 70% 50%, rgba(0, 184, 204, 0.05) 0%, rgba(0, 0, 0, 0) 4%),
    radial-gradient(circle at 50% 70%, rgba(0, 184, 204, 0.05) 0%, rgba(0, 0, 0, 0) 3%);
  background-repeat: repeat;
  background-size: 20% 20%;
  pointer-events: none;
  opacity: 0;
  animation: shimmeringParticles 12s infinite alternate ease-in-out;
  transition: opacity 2s ease-in-out;
  z-index: -1;
}

@keyframes shimmeringParticles {
  0% {
    background-position: 0% 0%, 10% 10%, 20% 20%, 30% 30%;
    opacity: 0.5;
    filter: blur(1px);
  }
  33% {
    background-position: 5% 10%, 15% 20%, 25% 30%, 35% 40%;
    opacity: 0.8;
    filter: blur(0px);
  }
  66% {
    background-position: 10% 15%, 20% 25%, 30% 35%, 40% 45%;
    opacity: 0.6;
    filter: blur(2px);
  }
  100% {
    background-position: 15% 20%, 25% 30%, 35% 40%, 45% 50%;
    opacity: 0.9;
    filter: blur(0px);
  }
}

.intro-overlay.visible .intro-content::before {
  opacity: 1;
}

.intro-logo {
  width: 220px;
  height: 220px;
  margin-bottom: var(--spacing-lg);
  filter: drop-shadow(0 0 20px rgba(0, 184, 204, 0.2));
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 2s ease-out, transform 2s ease-out, filter 2s ease-out;
  /* Neuromorphic panel styling */
  padding: 25px;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(26, 44, 61, 0.2), rgba(10, 14, 18, 0.4));
  box-shadow: 
    20px 20px 60px rgba(0, 0, 0, 0.5),
    -20px -20px 60px rgba(52, 33, 59, 0.1),
    inset 0 0 15px rgba(0, 184, 204, 0.15);
  border: 1px solid rgba(0, 184, 204, 0.1);
  animation: neuGlow 6s infinite alternate ease-in-out;
  animation-play-state: paused;
}

.intro-logo.visible {
  opacity: 1;
  transform: translateY(0);
  filter: drop-shadow(0 0 30px rgba(0, 184, 204, 0.4));
  animation-play-state: running;
}

@keyframes neuGlow {
  0% {
    box-shadow: 
      20px 20px 60px rgba(0, 0, 0, 0.5),
      -20px -20px 60px rgba(52, 33, 59, 0.1),
      inset 0 0 15px rgba(0, 184, 204, 0.15);
  }
  50% {
    box-shadow: 
      20px 20px 60px rgba(0, 0, 0, 0.5),
      -20px -20px 60px rgba(52, 33, 59, 0.1),
      inset 0 0 30px rgba(0, 184, 204, 0.3);
  }
  100% {
    box-shadow: 
      20px 20px 60px rgba(0, 0, 0, 0.5),
      -20px -20px 60px rgba(52, 33, 59, 0.1),
      inset 0 0 20px rgba(0, 184, 204, 0.2);
  }
}

.intro-title {
  font-family: var(--font-heading);
  font-size: 5rem;
  text-transform: uppercase;
  margin-bottom: var(--spacing-lg);
  color: var(--color-spectral-white);
  text-shadow: 0 0 30px rgba(0, 184, 204, 0.3);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 2s ease-out, transform 2s ease-out, text-shadow 2s ease-out;
  transition-delay: 0.5s;
}

.intro-title.visible {
  opacity: 0.9;
  transform: translateY(0);
  text-shadow: 0 0 40px rgba(0, 184, 204, 0.5);
}

.intro-enter-button {
  padding: 1.2rem 4rem;
  background: transparent;
  border: 1px solid rgba(0, 184, 204, 0.3);
  color: var(--color-spectral-white);
  font-family: var(--font-heading);
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 1.5s cubic-bezier(0.22, 0.61, 0.36, 1);
  opacity: 0;
  transform: translateY(20px);
  transition-delay: 1s;
  /* Add slightly jagged clip path for ice-like edges */
  clip-path: polygon(
    0% 5%, 
    3% 0%, 
    97% 0%, 
    100% 5%, 
    100% 95%, 
    97% 100%, 
    3% 100%, 
    0% 95%
  );
}

.intro-enter-button.visible {
  opacity: 0.9;
  transform: translateY(0);
}

.intro-enter-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 184, 204, 0.07) 0%,
    rgba(0, 184, 204, 0) 100%
  );
  z-index: -1;
}

.intro-enter-button::after {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 184, 204, 0.15) 0%,
    rgba(0, 184, 204, 0) 70%
  );
  opacity: 0;
  transition: opacity 0.5s ease-out;
  z-index: -1;
}

.intro-enter-button:hover {
  background-color: rgba(0, 184, 204, 0.1);
  transform: translateY(-3px) scale(1.03);
  box-shadow: 
    0 0 40px rgba(0, 184, 204, 0.2),
    inset 0 0 15px rgba(0, 184, 204, 0.1);
  border-color: rgba(0, 184, 204, 0.7);
  letter-spacing: 0.35em;
  color: rgba(255, 255, 255, 1);
  /* Add frost crack lines on hover */
  background-image: 
    linear-gradient(135deg, transparent 49.7%, rgba(216, 225, 232, 0.06) 50%, transparent 50.3%),
    linear-gradient(45deg, transparent 49.7%, rgba(216, 225, 232, 0.06) 50%, transparent 50.3%);
  background-size: 20px 20px, 20px 20px;
}

.intro-enter-button:hover::after {
  opacity: 1;
  animation: pulseButton 3s infinite alternate ease-in-out;
}

/* Add subtle frost particle effect on hover */
.intro-enter-button:hover::before {
  content: '';
  background-image: 
    radial-gradient(circle at 30% 50%, rgba(0, 184, 204, 0.2) 0%, rgba(0, 0, 0, 0) 10%),
    radial-gradient(circle at 70% 50%, rgba(0, 184, 204, 0.2) 0%, rgba(0, 0, 0, 0) 10%),
    radial-gradient(circle at 50% 30%, rgba(0, 184, 204, 0.2) 0%, rgba(0, 0, 0, 0) 10%),
    radial-gradient(circle at 50% 70%, rgba(0, 184, 204, 0.2) 0%, rgba(0, 0, 0, 0) 10%);
  background-size: 100% 100%;
  animation: frostParticles 4s infinite alternate ease-in-out;
}

@keyframes frostParticles {
  0% {
    background-position: 0% 0%, 100% 100%, 0% 100%, 100% 0%;
    opacity: 0.3;
  }
  100% {
    background-position: 10% 10%, 90% 90%, 10% 90%, 90% 10%;
    opacity: 0.8;
  }
}

@keyframes pulseButton {
  0% {
    opacity: 0.3;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1.05);
  }
}

/* Forest path animation */
.intro-path {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 20vh;
  background: linear-gradient(
    to top,
    rgba(3, 3, 5, 0.9) 0%,
    rgba(3, 3, 5, 0) 100%
  );
  z-index: 3;
  transform: translateY(100%);
  transition: transform 8s cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-delay: 6s;
}

.intro-path.visible {
  transform: translateY(0);
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: var(--spacing-xl) 0;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-background);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.6;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(3, 3, 5, 0.95) 0%,
    rgba(5, 7, 9, 0.8) 50%,
    rgba(3, 3, 5, 0.95) 100%
  );
  z-index: var(--z-background);
}

.hero-content {
  position: relative;
  z-index: var(--z-default);
  max-width: 800px;
  margin: 0 auto;
  opacity: 0;
  animation: deepDescent var(--animation-slow) cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
  animation-delay: 1s;
  text-align: center;
}

.hero-title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 5.5rem;
  text-transform: uppercase;
  line-height: 0.85;
  letter-spacing: -0.05em;
  margin-bottom: var(--spacing-lg);
  color: var(--color-spectral-white);
  text-shadow: 0 0 30px rgba(3, 3, 5, 0.9);
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: 1.5rem;
  line-height: 1.4;
  margin-bottom: var(--spacing-lg);
  color: rgba(216, 225, 232, 1);
  max-width: 600px;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

.hero-cta {
  margin-top: var(--spacing-lg);
}

.hero-scroll-indicator {
  position: absolute;
  bottom: var(--spacing-lg);
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-spectral-white);
  font-size: 2rem;
  cursor: pointer;
  opacity: 0.7;
  transition: all var(--animation-fast) ease-out;
  animation: hauntingHover 2s ease-in-out infinite;
}

.hero-scroll-indicator:hover {
  opacity: 1;
  color: var(--color-bioluminescent-cyan);
}

/* Sections */
.section {
  position: relative;
  padding: var(--spacing-xl) 0;
  overflow: hidden;
}

.section-title-container {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--spacing-xl);
  position: relative;
  max-width: 800px;
}

.section-title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 3.5rem;
  text-transform: uppercase;
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: var(--color-spectral-white);
  display: inline-block;
  position: relative;
  margin-bottom: var(--spacing-md);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 30%;
  width: 40%;
  height: 3px;
  background: linear-gradient(
    to right,
    rgba(0, 184, 204, 0) 0%,
    var(--color-bioluminescent-cyan) 50%,
    rgba(0, 184, 204, 0) 100%
  );
}

.section-subtitle {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto;
  color: rgba(216, 225, 232, 0.7);
  line-height: 1.6;
}

/* Section Variants */
.section.darker {
  background-color: rgba(10, 14, 18, 0.7);
}

.section.with-particles {
  position: relative;
}

.section.with-particles::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../assets/frost_effects/frost_effect_001.png');
  background-size: cover;
  background-position: center;
  opacity: 0.08;
  z-index: var(--z-background);
  animation: frostBreath var(--animation-breath-cycle) cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

/* Fine snow mist overlays */
.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../assets/frost_effects/frost_effect_004.png');
  background-size: 500px 500px;
  background-repeat: repeat;
  opacity: 0.03;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
  animation: sectionSnowDrift 100s linear infinite;
}

@keyframes sectionSnowDrift {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 500px 500px;
  }
}

.section.with-diagonal-divide {
  position: relative;
  z-index: 1;
}

.section.with-diagonal-divide::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 150px;
  background: linear-gradient(
    to right bottom,
    transparent 49.5%,
    var(--color-abyssal-black) 50%
  );
  z-index: var(--z-background);
}

.section.with-diagonal-divide.inverted::after {
  background: linear-gradient(
    to left bottom,
    transparent 49.5%,
    var(--color-abyssal-black) 50%
  );
}

/* Two Column Layout */
.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
}

.column-content {
  position: relative;
}

.column-image {
  position: relative;
  overflow: hidden;
  clip-path: polygon(
    0% 5%, 
    5% 0%, 
    95% 0%, 
    100% 5%, 
    100% 95%, 
    95% 100%, 
    5% 100%, 
    0% 95%
  );
  box-shadow: var(--shadow-deep);
}

.column-image img, 
.column-image video {
  width: 100%;
  height: auto;
  transition: transform var(--animation-slow) ease-out;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: var(--shadow-deep);
}

.column-image:hover img,
.column-image:hover video {
  transform: scale(1.05);
}

.video-container {
  width: 100%;
  overflow: hidden;
  border-radius: 4px;
  position: relative;
  box-shadow: 0 8px 30px rgba(10, 14, 18, 0.8), 0 0 40px rgba(0, 184, 204, 0.15);
}

.glacial-video {
  max-height: 400px;
  filter: contrast(1.1) brightness(0.8) saturate(0.9);
  width: 100%;
  object-fit: cover;
  display: block;
}

/* Footer */
.ice-footer {
  position: relative;
  background-color: var(--color-abyssal-black);
  padding: var(--spacing-xl) 0 var(--spacing-lg);
  color: rgba(216, 225, 232, 0.6);
  overflow: hidden;
}

.ice-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    to right,
    rgba(0, 184, 204, 0) 0%,
    rgba(0, 184, 204, 0.3) 50%,
    rgba(0, 184, 204, 0) 100%
  );
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-lg);
}

.footer-logo {
  margin-bottom: var(--spacing-md);
}

.footer-logo img {
  height: 40px;
  filter: brightness(0.8) drop-shadow(0 0 5px rgba(0, 184, 204, 0.3));
}

.footer-column h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--color-spectral-white);
  margin-bottom: var(--spacing-md);
  position: relative;
  display: inline-block;
}

.footer-column h4::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 30px;
  height: 2px;
  background-color: var(--color-bioluminescent-cyan);
}

.footer-column p {
  margin-bottom: var(--spacing-md);
  line-height: 1.6;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column li {
  margin-bottom: var(--spacing-xs);
}

.footer-column a {
  color: rgba(216, 225, 232, 0.6);
  text-decoration: none;
  transition: all var(--animation-fast) ease-out;
}

.footer-column a:hover {
  color: var(--color-bioluminescent-cyan);
}

.footer-social {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
}

.social-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(216, 225, 232, 0.1);
  border-radius: 50%;
  color: rgba(216, 225, 232, 0.6);
  font-size: 1rem;
  transition: all var(--animation-fast) ease-out;
}

.social-icon:hover {
  background-color: var(--color-bioluminescent-cyan);
  color: var(--color-abyssal-black);
  border-color: var(--color-bioluminescent-cyan);
}

.footer-bottom {
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(216, 225, 232, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.footer-copyright {
  color: rgba(216, 225, 232, 0.5);
}

.footer-links {
  display: flex;
}

.footer-links a {
  margin-left: var(--spacing-md);
  color: rgba(216, 225, 232, 0.5);
  text-decoration: none;
  transition: all var(--animation-fast) ease-out;
}

.footer-links a:hover {
  color: var(--color-bioluminescent-cyan);
}

/* Responsive Adjustments */
@media screen and (max-width: 1200px) {
  .hero-title {
    font-size: 4rem;
  }
  
  .hero-subtitle {
    font-size: 1.3rem;
  }
  
  .section-title {
    font-size: 3rem;
  }
}

@media screen and (max-width: 992px) {
  .two-column {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 768px) {
  .hero-title {
    font-size: 3rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .section-title {
    font-size: 2.5rem;
  }
  
  .section-subtitle {
    font-size: 1rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-links {
    margin-top: var(--spacing-sm);
    justify-content: center;
  }
  
  .footer-links a {
    margin: 0 var(--spacing-sm);
  }
}

@media screen and (max-width: 576px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
}