/* CSS Variables for theme colours */
:root {
  --hero-top: 18vh;
  --nav-height: 64px;
  --profile-media-height: 300px;
  --profile-focal-y: 35%;
  --section-max: 1000px;
  --primary: #1b4332;
  --primary-light: #2d6a4f;
  --accent: #d9c89c;
  --background: #f7f8f5;
  --surface: #fbfcfa;
  --text: #242623;
  --muted: #5f6f52;
  --white: #ffffff;
  --shadow: rgba(18, 25, 23, 0.12);
  --shadow-strong: rgba(18, 25, 23, 0.18);
  --transition-fast: 0.25s ease;
}

/* Reset & Basics */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
  text-wrap: balance;
}

/* Layout Containers */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.section-header p {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.7;
  text-wrap: pretty;
  hyphens: manual; /* avoid awkward auto-hyphenation in long paragraphs */
  font-variant-numeric: lining-nums;
}
.section-header p + p { margin-top: 1rem; } /* consistent paragraph spacing */
.section-header p { max-width: 72ch; } /* readable line length for body copy */

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: saturate(1.1) blur(10px);
  box-shadow: 0 6px 18px var(--shadow);
  transition: background var(--transition-fast), box-shadow var(--transition-fast), backdrop-filter var(--transition-fast);
}
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  min-height: var(--nav-height);
}
.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem; /* slightly smaller logo */
  font-weight: 700;
  color: var(--primary);
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 1.2rem; /* tighter spacing */
}
.nav-links a {
  position: relative;
  font-weight: 600;
  font-size: 0.95rem; /* slightly smaller link text */
  color: var(--text);
  transition: color var(--transition-fast);
}
.nav-links a:hover {
  color: var(--primary);
}
/* Elegant underline on hover */
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease;
}
.nav-links a:hover::after { transform: scaleX(1); }
/* Active nav link */
.nav-links a.active {
  color: var(--primary);
}
.nav-links a.active::after { transform: scaleX(1); }
/* Navbar active state on scroll */
.navbar.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.2) blur(12px);
  box-shadow: 0 8px 20px var(--shadow-strong);
}

/* Hero Section */
.hero {
  height: 100vh;
  background-image: url('assets/hero.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: flex-start; /* place content toward top half */
  justify-content: center;
  text-align: center;
  color: var(--white);
  margin-top: var(--nav-height); /* ensure content sits below fixed navbar */
  /* Slight vibrance for a high‑end feel */
  filter: saturate(1.1) contrast(1.04) brightness(1.02);
}
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Layered overlay for depth and contrast */
  background:
    radial-gradient(1200px 60% at 50% 20%, rgba(255,255,255,0.06), transparent 70%),
    linear-gradient(180deg, rgba(12, 36, 24, 0.6) 0%, rgba(0, 0, 0, 0.35) 60%);
  z-index: 0;
}
/* Our Story Section */
.story-section {
  background:
    linear-gradient(180deg, rgba(12, 36, 24, 0.68) 0%, rgba(0, 0, 0, 0.45) 70%),
    url('assets/DJI_0330.JPEG');
  background-size: cover;
  background-position: center;
}
.story-section .section-header h2 { color: #ffffff; text-shadow: 0 2px 6px rgba(0,0,0,0.45); }
.story-section .section-header p { color: #f2fff0; text-shadow: 0 1px 3px rgba(0,0,0,0.35); }
.story-section .section-header p:last-child {
  margin-top: 1.25rem; /* add visual break before closing line */
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 0 1rem;
  margin-top: var(--hero-top); /* adjustable placement in hero */
}
.hero-badges {
  margin: 0.75rem 0 1.25rem;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: #f7e9db;
}
.hero-ctas { margin-top: 0.25rem; display: inline-flex; gap: 0.75rem; flex-wrap: wrap; }
.hero-title {
  font-size: clamp(2rem, 4.75vw, 3.5rem);
  margin-bottom: 1rem;
  /* Explicitly set white colour and a subtle shadow for better contrast */
  color: #ffffff;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.55);
}
.hero-subtitle {
  font-size: 1.15rem;
  margin-bottom: 2rem;
  line-height: 1.6;
  /* Align subtitle colour with hero title and add shadow for readability */
  color: #f2fff0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Buttons */
.btn {
  display: inline-block;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--white);
  padding: 0.8rem 1.6rem;
  border-radius: 3px;
  font-weight: 600;
  transition: background var(--transition-fast), transform var(--transition-fast);
}
.btn:hover {
  filter: brightness(1.05);
  transform: translateY(-2px);
}
.btn.secondary-btn {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.7);
}
.btn.secondary-btn:hover {
  background: rgba(255,255,255,0.1);
}

/* Sections */
.section {
  /* Increase vertical spacing for a more breathable layout */
  padding: 6rem 0;
  position: relative;
  /* Add smooth transitions between sections */
  transition: background 0.3s ease;
}

/* Decorative section dividers for flow */
.section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary-light), transparent);
  opacity: 0.3;
}

/* Remove divider from last sections */
.contact-section::after,
.footer::after {
  display: none;
}
.section-header {
  margin-bottom: 2.75rem; /* slightly more breathing room under headings */
  max-width: var(--section-max);
  /* Smooth fade-in for readability */
  animation: fadeInDown 0.6s ease-out;
  position: relative;
}
.section-header h2::after {
  content: '';
  display: block;
  margin-top: 0.4rem;
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.6;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.section-header h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.section-header p {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.7;
  text-wrap: pretty;
  hyphens: manual; /* avoid awkward auto-hyphenation in long paragraphs */
  font-variant-numeric: lining-nums;
}
.section-header p + p { margin-top: 1rem; } /* consistent paragraph spacing */
.section-header p { max-width: 72ch; } /* readable line length for body copy */

/* Cards & Highlights */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px var(--shadow);
  border: 1px solid rgba(217, 200, 156, 0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 32px var(--shadow-strong);
  border-color: var(--accent);
}

/* Details Section */
.details-content {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
}
.details-content > div {
  flex: 1 1 250px;
}
.details-content h3 {
  margin-bottom: 0.5rem;
}

/* removed table-specific styles (no tables in current layout) */

/* Sustainability Section */
/* Sustainability Section
   We use a light neutral background here and subtle patterns. The pattern is
   intentionally faint to avoid drawing attention away from the content. */
.sustainability-section {
  background: linear-gradient(to bottom, var(--background) 0%, var(--surface) 100%);
  color: var(--text);
  position: relative;
  overflow: hidden;
}
.sustainability-section .background-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('assets/abstract.png');
  background-size: cover;
  background-position: center;
  opacity: 0.05; /* very subtle pattern */
  z-index: 0;
}
.sustainability-section .section-header,
.sustainability-section .highlights {
  position: relative;
  z-index: 1;
}
/* Grid of highlights within sustainability section */
.highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
/* Each highlight card uses a soft surface colour and dark text */
.highlight {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px var(--shadow);
  border: 1px solid rgba(217, 200, 156, 0.3);
}
.highlight h3 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.highlight p {
  color: var(--muted);
}

/* Team Section */
.team-section {
  /* Light cream surface for warmth */
  background: linear-gradient(to bottom, var(--white) 0%, var(--surface) 100%);
}
.team-content {
  margin-top: 2rem;
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.team-member {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px var(--shadow); /* softer shadow to reduce visual weight */
}
.team-member h3 {
  margin-bottom: 0.5rem;
  color: var(--primary);
}
.team-member p {
  color: var(--text);
  line-height: 1.6;
}

/* Heritage Section */
.heritage-section {
  background:
    linear-gradient(180deg, rgba(12, 36, 24, 0.68) 0%, rgba(0, 0, 0, 0.45) 70%),
    url('assets/DJI_0352.JPEG');
  background-size: cover;
  background-position: center;
}
.heritage-section .quote { margin-bottom: 1.25rem; }
.heritage-section .section-header h2 { color: #ffffff; text-shadow: 0 2px 6px rgba(0,0,0,0.45); }
.heritage-section .section-header p { color: #f2fff0; text-shadow: 0 1px 3px rgba(0,0,0,0.35); }
.heritage-section .quote blockquote { color: #ffffff; text-shadow: 0 2px 6px rgba(0,0,0,0.45); }
.heritage-section .quote cite { color: #e0eedf; }
.heritage-content p { color: #f2fff0; text-shadow: 0 1px 3px rgba(0,0,0,0.35); line-height: 1.7; }
.heritage-content { margin-top: 0.5rem; }
/* Featured caretaker profile card */
.profile-card {
  display: grid;
  grid-template-columns: 1fr 2fr; /* smaller media column */
  gap: 1.25rem;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  padding: 1.25rem;
  border-radius: 12px;
  box-shadow: 0 2px 12px var(--shadow);
  margin-bottom: 2rem;
  align-items: center;
}
.profile-media { max-width: 340px; height: var(--profile-media-height); overflow: hidden; border-radius: 8px; }
.profile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% var(--profile-focal-y); /* fine-tune visible area */
  border-radius: 8px;
  border: 1px solid #e5f2e5; /* subtle green frame */
}
.profile-body h3 {
  margin-bottom: 0.5rem;
  color: var(--primary);
  font-size: 1.25rem;
}
.profile-body p {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.6;
}
.profile-facts {
  margin-top: 0.75rem;
  padding-left: 1rem;
}
.profile-facts li { color: var(--text); margin-bottom: 0.35rem; font-size: 0.95rem; }

@media (max-width: 768px) {
  .profile-card { grid-template-columns: 1fr; }
  :root { --profile-media-height: 240px; --profile-focal-y: 35%; }
  .profile-media { max-width: 100%; height: var(--profile-media-height); }
  .profile-media img { height: 100%; }
}
.quote blockquote {
  font-style: italic;
  color: var(--primary);
  margin-bottom: 0.5rem;
  position: relative;
}
.quote blockquote::before {
  content: '“';
  font-size: 2rem;
  color: var(--primary-light);
  position: absolute;
  left: -0.5rem;
  top: -0.5rem;
}
.quote cite {
  font-size: 0.9rem;
  color: var(--muted);
}
.sale-history h3 {
  margin-bottom: 0.5rem;
  color: var(--primary);
}
.sale-history p {
  color: var(--muted);
}

/* Contact Section */
.contact-section {
  /* Match the main page background for a seamless flow */
  background: linear-gradient(to bottom, var(--surface) 0%, var(--background) 100%);
}
.contact-card {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  /* Light surface with thin border for a refined look */
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px var(--shadow);
  border: 1px solid rgba(217, 200, 156, 0.35);
}
.contact-info p {
  margin-bottom: 0.5rem;
  color: var(--primary);
  font-weight: 500;
}
.contact-info a {
  color: var(--primary);
  font-weight: 600;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
}
.modal-content {
  background-color: var(--white);
  margin: 10% auto;
  padding: 2rem;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 6px 20px var(--shadow);
}
.modal-content h3 {
  margin-bottom: 1rem;
  color: var(--primary);
}
.modal-content label {
  display: block;
  margin-top: 1rem;
  margin-bottom: 0.25rem;
  font-weight: 600;
}
.modal-content input,
.modal-content textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}
.modal-content .btn {
  margin-top: 1rem;
  width: 100%;
}
.close {
  color: var(--muted);
  float: right;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
}

/* Footer */
.footer {
  background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary) 100%);
  color: var(--white);
  text-align: center;
  padding: 1.5rem 0;
}
.footer .small {
  font-size: 0.8rem;
  color: #dcedc8;
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(28px) scale(0.98);
  transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1), transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}
.slide-up {
  opacity: 0;
  transform: translateY(42px) scale(0.98);
  transition: opacity 1.1s cubic-bezier(0.4, 0, 0.2, 1), transform 1.1s cubic-bezier(0.4, 0, 0.2, 1);
}
.show {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Stagger animation delays for progressive reveals */
.cards .card:nth-child(1) { transition-delay: 0.1s; }
.cards .card:nth-child(2) { transition-delay: 0.2s; }
.cards .card:nth-child(3) { transition-delay: 0.3s; }
.cards .card:nth-child(4) { transition-delay: 0.4s; }
.cards .card:nth-child(5) { transition-delay: 0.5s; }

/* Stagger for other grids */
.highlights .highlight:nth-child(1) { transition-delay: 0.1s; }
.highlights .highlight:nth-child(2) { transition-delay: 0.2s; }
.highlights .highlight:nth-child(3) { transition-delay: 0.3s; }
.highlights .highlight:nth-child(4) { transition-delay: 0.4s; }
.wines-grid .wine-card:nth-child(1) { transition-delay: 0.1s; }
.wines-grid .wine-card:nth-child(2) { transition-delay: 0.2s; }

@media (max-width: 768px) {
  :root {
    --hero-top: 14vh; /* keep content in upper half on tablets/phones */
  }

  .nav-links {
    display: none;
  }
  .navbar {
    padding: 1rem;
  }
  /* Could add responsive menu toggle for mobile if needed */
  .contact-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .team-grid {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: clamp(1.4rem, 6vw, 2.4rem);
  }
  .hero-subtitle {
    margin-bottom: 1.2rem;
  }
}

/* Fine-tune between tablet and desktop */
@media (max-width: 1024px) {
  :root {
    --hero-top: 16vh;
  }
}

/* Extra small phones */
@media (max-width: 480px) {
  :root {
    --hero-top: 12vh;
  }
  .hero-title {
    font-size: clamp(1.3rem, 7vw, 2rem);
  }
}

/* Distribution Section */
.distribution-section {
  background: linear-gradient(to bottom, var(--surface) 0%, var(--white) 100%);
}
.distribution-content {
  margin-top: 2rem;
}
.distribution-content p {
  color: var(--text);
  line-height: 1.7;
  text-wrap: pretty;
  hyphens: auto;
}
.distribution-highlights {
  margin-top: 1.5rem;
}

/* Wine Offerings Section */
.wines-section {
  background: linear-gradient(to bottom, var(--background) 0%, var(--surface) 100%);
}
.wines-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.wine-card {
  padding: 2rem;
}
.wine-card p {
  color: var(--text);
  line-height: 1.7;
  text-wrap: pretty;
  hyphens: auto;
}
.wine-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}
.wine-cases {
  color: var(--primary);
  font-weight: 600;
  font-style: italic;
  margin-bottom: 1rem;
}

/* Gallery Section */
.gallery-section {
  background: linear-gradient(to bottom, var(--white) 0%, var(--surface) 100%);
}

 
.carousel {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 2px 12px var(--shadow);
  border: 1px solid rgba(217, 200, 156, 0.35);
  background: rgba(255, 255, 255, 0.6);
  margin-top: 1.5rem;
}
.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}
.carousel-slide {
  min-width: 100%;
}
.carousel-slide img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary);
  border: 1px solid rgba(217, 200, 156, 0.6);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 10px var(--shadow);
  transition: transform 0.2s ease;
}
.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }
.carousel-prev:hover, .carousel-next:hover { transform: translateY(-50%) scale(1.06); }
.carousel-dots {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  display: inline-flex;
  gap: 6px;
}
.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(217, 200, 156, 0.6);
  cursor: pointer;
}
.carousel-dot.active {
  background: var(--accent);
}
/* Photo section header panels for legibility */
.story-section .section-header,
.heritage-section .section-header {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(217, 200, 156, 0.25);
  border-radius: 10px;
  padding: 1rem 1rem;
  box-shadow: 0 6px 18px var(--shadow);
}

/* Focus-visible accessibility */
.btn:focus-visible,
.nav-links a:focus-visible,
.carousel-prev:focus-visible,
.carousel-next:focus-visible,
.carousel-dot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .fade-in,
  .slide-up {
    transition: none !important;
    transform: none !important;
  }
  .carousel-track {
    transition: none !important;
  }
}
 
