/* Custom styles for Bruce Motel */

:root {
  --color-terracotta: #C4724E;
  --color-sand: #f3e8d5;
  --color-warm: #1a1410;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Selection color */
::selection {
  background-color: rgba(196, 114, 78, 0.2);
  color: #1a1410;
}

/* Nav scroll state */
#site-header.scrolled {
  background-color: rgba(253, 252, 250, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 4px 20px rgba(0, 0, 0, 0.04);
}

#site-header.scrolled .font-serif {
  color: #1a1410 !important;
}

#site-header.scrolled .text-sand-600 {
  color: #8c6640 !important;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #C4724E;
  transition: width 0.3s ease;
  border-radius: 1px;
}

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

/* Mobile menu */
#mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
  translate: 0;
}

#mobile-menu.open .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

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

#mobile-menu.open .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
  width: 1.4rem;
}

/* Mobile nav links */
.mobile-nav-link {
  position: relative;
}

.mobile-nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #C4724E;
  transition: width 0.3s ease;
}

.mobile-nav-link:hover::after {
  width: 2rem;
}

/* Hero animations */
.hero-badge {
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
  animation-delay: 0.2s;
}

.hero-badge,
h1,
p,
.flex.flex-col.sm\:flex-row {
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
}

h1 {
  animation-delay: 0.35s;
}

p {
  animation-delay: 0.5s;
}

.flex.flex-col.sm\:flex-row {
  animation-delay: 0.65s;
}

.flex.items-center.gap-8 {
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
  animation-delay: 0.8s;
}

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

/* Reveal animations (below the fold only) */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-badge,
  h1, p, .flex.flex-col.sm\:flex-row, .flex.items-center.gap-8 {
    animation: none;
    opacity: 1;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Back to top */
#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Image hover container */
.rounded-2xl {
  contain: layout style;
}

/* Focus visible styles */
button:focus-visible,
a:focus-visible {
  outline: 2px solid #C4724E;
  outline-offset: 2px;
  border-radius: 0.5rem;
}

/* Input autofill */
input:-webkit-autofill,
textarea:-webkit-autofill {
  box-shadow: 0 0 0 30px #faf5ed inset !important;
  -webkit-text-fill-color: #1a1410 !important;
}

/* Print styles */
@media print {
  #site-header, #back-to-top, #menu-toggle {
    display: none;
  }
  body {
    color: #000;
    background: #fff;
  }
}
