/*
 * home.css — Yarabelle Soft Botanical homepage styles
 * Enqueued only on is_front_page(). Uses contract CSS vars exclusively.
 * Responsive: 375 / 768 / 1440.
 */

/* ─────────────────────────────────────────
   HERO
───────────────────────────────────────── */
.home-hero {
  position: relative;
  min-height: 96vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.home-hero__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    var(--sage) 0%,
    var(--moss) 60%,
    #1e2818 100%
  );
  will-change: transform;
  z-index: 0;
}

.home-hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(243, 241, 233, 0.72) 0%,
    rgba(243, 241, 233, 0.38) 45%,
    rgba(63, 74, 51, 0.08) 100%
  );
}

/* ── Parallax leaf layers ── */
.leaf-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  will-change: transform;
}

.leaf-layer-back  { z-index: 1; color: var(--sage); }
.leaf-layer-mid   { z-index: 2; color: var(--moss); }
.leaf-layer-front { z-index: 3; color: var(--moss); }

.leaf-layer-back  .leaf { opacity: 0.18; }
.leaf-layer-mid   .leaf { opacity: 0.26; }
.leaf-layer-front .leaf { opacity: 0.48; }

/* Positioned leaf wrappers within each layer */
.leaf-layer__item {
  position: absolute;
  display: block;
}

/* SVG fills the item wrapper's declared width */
.leaf-layer__item .leaf {
  width: 100%;
  height: auto;
  display: block;
}

/* Back layer placements */
.leaf-layer-back .leaf-layer__item:nth-child(1) { top: 3%;  left: -3%;  width: 300px; }
.leaf-layer-back .leaf-layer__item:nth-child(2) { top: 48%; right: -2%; width: 220px; }
.leaf-layer-back .leaf-layer__item:nth-child(3) {
  bottom: -6%; left: 28%; width: 300px;
  transform: rotate(40deg);
}

/* Mid layer placements */
.leaf-layer-mid .leaf-layer__item:nth-child(1) {
  top: 8%;  right: 7%;  width: 160px;
  transform: rotate(-20deg);
}
.leaf-layer-mid .leaf-layer__item:nth-child(2) {
  bottom: 14%; left: 9%; width: 130px;
  transform: rotate(30deg);
}
.leaf-layer-mid .leaf-layer__item:nth-child(3) {
  top: 52%; right: 21%; width: 110px;
  transform: rotate(-45deg);
}

/* Front layer placements — sprigs */
.leaf-layer-front .leaf-layer__item:nth-child(1) {
  top: 7%;  left: 36%; width: 80px;
  transform: rotate(10deg);
}
.leaf-layer-front .leaf-layer__item:nth-child(2) {
  bottom: 19%; right: 11%; width: 64px;
  transform: rotate(-15deg);
}

/* Hero content */
.home-hero__content {
  position: relative;
  z-index: 10;
  max-width: 620px;
  padding: clamp(60px, 10vw, 100px) 24px clamp(60px, 10vw, 100px) clamp(24px, 6vw, 80px);
}

.home-hero__eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage-dark);
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(16px);
  animation: hb-fadeUp 0.7s ease forwards 0.2s;
}

.home-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  font-weight: 300;
  color: var(--moss);
  line-height: 1.08;
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(24px);
  animation: hb-fadeUp 0.85s ease forwards 0.45s;
}

.home-hero__title em {
  font-style: italic;
  color: var(--sage);
}

.home-hero__sub {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--ink);
  max-width: 440px;
  margin-bottom: 40px;
  line-height: 1.75;
  opacity: 0;
  transform: translateY(16px);
  animation: hb-fadeUp 0.75s ease forwards 0.7s;
}

.home-hero__cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(16px);
  animation: hb-fadeUp 0.7s ease forwards 0.9s;
}

/* Scroll indicator */
.home-hero__scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: hb-fadeUp 0.6s ease forwards 1.3s;
}

.home-hero__scroll span {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--moss);
  opacity: 0.6;
}

.home-hero__scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--sage), transparent);
  animation: hb-scrollPulse 2s ease-in-out infinite;
}

/* ── Wave divider ── */
.home-wave {
  position: relative;
  overflow: hidden;
  line-height: 0;
  background: var(--cream);
}

.home-wave svg {
  display: block;
  width: 100%;
}

/* ─────────────────────────────────────────
   FEATURED PRODUCTS
───────────────────────────────────────── */
.home-products {
  padding: var(--space) 0;
  background: var(--white);
  position: relative;
}

.home-products__head {
  text-align: center;
  margin-bottom: clamp(36px, 5vw, 60px);
}

.home-products__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* Empty state when no products */
.home-products__empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: clamp(48px, 8vw, 80px) 24px;
  color: var(--muted);
}

.home-products__empty p {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 300;
  color: var(--moss);
  margin-bottom: 20px;
}

.home-products__empty small {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--muted);
  display: block;
  margin-bottom: 28px;
}

/* ── Blob divider ── */
.home-blob {
  position: relative;
  height: 100px;
  overflow: hidden;
  background: var(--white);
  line-height: 0;
}

.home-blob::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 100px;
  background: var(--cream);
  clip-path: ellipse(60% 100% at 50% 100%);
}

/* ─────────────────────────────────────────
   BRAND STORY / VALUES BAND
───────────────────────────────────────── */
.home-story {
  padding: var(--space) 0;
  position: relative;
  overflow: hidden;
  background: var(--cream);
}

.home-story__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.home-story__image-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/5;
  box-shadow: 0 20px 60px rgba(63, 74, 51, 0.16);
  will-change: transform;
  background: var(--sand);
}

.home-story__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-story__image-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(63, 74, 51, 0.28) 100%);
  z-index: 1;
  pointer-events: none;
}

.home-story__blob {
  position: absolute;
  top: -36px;
  right: -36px;
  width: 180px;
  height: 180px;
  background: var(--sand);
  border-radius: 60% 40% 70% 30% / 50% 60% 40% 60%;
  opacity: 0.5;
  z-index: -1;
}

.home-story__content {
  padding: 16px 0;
}

.home-story__values {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.home-story__value {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.home-story__value-icon {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  background: var(--sand);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sage);
}

.home-story__value-icon svg {
  width: 20px;
  height: 20px;
}

.home-story__value-text h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 400;
  color: var(--moss);
  margin-bottom: 4px;
}

.home-story__value-text p {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.65;
}

/* Dark-section wave dividers */
.home-wave-into-dark {
  background: var(--cream);
  line-height: 0;
}

.home-wave-into-dark svg { display: block; width: 100%; }

.home-wave-out-dark {
  background: var(--white);
  line-height: 0;
}

.home-wave-out-dark svg { display: block; width: 100%; }

/* ─────────────────────────────────────────
   CATEGORY HIGHLIGHT
───────────────────────────────────────── */
.home-categories {
  padding: var(--space) 0;
  background: var(--cream);
}

.home-categories__head {
  text-align: center;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.home-categories__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.home-cat-tile {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3/4;
  display: flex;
  align-items: flex-end;
  text-decoration: none;
  box-shadow: 0 8px 32px rgba(63, 74, 51, 0.1);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.home-cat-tile:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 56px rgba(63, 74, 51, 0.18);
}

.home-cat-tile__bg {
  position: absolute;
  inset: 0;
  transition: transform 0.6s var(--ease);
}

.home-cat-tile:hover .home-cat-tile__bg {
  transform: scale(1.06);
}

/* Skincare tile */
.home-cat-tile--skincare .home-cat-tile__bg {
  background: linear-gradient(145deg, #b5c9a8 0%, var(--sage) 60%, var(--moss) 100%);
}

/* Makeup tile */
.home-cat-tile--makeup .home-cat-tile__bg {
  background: linear-gradient(145deg, #d4b0a0 0%, var(--accent) 60%, #8a5540 100%);
}

/* Body & Bath tile */
.home-cat-tile--body .home-cat-tile__bg {
  background: linear-gradient(145deg, var(--sand) 0%, #c8c4b2 60%, var(--sage) 100%);
}

/* Decorative leaf on each tile */
.home-cat-tile__leaf {
  position: absolute;
  top: -10%;
  right: -8%;
  width: 55%;
  color: rgba(255, 255, 255, 0.15);
  pointer-events: none;
  display: block;
}

.home-cat-tile__leaf .leaf {
  width: 100%;
  height: auto;
  display: block;
}

.home-cat-tile__body {
  position: relative;
  z-index: 2;
  padding: 28px 24px;
  width: 100%;
  background: linear-gradient(to top, rgba(30, 40, 24, 0.75) 0%, transparent 100%);
}

.home-cat-tile__eyebrow {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(243, 241, 233, 0.7);
  display: block;
  margin-bottom: 6px;
}

.home-cat-tile__title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  font-weight: 300;
  color: var(--cream);
  line-height: 1.15;
  margin-bottom: 10px;
}

.home-cat-tile__link {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(243, 241, 233, 0.75);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.home-cat-tile:hover .home-cat-tile__link {
  color: var(--cream);
}

.home-cat-tile__link::after {
  content: '\2192';
  transition: transform 0.2s;
}

.home-cat-tile:hover .home-cat-tile__link::after {
  transform: translateX(4px);
}

/* ─────────────────────────────────────────
   TESTIMONIALS
───────────────────────────────────────── */
.home-testimonials {
  padding: var(--space) 0;
  background: var(--white);
  position: relative;
  overflow: hidden;
}

.home-testimonials__head {
  text-align: center;
  margin-bottom: clamp(36px, 5vw, 60px);
}

.home-testimonials__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.home-testimonial-card {
  background: var(--cream);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 36px) clamp(20px, 2.5vw, 32px);
  position: relative;
  box-shadow: 0 4px 24px rgba(63, 74, 51, 0.07);
}

.home-testimonial-card::before {
  content: '\201C';
  position: absolute;
  top: 16px;
  right: 20px;
  font-family: var(--font-display);
  font-size: 4.5rem;
  color: var(--sand);
  line-height: 1;
  pointer-events: none;
}

.home-testimonial-card__stars {
  color: #c9a84c;
  font-size: 0.95rem;
  letter-spacing: 2px;
  margin-bottom: 14px;
}

.home-testimonial-card__text {
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--ink);
  margin-bottom: 22px;
  font-style: italic;
}

.home-testimonial-card__author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.home-testimonial-card__avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--sand);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--sage);
}

.home-testimonial-card__name {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--moss);
}

.home-testimonial-card__tag {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--muted);
}

/* ─────────────────────────────────────────
   NEWSLETTER CTA BAND
───────────────────────────────────────── */
.home-newsletter {
  background: linear-gradient(135deg, var(--sage) 0%, var(--moss) 100%);
  padding: clamp(60px, 8vw, 100px) 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.home-newsletter::before {
  content: '';
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  pointer-events: none;
}

.home-newsletter__inner {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
}

.home-newsletter__eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(211, 219, 201, 0.85);
  margin-bottom: 12px;
}

.home-newsletter__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 300;
  color: var(--cream);
  line-height: 1.2;
  margin-bottom: 14px;
}

.home-newsletter__sub {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: rgba(243, 241, 233, 0.72);
  margin-bottom: 36px;
  line-height: 1.65;
}

.home-newsletter__form {
  display: flex;
  gap: 10px;
  max-width: 440px;
  margin: 0 auto;
}

.home-newsletter__input {
  flex: 1;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-pill);
  padding: 14px 22px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--cream);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  min-width: 0;
}

.home-newsletter__input::placeholder {
  color: rgba(243, 241, 233, 0.48);
}

.home-newsletter__input:focus {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.18);
}

.home-newsletter__submit {
  background: var(--cream);
  color: var(--moss);
  border: none;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.25s var(--ease), transform 0.2s var(--ease);
}

.home-newsletter__submit:hover {
  background: var(--sand);
  transform: translateY(-2px);
}

.home-newsletter__note {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: rgba(243, 241, 233, 0.4);
  margin-top: 16px;
}

/* ─────────────────────────────────────────
   KEYFRAMES (home-specific)
───────────────────────────────────────── */
@keyframes hb-fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes hb-scrollPulse {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50%       { transform: scaleY(0.6); opacity: 0.5; }
}

/* ─────────────────────────────────────────
   REDUCED MOTION
───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .home-hero__eyebrow,
  .home-hero__title,
  .home-hero__sub,
  .home-hero__cta,
  .home-hero__scroll {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .home-hero__scroll-line {
    animation: none;
  }
  .leaf-layer {
    display: none;
  }
}

/* ─────────────────────────────────────────
   RESPONSIVE — 768px
───────────────────────────────────────── */
@media (max-width: 768px) {
  .home-hero__content {
    padding: 60px 24px 80px;
  }

  .home-products__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .home-story__inner {
    grid-template-columns: 1fr;
  }

  .home-story__image-wrap {
    aspect-ratio: 16/9;
  }

  .home-categories__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .home-cat-tile {
    aspect-ratio: 16/7;
  }

  .home-testimonials__grid {
    grid-template-columns: 1fr;
  }

  .home-newsletter__form {
    flex-direction: column;
  }

  .home-newsletter__input,
  .home-newsletter__submit {
    width: 100%;
    text-align: center;
  }
}

/* ─────────────────────────────────────────
   RESPONSIVE — 375px
───────────────────────────────────────── */
@media (max-width: 480px) {
  .home-products__grid {
    grid-template-columns: 1fr;
  }

  .home-hero__title {
    font-size: clamp(2.4rem, 10vw, 3.2rem);
  }

  .home-cat-tile {
    aspect-ratio: 4/3;
  }
}
