/* Volcanic Theme Styles for ErgoSphere KZ */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Volcanic Color Palette */
:root {
  --obsidian: #0f0e12;
  --lava: #ff3b0a;
  --heat: #ff7a1a;
  --ash: #f1efea;
  --smoke: #6b7280;
}

/* Custom animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes emberPulse {
  0%,
  100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

@keyframes lavaFlow {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

/* Animation classes */
.fade-in-up {
  animation: fadeInUp 0.65s ease-out;
}

/* Volcanic Button Styles */
.volcanic-btn {
  background: linear-gradient(135deg, var(--obsidian) 0%, #1a1820 100%);
  color: var(--ash);
  padding: 12px 24px;
  border-radius: 8px;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.volcanic-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--lava) / 20 0%, var(--heat) / 20 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.volcanic-btn:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 12px 26px rgba(255, 58, 10, 0.18);
}

.volcanic-btn:hover::before {
  opacity: 1;
}

.volcanic-btn-footer {
  background: var(--ash);
  color: var(--obsidian);
  padding: 8px 16px;
  border-radius: 6px;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  font-weight: 500;
  font-size: 0.875rem;
}

.volcanic-btn-footer:hover {
  background: #e8e6e1;
  box-shadow: 0 4px 12px rgba(241, 239, 234, 0.3);
}

/* Header enhancements */
header {
  backdrop-filter: blur(10px);
  background-color: rgba(15, 14, 18, 0.95);
  transition: transform 0.3s ease-in-out;
}

/* Mobile menu transitions */
#mobileMenu {
  transition: all 0.3s ease-in-out;
  max-height: 0;
  overflow: hidden;
}

#mobileMenu.show {
  max-height: 300px;
}

/* Volcanic Image Masks */
.volcanic-image {
  position: relative;
  border: 2px solid var(--obsidian);
  box-shadow: inset 0 0 0 1px var(--heat) / 40, 0 8px 30px rgba(0, 0, 0, 0.3);
}

.basalt-mask {
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  border: 1px solid var(--heat) / 30;
}

.mask-crack {
  position: relative;
}

.mask-crack::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent 48%, var(--lava) / 20 49%, var(--lava) / 20 51%, transparent 52%);
  pointer-events: none;
}

/* Obsidian Card Styles */
.obsidian-card {
  background: #121217;
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-left: 4px solid var(--lava);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s ease;
  text-align: center;
}

.obsidian-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 58, 10, 0.15);
}

.obsidian-card:hover .w-32 {
  box-shadow: 0 0 20px rgba(255, 122, 26, 0.4), inset 0 0 20px rgba(255, 58, 10, 0.1);
}

/* Lava Slab Styles */
.lava-slab {
  background: var(--obsidian);
  border: 2px solid #201d24;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  transition: all 0.3s ease;
}

.lava-slab::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(90deg, var(--lava) 0%, var(--heat) 100%);
}

.lava-slab:hover {
  transform: scale(1.01);
  box-shadow: 0 10px 24px rgba(255, 58, 10, 0.18);
}

/* Form Styles - Crater Control */
.crater-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: var(--obsidian);
  color: var(--ash);
  transition: all 0.3s ease;
  font-size: 1rem;
}

.crater-input:focus {
  outline: none;
  border-color: var(--lava);
  box-shadow: 0 0 0 3px rgba(255, 58, 10, 0.1);
  background: #1a1820;
}

.crater-input::placeholder {
  color: var(--smoke);
}

/* Map Styling */
.volcanic-map {
  border: 2px solid var(--heat);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 4px 15px rgba(255, 122, 26, 0.2);
}

/* Ash Footer Links */
.ash-link {
  color: var(--smoke);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.ash-link:hover {
  color: var(--ash);
}

.ash-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--heat);
  transition: width 0.3s ease;
}

.ash-link:hover::after {
  width: 100%;
}

/* Lava River Separators */
.lava-river {
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--lava) /
    22 25%,
    var(--heat) /
    22 50%,
    var(--lava) /
    22 75%,
    transparent 100%
  );
  margin: 2rem 0;
}

/* Micro Grain Texture */
.grain-texture {
  position: relative;
}

.grain-texture::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 4px 4px, 6px 6px;
  pointer-events: none;
  opacity: 0.6;
}

/* Scroll Reveal Animations */
.scroll-reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.6s ease;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Form validation styles */
.form-error {
  border-color: var(--lava) !important;
  background-color: rgba(255, 59, 10, 0.05);
}

.error-message {
  color: var(--lava);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.form-success {
  border-color: var(--heat) !important;
  background-color: rgba(255, 122, 26, 0.05);
}

/* Cookie notice styling */
#cookieNotice {
  animation: slideUp 0.3s ease-out;
  backdrop-filter: blur(10px);
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-text {
    text-align: center;
  }

  .section-padding {
    padding: 60px 0;
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .obsidian-card {
    transform: none !important;
  }

  .lava-slab {
    margin-bottom: 1rem;
  }
}

/* Large screen mosaics */
@media (min-width: 768px) {
  .md-mosaic-2-1 {
    grid-template-columns: 2fr 1fr;
  }

  .md-mosaic-1-2 {
    grid-template-columns: 1fr 2fr;
  }
}

@media (min-width: 1024px) {
  .lg-mosaic-2-1 {
    grid-template-columns: 2fr 1fr;
  }

  .lg-mosaic-1-2 {
    grid-template-columns: 1fr 2fr;
  }
}

/* Print styles */
@media print {
  header,
  footer,
  #cookieNotice {
    display: none;
  }

  .no-print {
    display: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .text-gray-600 {
    color: var(--smoke);
  }

  .text-gray-500 {
    color: #9ca3af;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* Focus styles for accessibility */
*:focus {
  outline: 2px solid var(--lava);
  outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--obsidian);
  color: var(--ash);
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 1000;
}

.skip-link:focus {
  top: 6px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--obsidian);
}

::-webkit-scrollbar-thumb {
  background: var(--smoke);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--heat);
}

/* Selection styling */
::selection {
  background-color: var(--lava);
  color: var(--ash);
}

::-moz-selection {
  background-color: var(--lava);
  color: var(--ash);
}

/* Stagger animations for team cards */
.obsidian-card:nth-child(1) {
  animation-delay: 0.1s;
}

.obsidian-card:nth-child(2) {
  animation-delay: 0.2s;
}

.obsidian-card:nth-child(3) {
  animation-delay: 0.3s;
}

/* Lava slab stagger */
.lava-slab:nth-child(1) {
  animation-delay: 0.15s;
}

.lava-slab:nth-child(2) {
  animation-delay: 0.3s;
}

.lava-slab:nth-child(3) {
  animation-delay: 0.45s;
}

/* Volcanic decorative elements */
.ember-spark {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--lava);
  border-radius: 50%;
  animation: emberPulse 2s infinite;
}

.smoke-trail {
  position: absolute;
  background: linear-gradient(45deg, transparent, var(--smoke) / 10, transparent);
  filter: blur(8px);
  border-radius: 50%;
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--lava) / 20, transparent);
  animation: lavaFlow 1.5s infinite;
}
