/* Modern enhancements — Candle Bloom */

:root {
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --section-gap: clamp(4rem, 8vw, 7rem);
  --glass: rgba(255, 253, 248, 0.72);
  --glass-border: rgba(74, 46, 27, 0.08);
  --gradient-warm: linear-gradient(165deg, #f5f0e6 0%, #f0e9dd 45%, #ebe3d4 100%);
  --gradient-hero-glow: radial-gradient(ellipse 80% 60% at 70% 40%, rgba(212, 176, 121, 0.18), transparent 70%);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-stagger > * { transition: none !important; opacity: 1 !important; transform: none !important; }
}

body.page-home {
  background: var(--ivory);
}

/* Scroll progress */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--gold), var(--brown));
  z-index: 10000;
  pointer-events: none;
  transition: width 0.08s linear;
}

/* Liquid glass pill header (on scroll) */
.liquid-glass-pill {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(
    145deg,
    rgba(255, 253, 248, 0.42) 0%,
    rgba(255, 253, 248, 0.28) 100%
  );
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.38);
  box-shadow:
    0 8px 28px rgba(74, 46, 27, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.liquid-glass-pill.pill-on-dark {
  background: linear-gradient(
    145deg,
    rgba(255, 253, 248, 0.22) 0%,
    rgba(74, 46, 27, 0.35) 100%
  );
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.liquid-glass-pill.pill-on-dark .split-nav a,
.liquid-glass-pill.pill-on-dark .navbar-links a {
  color: rgba(255, 253, 248, 0.95);
}

.liquid-glass-pill.pill-on-dark .nav-icon {
  color: rgba(255, 253, 248, 0.95);
}

.liquid-glass-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.42) 0%,
    rgba(255, 255, 255, 0.08) 38%,
    transparent 55%
  );
  pointer-events: none;
  z-index: 0;
}

.liquid-glass-pill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.55),
    transparent
  );
  pointer-events: none;
  z-index: 0;
  opacity: 0.85;
}

.liquid-glass-pill > * {
  position: relative;
  z-index: 1;
}

/* Home: split header → floating pill */
.split-header.is-pill-glass {
  position: fixed;
  top: 0.75rem;
  left: 50%;
  right: auto;
  width: min(680px, calc(100vw - 1.25rem));
  height: 50px;
  min-height: 50px;
  transform: translateX(-50%);
  display: block;
  padding: 0;
  border-radius: 9999px;
  z-index: 1000;
  animation: pillHeaderIn 0.45s var(--ease-out);
}

.split-header.is-pill-glass .split-header-left {
  position: absolute;
  left: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  padding: 0;
  z-index: 2;
  background: transparent !important;
}

.split-header.is-pill-glass .split-header-right {
  position: absolute;
  inset: 0;
  width: 100%;
  padding: 0 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  pointer-events: none;
}

.split-header.is-pill-glass .split-nav {
  gap: clamp(0.85rem, 2.5vw, 1.5rem);
  padding-top: 0;
  justify-content: center;
  pointer-events: auto;
}

.split-header.is-pill-glass .split-nav a {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  white-space: nowrap;
}

.split-header.is-pill-glass .split-actions {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: auto;
}

.split-header.is-pill-glass .logo-emblem--mark {
  width: 38px !important;
  height: auto !important;
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
}

@keyframes pillHeaderIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-12px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

/* Inner pages: navbar → pill */
header:has(#navbar.is-pill-glass) .navbar-top {
  max-height: 0;
  opacity: 0;
  padding: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease-out), opacity 0.3s;
}

#navbar.is-pill-glass {
  top: 0.75rem;
  left: 50%;
  right: auto;
  width: min(680px, calc(100vw - 1.25rem));
  transform: translateX(-50%);
  border-radius: 9999px;
  border-bottom: none;
  animation: pillHeaderIn 0.45s var(--ease-out);
}

#navbar.is-pill-glass .navbar-inner {
  position: relative;
  padding: 0.4rem 3rem;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#navbar.is-pill-glass .navbar-logo {
  position: absolute;
  left: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
}

#navbar.is-pill-glass .logo-emblem1 {
  height: 34px;
  width: 34px;
  border-radius: 50%;
}

#navbar.is-pill-glass .logo-text-wrap {
  display: none;
}

#navbar.is-pill-glass .navbar-links {
  gap: clamp(0.85rem, 2.5vw, 1.5rem);
  justify-content: center;
}

#navbar.is-pill-glass .navbar-links a {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
}

.navbar.modern-nav:not(.is-pill-glass) {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(255, 253, 248, 0.85) !important;
  border-bottom: 1px solid var(--glass-border);
}

#navbar.is-pill-glass.modern-nav {
  background: transparent !important;
}

@media (max-width: 1024px) {
  .split-header.is-pill-glass {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    height: 80px;
    min-height: 80px;
    transform: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    animation: none;
    background: var(--ivory) !important;
    border-bottom: 1px solid rgba(74, 46, 27, 0.1);
  }

  .split-header.is-pill-glass .split-header-left {
    position: static;
    transform: none;
    left: auto;
    top: auto;
  }

  .split-header.is-pill-glass .split-header-right {
    position: static;
    inset: auto;
    width: auto;
    flex: 1;
    justify-content: flex-end;
    padding: 0;
    pointer-events: auto;
  }

  .split-header.is-pill-glass .split-nav {
    display: none;
  }

  .split-header.is-pill-glass .split-actions {
    position: static;
    transform: none;
    margin-left: auto;
  }

  body.page-home .split-header .nav-icon,
  body.page-home .split-header .mobile-toggle,
  body.page-home .split-header.liquid-glass-pill.pill-on-dark .nav-icon,
  body.page-home .split-header.liquid-glass-pill.pill-on-dark .mobile-toggle {
    color: var(--brown);
  }

  body.page-home .split-header .mobile-toggle svg {
    stroke: var(--brown);
  }
}

@media (max-width: 768px) {
  #navbar.is-pill-glass {
    width: calc(100vw - 1rem);
    top: 0.5rem;
    height: 48px;
    min-height: 48px;
  }

  #navbar.is-pill-glass .split-nav {
    display: none;
  }

  #navbar.is-pill-glass .navbar-links {
    display: none;
  }

  #navbar.is-pill-glass .navbar-inner {
    padding: 0.35rem 2.75rem;
    min-height: 48px;
  }
}

/* Home: smooth section flow */
.home-scroll {
  scroll-snap-type: y proximity;
}

.page-section {
  scroll-snap-align: start;
  scroll-margin-top: 5rem;
  position: relative;
}

.page-section::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.4;
  background: var(--gradient-hero-glow);
  z-index: 0;
}

.page-section > .container-custom {
  position: relative;
  z-index: 1;
}

.section-categories {
  background: var(--gradient-warm);
}

.section-products {
  background: var(--ivory);
}

.section-testimonials {
  background: linear-gradient(180deg, var(--ivory) 0%, var(--cream) 100%);
}

.section-newsletter {
  background: var(--brown);
  color: var(--ivory);
  padding-top: 8.5rem;
}

.section-newsletter .section-title,
.section-newsletter .section-subtitle {
  color: var(--ivory);
}

.section-newsletter .section-subtitle {
  opacity: 0.85;
}

.section-newsletter .form-input {
  border-radius: var(--radius-sm);
  border: none;
  background: rgba(255, 255, 255, 0.95);
}

.section-newsletter .btn-primary {
  border-radius: var(--radius-sm);
  background: var(--gold);
}

.section-newsletter .btn-primary::before {
  background: var(--ivory);
}

.section-newsletter .btn-primary:hover span {
  color: var(--brown);
}

/* Section header block */
.section-header {
  max-width: 42rem;
  margin: 0 auto 3rem;
  text-align: center;
}

.section-header .section-subtitle {
  font-size: 1.05rem;
  line-height: 1.7;
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal-stagger.active > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.active > *:nth-child(2) { transition-delay: 0.12s; }
.reveal-stagger.active > *:nth-child(3) { transition-delay: 0.19s; }
.reveal-stagger.active > *:nth-child(4) { transition-delay: 0.26s; }
.reveal-stagger.active > *:nth-child(5) { transition-delay: 0.33s; }
.reveal-stagger.active > *:nth-child(6) { transition-delay: 0.4s; }
.reveal-stagger.active > *:nth-child(7) { transition-delay: 0.47s; }
.reveal-stagger.active > *:nth-child(8) { transition-delay: 0.54s; }

.reveal-stagger.active > * {
  opacity: 1;
  transform: translateY(0);
}

/* Hero scroll cue */
.hero-scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--brown-light);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  animation: floatCue 2.5s ease-in-out infinite;
}

.hero-scroll-cue span {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--gold), transparent);
}

@keyframes floatCue {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.7; }
  50% { transform: translateX(-50%) translateY(8px); opacity: 1; }
}

/* Section nav dots (home) */
.section-scroll-nav {
  position: fixed;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

@media (max-width: 1024px) {
  .section-scroll-nav { display: none; }
}

.section-scroll-nav a {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: transparent;
  transition: transform 0.3s var(--ease-out), background 0.3s;
  position: relative;
}

.section-scroll-nav a:hover,
.section-scroll-nav a.is-active {
  background: var(--gold);
  transform: scale(1.25);
}

.section-scroll-nav a::after {
  content: attr(data-label);
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brown-light);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.section-scroll-nav a:hover::after {
  opacity: 1;
}

/* Cards — softer, modern */
.product-card {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(74, 46, 27, 0.06);
}

.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-8px);
}

.product-image-wrapper {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.category-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}

.category-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-lg);
}

.testimonial-card {
  border-radius: var(--radius-md);
  border: 1px solid rgba(74, 46, 27, 0.06);
  background: rgba(255, 253, 248, 0.9);
  backdrop-filter: blur(8px);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  margin-top: 2.5rem;
  text-align: left;
}

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

.btn-primary,
.btn-outline {
  border-radius: var(--radius-sm);
}

.btn-outline {
  border-width: 1.5px;
}

.split-hero-container {
  position: relative;
}

.split-pane.split-right .split-image-wrapper:not(.hero-logo-wrapper) img {
  transition: transform 8s var(--ease-out);
}

.page-home.is-loaded .split-pane.split-right .split-image-wrapper:not(.hero-logo-wrapper) img {
  transform: scale(1.03);
}

.newsletter-form-modern {
  max-width: 520px;
  margin: 2rem auto 0;
  display: flex;
  gap: 0.75rem;
  padding: 0.35rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

@media (max-width: 640px) {
  .newsletter-form-modern { flex-direction: column; padding: 1rem; }
}

.footer.modern-footer {
  background: var(--brown);
  color: rgba(255, 253, 248, 0.85);
}

.footer.modern-footer a {
  color: var(--gold-light);
}

.footer.modern-footer a:hover {
  color: var(--ivory);
}
