/* ============================================
   Grizzly Lodge Rathdrum — Custom Styles
   ============================================ */

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

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

body {
  overflow-x: hidden;
}

::selection {
  background: #7dd3b8;
  color: #0a1628;
}

/* --- Custom Properties --- */
:root {
  --color-midnight: #0a1628;
  --color-mint: #3a9d84;
  --color-mint-light: #7dd3b8;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', system-ui, sans-serif;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
}

/* --- Buttons --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--color-midnight);
  color: #fff;
  padding: 0.875rem 2rem;
  border-radius: 9999px;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid var(--color-midnight);
  cursor: pointer;
}

.btn-primary:hover {
  background: transparent;
  color: var(--color-midnight);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -10px rgba(10, 22, 40, 0.2);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--color-midnight);
  padding: 0.875rem 2rem;
  border-radius: 9999px;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid rgba(10, 22, 40, 0.2);
}

.btn-secondary:hover {
  border-color: var(--color-midnight);
  transform: translateY(-2px);
}

.btn-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #fff;
  color: var(--color-midnight);
  padding: 0.875rem 2rem;
  border-radius: 9999px;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid #fff;
  cursor: pointer;
}

.btn-white:hover {
  background: transparent;
  color: #fff;
  border-color: #fff;
  transform: translateY(-2px);
}

.btn-outline-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  color: #fff;
  padding: 0.875rem 2rem;
  border-radius: 9999px;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn-outline-white:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* --- Tags --- */
.tag {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  background: rgba(10, 22, 40, 0.06);
  color: var(--color-midnight);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.025em;
}

/* --- Input Fields --- */
.input-field {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1.5px solid rgba(10, 22, 40, 0.12);
  border-radius: 0.75rem;
  font-size: 0.9375rem;
  font-family: var(--font-sans);
  color: var(--color-midnight);
  background: #fff;
  transition: all 0.3s ease;
  outline: none;
}

.input-field::placeholder {
  color: rgba(10, 22, 40, 0.3);
}

.input-field:focus {
  border-color: var(--color-mint);
  box-shadow: 0 0 0 3px rgba(58, 157, 132, 0.1);
}

/* --- Navigation --- */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--color-mint);
  transition: width 0.3s ease;
}

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

/* --- Mobile Menu --- */
.menu-line {
  transition: all 0.3s ease;
}

#menu-btn.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(0.35rem, 0.35rem);
}

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

#menu-btn.active .menu-line:nth-child(3) {
  width: 1.375rem;
  transform: rotate(-45deg) translate(0.25rem, -0.25rem);
}

#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-link {
  transition: all 0.3s ease;
}

/* --- Room Cards --- */
.room-card {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.room-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px -20px rgba(10, 22, 40, 0.12);
}

/* --- Scroll Reveal --- */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-up.visible,
.reveal-left.visible,
.reveal-right.visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* --- Navbar Scroll State --- */
#navbar.scrolled {
  background: rgba(240, 250, 246, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(10, 22, 40, 0.06);
}

#navbar.scrolled .nav-link {
  color: var(--color-midnight);
}

#navbar.scrolled .nav-link::after {
  background: var(--color-mint);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .btn-primary, .btn-secondary, .btn-white, .btn-outline-white {
    width: 100%;
    justify-content: center;
  }

  .reveal-left, .reveal-right {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }
}

/* --- Focus Styles --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-mint);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- Reduced Motion --- */
@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;
  }
  .reveal-up, .reveal-left, .reveal-right {
    opacity: 1;
    transform: none;
  }
}
