/* ============================================
   THE THOMPSON XPERIENCE — Custom Styles
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: 'Outfit', sans-serif;
  background-color: #fffbf0;
  color: #064e3b;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #fffbf0;
}
::-webkit-scrollbar-thumb {
  background: #059669;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #047857;
}

/* Selection */
::selection {
  background: #10b981;
  color: #fefce8;
}

/* ============================================
   NAVBAR
   ============================================ */
#navbar {
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
  background: rgba(255, 251, 240, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 20px rgba(6, 78, 59, 0.08);
}

/* ============================================
   HERO — Floating Cards
   ============================================ */
.floating-card {
  animation: float 6s ease-in-out infinite;
}

.card-1 {
  animation-delay: 0s;
}

.card-2 {
  animation-delay: -2s;
}

.card-3 {
  animation-delay: -4s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  33% {
    transform: translateY(-12px) rotate(0.5deg);
  }
  66% {
    transform: translateY(6px) rotate(-0.5deg);
  }
}

/* Hero geometric shapes animation */
.hero-shape {
  animation: heroFloat 8s ease-in-out infinite;
}

.shape-circle-1 { animation-delay: 0s; }
.shape-circle-2 { animation-delay: -2s; }
.shape-rect-1 { animation-delay: -4s; }
.shape-tri-1 { animation-delay: -1s; }
.shape-dot-1 { animation-delay: -3s; animation-duration: 4s; }
.shape-dot-2 { animation-delay: -5s; animation-duration: 5s; }
.shape-dot-3 { animation-delay: -2s; animation-duration: 6s; }
.shape-diamond { animation-delay: -6s; animation-duration: 7s; }

@keyframes heroFloat {
  0%, 100% { transform: translate(0, 0) rotate(var(--rot, 0deg)); }
  25% { transform: translate(10px, -15px) rotate(calc(var(--rot, 0deg) + 2deg)); }
  50% { transform: translate(-5px, -25px) rotate(calc(var(--rot, 0deg) - 1deg)); }
  75% { transform: translate(-10px, -10px) rotate(calc(var(--rot, 0deg) + 1deg)); }
}

.shape-circle-1 { --rot: 0deg; }
.shape-circle-2 { --rot: 0deg; }
.shape-rect-1 { --rot: 45deg; }
.shape-tri-1 { --rot: 12deg; }
.shape-diamond { --rot: 45deg; }

/* ============================================
   FEATURE CARDS
   ============================================ */
.feature-card {
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(6, 78, 59, 0.12);
}

/* ============================================
   GALLERY
   ============================================ */
.gallery-item {
  overflow: hidden;
  cursor: pointer;
}

.gallery-item img {
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover img {
  transform: scale(1.08);
}

/* ============================================
   MOBILE MENU
   ============================================ */
#mobile-menu {
  box-shadow: none;
}

#mobile-menu.open {
  box-shadow: 0 20px 60px rgba(6, 78, 59, 0.15);
}

.mobile-link {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ============================================
   SCROLL REVEAL (below-fold only)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s ease, transform 0.8s ease;
  }

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

/* Reduced motion: disable all animations */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .floating-card {
    animation: none;
  }

  .hero-shape {
    animation: none;
  }

  .gallery-item img {
    transition: none;
  }

  .gallery-item:hover img {
    transform: none;
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .font-display {
    font-size: clamp(1.25rem, 5vw, 2rem);
  }
}

@media (min-width: 769px) and (max-width: 1023px) {
  #visit .grid > div:first-child {
    order: 2;
  }
  #visit .grid > div:last-child {
    order: 1;
  }
}
