/* Custom styles for SoftwareInLevels Static Site */

/* Typography classes matching the original */
.heading3-title {
  font-size: 2rem;
  font-weight: 600;
  line-height: 2.4rem;
}

.text-subheading {
  font-weight: 600;
  font-size: clamp(2.25rem, 1.6429rem + 3.0357vw, 6.5rem);
  text-transform: uppercase;
  line-height: 1;
}

.text-subtitle {
  line-height: 1;
  font-size: clamp(2.625rem, 1.9917rem + 3.1667vw, 5rem);
  font-weight: 600;
  text-transform: uppercase;
}

.text-hero {
  font-size: clamp(3rem, 2.5rem + 4vw, 6rem);
  font-weight: 600;
  line-height: 1.1;
  text-transform: uppercase;
}

.text-footer-title {
  color: #ffffff;
  font-size: clamp(2.625rem, 1.9917rem + 3.1667vw, 5rem);
  font-weight: 600;
  text-transform: uppercase;
}

/* Elegant CTA animations and effects */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fade-in-up 600ms ease-out both;
}

.elegant-cta {
  position: relative;
  overflow: hidden;
}

.elegant-cta::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: conic-gradient(from 180deg at 50% 50%, rgba(0,0,0,0.06), rgba(0,0,0,0.12), rgba(0,0,0,0.06));
  filter: blur(10px);
  opacity: 0;
  transition: opacity 400ms ease;
  z-index: 0;
}

.dark .elegant-cta::before {
  background: conic-gradient(from 180deg at 50% 50%, rgba(255,255,255,0.06), rgba(255,255,255,0.14), rgba(255,255,255,0.06));
}

.elegant-cta:hover::before {
  opacity: 0.6;
}

.elegant-cta-content {
  position: relative;
  z-index: 1;
}

.cta-button {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(0,0,0,0.06), rgba(0,0,0,0.12));
  color: inherit;
  transition: transform 250ms ease, background-color 250ms ease, color 250ms ease, box-shadow 250ms ease, border-color 250ms ease;
  will-change: transform;
}

.dark .cta-button {
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.14));
}

.cta-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.cta-button::after {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 120%;
  height: 100%;
  background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.35) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-20deg);
  transition: transform 700ms ease;
}

.cta-button:hover::after {
  transform: translateX(220%) skewX(-20deg);
}

/* Marquee animation for newsletter ticker */
@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.animate-marquee {
  display: inline-block;
  animation: marquee 20s linear infinite;
}

/* Code block styling */
pre {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

code {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Link hover effects */
a {
  transition: opacity 200ms ease;
}

a:hover {
  opacity: 0.8;
}

/* Selection color */
::selection {
  background-color: rgba(0, 0, 0, 0.2);
}

.dark ::selection {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Image placeholder gradient */
img[onerror] {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .heading3-title {
    font-size: 1.5rem;
    line-height: 1.8rem;
  }
}

/* Dark mode transitions */
body {
  transition: background-color 300ms ease, color 300ms ease;
}

/* Article card hover effect */
article {
  transition: transform 200ms ease, box-shadow 200ms ease;
}

article:hover {
  transform: translateY(-2px);
}

/* Loading state for images */
img {
  transition: opacity 300ms ease;
}

img[src=""] {
  opacity: 0;
}

/* ===== HERO LEVEL ANIMATIONS ===== */

/* Entrance animation for hero text */
.hero-text {
  animation: slideIn 600ms ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Level steps visualization */
.level-visual {
  animation: fadeIn 800ms ease-out 200ms both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Individual level step animations */
.level-step {
  animation: stepRise 500ms ease-out both;
  animation-delay: var(--delay, 0ms);
}

@keyframes stepRise {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Crown animation */
.crown {
  animation: crownBob 2s ease-in-out infinite;
}

@keyframes crownBob {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-4px);
  }
}

/* Floating Stars */
.stars-container {
  z-index: 5;
}

.star {
  position: absolute;
  color: currentColor;
}

/* Star sizes */
.star-lg { width: 14px; height: 14px; }
.star-md { width: 10px; height: 10px; }
.star-sm { width: 7px; height: 7px; }
.star-xs { width: 4px; height: 4px; }

/* Star positions - Large */
.s1 { top: 5%; left: 10%; }
.s2 { top: 15%; right: 5%; }
.s3 { bottom: 25%; left: 5%; }
.s4 { bottom: 10%; right: 15%; }

/* Star positions - Medium */
.s5 { top: 0%; left: 30%; }
.s6 { top: 25%; left: -5%; }
.s7 { top: 10%; right: 25%; }
.s8 { top: 45%; right: -3%; }
.s9 { bottom: 35%; left: 25%; }
.s10 { bottom: 5%; left: 40%; }

/* Star positions - Small */
.s11 { top: -5%; left: 50%; }
.s12 { top: 20%; left: 15%; }
.s13 { top: 35%; left: 0%; }
.s14 { top: 8%; right: 40%; }
.s15 { top: 50%; right: 10%; }
.s16 { bottom: 45%; right: 0%; }
.s17 { bottom: 15%; left: 15%; }
.s18 { bottom: 0%; right: 30%; }

/* Star positions - Tiny */
.s19 { top: 12%; left: 45%; }
.s20 { top: 30%; left: 8%; }
.s21 { top: 5%; right: 15%; }
.s22 { top: 40%; right: 20%; }
.s23 { top: 55%; left: 20%; }
.s24 { bottom: 30%; right: 25%; }
.s25 { bottom: 20%; left: 35%; }
.s26 { bottom: 8%; right: 5%; }

/* Animations */
@keyframes drift1 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(8px, -12px) rotate(180deg); }
}

@keyframes drift2 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-10px, -8px) rotate(-180deg); }
}

@keyframes drift3 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(5px, -15px) rotate(120deg); }
  66% { transform: translate(-8px, -5px) rotate(240deg); }
}

@keyframes twinkle1 {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.6; }
}

@keyframes twinkle2 {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.5; }
}

@keyframes twinkle3 {
  0%, 100% { opacity: 0.1; }
  50% { opacity: 0.4; }
}

/* Apply animations - Large stars */
.s1 { animation: drift1 8s ease-in-out infinite, twinkle1 3s ease-in-out infinite; }
.s2 { animation: drift2 9s ease-in-out infinite 1s, twinkle1 2.5s ease-in-out infinite 0.5s; }
.s3 { animation: drift3 10s ease-in-out infinite 0.5s, twinkle1 3.5s ease-in-out infinite 1s; }
.s4 { animation: drift1 7s ease-in-out infinite 2s, twinkle1 2.8s ease-in-out infinite 1.5s; }

/* Apply animations - Medium stars */
.s5 { animation: drift2 6s ease-in-out infinite 0.3s, twinkle2 2s ease-in-out infinite; }
.s6 { animation: drift3 8s ease-in-out infinite 1.2s, twinkle2 2.3s ease-in-out infinite 0.8s; }
.s7 { animation: drift1 7s ease-in-out infinite 0.8s, twinkle2 1.8s ease-in-out infinite 0.3s; }
.s8 { animation: drift2 9s ease-in-out infinite 2s, twinkle2 2.5s ease-in-out infinite 1.2s; }
.s9 { animation: drift3 6s ease-in-out infinite 1.5s, twinkle2 2.2s ease-in-out infinite 0.5s; }
.s10 { animation: drift1 8s ease-in-out infinite 0.5s, twinkle2 1.9s ease-in-out infinite 1s; }

/* Apply animations - Small stars */
.s11 { animation: drift1 5s ease-in-out infinite, twinkle3 1.5s ease-in-out infinite; }
.s12 { animation: drift2 6s ease-in-out infinite 0.5s, twinkle3 1.8s ease-in-out infinite 0.3s; }
.s13 { animation: drift3 5s ease-in-out infinite 1s, twinkle3 1.6s ease-in-out infinite 0.8s; }
.s14 { animation: drift1 7s ease-in-out infinite 1.5s, twinkle3 2s ease-in-out infinite 0.5s; }
.s15 { animation: drift2 5s ease-in-out infinite 0.8s, twinkle3 1.7s ease-in-out infinite 1s; }
.s16 { animation: drift3 6s ease-in-out infinite 2s, twinkle3 1.4s ease-in-out infinite 0.2s; }
.s17 { animation: drift1 5s ease-in-out infinite 0.3s, twinkle3 1.9s ease-in-out infinite 0.7s; }
.s18 { animation: drift2 7s ease-in-out infinite 1.2s, twinkle3 1.6s ease-in-out infinite 1.2s; }

/* Apply animations - Tiny stars */
.s19 { animation: drift3 4s ease-in-out infinite, twinkle3 1.2s ease-in-out infinite; }
.s20 { animation: drift1 5s ease-in-out infinite 0.4s, twinkle3 1.4s ease-in-out infinite 0.2s; }
.s21 { animation: drift2 4s ease-in-out infinite 0.8s, twinkle3 1.1s ease-in-out infinite 0.6s; }
.s22 { animation: drift3 5s ease-in-out infinite 1.2s, twinkle3 1.3s ease-in-out infinite 0.4s; }
.s23 { animation: drift1 4s ease-in-out infinite 0.6s, twinkle3 1.5s ease-in-out infinite 0.8s; }
.s24 { animation: drift2 5s ease-in-out infinite 1s, twinkle3 1.2s ease-in-out infinite 1s; }
.s25 { animation: drift3 4s ease-in-out infinite 1.5s, twinkle3 1.4s ease-in-out infinite 0.3s; }
.s26 { animation: drift1 5s ease-in-out infinite 0.2s, twinkle3 1.1s ease-in-out infinite 0.9s; }
