/* ============================================
   Out-Post Camping Resort — Custom Styles
   Classic & Elegant | Terracotta + Sand
   ============================================ */

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

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

body {
  margin: 0;
  overflow-x: hidden;
}

::selection {
  background: #c45234;
  color: #fdfbf7;
}

img {
  display: block;
  max-width: 100%;
}

/* ── Navigation ── */
#nav {
  background: transparent;
  transition: background 0.5s ease, box-shadow 0.5s ease, backdrop-filter 0.5s ease;
}

#nav.scrolled {
  background: rgba(23, 15, 10, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(244, 233, 208, 0.06);
}

/* ── Hero Animations ── */
.hero-eyebrow {
  animation: fadeSlideUp 0.8s ease forwards;
  animation-delay: 0.2s;
  opacity: 0;
}

.hero-title-line {
  display: inline-block;
  animation: fadeSlideUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  opacity: 0;
}

.hero-title-line:nth-child(1) { animation-delay: 0.4s; }
.hero-title-line:nth-child(2) { animation-delay: 0.55s; }
.hero-title-line:nth-child(3) { animation-delay: 0.7s; }

h1 .hero-title-line {
  animation: fadeSlideUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  opacity: 0;
}

h1 .hero-title-line:nth-of-type(1),
.hero-title-line:first-of-type { animation-delay: 0.4s; }
h1 .hero-title-line:nth-of-type(2) { animation-delay: 0.55s; }
h1 .hero-title-line:nth-of-type(3) { animation-delay: 0.7s; }

.hero-sub {
  animation: fadeSlideUp 0.8s ease forwards;
  animation-delay: 0.9s;
  opacity: 0;
}

.hero-cta {
  animation: fadeSlideUp 0.8s ease forwards;
  animation-delay: 1.1s;
  opacity: 0;
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Scroll Indicator ── */
.scroll-line {
  animation: scrollDown 1.8s ease-in-out infinite;
}

@keyframes scrollDown {
  0% { top: -50%; opacity: 0; }
  50% { opacity: 1; }
  100% { top: 150%; opacity: 0; }
}

/* ── Reveal Animations (below-fold only) ── */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Default state is visible — JS adds the revealed class for timing */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
  }
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stagger children */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Mobile Menu ── */
#mobileMenu.open {
  opacity: 1;
  pointer-events: all;
}

#mobileMenu.closed {
  opacity: 0;
  pointer-events: none;
}

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

#mobileMenu.open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

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

/* ── Hamburger → X ── */
.menu-line {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

body.menu-open .menu-line:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

body.menu-open .menu-line:nth-child(2) {
  opacity: 0;
}

body.menu-open .menu-line:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
  width: 6px;
}

/* ── Form 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'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%237a2f23' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ── Focus Visible ── */
:focus-visible {
  outline: 2px solid #c45234;
  outline-offset: 2px;
}

/* ── Utility ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ── Print ── */
@media print {
  #nav, #mobileMenu, .scroll-indicator { display: none; }
  body { color: #000; background: #fff; }
  a { color: #000; }
}
