/* ===== Base Styles ===== */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: #FDFBF7; /* cream */
  color: #4A3728; /* warm-brown */
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

/* ===== Premium Scrollbar ===== */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background-color: #fbf9f4;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #98462f 0%, #b5593b 100%);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #782e19 0%, #98462f 100%);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #98462f #fbf9f4;
}

/* ===== Selection ===== */
::selection {
  background-color: rgba(152, 70, 47, 0.15);
  color: #1c1b1b;
}

/* ===== Custom Components ===== */
.glass {
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.glass-dark {
  background-color: rgba(46, 32, 23, 0.8); /* deep-brown */
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.text-gradient {
  background: linear-gradient(135deg, #98462f, #E8872E);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-padding {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

@media (min-width: 768px) {
  .section-padding {
    padding-top: 7rem;
    padding-bottom: 7rem;
  }
}

/* ===== Premium Shadows ===== */
.editorial-shadow {
  box-shadow: 0 32px 64px -16px rgba(28, 27, 27, 0.08);
}

.shadow-premium {
  box-shadow:
    0 1px 2px rgba(28, 27, 27, 0.04),
    0 4px 8px rgba(28, 27, 27, 0.04),
    0 16px 32px rgba(28, 27, 27, 0.06);
}

/* ===== Smooth Image Loading ===== */
img {
  transition: opacity 0.4s ease;
}

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

/* ===== Focus Styles (Accessibility) ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #98462f;
  outline-offset: 2px;
  border-radius: 2px;
}

/* ===== Link Underline Animation ===== */
.link-animate {
  position: relative;
}

.link-animate::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: #98462f;
  transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.link-animate:hover::after {
  width: 100%;
}

/* ===== Common Animations ===== */
@keyframes bounce-gentle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.animate-bounce-gentle {
  animation: bounce-gentle 2s infinite ease-in-out;
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 0 0 rgba(152, 70, 47, 0.4); }
  70% { box-shadow: 0 0 0 15px rgba(152, 70, 47, 0); }
  100% { box-shadow: 0 0 0 0 rgba(152, 70, 47, 0); }
}

.animate-pulse-glow {
  animation: pulse-glow 2s infinite;
}

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

.animate-shimmer {
  background: linear-gradient(90deg, transparent 25%, rgba(255,255,255,0.1) 50%, transparent 75%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

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

.animate-fade-up {
  animation: fade-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ===== Hover Card Lift ===== */
.card-lift {
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card-lift:hover {
  transform: translateY(-4px);
  box-shadow:
    0 8px 16px rgba(28, 27, 27, 0.06),
    0 24px 48px rgba(28, 27, 27, 0.08);
}

/* ===== Page Transition ===== */
body {
  animation: page-enter 0.5s ease-out;
}

@keyframes page-enter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
