/* ===== 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: #df4a20;
  color: #fff;
}

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

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

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

/* Header scroll state */
#site-header.scrolled {
  background: rgba(254, 253, 248, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(44, 26, 14, 0.08);
}

#site-header.scrolled .nav-link {
  color: rgba(44, 26, 14, 0.7);
}

#site-header.scrolled .menu-line {
  background: #2c1a0e;
}

/* Mobile menu */
.mobile-link {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

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

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

/* Hamburger animation */
.menu-toggle.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}
.menu-toggle.active .menu-line:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
  width: 1.25rem;
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #c93614;
  color: #fff;
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(201, 54, 20, 0.3);
}

.btn-primary:hover {
  background: #a72710;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201, 54, 20, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

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

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

/* ===== SECTION LABELS ===== */
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ===== FLOATING CARDS ===== */
.floating-card {
  animation: float 6s ease-in-out infinite;
}

.card-1 { animation-delay: 0s; }
.card-2 { animation-delay: -1.5s; }
.card-3 { animation-delay: -3s; }
.card-4 { animation-delay: -4.5s; }

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-16px); }
}

/* ===== INPUTS ===== */
.input-field {
  background: #fdf9ed;
  border: 1.5px solid #f5e8b0;
  border-radius: 12px;
  padding: 0.875rem 1rem;
  font-size: 0.9375rem;
  font-family: inherit;
  color: #2c1a0e;
  transition: all 0.25s ease;
  outline: none;
  width: 100%;
}

.input-field::placeholder {
  color: rgba(44, 26, 14, 0.3);
}

.input-field:focus {
  border-color: #c93614;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(201, 54, 20, 0.1);
}

.input-field:hover:not(:focus) {
  border-color: #e86740;
}

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

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26, 15, 7, 0.3), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: inherit;
}

.gallery-item:hover::after {
  opacity: 1;
}

/* ===== SCROLL ANIMATIONS ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  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);
}

.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; }

/* ===== RESPONSIVE ===== */
@media (max-width: 767px) {
  .font-serif {
    line-height: 1.1;
  }

  h1 {
    font-size: 2.75rem !important;
  }

  .floating-card {
    display: none;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .floating-card {
    display: none;
  }
}

/* ===== 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 {
    opacity: 1;
    transform: none;
  }
}
