/*
  Homepage Styles — Crumble & Co.
  Page-specific styles for index.html (hero, bestsellers).
  All values reference design tokens from tokens.css.
*/

/* ========================================
   Hero Section — Parallax Banner
   ======================================== */

.hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  color: var(--color-bg);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../../images/hero/hero-main.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center center;
  z-index: 0;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(44, 24, 16, 0.55) 0%,
    rgba(44, 24, 16, 0.7) 50%,
    rgba(61, 31, 46, 0.8) 100%
  );
  z-index: 1;
}

.hero__inner {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-10) var(--space-4);
}

@keyframes hero-fade-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero__content {
  animation: hero-fade-in 500ms ease-out both;
}

.hero__badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-warm);
  margin-bottom: var(--space-4);
  padding: var(--space-2) var(--space-5);
  border: 1px solid rgba(212, 165, 116, 0.4);
  border-radius: var(--radius-full);
  animation: hero-fade-in 500ms ease-out both;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1.1;
  color: var(--color-bg);
  margin-bottom: var(--space-4);
  animation: hero-fade-in 500ms ease-out 100ms both;
}

.hero__tagline {
  font-size: var(--text-lg);
  color: rgba(253, 248, 243, 0.85);
  max-width: 560px;
  margin: 0 auto var(--space-8);
  line-height: 1.6;
  animation: hero-fade-in 500ms ease-out 200ms both;
}

.hero__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: center;
  animation: hero-fade-in 500ms ease-out 300ms both;
}

.hero__btn-secondary {
  background-color: transparent;
  color: var(--color-bg);
  border-color: rgba(253, 248, 243, 0.5);
}

.hero__btn-secondary:hover {
  background-color: rgba(253, 248, 243, 0.1);
  color: var(--color-bg);
  border-color: var(--color-bg);
}

@media (min-width: 768px) {
  .hero__actions {
    flex-direction: row;
    justify-content: center;
    gap: var(--space-4);
  }

  .hero__inner {
    padding: var(--space-12) var(--gutter);
  }

  .hero__title {
    font-size: var(--text-4xl);
  }
}

@media (min-width: 1024px) {
  .hero {
    min-height: 65vh;
  }

  .hero__title {
    font-size: 4.5rem;
  }

  .hero__tagline {
    font-size: 1.25rem;
  }
}

/* ========================================
   Section Decorative Images
   ======================================== */

.section-decor {
  position: absolute;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  opacity: 0.25;
}

/* Left side, vertically centered */
.section-decor--left-mid {
  width: 180px;
  height: 220px;
  top: 50%;
  left: -20px;
  transform: translateY(-50%) rotate(-6deg);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

/* Right side, near top */
.section-decor--right-top {
  width: 160px;
  height: 200px;
  top: 20px;
  right: -10px;
  transform: rotate(5deg);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

/* Right side, near bottom */
.section-decor--right-bot {
  width: 150px;
  height: 180px;
  bottom: 20px;
  right: 40px;
  transform: rotate(-4deg);
  border-radius: var(--radius-lg);
}

/* Left side, near top */
.section-decor--left-top {
  width: 170px;
  height: 230px;
  top: 10px;
  left: -10px;
  transform: rotate(4deg);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

/* Right side, vertically centered */
.section-decor--right-mid {
  width: 180px;
  height: 270px;
  top: 50%;
  right: -10px;
  transform: translateY(-50%) rotate(-5deg);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

/* Left side, near bottom */
.section-decor--left-bot {
  width: 160px;
  height: 110px;
  bottom: 30px;
  left: 30px;
  transform: rotate(6deg);
  border-radius: var(--radius-lg);
}

@media (max-width: 1200px) {
  .section-decor { opacity: 0.15; }
}

@media (max-width: 767px) {
  .section-decor { opacity: 0.1; }
  .section-decor--right-bot,
  .section-decor--left-bot { display: none; }
}

/* ========================================
   Trust Marquee
   ======================================== */

.trust-marquee {
  background: var(--color-accent);
  color: var(--color-bg);
  padding: var(--space-4) 0;
  overflow: hidden;
}

.trust-marquee__track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 30s linear infinite;
}

.trust-marquee__content {
  display: flex;
  gap: var(--space-10);
  padding-right: var(--space-10);
  flex-shrink: 0;
}

.trust-marquee__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  white-space: nowrap;
}

.trust-marquee__item i {
  font-size: 1.125rem;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .trust-marquee__track {
    animation: none;
    justify-content: center;
    flex-wrap: wrap;
    width: auto;
    gap: var(--space-6);
    padding: var(--space-2) var(--space-4);
  }

  .trust-marquee__content:last-child {
    display: none;
  }

  .trust-marquee__content {
    gap: var(--space-6);
    padding-right: 0;
  }
}

/* ========================================
   About / Brand Story Section
   ======================================== */

.about {
  padding: var(--space-16) 0;
  background: var(--color-surface);
}

.about__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-4);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  align-items: center;
}

.about__badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
  padding: var(--space-1) var(--space-4);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-full);
}

.about__heading {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.about__text {
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-4);
}

.about__text:last-of-type {
  margin-bottom: var(--space-6);
}

.about__highlights {
  display: flex;
  gap: var(--space-8);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.about__highlight {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.about__stat {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-2xl);
  color: var(--color-accent);
}

.about__label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.about__image-wrapper {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.about__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
}

@media (min-width: 768px) {
  .about__inner {
    padding: 0 var(--gutter);
  }

  .about__heading {
    font-size: 2rem;
  }
}

@media (min-width: 1024px) {
  .about__inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-10);
  }

  .about__image {
    aspect-ratio: auto;
    min-height: 400px;
  }
}

/* ========================================
   Best Sellers Section
   ======================================== */

.bestsellers {
  position: relative;
  overflow: hidden;
  padding: var(--space-16) 0;
  background:
    radial-gradient(ellipse at 80% 20%, rgba(212, 165, 116, 0.1), transparent 50%),
    radial-gradient(ellipse at 20% 80%, rgba(123, 45, 78, 0.05), transparent 50%),
    var(--color-bg);
}

.bestsellers__inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.bestsellers__heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-2xl);
  text-align: center;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.bestsellers__subtext {
  text-align: center;
  color: var(--color-text-muted);
  max-width: 520px;
  margin: 0 auto var(--space-8);
}

.bestsellers__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .bestsellers__inner {
    padding: 0 var(--gutter);
  }

  .bestsellers__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bestsellers__heading {
    font-size: 2rem;
  }
}

.bestsellers__cta {
  text-align: center;
  margin-top: var(--space-8);
}

@media (min-width: 1024px) {
  .bestsellers {
    padding: var(--space-16) 0;
  }

  .bestsellers__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ========================================
   Cake Flavors Section
   ======================================== */

/* ========================================
   Shared Parallax Sections (DelmarLFG pattern)
   ======================================== */

.parallax-section {
  position: relative;
  overflow: hidden;
  color: var(--color-bg);
}

.parallax-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../../images/banners/sections-bg.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  z-index: 0;
}

.parallax-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(44, 24, 16, 0.8);
  z-index: 0;
}

/* Each segment shows a different vertical slice of the background */
.parallax--seg1::before { background-position: center 20%; }
.parallax--seg2::before { background-position: center 80%; }

/* Content sits above the background + overlay */
.parallax-section > .container,
.parallax-section > [class*="__inner"] {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .parallax-section::before {
    background-attachment: scroll;
  }
}

/* ---- Flavors (inside parallax band) ---- */

.flavors {
  padding: var(--space-16) 0;
}

.flavors__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.flavors__heading {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  text-align: center;
  color: var(--color-bg);
  margin-bottom: var(--space-2);
}

.flavors__subtext {
  text-align: center;
  color: rgba(253, 248, 243, 0.8);
  max-width: 520px;
  margin: 0 auto var(--space-8);
}

.flavors__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

.flavors__item {
  text-align: center;
  padding: var(--space-6);
  background: rgba(253, 248, 243, 0.1);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(253, 248, 243, 0.15);
  transition: transform var(--transition-base), background var(--transition-base);
}

.flavors__item:hover {
  transform: translateY(-4px);
  background: rgba(253, 248, 243, 0.18);
}

.flavors__icon {
  font-size: 2rem;
  color: var(--color-warm);
  margin-bottom: var(--space-3);
}

.flavors__name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-bg);
  margin-bottom: var(--space-2);
}

.flavors__description {
  font-size: var(--text-sm);
  color: rgba(253, 248, 243, 0.75);
  line-height: 1.6;
  margin-bottom: var(--space-3);
}

.flavors__price {
  font-weight: 600;
  color: var(--color-warm);
  font-size: var(--text-base);
}

.flavors__cta {
  text-align: center;
  margin-top: var(--space-8);
}

@media (min-width: 768px) {
  .flavors__inner {
    padding: 0 var(--gutter);
  }

  .flavors__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .flavors__heading {
    font-size: 2rem;
  }
}

@media (min-width: 1024px) {
  .flavors__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ========================================
   Customer Testimonials Section
   ======================================== */

.testimonials {
  position: relative;
  overflow: hidden;
  padding: var(--space-16) 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(123, 45, 78, 0.04), transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(212, 165, 116, 0.06), transparent 50%),
    var(--color-bg);
}

.testimonials__inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.testimonials__heading {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  text-align: center;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.testimonials__subtext {
  text-align: center;
  color: var(--color-text-muted);
  max-width: 520px;
  margin: 0 auto var(--space-8);
}

.testimonials__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

.testimonial {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin: 0;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.testimonial:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.testimonial__stars {
  color: #F5A623;
  font-size: 1.125rem;
  margin-bottom: var(--space-3);
  display: flex;
  gap: var(--space-1);
}

.testimonial__stars i {
  -webkit-text-stroke: 0;
  text-shadow: 0 0 0 #F5A623;
}

.testimonial__text {
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: 1.7;
  font-style: italic;
  margin-bottom: var(--space-4);
}

.testimonial__author {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.testimonial__name {
  font-weight: 600;
  font-style: normal;
  color: var(--color-text);
  font-size: var(--text-base);
}

.testimonial__detail {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

@media (min-width: 768px) {
  .testimonials__inner {
    padding: 0 var(--gutter);
  }

  .testimonials__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .testimonials__heading {
    font-size: 2rem;
  }
}

@media (min-width: 1024px) {
  .testimonials__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ========================================
   Home Contact Section
   ======================================== */
.home-contact {
  padding: var(--space-16) 0;
  text-align: center;
}

.home-contact__heading {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  color: var(--color-bg);
  margin-bottom: var(--space-2);
}

.home-contact__subtext {
  color: rgba(253, 248, 243, 0.8);
  margin-bottom: var(--space-8);
  font-size: var(--text-lg);
}

.home-contact__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

.home-contact__item {
  padding: var(--space-5);
  background: rgba(253, 248, 243, 0.08);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(253, 248, 243, 0.12);
  backdrop-filter: blur(8px);
}

.home-contact__item i {
  font-size: 1.75rem;
  color: var(--color-warm);
  margin-bottom: var(--space-3);
  display: block;
}

.home-contact__label {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-bg);
  margin-bottom: var(--space-2);
}

.home-contact__item p,
.home-contact__item span {
  color: rgba(253, 248, 243, 0.8);
}

.home-contact__link {
  color: var(--color-warm);
  text-decoration: none;
}

.home-contact__link:hover {
  text-decoration: underline;
  color: var(--color-bg);
}

.home-contact__cta {
  display: inline-block;
  background: var(--color-warm);
  color: var(--color-text);
  box-shadow: 0 2px 8px rgba(212, 165, 116, 0.3);
}

.home-contact__cta:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

@media (min-width: 768px) {
  .home-contact__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
