/* Critical CSS untuk above-the-fold content */
/* Font loading */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/inter-regular.woff2') format('woff2');
}

/* Reset dan base styles */
* {
  box-sizing: border-box;
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: #1a202c;
  background-color: #ffffff;
}

/* Hero section critical styles */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

.hero-content {
  text-align: center;
  z-index: 10;
  position: relative;
  max-width: 1200px;
  padding: 0 20px;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-weight: 400;
  line-height: 1.6;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* Loading states */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

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

/* Prevent layout shift */
.layout-stable {
  contain: layout;
  min-height: 100vh;
}

/* Image optimization */
.responsive-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  background-color: #f3f4f6;
}

/* Button critical styles */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  border: none;
  border-radius: 8px;
  background: #f59e0b;
  color: white;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 48px;
}

.btn-primary:hover {
  background: #d97706;
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Navigation critical styles */
.nav-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e5e7eb;
  height: 72px;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Performance optimizations */
img {
  max-width: 100%;
  height: auto;
}

/* Reserve space for lazy loaded content */
.lazy-placeholder {
  aspect-ratio: 16/9;
  background: #f3f4f6;
  border-radius: 8px;
}
