/* ========================================================================
   Aethonex — Main Stylesheet
   Single source of truth for shared styles across all pages.
   ======================================================================== */

/* --- Base Resets & Defaults --- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: transparent;
  color: #e5e2e1;
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

/* --- Utility Classes --- */
.text-balance {
  text-wrap: balance;
}

/* --- Glass Card --- */
.glass-card {
  background: rgba(32, 31, 31, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- Reveal Animation (scroll-triggered via JS) --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  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[style*="animation-delay"] {
  opacity: 0;
  transform: translateY(24px);
}

/* --- Gold Shimmer on Primary CTAs --- */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.cta-shimmer {
  background-image: linear-gradient(
    110deg,
    transparent 25%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 75%
  );
  background-size: 200% 100%;
}

.cta-shimmer:hover {
  animation: shimmer 1.5s ease-in-out;
}

/* --- Skip to Content (Accessibility) --- */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: #c6a86b;
  color: #131313;
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 0.5rem 0.5rem;
  font-weight: 700;
  font-size: 0.875rem;
  z-index: 9999;
  transition: top 0.2s ease;
}

.skip-to-content:focus {
  top: 0;
}

/* --- Mobile Menu --- */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 85vw);
  background: rgba(19, 19, 19, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 100;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  overflow-y: auto;
}

.mobile-menu.active {
  transform: translateX(0);
}

.mobile-menu-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: transparent;
  color: #e5e2e1;
  cursor: pointer;
  align-self: flex-end;
  margin-bottom: 2rem;
  transition: border-color 0.2s, color 0.2s;
}

.mobile-menu-close:hover {
  border-color: #c6a86b;
  color: #c6a86b;
}

.mobile-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.mobile-menu-nav a {
  display: block;
  padding: 0.875rem 1rem;
  color: #d0c5b5;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: color 0.2s, background 0.2s;
}

.mobile-menu-nav a:hover,
.mobile-menu-nav a.active {
  color: #c6a86b;
  background: rgba(198, 168, 107, 0.08);
}

.mobile-menu-nav a.active {
  border-left: 2px solid #c6a86b;
}

.mobile-menu-cta {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-menu-cta a {
  display: block;
  text-align: center;
  background: #c6a86b;
  color: #131313;
  padding: 0.875rem 1.5rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  transition: filter 0.2s;
}

.mobile-menu-cta a:hover {
  filter: brightness(1.1);
}

/* Hamburger Icon */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  cursor: pointer;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  padding: 0;
  gap: 5px;
  transition: border-color 0.2s;
}

.hamburger:hover {
  border-color: #c6a86b;
}

.hamburger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: #e5e2e1;
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Body scroll lock when menu open */
body.menu-open {
  overflow: hidden;
}

/* --- Lazy Image Fade-In --- */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.4s ease;
}

img[loading="lazy"].loaded,
img.loaded {
  opacity: 1;
}

/* Immediately show images that are already loaded */
img[loading="lazy"][complete] {
  opacity: 1;
}

/* --- Spotlight Glass Card Upgrades --- */
.glass-card, .glass-panel {
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card::before, .glass-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(350px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(198, 168, 107, 0.07), transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.glass-card:hover::before, .glass-panel:hover::before {
  opacity: 1;
}

.glass-card:hover, .glass-panel:hover {
  border-color: rgba(198, 168, 107, 0.25) !important;
  box-shadow: 0 0 25px rgba(198, 168, 107, 0.03);
}

/* --- Premium Chatbot Styling Override --- */
.chatbot-panel {
  background: rgba(19, 19, 19, 0.85) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(198, 168, 107, 0.15) !important;
  border-radius: 1rem !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(198, 168, 107, 0.05) !important;
}

.chatbot-header {
  border-bottom: 1px solid rgba(198, 168, 107, 0.1) !important;
  background: rgba(198, 168, 107, 0.02) !important;
}

.chatbot-title {
  color: #e5e2e1 !important;
  font-family: 'Syne', sans-serif !important;
}

.chatbot-message {
  border-radius: 0.75rem !important;
  padding: 0.75rem 1rem !important;
  border: 1px solid rgba(255, 255, 255, 0.03) !important;
  background: rgba(255, 255, 255, 0.01) !important;
}

.chatbot-message.user {
  border-color: rgba(198, 168, 107, 0.2) !important;
  background: rgba(198, 168, 107, 0.03) !important;
}

.chatbot-message.user p strong {
  color: #c6a86b !important;
}

.chatbot-send {
  background: #c6a86b !important;
  color: #131313 !important;
  font-weight: 700 !important;
  border-radius: 0.5rem !important;
  transition: filter 0.2s ease !important;
}

.chatbot-send:hover {
  filter: brightness(1.1) !important;
}

.chatbot-quick {
  border: 1px solid rgba(198, 168, 107, 0.2) !important;
  color: #c6a86b !important;
  background: rgba(198, 168, 107, 0.03) !important;
  border-radius: 0.5rem !important;
  transition: all 0.2s ease !important;
  margin-right: 4px;
  margin-bottom: 4px;
}

.chatbot-quick:hover {
  background: rgba(198, 168, 107, 0.1) !important;
  border-color: #c6a86b !important;
}

.chatbot-input-wrap input {
  background: rgba(0, 0, 0, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-radius: 0.5rem !important;
  color: #e5e2e1 !important;
}

.chatbot-input-wrap input:focus {
  border-color: #c6a86b !important;
  outline: none !important;
}
