/* ==========================================
   Coffee, Tea & Thee — Custom Styles
   ========================================== */

/* Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 300;
  color: #5C4D40;
  background-color: #FDFCFA;
  line-height: 1.7;
  overflow-x: hidden;
}

/* Selection */
::selection {
  background: #C07A56;
  color: #FDFCFA;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #F2EDE2;
}
::-webkit-scrollbar-thumb {
  background: #D8CCB4;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #C07A56;
}

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

#nav.scrolled {
  background: rgba(253, 252, 250, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(212, 180, 120, 0.15);
}

.nav-link {
  position: relative;
}

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

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

.nav-logo {
  transition: color 0.3s ease;
}

/* Mobile Menu */
.menu-line {
  display: block;
}

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

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

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

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

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

/* Hero Animations */
.hero-eyebrow {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.8s ease forwards 0.2s;
}

.hero-title {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.8s ease forwards 0.4s;
}

.hero-line {
  opacity: 0;
  transform: scaleX(0);
  animation: expandLine 0.6s ease forwards 0.7s;
}

.hero-desc {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.8s ease forwards 0.8s;
}

.hero-cta {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.8s ease forwards 0.95s;
}

.hero-image {
  opacity: 0;
  transform: translateX(40px);
  animation: slideInRight 1s ease forwards 0.5s;
}

.floating-card {
  opacity: 0;
  animation: floatIn 0.6s ease forwards;
}

.card-one { animation-delay: 1.1s; }
.card-two { animation-delay: 1.3s; }
.card-three { animation-delay: 1.5s; }

.scroll-line {
  opacity: 0;
  animation: fadeIn 0.6s ease forwards 1.8s;
}

/* Floating animation for stat cards */
@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.card-one {
  animation: floatCard 4s ease-in-out infinite 1.1s;
}

.card-two {
  animation: floatCard 4.5s ease-in-out infinite 1.3s;
}

.card-three {
  animation: floatCard 3.5s ease-in-out infinite 1.5s;
}

/* Section Animations */
.section-eyebrow {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-title {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.section-desc {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-eyebrow.visible,
.section-title.visible,
.section-desc.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Menu Items */
.menu-item {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.menu-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* About Section */
.about-image {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.about-image.visible {
  opacity: 1;
  transform: translateX(0);
}

.about-content {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.about-content.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Contact Section */
.contact-left {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.contact-left.visible {
  opacity: 1;
  transform: translateY(0);
}

.contact-form-wrap {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease 0.15s;
}

.contact-form-wrap.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Keyframes */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes expandLine {
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes slideInRight {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes floatIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #C07A56;
  outline-offset: 2px;
}

/* 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;
  }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .font-serif {
    font-size: 2.5rem;
  }

  #nav .hidden {
    display: none;
  }

  .grid lg\\:grid-cols-2 {
    grid-template-columns: 1fr;
  }

  .floating-card {
    display: none;
  }

  .hero-image {
    margin-top: 2rem;
  }

  .about-image {
    order: -1;
  }

  .contact-form-wrap {
    order: -1;
  }

  .space-y-10 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 1.5rem;
  }
}

@media (max-width: 640px) {
  .font-serif {
    font-size: 2rem;
  }

  section {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .max-w-7xl {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .grid md\\:grid-cols-3 {
    grid-template-columns: 1fr;
  }

  .grid sm\\:grid-cols-2 {
    grid-template-columns: 1fr;
  }
}
