/*
 * Global theme definitions
 *
 * This stylesheet defines colour variables and a handful of bespoke
 * utility classes to mirror the aesthetic of the original Holy
 * Elixir landing page. The intent is to provide a cohesive,
 * professional look across all pages while still leaning on
 * TailwindCSS for the majority of layout and typography.
 */

/* Colour palette derived from the original design */
:root {
  --teal: #0DBDAD;
  --teal-dark: #0A9A8D;
  --teal-light: #E8F8F6;
  --navy: #1A2B4A;
  --navy-light: #2D4263;
  --charcoal: #333333;
  --gray-dark: #555555;
  --gray: #777777;
  --gray-light: #999999;
  --gray-lighter: #E5E5E5;
  --gray-bg: #F8F9FA;
  --white: #FFFFFF;
  --gold: #D4A853;
  --gold-light: #F5E6C8;
}

html {
  scroll-behavior: smooth;
}

html, body {
  height: 100%;
  width: 100%;
  font-family: 'Lato', sans-serif;
  color: var(--charcoal);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ======================================= */
/*  Reading Experience – Prose & Lead      */
/*
 * Optimised for comfortable reading: 1.7 line-height, ~65ch line length,
 * clear paragraph spacing, and a distinct lead (intro) style.
 */
.content-prose {
  max-width: 65ch;
  line-height: 1.7;
  font-size: 1.0625rem;
}

.content-prose p {
  margin-bottom: 1.25em;
}

.content-prose p:last-child {
  margin-bottom: 0;
}

.content-prose ul {
  margin-bottom: 1.25em;
}

.content-prose li {
  margin-bottom: 0.5em;
}

.content-prose li::marker {
  color: var(--teal);
}

/* Lead / intro paragraph – slightly larger, easier to scan */
.lead {
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--navy);
  font-weight: 400;
}

/* Key takeaway / callout – for “In short” or highlight boxes */
.key-takeaway {
  background: var(--teal-light);
  border-left: 4px solid var(--teal);
  padding: 1rem 1.25rem;
  border-radius: 0 0.5rem 0.5rem 0;
  margin: 1.5rem 0;
  font-size: 1rem;
  line-height: 1.65;
}

.key-takeaway strong {
  color: var(--navy);
}

/* At-a-glance / summary list – scannable bullets before long content */
.at-a-glance {
  display: grid;
  gap: 0.75rem;
  margin: 1.5rem 0;
  list-style: none;
  padding: 0;
}

.at-a-glance li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 1rem;
  line-height: 1.6;
  list-style: none;
}

.at-a-glance li::before {
  content: '';
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  margin-top: 0.6em;
  border-radius: 50%;
  background: var(--teal);
}

/* Focus styles for accessibility and keyboard navigation */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* Section heading styles */
.section-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--gray);
  font-size: 1rem;
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
  margin-top: 0.5rem;
}

.section-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  background: var(--teal-light);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 9999px;
  color: var(--white);
  background: var(--teal);
  /* Introduce a subtle 3D perspective so the button appears to float above the page */
  transform: perspective(600px) translateZ(0);
  transition: background 0.3s, transform 0.3s cubic-bezier(.21,.68,.08,1.5), box-shadow 0.3s;
  box-shadow: 0 4px 14px rgba(13, 189, 173, 0.4);
}
.btn-primary:hover {
  background: var(--teal-dark);
  /* Lift the button and add depth on hover */
  transform: perspective(600px) translateY(-6px) translateZ(10px);
  box-shadow: 0 12px 32px rgba(13, 189, 173, 0.6);
}

/* Add an active state to provide tactile feedback */
.btn-primary:active {
  transform: perspective(600px) translateY(-2px) translateZ(2px);
  box-shadow: 0 6px 18px rgba(13, 189, 173, 0.5);
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 9999px;
  color: var(--teal);
  border: 2px solid var(--teal);
  background: transparent;
  /* Add 3D perspective to the outline button */
  transform: perspective(600px) translateZ(0);
  transition: background 0.3s, color 0.3s, transform 0.3s cubic-bezier(.21,.68,.08,1.5), box-shadow 0.3s;
}
.btn-secondary:hover {
  background: var(--teal);
  color: var(--white);
  /* Lift the button and cast a shadow on hover */
  transform: perspective(600px) translateY(-6px) translateZ(10px);
  box-shadow: 0 12px 32px rgba(13, 189, 173, 0.3);
}

/* Active state for outline buttons */
.btn-secondary:active {
  transform: perspective(600px) translateY(-2px) translateZ(2px);
  box-shadow: 0 6px 18px rgba(13, 189, 173, 0.2);
}

/* Navigation bar */
nav {
  background: var(--white);
  border-bottom: 1px solid var(--gray-lighter);
  position: sticky;
  top: 0;
  z-index: 50;
}
nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0.75rem 1rem;
}
nav a {
  color: var(--gray-dark);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  text-decoration: none;
  padding: 0.25rem;
  /* Smooth animation for menu items: include transform and shadow transitions */
  transition: color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--teal);
  transition: width 0.3s;
}
nav a:hover, nav a.active {
  color: var(--teal);
}
nav a:hover::after, nav a.active::after {
  width: 100%;
}

/* Enhance menu animations: gently lift and cast a soft shadow on hover */
nav a:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(13, 189, 173, 0.3);
}

/* Hero slider */
.hero-wrap {
  /*
   * Premium “framed” hero: a subtle 1% viewport gap on each side
   * reduces the perceived zoom/crop while keeping a high-end look.
   */
  padding-left: 1vw;
  padding-right: 1vw;
}

.hero-slider {
  position: relative;
  width: 100%;
  /* Premium full-bleed feel while staying friendly to small screens */
  height: clamp(420px, 78vh, 820px);
  overflow: hidden;
  background: #F3F4F6; /* fallback behind images on very wide screens */
  isolation: isolate;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 22px 70px rgba(15, 23, 42, 0.16);
  perspective: 1200px;
  transform-style: preserve-3d;
}
.hero-slider .slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Display background images without excessive zoom so the products remain visible */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0;
  /* Keep motion premium (subtle) so subject framing isn't lost */
  transform: translate3d(0, 0, 0) scale(1.04);
  filter: saturate(1.03) contrast(1.03);
  transition:
    opacity 0.9s ease,
    transform 1.15s cubic-bezier(.2,.7,.1,1),
    filter 1.15s cubic-bezier(.2,.7,.1,1);
  will-change: opacity, transform, filter;
}

/* Direction-aware 3D entrance (set by script.js) */
.hero-slider[data-dir="next"] .slide { transform: translate3d(1.6%, 0, 0) scale(1.06) rotateY(-3.5deg); }
.hero-slider[data-dir="prev"] .slide { transform: translate3d(-1.6%, 0, 0) scale(1.06) rotateY(3.5deg); }

.hero-slider .slide.active {
  opacity: 1;
  z-index: 2;
  transform: translate3d(0, 0, 0) scale(1.01) rotateY(0deg);
  filter: saturate(1.06) contrast(1.05);
}

/* Outgoing slide (briefly applied by script.js to make transitions feel more alive) */
.hero-slider .slide.leaving {
  z-index: 3;
  pointer-events: none;
}
.hero-slider[data-dir="next"] .slide.leaving { transform: translate3d(-1.6%, 0, 0) scale(1.03) rotateY(3deg); }
.hero-slider[data-dir="prev"] .slide.leaving { transform: translate3d(1.6%, 0, 0) scale(1.03) rotateY(-3deg); }

/*
 * Bottom-only contrast layer (keeps the image crisp; avoids a “white haze” over the whole slide)
 */
.hero-slider .slide::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 52%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.00));
  z-index: 1;
  pointer-events: none;
}

/*
 * Ensure hero content sits above the overlay.
 * IMPORTANT: keep the horizontal centering (translateX(-50%)) inside the
 * same transform that drives the entrance animation; otherwise transforms
 * override each other and the copy drifts to the side.
 */
.hero-slider .slide .hero-content {
  position: absolute;
  z-index: 2;
  /* Keep copy safely inside the frame (prevents clipping on the right) */
  left: clamp(1rem, 4vw, 3rem);
  right: clamp(1rem, 4vw, 3rem);
  bottom: clamp(1.1rem, 5vh, 2.25rem);
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition:
    opacity 0.75s ease 0.12s,
    transform 0.95s cubic-bezier(.2,.7,.1,1) 0.12s;
}

.hero-slider .slide.active .hero-content {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/*
 * Make the hero copy span wide (reduces wrapping/height) while staying readable.
 * We keep it centered with a generous max width so it still feels premium.
 */
.hero-content {
  /* Use max-width (widely supported) vs min() to avoid shrink-to-fit overflow */
  width: 100%;
  max-width: 56rem; /* ~896px: wide enough to reduce wrapping without overflowing */
  margin-left: auto; /* anchor copy to the right side of the hero */
  text-align: left;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
  color: #FFFFFF;
}

/* On smaller screens, center the hero copy for balance and readability */
@media (max-width: 768px) {
  .hero-content {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    max-width: 42rem;
  }
}

/* Badge in hero: subtle glass pill */
.hero-content .section-badge {
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
}

/* Full-bleed images: fill width (crop instead of leaving side gutters) */
.hero-slider .slide img.hero-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* critical: removes side gutters on wide screens */
  object-position: center;
  z-index: 0;
  will-change: transform;
}

/* Premium “Ken Burns” motion on the active slide image (lively, but still elegant) */
.hero-slider .slide.active img.hero-img {
  animation: heroKenBurns 6.8s ease-out both;
}

@keyframes heroKenBurns {
  from { transform: scale(1.08); }
  to   { transform: scale(1.01); }
}

/* Respect accessibility preferences */
@media (prefers-reduced-motion: reduce) {
  .hero-slider .slide,
  .hero-slider .slide .hero-content {
    transition: opacity 0.2s linear !important;
    transform: none !important;
    filter: none !important;
  }
  .hero-slider .slide.active img.hero-img {
    animation: none !important;
  }
}

/* Per-slide focal points (tune cropping without touching images) */
/* Slide 1 (model drinking): bias further upward so the head stays fully in-frame */
.hero-slider > .slide:nth-child(1) img.hero-img { object-position: 58% 6%; }
/* Slide 2 (bottles range): lift framing to keep bottle caps visible */
.hero-slider > .slide:nth-child(2) img.hero-img { object-position: 55% 30%; }
/* Slide 3 (ionizer): lift framing to keep the top branding visible */
.hero-slider > .slide:nth-child(3) img.hero-img { object-position: 55% 25%; }

.hero-content h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.0rem, 3.2vw, 3.25rem);
  margin-bottom: 0.45rem;
  line-height: 1.02;
  color: #FFFFFF;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.38);
  max-width: 100%;
  overflow-wrap: break-word;
}

.hero-content p {
  font-size: clamp(1.0rem, 1.35vw, 1.15rem);
  margin-bottom: 0.95rem;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

/* Slider navigation arrows */
.slider-controls {
  position: absolute;
  bottom: 2.1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
  z-index: 6;
}
.slider-controls button {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.72);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s;
}
.slider-controls button:hover {
  background: rgba(255, 255, 255, 0.88);
}

/* Slider dot navigation */
.slider-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 6;
}
.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transition: background 0.3s, transform 0.3s;
  cursor: pointer;
}
.slider-dot.active {
  background: var(--teal);
  transform: scale(1.4);
}

/* Mobile tuning */
@media (max-width: 640px) {
  .hero-wrap {
    padding-left: 0;
    padding-right: 0;
  }
  .hero-slider {
    height: clamp(340px, 62vh, 520px);
    border-radius: 0;
    border: none;
    box-shadow: none;
  }
  .hero-content {
    width: calc(100% - 1.75rem);
  }
  .hero-content h1 {
    font-size: 1.85rem;
  }
  .hero-content p {
    font-size: 1rem;
    margin-bottom: 0.85rem;
  }
  .slider-controls {
    bottom: 2.4rem; /* keep arrows above dots on tight screens */
  }
}

/* Extra mobile focal tuning: keep faces/products framed nicely */
@media (max-width: 640px) {
  /* On small screens, keep the model's face/hand well-framed */
  .hero-slider > .slide:nth-child(1) img.hero-img { object-position: 58% 10%; }
  /* Keep product tops visible on smaller viewports */
  .hero-slider > .slide:nth-child(2) img.hero-img { object-position: 55% 28%; }
  .hero-slider > .slide:nth-child(3) img.hero-img { object-position: 55% 22%; }
}


/* Cards */
.stat-item {
  text-align: center;
  padding: 1rem;
}
.stat-item .stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 2.25rem;
  font-weight: 600;
  color: var(--teal);
}
.product-card {
  background: var(--white);
  border: 1px solid var(--gray-lighter);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.3s, box-shadow 0.3s;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}
.product-badge {
  display: inline-block;
  background: var(--gold-light);
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  margin-bottom: 0.5rem;
}

/* Ensure consistent image sizing in the Premium Collection grid */
.product-card img {
  /* Fix the height to create uniform cards regardless of source image dimensions */
  height: 220px;
  width: 100%;
  /* Show the full image within the card while maintaining aspect ratio */
  object-fit: contain;
  object-position: center;
  display: block;
  /* Fill empty space around the image with a light teal background that ties into the site palette */
  background: var(--teal-light);
}

/* FAQ styles */
.faq-item {
  border-bottom: 1px solid var(--gray-lighter);
  padding: 1rem 0;
}
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  color: var(--navy);
  font-weight: 600;
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.faq-item.open .faq-answer {
  max-height: 500px;
  margin-top: 0.5rem;
}
.faq-icon {
  width: 1rem;
  height: 1rem;
  margin-left: 0.5rem;
  transition: transform 0.3s;
}
.faq-item.open .faq-icon {
  transform: rotate(180deg);
}

/* Contact form */
.contact-form {
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}
.contact-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--gray-lighter);
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  font-size: 1rem;
}
.contact-form button {
  width: 100%;
}

/* Dealer/Partner page */
.partner-benefits {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.partner-benefit {
  background: var(--white);
  border: 1px solid var(--gray-lighter);
  padding: 1.5rem;
  border-radius: 0.75rem;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.partner-benefit h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--navy);
}

/* Utility classes */
.bg-light {
  background: var(--gray-bg);
}

.text-teal {
  color: var(--teal);
}

.text-navy {
  color: var(--navy);
}

/* ======================================= */
/*  Wow Factor Section Styles              */
/*
 * The wow section introduces a wow‑factor area on the landing page where
 * visitors can learn about the extraordinary properties of Zubrex water. It
 * employs floating water droplets in the background to evoke a sense of
 * movement and liveliness. Icons and copy are centred and evenly spaced
 * across the grid.
 */
.wow-section {
  position: relative;
  background: var(--gray-bg);
  overflow: hidden;
}
.wow-section .wow-item {
  background: var(--white);
  border: 1px solid var(--gray-lighter);
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s, box-shadow 0.3s;
}
.wow-section .wow-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}
.wow-section .wow-icon {
  margin-bottom: 0.75rem;
}

/* Floating water droplets */
.wow-section .drop {
  position: absolute;
  width: 120px;
  height: 160px;
  background: var(--teal-light);
  opacity: 0.35;
  border-radius: 50% 50% 60% 60% / 70% 70% 40% 40%;
  animation: float 12s ease-in-out infinite;
}
.wow-section .drop-1 {
  top: -40px;
  left: 10%;
  animation-delay: 0s;
  animation-duration: 14s;
}
.wow-section .drop-2 {
  bottom: -60px;
  right: 15%;
  animation-delay: 2s;
  animation-duration: 16s;
}
.wow-section .drop-3 {
  top: 30%;
  right: -80px;
  width: 80px;
  height: 110px;
  opacity: 0.25;
  animation-delay: 5s;
  animation-duration: 18s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0) rotate(0deg); }
  25% { transform: translateY(-20px) translateX(10px) rotate(5deg); }
  50% { transform: translateY(10px) translateX(-15px) rotate(-5deg); }
  75% { transform: translateY(-10px) translateX(5px) rotate(3deg); }
}

/* -----------------------------------------------------------------
   Benefits Page Enhancements
   These styles add interactive touches to the benefits cards without
   altering the existing layout or theme. Hovering over a benefit
   section will gently lift the card and subtly brighten the image,
   inviting exploration while preserving performance on mobile devices.
-------------------------------------------------------------------- */
#benefits .benefit-section .grid {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
#benefits .benefit-section .grid:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.15);
}
#benefits .benefit-section img {
  transition: transform 0.5s ease, filter 0.5s ease;
}
#benefits .benefit-section img:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

