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

body {
  overflow-x: hidden;
}

::selection {
  background: rgba(201, 168, 76, 0.3);
  color: #f5eabb;
}

/* ===== Scroll Reveal Animations ===== */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal[data-reveal="up"] {
  transform: translateY(40px);
  opacity: 0;
}

.reveal[data-reveal="left"] {
  transform: translateX(-40px);
  opacity: 0;
}

.reveal[data-reveal="right"] {
  transform: translateX(40px);
  opacity: 0;
}

.reveal[data-reveal="scale"] {
  transform: scale(0.95);
  opacity: 0;
}

/* Show revealed elements (progressive enhancement — JS adds .revealed) */
.reveal.revealed {
  opacity: 1;
  transform: none;
}

/* Default state: visible for accessibility (no JS) */
@media (prefers-reduced-motion: no-preference) {
  .reveal[data-reveal] {
    opacity: 0;
    transform: translateY(40px);
  }
  .reveal[data-reveal="left"] { transform: translateX(-40px); }
  .reveal[data-reveal="right"] { transform: translateX(40px); }
  .reveal[data-reveal="scale"] { transform: scale(0.95); }
}

/* ===== Navbar ===== */
#navbar {
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
}

#navbar.scrolled {
  background: rgba(5, 9, 20, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(201, 168, 76, 0.1);
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.4);
}

#navbar.scrolled .menu-line {
  background: white;
}

#navbar.scrolled .menu-line:last-child {
  background: #c9a84c;
}

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

#mobile-menu:not(.open) {
  opacity: 0;
  pointer-events: none;
}

.mobile-link {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-link {
  opacity: 1;
  transform: none;
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* ===== Hamburger Animation ===== */
.menu-line {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-btn.active .menu-line:first-child {
  transform: translateY(4px) rotate(45deg);
}

#menu-btn.active .menu-line:nth-child(2) {
  opacity: 0;
}

#menu-btn.active .menu-line:last-child {
  transform: translateY(-4px) rotate(-45deg);
  width: 20px;
  margin-right: 0;
}

/* ===== Hero Image Card Float ===== */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

.lg\\:block .relative {
  animation: float 6s ease-in-out infinite;
}

/* ===== Custom Select Arrow ===== */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23c9a84c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* ===== Smooth Scroll Offset ===== */
[id] {
  scroll-margin-top: 80px;
}

/* ===== Focus Styles ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #c9a84c;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #0a0f1e;
}

::-webkit-scrollbar-thumb {
  background: #1c2d55;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #c9a84c;
}

/* ===== Responsive tweaks ===== */
@media (max-width: 767px) {
  [id] {
    scroll-margin-top: 60px;
  }
}
