:root {
  /* Color Palette */
  --color-bg: #0f1412;
  --color-surface: #181f1c;
  --color-primary: #d4af37; /* Gold */
  --color-primary-hover: #b89326;
  --color-accent: #788a63; /* Earthy Green */
  --color-text-main: #f0f4f1;
  --color-text-muted: #a4b3aa;
  
  /* Typography */
  --font-main: 'Outfit', sans-serif;
  --font-display: 'Playfair Display', serif;
  
  /* Layout */
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;
  --container-width: 1200px;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-med: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text-main);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: url('Herbal_Apothecary_Patterns/JPG/HA_PATTERN_1.avif');
  background-size: 600px;
  background-repeat: repeat;
  opacity: 0.15; /* Increased opacity to make it visible */
  mix-blend-mode: color-dodge; /* Works better on dark backgrounds to show light patterns */
  z-index: -1;
  pointer-events: none;
}

/* Utilities */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section {
  padding: var(--spacing-xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 3rem;
  margin-bottom: var(--spacing-sm);
  background: linear-gradient(135deg, var(--color-primary), #fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-header p {
  color: var(--color-text-muted);
  font-size: 1.1rem;
}

.btn-primary {
  display: inline-block;
  background-color: var(--color-primary);
  color: var(--color-bg);
  padding: 1rem 2.5rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  border-radius: 50px;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

/* Glassmorphism */
.glass-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100001;
  background: rgba(15, 20, 18, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: padding var(--transition-fast);
}

.nav-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0.75rem var(--spacing-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 400;
  font-style: italic;
  background: linear-gradient(135deg, #FFDF73, #D4AF37, #AA7C11);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  letter-spacing: 1px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links a {
  display: inline-block;
  color: var(--color-text-main);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 1px;
  font-weight: 400;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--color-primary);
  transition: width var(--transition-fast);
}

.nav-links a:hover {
  color: var(--color-primary);
}

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

/* Hero Section */
.hero {
  height: calc(60vh + 50px);
  min-height: 450px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('hero.avif');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--color-text-light);
  text-align: center;
  position: relative;
  /* CSS mask to create the wavy bottom while revealing the body's repeating pattern underneath */
  -webkit-mask-image: 
    linear-gradient(black, black),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,0 L1200,0 L1200,60 C900,0 300,120 0,60 Z' fill='%23000'/%3E%3C/svg%3E");
  mask-image: 
    linear-gradient(black, black),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,0 L1200,0 L1200,60 C900,0 300,120 0,60 Z' fill='%23000'/%3E%3C/svg%3E");
  -webkit-mask-position: top center, bottom center;
  mask-position: top center, bottom center;
  -webkit-mask-size: 100% calc(100% - 119px), 2400px 120px;
  mask-size: 100% calc(100% - 119px), 2400px 120px;
  -webkit-mask-repeat: no-repeat, repeat-x;
  mask-repeat: no-repeat, repeat-x;
  animation: waveScrollBottom 15s linear infinite;
}

@keyframes waveScrollBottom {
  0% {
    -webkit-mask-position: top center, 0px bottom;
    mask-position: top center, 0px bottom;
  }
  100% {
    -webkit-mask-position: top center, 2400px bottom;
    mask-position: top center, 2400px bottom;
  }
}

@keyframes waveScrollTop {
  0% {
    -webkit-mask-position: bottom center, 0px top;
    mask-position: bottom center, 0px top;
  }
  100% {
    -webkit-mask-position: bottom center, -2400px top;
    mask-position: bottom center, -2400px top;
  }
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(15, 20, 18, 0.4), rgba(15, 20, 18, 0.95));
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 800px;
  padding: 0 var(--spacing-md);
  margin-top: 80px; /* Push down away from the fixed navbar */
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 700;
  line-height: 1.1;
  padding-bottom: 0.2em; /* Prevents descenders from being clipped */
  margin-bottom: var(--spacing-sm);
  background: linear-gradient(135deg, #fff, var(--color-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.hero .btn-primary {
  margin-bottom: 3rem;
}

.hero p {
  font-size: 1.25rem;
  font-weight: 300;
  color: #e0e6e2;
  margin-bottom: var(--spacing-md);
}

.floral-accent {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  opacity: 0.8;
  max-width: 250px;
}

.floral-divider {
  display: block;
  margin: 0 auto 1.5rem auto;
  max-width: 120px;
  opacity: 0.9;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* About Section */
.about {
  position: relative;
  overflow: hidden;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text h2 {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--color-primary);
  margin-bottom: var(--spacing-sm);
}

.about-text p {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.about-text strong {
  color: var(--color-text-main);
  font-weight: 600;
}

.offerings-list {
  list-style: none;
  margin-top: 1.5rem;
}

.offerings-list li {
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
  color: var(--color-text-muted);
  position: relative;
  padding-left: 1.5rem;
}

.offerings-list li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-size: 0.9rem;
  top: 2px;
}

.about-image {
  position: relative;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.about-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  position: relative;
  z-index: 2;
  transition: transform var(--transition-slow);
}

.about-image:hover img {
  transform: scale(1.02);
}

.image-accent {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 100%;
  height: 100%;
  border: 2px solid var(--color-primary);
  border-radius: 12px;
  z-index: 1;
  opacity: 0.3;
}

/* Gallery Section (Scattered Polaroids) */
.gallery {
  position: relative;
  z-index: 10; /* Ensures polaroids overlap the next section when dragged out */
  margin-top: -40px; /* Pull up to overlap slightly if needed, or just tighten the gap */
  padding-top: 160px; /* Add extra padding to account for the top wave */
}

.gallery::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-surface);
  z-index: -1;
  /* Upside-down wavy mask at the top of the section */
  -webkit-mask-image: 
    linear-gradient(black, black),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,120 L1200,120 L1200,60 C900,120 300,0 0,60 Z' fill='%23000'/%3E%3C/svg%3E");
  mask-image: 
    linear-gradient(black, black),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,120 L1200,120 L1200,60 C900,120 300,0 0,60 Z' fill='%23000'/%3E%3C/svg%3E");
  -webkit-mask-position: bottom center, top center;
  mask-position: bottom center, top center;
  -webkit-mask-size: 100% calc(100% - 119px), 2400px 120px;
  mask-size: 100% calc(100% - 119px), 2400px 120px;
  -webkit-mask-repeat: no-repeat, repeat-x;
  mask-repeat: no-repeat, repeat-x;
  animation: waveScrollTop 20s linear infinite;
}

.masonry-grid {
  width: 100%;
  height: 1000px; 
}

.grid-item {
  position: absolute;
  width: 250px;
  padding: 12px 12px 45px 12px; 
  background-color: #f8f6f0; /* Aged paper color */
  background-image: url('Herbal_Apothecary_Patterns/JPG/HA_PATTERN_1.avif');
  background-size: 150px;
  background-blend-mode: luminosity; /* Subtle pattern overlay */
  border: 1px solid #e0dcd2;
  border-radius: 2px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.3), inset 0 0 15px rgba(100, 80, 50, 0.05); /* Vintage shadow */
  cursor: grab;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  user-select: none;
}

.grid-item:active {
  cursor: grabbing;
}

.gallery-img {
  width: 100%;
  height: 230px; 
  object-fit: cover;
  display: block;
  border-radius: 1px;
  pointer-events: none; 
  filter: sepia(0.2) contrast(1.05) saturate(0.9); /* Vintage photo effect */
}

.grid-item:hover {
  /* Subtle lift on hover */
  box-shadow: 0 15px 30px rgba(0,0,0,0.5);
}


/* Visit Section */
.visit {
  background: linear-gradient(180deg, var(--color-surface), var(--color-bg));
  text-align: center;
}

.visit-content {
  margin: 0 auto;
}

.visit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: stretch;
  margin-top: 2rem;
  text-align: left;
}

.visit-content h2 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.visit-content > p {
  color: var(--color-text-muted);
  margin-bottom: 3rem;
  font-size: 1.1rem;
}

.visit-card {
  padding: 3rem;
  text-align: left;
}

.visit-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.visit-map {
  width: 100%;
  height: 300px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.visit-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.visit-details h3 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.visit-details p {
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

/* Footer */
.footer {
  background-color: #080a09;
  padding: 2rem 0;
  text-align: center;
  color: var(--color-text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-med);
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  transform: scale(0.9);
  transition: transform var(--transition-med);
}

.lightbox.active .lightbox-content {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 40px;
  color: white;
  font-size: 40px;
  font-weight: 300;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.lightbox-close:hover {
  color: var(--color-primary);
}

/* Mobile Menu Styles */
.hamburger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10001; /* Above overlay */
  width: 40px;
  height: 40px;
  position: relative;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 0;
}

.hamburger-btn .bar {
  background-color: var(--color-primary);
  border-radius: 2px;
  width: 24px;
  height: 2px;
  transition: all 0.3s ease;
}

.hamburger-btn.is-active .bar:first-child {
  transform: translateY(8px) rotate(45deg);
}

.hamburger-btn.is-active .bar:nth-child(2) {
  opacity: 0;
}

.hamburger-btn.is-active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
  background: rgba(15, 20, 18, 0.95);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.mobile-menu-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.mobile-nav-links a {
  color: var(--color-text-main);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 400;
  letter-spacing: 2px;
  transition: color 0.3s ease;
}

.mobile-nav-links a:hover {
  color: var(--color-primary);
}

body.menu-open {
  overflow: hidden;
}

body.menu-open .navbar {
  background: transparent;
  border-bottom: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Responsive */
@media (max-width: 992px) {
  .hero h1 { font-size: 4rem; }
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .visit-layout { grid-template-columns: 1fr; gap: 2rem; }
  .masonry-grid { column-count: 2; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger-btn { display: flex; }
  .container { padding: 0 1rem; } /* Reduce padding on mobile to maximize width */
  .nav-container { padding: 0.75rem 1.5rem; }
  .hero h1 { font-size: 3rem; }
  .section-header p { 
    font-size: min(3.8vw, 1rem); 
    white-space: nowrap; /* Force the main text to stay on one line */
  }
  .section { padding: var(--spacing-lg) 0; }
  .masonry-grid { column-count: 1; }
  .visit-grid { grid-template-columns: 1fr; }
  
  .hero {
    -webkit-mask-size: 100% calc(100% - 39px), 1200px 40px;
    mask-size: 100% calc(100% - 39px), 1200px 40px;
  }
  
  .gallery {
    padding-top: 80px; /* Less padding needed for smaller wave */
  }
  
  .gallery::before {
    -webkit-mask-size: 100% calc(100% - 39px), 1200px 40px;
    mask-size: 100% calc(100% - 39px), 1200px 40px;
  }
  
  .grid-item {
    width: 200px; /* 80% of 250px */
    padding: 10px 10px 36px 10px;
  }
  .gallery-img {
    height: 184px; /* 80% of 230px */
  }
}
