/*
 * ================================================================
 * Jafra Imports — Animation & Visual Enhancement Layer
 * ================================================================
 * BACKGROUND IMAGE SLOTS — files in assets/backgrounds/
 *
 *   hero-bg.webp            — Homepage hero layered behind gradient
 *                            Selector: .hero-bg-photo
 *
 *   shop-header-bg.webp     — Shop page header photo overlay
 *                            Selector: body[data-page="shop"] .page-header-bg
 *
 *   goals-section-bg.webp   — Goals / Why Jafra section (dark teal)
 *                            Also reused for About page header
 *                            Selector: .goals-section-enhanced (layered bg)
 *                                      body[data-page="about"] .page-header-bg
 *
 *   contact-header-bg.webp  — Contact page header overlay
 *                            Selector: body[data-page="contact"] .page-header-bg
 *
 *   newsletter-bg.webp      — Newsletter section (warm sand)
 *                            Selector: .newsletter-section-enhanced (layered bg)
 *
 *   section-texture.webp    — Repeating Tatreez cross-stitch tile (≤ 200 px)
 *                            Selector: .pattern-overlay
 *
 * Gradient overlays on every slot keep text readable regardless of image.
 * ================================================================
 */

/* ================================================================
   1. REVEAL ANIMATION SYSTEM
   Scroll-triggered entrance via IntersectionObserver (animations.js)
   Classes: .reveal (base) + .reveal-up | .reveal-scale (variants)
   Parent: .reveal-stagger (JS sets --stagger-i on each .reveal child)
   ================================================================ */

.reveal {
  opacity: 0;
  transition:
    opacity 0.72s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-up {
  transform: translateY(36px);
}

.reveal-scale {
  transform: scale(0.96) translateY(12px);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Stagger: JS sets CSS custom property --stagger-i on each child */
.reveal-stagger .reveal {
  transition-delay: calc(var(--stagger-i, 0) * 110ms);
}

/* ================================================================
   2. HERO ENHANCED
   .hero-enhanced wraps: hero-backdrop → bg-photo + bg-pattern + orbs
   ================================================================ */

.hero-enhanced {
  overflow: hidden;
  min-height: clamp(540px, 84vh, 780px);
}

/* Full-bleed backdrop container — sits behind content */
.hero-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* Full-bleed cover photo for the hero background */
.hero-bg-photo {
  position: absolute;
  inset: -8% 0 0 0;          /* extra top room for parallax travel */
  height: 116%;
  background-image: url('../assets/backgrounds/hero-bg.webp');
  background-size: cover;
  background-position: center 35%;
  will-change: transform;
}

/* Dark gradient overlay — keeps overlaid text readable and blends the
   bottom edge into the sand section that follows */
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      105deg,
      rgba(20, 32, 32, 0.82) 0%,
      rgba(26, 40, 40, 0.62) 42%,
      rgba(26, 40, 40, 0.34) 100%
    ),
    linear-gradient(
      to bottom,
      rgba(20, 32, 32, 0.35) 0%,
      transparent 30%,
      transparent 62%,
      rgba(243, 235, 224, 0.55) 88%,
      #f3ebe0 100%
    );
  pointer-events: none;
}

/* Tatreez-inspired diamond cross-stitch SVG pattern */
.hero-bg-pattern {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='56' height='56' viewBox='0 0 56 56' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23243838' fill-opacity='0.045'%3E%3Cpath d='M28 0L56 28L28 56L0 28z'/%3E%3Cpath d='M28 8L48 28L28 48L8 28z' fill='%23b04e57' fill-opacity='0.025'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 56px 56px;
}

/* Floating ambient orbs */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  pointer-events: none;
  animation: orbDrift 12s ease-in-out infinite alternate;
}

.hero-orb--1 {
  width: clamp(200px, 32vw, 380px);
  height: clamp(200px, 32vw, 380px);
  top: -15%;
  right: 2%;
  background: radial-gradient(circle at center, rgba(176, 78, 87, 0.2), transparent 65%);
  animation-duration: 13s;
  animation-delay: 0s;
}

.hero-orb--2 {
  width: clamp(260px, 38vw, 480px);
  height: clamp(260px, 38vw, 480px);
  bottom: -28%;
  left: -6%;
  background: radial-gradient(circle at center, rgba(36, 56, 56, 0.13), transparent 65%);
  animation-duration: 16s;
  animation-delay: -5s;
}

.hero-orb--3 {
  width: clamp(100px, 16vw, 200px);
  height: clamp(100px, 16vw, 200px);
  top: 32%;
  left: 44%;
  background: radial-gradient(circle at center, rgba(212, 165, 116, 0.16), transparent 65%);
  animation-duration: 9s;
  animation-delay: -8s;
}

@keyframes orbDrift {
  0%   { transform: translate(0, 0) scale(1); }
  30%  { transform: translate(14px, -22px) scale(1.06); }
  65%  { transform: translate(-10px, -10px) scale(0.96); }
  100% { transform: translate(20px, -32px) scale(1.1); }
}

/* Hero content sits above backdrop layers */
.hero-enhanced .hero-layout {
  position: relative;
  z-index: 1;
}

/* Logo box entrance animation */
.hero-logo-box {
  animation: logoFloat 6s ease-in-out infinite alternate;
}

@keyframes logoFloat {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

/* ================================================================
   3. SCROLL INDICATOR
   ================================================================ */

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
  opacity: 0.5;
  text-decoration: none;
  z-index: 2;
  transition: opacity var(--transition);
}

.scroll-indicator:hover {
  opacity: 0.85;
  color: var(--color-primary);
}

.scroll-indicator::after {
  content: '';
  display: block;
  width: 1.5px;
  height: 30px;
  background: linear-gradient(to bottom, var(--color-accent), transparent);
  border-radius: 2px;
  animation: scrollLine 2.4s ease-in-out infinite;
}

@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 0; }
  40%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  60%  { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* ================================================================
   4. PAGE HEADER ENHANCED (inner pages)
   Extends .page-header — adds bg-photo slot + deeper padding
   ================================================================ */

.page-header-enhanced {
  position: relative;
  overflow: hidden;
  padding-block: clamp(4.5rem, 11vw, 7.5rem);
}

/* Photo background layer — sits behind sand gradient */
.page-header-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;            /* Hidden until image loads */
  transition: opacity 0.8s ease;
}

/* Reveal bg layer when image is present (JS-independent) */
body[data-page="shop"] .page-header-bg {
  background-image: url('../assets/backgrounds/shop-header-bg.webp');
  opacity: 0.13;
}

/* Reuse goals-section-bg for about page header (heritage / production theme) */
body[data-page="about"] .page-header-bg {
  background-image: url('../assets/backgrounds/goals-section-bg.webp');
  opacity: 0.11;
}

body[data-page="contact"] .page-header-bg {
  background-image: url('../assets/backgrounds/contact-header-bg.webp');
  opacity: 0.13;
}

.page-header-enhanced .pattern-overlay {
  z-index: 1;
  opacity: 0.05;
}

/* Ensure text container is above photo + pattern */
.page-header-enhanced .container {
  position: relative;
  z-index: 2;
}

/* ================================================================
   5. PATTERN OVERLAY (Tatreez-inspired diamond texture)
   Used in .section-sand-enhanced, .goals-section-enhanced,
   .newsletter-section-enhanced, page-header-enhanced
   ================================================================ */

.pattern-overlay {
  position: absolute;
  inset: 0;
  background-image:
    url('../assets/backgrounds/section-texture.webp'),
    url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23c9b896' fill-opacity='0.18' fill-rule='evenodd'%3E%3Cpath d='M20 0l5 5-5 5-5-5zm0 10l5 5-5 5-5-5zm-10-10l5 5-5 5-5-5zm20 0l5 5-5 5-5-5z'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px, 40px 40px;
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
}

/* ================================================================
   6. SECTION ENHANCED VARIANTS
   ================================================================ */

.section-sand-enhanced,
.goals-section-enhanced,
.newsletter-section-enhanced {
  position: relative;
  overflow: hidden;
}

/* Newsletter section: photo layered under warm sand gradient */
.newsletter-section-enhanced {
  background:
    linear-gradient(160deg, rgba(243,235,224,0.93) 0%, rgba(232,220,200,0.91) 100%),
    url('../assets/backgrounds/newsletter-bg.webp') center / cover no-repeat;
}

/* Decorative corner orb for sand sections */
.section-sand-enhanced::after {
  content: '';
  position: absolute;
  bottom: -60px;
  right: -60px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 165, 116, 0.12), transparent);
  pointer-events: none;
  z-index: 0;
}

/* Ensure section sand content is above the orb */
.section-sand-enhanced > .container {
  position: relative;
  z-index: 1;
}

/* Goals section: photo layered under semi-transparent brand gradient */
.goals-section-enhanced {
  background:
    linear-gradient(135deg, rgba(36,56,56,0.92) 0%, rgba(58,85,85,0.89) 55%, rgba(42,64,64,0.92) 100%),
    url('../assets/backgrounds/goals-section-bg.webp') center / cover no-repeat;
}

/* Subtle light divider at top */
.goals-section-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(640px, 80%);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 165, 116, 0.35), transparent);
  pointer-events: none;
  z-index: 1;
}

/* ================================================================
   7. NAVBAR GLASSMORPHISM (on .scrolled, set by main.js)
   ================================================================ */

.site-header {
  transition:
    background var(--transition),
    box-shadow var(--transition),
    backdrop-filter var(--transition);
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
}

/* Slightly compact navbar on scroll */
.site-header.scrolled .nav-logo img {
  height: 66px;
  transition: height var(--transition);
}

/* Nav link pill indicator on active */
.nav-links a {
  position: relative;
}

.nav-links a::before {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: calc(100% - 2rem);
  height: 2px;
  background: var(--gradient-accent);
  border-radius: 2px;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-links a:hover::before {
  transform: translateX(-50%) scaleX(1);
}

/* Active link already has gradient bg — hide underline */
.nav-links a.active::before {
  display: none;
}

/* ================================================================
   8. CARD ENHANCEMENTS
   ================================================================ */

/* Position context for pseudo-elements */
.card,
.product-card {
  position: relative;
}

/* Top accent border slides in on hover */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-accent);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.card:hover::before,
.product-card:hover::before {
  opacity: 1;
}

/* Category card image zoom (smoother easing) */
.category-card-image img {
  transition: transform 0.58s cubic-bezier(0.22, 1, 0.36, 1);
}

.category-card:hover .category-card-image img {
  transform: scale(1.09);
}

/* Category card shadow bloom */
.category-card {
  transition:
    transform var(--transition),
    box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    border-color var(--transition);
}

.category-card:hover {
  box-shadow: 0 20px 56px rgba(36, 56, 56, 0.14);
}

/* Product card hover lift + shadow bloom */
.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 52px rgba(36, 56, 56, 0.14);
  border-color: rgba(176, 78, 87, 0.2);
}

.product-card:hover .product-name {
  color: var(--color-accent);
}

/* Pillar card border glow */
.pillar-card {
  position: relative;
  overflow: hidden;
  transition:
    background var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
}

.pillar-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
}

/* Pillar icon pop on hover */
.pillar-icon {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow var(--transition);
}

.pillar-card:hover .pillar-icon {
  transform: scale(1.14) rotate(-5deg);
  box-shadow: 0 6px 22px rgba(176, 78, 87, 0.38);
}

/* Stat card bottom grow */
.stat-card {
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-accent);
  transform: scaleX(0);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.stat-card:hover::after {
  transform: scaleX(1);
}

/* ================================================================
   9. BUTTON SHINE SWEEP + RIPPLE
   ================================================================ */

.btn {
  position: relative;
  overflow: hidden;
}

/* Shine sweep on hover */
.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 75%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 20%,
    rgba(255, 255, 255, 0.22) 50%,
    transparent 80%
  );
  transform: skewX(-18deg);
  transition: left 0.52s ease;
  pointer-events: none;
  z-index: 1;
}

.btn:hover::before {
  left: 130%;
}

/* Ripple element injected by animations.js */
.btn-ripple {
  position: absolute;
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  transform: scale(0);
  animation: rippleExpand 0.65s ease-out forwards;
  pointer-events: none;
  margin-left: -3px;
  margin-top: -3px;
  z-index: 2;
}

@keyframes rippleExpand {
  to {
    transform: scale(120);
    opacity: 0;
  }
}

/* ================================================================
   10. NEWSLETTER BADGE PULSE
   ================================================================ */

.newsletter-badge {
  animation: badgePulse 3.8s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% {
    box-shadow: 0 4px 16px rgba(176, 78, 87, 0.35);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 4px 32px rgba(176, 78, 87, 0.65), 0 0 0 10px rgba(176, 78, 87, 0.07);
    transform: scale(1.05);
  }
}

/* ================================================================
   11. TIMELINE SEQUENTIAL REVEAL
   Triggered by initTimeline() in animations.js
   ================================================================ */

.timeline-item {
  opacity: 0;
  transform: translateX(-22px);
  transition:
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.timeline-item.is-visible {
  opacity: 1;
  transform: none;
}

/* Timeline dot scale-in after item appears */
.timeline-item::before {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ================================================================
   12. STAT COUNTER
   Numbers animate from 0 via initStatCounters() in animations.js
   ================================================================ */

[data-count] {
  display: inline-block;
  transition: color 0.2s ease;
}

/* ================================================================
   13. SHOP — SKELETON LOADING SHIMMER
   Replaces old spinner in shop.html; hidden by shop.js when ready
   ================================================================ */

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* Override old spinner padding */
.shop-loading {
  padding: 0 !important;
  color: transparent !important;
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 2.5vw, 1.75rem);
}

.product-card-skeleton {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(201, 184, 150, 0.28);
}

.skeleton-img {
  aspect-ratio: 1 / 1;
  background: linear-gradient(
    90deg,
    var(--color-cream-dark) 25%,
    #f0e8d8 50%,
    var(--color-cream-dark) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.9s ease-in-out infinite;
}

.skeleton-body {
  padding: 1.25rem;
}

.skeleton-line {
  height: 10px;
  border-radius: 5px;
  margin-bottom: 0.7rem;
  background: linear-gradient(
    90deg,
    var(--color-cream-dark) 25%,
    #f0e8d8 50%,
    var(--color-cream-dark) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.9s ease-in-out infinite;
}

.skeleton-line--title {
  height: 14px;
  width: 78%;
  animation-delay: 0.08s;
}

.skeleton-line--short {
  width: 50%;
  animation-delay: 0.16s;
}

.skeleton-line--price {
  width: 38%;
  height: 18px;
  margin-top: 0.9rem;
  margin-bottom: 0;
  animation-delay: 0.26s;
}

/* ================================================================
   14. FORM ENHANCED FOCUS STATES
   ================================================================ */

.form-group input:focus,
.form-group textarea:focus {
  box-shadow: 0 0 0 3px rgba(176, 78, 87, 0.14);
}

.newsletter-form input:focus {
  box-shadow: 0 0 0 3px rgba(176, 78, 87, 0.14);
}

/* ================================================================
   15. CONTACT PAGE ENHANCEMENTS
   ================================================================ */

/* Contact info block hover */
.info-block {
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  border-left: 3px solid transparent;
  margin-left: -1rem;
  transition:
    border-left-color var(--transition),
    background var(--transition);
}

.info-block:hover {
  border-left-color: var(--color-accent);
  background: rgba(247, 242, 234, 0.7);
}

/* Contact form lifts on focus-within */
.contact-form {
  transition: box-shadow 0.4s ease;
}

.contact-form:focus-within {
  box-shadow: 0 24px 64px rgba(36, 56, 56, 0.12);
}

/* ================================================================
   16. ABOUT PAGE CALLOUT ENHANCEMENT
   ================================================================ */

/* Arabic text glows on hover */
.callout-arabic {
  display: block;
  transition: text-shadow var(--transition);
}

.about-callout:hover .callout-arabic {
  text-shadow: 0 0 24px rgba(201, 184, 150, 0.5);
}

/* ================================================================
   17. FOOTER DECORATION
   ================================================================ */

/* Diamond pattern underlaid in footer */
.footer-grid,
.footer-bottom {
  position: relative;
  z-index: 1;
}

/* Animated top bar gradient sweep */
@keyframes footerBarSweep {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* ================================================================
   18. SECTION HEADER UNDERLINE GROW
   ================================================================ */

.section-header h2::after {
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Grow underline when section-header becomes visible */
.section-header.is-visible h2::after,
.reveal.is-visible .section-header h2::after {
  width: 64px;
}

/* ================================================================
   19. SHOP FILTER BUTTON TRANSITIONS
   ================================================================ */

.filter-btn {
  transition:
    background 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.2s ease;
}

.filter-btn:hover {
  transform: translateY(-2px);
}

.filter-btn.active {
  transform: translateY(-1px);
}

/* ================================================================
   19b. HERO COVER — full-bleed photo background, centered content
   ================================================================ */

.hero-cover {
  min-height: 100dvh;
  min-height: 100svh;
  align-items: center;
  text-align: center;
}

/* The base .hero sage gradient is hidden behind the photo overlay */
.hero-cover::before,
.hero-cover::after {
  display: none;
}

.hero-cover-inner {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding-block: clamp(0.75rem, 2vh, 1.5rem);
}

.hero-content--center {
  max-width: 760px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.35rem, 1.2vh, 0.65rem);
}

/* ---- Big centered brand logo ---- */
.hero-brand-logo {
  position: relative;
  margin-bottom: 0;
}

/* Soft luminous halo so the logo reads cleanly over the dark photo */
.hero-brand-logo::before {
  content: '';
  position: absolute;
  inset: -18% -10%;
  background: radial-gradient(ellipse at center, rgba(247, 242, 234, 0.22) 0%, transparent 68%);
  filter: blur(14px);
  z-index: -1;
  pointer-events: none;
}

.hero-brand-logo img {
  height: clamp(88px, 14vw, 150px);
  width: auto;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.4));
  transition:
    opacity 0.5s ease,
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Full hero banner logo — transparent asset blends on dark heroes */
.hero-brand-logo--full img {
  height: clamp(160px, 32vw, 300px);
  width: auto;
  max-width: min(640px, 96vw);
  object-fit: contain;
  filter: drop-shadow(0 8px 28px rgba(0, 0, 0, 0.35));
}

/* Logo hides as it "hands off" to the navbar on scroll (JS toggles
   .hero-logo-handoff on <body> once the navbar logo is shown) */
body.hero-logo-handoff .hero-brand-logo img,
body.hero-logo-handoff .hero-brand-logo--full img {
  opacity: 0;
  transform: translateY(-24px) scale(0.92);
}

/* ---- Light text treatment over the dark photo ---- */
.hero-cover .section-label--serif {
  color: var(--color-gold);
  margin-bottom: 0;
}

.hero-cover .hero-headline {
  color: var(--color-cream);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
  margin-bottom: 0;
}

.hero-cover .hero-content p {
  color: rgba(247, 242, 234, 0.88);
  margin-inline: auto;
  margin-bottom: 0;
  max-width: 36rem;
  line-height: 1.5;
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.3);
}

.hero-cover .hero-headline em {
  color: var(--color-gold);
}

.hero-cover .headline-sub {
  color: rgba(247, 242, 234, 0.82);
}

.hero-cover .hero-actions {
  justify-content: center;
  margin-top: clamp(0.25rem, 0.8vh, 0.5rem);
}

/* Ghost button styled for the dark hero */
.btn-hero-ghost {
  background: transparent;
  color: var(--color-cream);
  border: 2px solid rgba(247, 242, 234, 0.55);
}

.btn-hero-ghost:hover {
  background: rgba(247, 242, 234, 0.12);
  color: var(--color-white);
  border-color: var(--color-cream);
  transform: translateY(-2px);
}

/* Light scroll indicator variant */
.scroll-indicator--light {
  color: rgba(247, 242, 234, 0.85);
}

.scroll-indicator--light:hover {
  color: var(--color-white);
}

.scroll-indicator--light::after {
  background: linear-gradient(to bottom, var(--color-gold), transparent);
}

/* ---- Navbar logo hand-off (home + shop hero) ----
   At the top the navbar logo is hidden; the big hero logo is the focal point.
   Once scrolled, the compact navbar logo (logo.webp) fades in. */
body[data-page="home"] .nav-logo img,
body[data-page="shop"]:not(.hero-logo-handoff) .nav-logo img {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.45s ease, transform 0.45s ease, height var(--transition);
}

body[data-page="home"].hero-logo-handoff .nav-logo img,
body[data-page="shop"].hero-logo-handoff .nav-logo img {
  opacity: 1;
  transform: translateY(0);
}

/* ================================================================
   19e. TRANSPARENT NAVBAR ON EVERY PAGE
   The navbar is transparent at the top of every page (floating over
   the hero / page-header) and becomes a solid glass bar on scroll.
   - Home solidifies in sync with the logo hand-off (.hero-logo-handoff)
   - Inner pages solidify on the .scrolled class (added by main.js)
   Nav-link colour adapts: light over dark headers (home, shop),
   dark over light headers (about, contact).
   ================================================================ */

/* Remove body's top padding everywhere so the first section's
   background sits behind the fixed navbar; each first section re-adds
   the navbar height as inner padding. */
body {
  padding-top: 0;
}

.hero-cover {
  padding-top: var(--nav-height);
}

/* Inner-page headers clear the navbar plus breathing room */
.page-header {
  padding-top: calc(var(--nav-height) + clamp(2rem, 5vw, 3.5rem));
}

/* ---- Base: transparent navbar at the top of any page ---- */
.site-header {
  background: transparent;
  border-bottom-color: transparent;
  box-shadow: none;
}

.site-header::before {
  opacity: 0;
  transition: opacity var(--transition);
}

/* ---- Solid glass once scrolled (inner pages) ---- */
.site-header.scrolled {
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  border-bottom-color: var(--nav-border);
  box-shadow: var(--shadow-nav);
}

.site-header.scrolled::before {
  opacity: 0.5;
}

/* ---- Home + shop: keep transparent until logo hand-off ---- */
body[data-page="home"]:not(.hero-logo-handoff) .site-header,
body[data-page="shop"]:not(.hero-logo-handoff) .site-header {
  background: transparent;
  border-bottom-color: transparent;
  box-shadow: none;
}

body[data-page="home"]:not(.hero-logo-handoff) .site-header::before,
body[data-page="shop"]:not(.hero-logo-handoff) .site-header::before {
  opacity: 0;
}

body[data-page="home"].hero-logo-handoff .site-header,
body[data-page="shop"].hero-logo-handoff .site-header {
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  border-bottom-color: var(--nav-border);
  box-shadow: var(--shadow-nav);
}

/* Shop/home: ignore early .scrolled until hero logo hand-off */
body[data-page="home"]:not(.hero-logo-handoff) .site-header.scrolled,
body[data-page="shop"]:not(.hero-logo-handoff) .site-header.scrolled {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
  box-shadow: none;
}

/* Nav logo legibility while floating over a coloured header */
.site-header:not(.scrolled) .nav-logo img {
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.28));
}

/* ---- Light nav links over DARK headers (home + shop), desktop ---- */
@media (min-width: 769px) {
  body[data-page="home"]:not(.hero-logo-handoff) .nav-links a,
  body[data-page="shop"]:not(.hero-logo-handoff) .nav-links a {
    color: var(--color-cream);
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.3);
  }

  body[data-page="home"]:not(.hero-logo-handoff) .nav-links a:hover,
  body[data-page="shop"]:not(.hero-logo-handoff) .nav-links a:hover {
    color: var(--color-white);
    background: rgba(247, 242, 234, 0.14);
  }

  body[data-page="home"]:not(.hero-logo-handoff) .nav-links a.active,
  body[data-page="shop"]:not(.hero-logo-handoff) .nav-links a.active {
    color: var(--color-white);
  }
}

/* ---- Light hamburger over DARK headers (home + shop), mobile ---- */
@media (max-width: 768px) {
  body[data-page="home"]:not(.hero-logo-handoff) .nav-toggle,
  body[data-page="shop"]:not(.hero-logo-handoff) .nav-toggle {
    background: rgba(247, 242, 234, 0.12);
    border-color: rgba(247, 242, 234, 0.45);
  }

  body[data-page="home"]:not(.hero-logo-handoff) .nav-toggle span,
  body[data-page="shop"]:not(.hero-logo-handoff) .nav-toggle span {
    background: var(--color-cream);
  }
}

/* ================================================================
   19c. HERO HEADLINE TYPOGRAPHY
   ================================================================ */

/* Serif section-label variant (used in hero + section headers) */
.section-label--serif {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: none;
}

/* Hero headline — the brand tagline displayed in two tight lines */
.hero-headline {
  font-family: var(--font-heading);
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--color-primary);
  margin-bottom: 0;
}

.headline-main {
  display: block;
}

/* "Authenticity" — italic, accent-coloured key word (inline with "Taste The") */
.hero-headline em {
  font-style: italic;
  color: var(--color-accent);
  display: inline;
  font-size: 1em;
}

/* "Of The Heritage" — smaller, muted secondary line */
.headline-sub {
  display: block;
  font-size: 0.62em;
  font-weight: 400;
  font-style: normal;
  color: var(--color-muted);
  letter-spacing: 0.015em;
  margin-top: 0.08em;
  line-height: 1.1;
}

/* ================================================================
   19d. PAGE HEADER — DARK CATALOG VARIANT (shop page)
   ================================================================ */

.page-header--catalog {
  background: linear-gradient(145deg, #1a2828 0%, #243838 55%, #2f4848 100%);
}

.page-header--catalog .container {
  position: relative;
  z-index: 2;
}

.page-header--catalog h1 {
  color: var(--color-cream);
  letter-spacing: -0.025em;
}

.page-header--catalog p,
.page-header--catalog .shop-header-meta {
  color: rgba(229, 222, 212, 0.75);
}

.page-header--catalog .section-label {
  color: var(--color-gold);
}

/* Dark header pattern overlay — slightly more visible on dark bg */
.page-header--catalog .pattern-overlay {
  opacity: 0.08;
  /* Invert tint so diamonds appear lighter on dark */
  filter: invert(1);
}

/* Shop hero — full banner logo at top (same hand-off as home) */
.page-header--hero-logo {
  padding-top: calc(var(--nav-height) + clamp(0.35rem, 1.5vh, 0.75rem));
  padding-bottom: clamp(0.75rem, 2vh, 1.25rem);
}

.page-header-hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
}

.page-header--hero-logo .hero-brand-logo {
  margin-bottom: 0;
}

.page-header--hero-logo .shop-header-meta {
  color: rgba(229, 222, 212, 0.8);
  font-size: 0.9375rem;
  margin: 0;
}

/* ================================================================
   20. PREFERS-REDUCED-MOTION — DISABLE ALL ANIMATIONS
   ================================================================ */

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-up,
  .reveal-scale {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .reveal-stagger .reveal {
    transition-delay: 0ms !important;
  }

  .timeline-item {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .hero-orb {
    animation: none !important;
  }

  .hero-logo-box {
    animation: none !important;
  }

  .newsletter-badge {
    animation: none !important;
    box-shadow: 0 4px 16px rgba(176, 78, 87, 0.35);
  }

  .scroll-indicator::after {
    animation: none !important;
  }

  .btn::before,
  .btn-ripple {
    display: none !important;
  }

  .skeleton-img,
  .skeleton-line {
    animation: none !important;
  }
}

/* ================================================================
   21. MOBILE RESPONSIVE ADJUSTMENTS
   ================================================================ */

@media (max-width: 768px) {
  /* Lighter orbs on mobile */
  .hero-orb {
    filter: blur(50px);
  }

  .hero-orb--1 { width: 160px; height: 160px; }
  .hero-orb--2 { width: 200px; height: 200px; }
  .hero-orb--3 { display: none; }

  /* Hide scroll indicator on mobile */
  .scroll-indicator { display: none; }

  /* Smaller reveal offset on mobile */
  .reveal-up {
    transform: translateY(20px);
  }

  /* Skeleton grid 2-col on mobile */
  .skeleton-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Hero headline + logo — compact for one-screen hero */
  .hero-headline {
    font-size: clamp(1.85rem, 7vw, 2.65rem);
  }

  .hero-brand-logo img {
    height: clamp(72px, 20vw, 120px);
  }

  .hero-brand-logo--full img {
    height: clamp(130px, 32vw, 220px);
  }

  .hero-cover {
    min-height: 100dvh;
    min-height: 100svh;
  }

  /* Keep nav bg solid on mobile even when scrolled */
  .site-header.scrolled .nav-links {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (max-width: 480px) {
  .skeleton-grid {
    grid-template-columns: 1fr;
  }
}
