/* ===== BASE OVERRIDES & CUSTOM STYLES ===== */

/* Ensure Playfair Display renders cleanly */
font-serif {
  font-optical-sizing: auto;
  font-style: normal;
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid #14b8a6;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Prevent horizontal scroll */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* ===== REVEAL ANIMATIONS (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }

  /* Stagger children */
  .reveal-delay-100 { transition-delay: 0.1s; }
  .reveal-delay-200 { transition-delay: 0.2s; }
  .reveal-delay-300 { transition-delay: 0.3s; }
  .reveal-delay-400 { transition-delay: 0.4s; }
}

/* Fallback: always show content if JS is disabled */
@media not all and (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ===== NAVBAR SCROLL STATE ===== */
#navbar.scrolled {
  background: rgba(4, 11, 20, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(20, 184, 166, 0.1);
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.3);
}

/* ===== MOBILE MENU ===== */
#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

/* ===== SMOOTH HOVER ON CARDS ===== */
.group:hover .group-hover\:scale-105 {
  transform: scale(1.05);
}

/* ===== BUTTON RIPPLE EFFECT ===== */
button, a[type="submit"] {
  position: relative;
  overflow: hidden;
}

/* ===== CUSTOM SELECTION ===== */
::selection {
  background: rgba(20, 184, 166, 0.3);
  color: #f0fdf9;
}

/* ===== INPUT AUTOFOCUS GLOW ===== */
input:focus, textarea:focus {
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.1);
}

/* ===== PRINT STYLES ===== */
@media print {
  body { background: white; color: black; }
  #navbar, #mobile-menu { display: none; }
  a[href]::after { content: " (" attr(href) ")"; }
}
