@layer base {
  body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa;
    color: #1a1a2e;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
    text-rendering: optimizeSpeed;
  }

  /* Accessibility: Skip Link */
  .skip-to-content {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a2e;
    color: #fff;
    padding: 12px 24px;
    border-radius: 0 0 12px 12px;
    font-weight: 700;
    z-index: 10000;
    transition: top 0.2s;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.3);
  }
  .skip-to-content:focus {
    top: 0;
  }

  /* Improved High-Visibility Focus States */
  :focus-visible {
    outline: 3px solid #b8860b;
    outline-offset: 4px;
    border-radius: 6px;
  }
}

/* Rendering Optimizations */
.optimize-scrolling {
  will-change: transform;
}

section {
  content-visibility: auto;
  contain-intrinsic-size: 1px 500px;
}

.hero-container {
  content-visibility: visible;
}

/* Aspect Ratio Stability to avoid CLS */
.aspect-square { aspect-ratio: 1 / 1; }
.aspect-video { aspect-ratio: 16 / 9; }
.aspect-portrait { aspect-ratio: 4 / 5; }

.hero-gradient {
  background: linear-gradient(135deg, rgba(26,26,46,0.92), rgba(184,134,11,0.25));
}

.text-gold-accessible {
  color: #b8860b;
}

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

.animate-fade-in {
  animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Responsive Image Performance */
img {
  max-width: 100%;
  height: auto;
  transition: opacity 0.3s ease-in;
}

/* Mobile Touch Targets */
@media (max-width: 640px) {
  button, a {
    min-height: 48px;
    min-width: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
