/* Critical above-the-fold CSS - inlined for fastest LCP */
@font-face {
  font-family: 'Luckiest Guy';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/luckiestguy/v18/foKKNwpKj4U5MjeRsON7Ku4PTQ5WZGc.woff2) format('woff2');
}

/* Critical layout to prevent CLS */
:root {
  --vh: 1vh;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: #0f172a;
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Hero section critical styles */
.hero-container {
  min-height: 100svh;
  display: flex;
  align-items: start;
  justify-content: center;
  background: linear-gradient(to bottom right, #1e3a8a, #0f172a, #7f1d1d);
  padding-top: 8rem;
}

/* Reserve space for hero images to prevent CLS */
.hero-card-left {
  position: absolute;
  left: clamp(8px, 3vw, 20px);
  top: 65%;
  transform: translateY(-50%) rotate(-4deg);
  width: clamp(140px, 32vw, 320px);
  aspect-ratio: 5/7;
}

.hero-card-right {
  position: absolute;
  right: clamp(8px, 3vw, 20px);
  top: 65%;
  transform: translateY(-50%) rotate(4deg);
  width: clamp(140px, 32vw, 320px);
  aspect-ratio: 5/7;
}

/* Navigation critical styles */
.nav-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 80px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
}

.nav-logo {
  height: 48px;
  width: auto;
  will-change: transform;
  contain: layout style paint;
}

/* Typography */
.font-luckiest {
  font-family: 'Luckiest Guy', system-ui, sans-serif;
  font-display: block;
  will-change: auto;
}

.text-4xl {
  font-size: 2.25rem;
  line-height: 2.5rem;
}

.text-5xl {
  font-size: 3rem;
  line-height: 1.1;
}

@media (min-width: 768px) {
  .hero-container {
    padding-top: 10rem;
  }
  
  .hero-card-left,
  .hero-card-right {
    top: 75%;
    width: clamp(300px, 38vw, 560px);
  }
  
  .text-5xl {
    font-size: 4rem;
  }
}

@media (min-width: 1024px) {
  .hero-container {
    padding-top: 8rem;
  }
  
  .hero-card-left,
  .hero-card-right {
    width: clamp(340px, 28vw, 600px);
  }
  
  .text-5xl {
    font-size: 6rem;
  }
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Critical image optimization */
img {
  height: auto;
  max-width: 100%;
}

.aspect-ratio-5-7 {
  aspect-ratio: 5/7;
}

.aspect-ratio-16-9 {
  aspect-ratio: 16/9;
}

.aspect-ratio-4-3 {
  aspect-ratio: 4/3;
}