/* Copyright 2025-2026 Renofy Ltd. All rights reserved. */
/* ===== HOMEPAGE STYLES (Customer & Tradesperson) ===== */

/* CSS Variables */
:root {
  --home-max-width: 1400px;
  --home-section-gap: 3rem;
  --home-gradient-start: #667eea;
}

/* Base Container */
.home-container {
  max-width: var(--home-max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.home-container--narrow {
  max-width: 900px;
}

/* ===== BACKGROUND IMAGE UTILITIES ===== */
.section-bg-image {
  height: 100%;
  background-repeat: no-repeat;
  position: relative;
}

.section-bg-overlay-dark::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 0;
}

.section-bg-overlay-dark > * {
  position: relative;
  z-index: 1;
}

.section-bg-parallax {
  background-attachment: scroll;
}

/* ===== SHARED HERO COMPONENTS ===== */
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  margin-bottom: 1rem;
}

.hero__title {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
  color: var(--color-text-primary);
  margin: 0 0 1rem 0;
  letter-spacing: var(--letter-spacing-tight);
}

.hero__subtitle {
  font-size: var(--font-size-lg);
  margin: 0 0 1.75rem 0;
}

.hero__actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.hero__actions .button {
  flex: 1;
}

.hero__cta {
  display: block;
  max-width: 330px;
  margin: 0 auto;
}

/* Note text below CTA */
.hero__note {
  font-size: var(--font-size-sm);
  margin-top: 0.5rem;
}

/* ===== HERO SECTION ===== */
.landing-hero {
  padding: 4rem 0 3rem 0;
  text-align: center;
  background: linear-gradient(180deg, var(--color-white) 0%, var(--color-bg-light) 100%);
}

.landing-hero.section-bg-image {
  background-size: cover;
  background-position: 50% 15%;
}

.landing-hero__content-box {
  background: var(--glass-light);
  backdrop-filter: var(--blur-light);
  -webkit-backdrop-filter: var(--blur-light);
  padding: 2rem 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: inline-block;
  max-width: 450px;
}

/* ===== HOW IT WORKS SECTION ===== */
.home-how {
  padding: var(--home-section-gap) 0;
  background: var(--color-bg-light);
  position: relative;
  z-index: 1; /* Ensure content is above during parallax animations */
}

/* ===================================================================
   TOOL SHOWCASE - MOCKUPS (Mobile Carousel, Desktop Grid)
   =================================================================== */

/* Mobile: Carousel layout */
.landing-showcase {
  display: block;
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  min-height: 681px;
  perspective: 1000px;
  overflow: hidden;
}

.landing-showcase__item {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 320px;
  text-align: center;
  transition: none; /* GSAP will handle transitions */
}

.landing-mockup {
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
  background: transparent;
}

.landing-mockup__image {
  max-width: 280px;
  width: 100%;
  height: auto;
  display: block;
  background: transparent;
  padding-top: 1.5rem;
  filter: drop-shadow(2px 18px 25px rgba(0, 0, 0, 0.2));
}

.landing-showcase__title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin: 0 0 0.25rem 0;
}

.landing-showcase__description {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* ===== PARALLAX BREAK SECTION ===== */
.home-parallax-break {
  padding: 4rem 0;
  text-align: center;
  color: var(--color-white);
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
}

.home-parallax-break__text {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-semibold);
  line-height: 1.4;
  color: var(--color-white);
  margin: 0;
  max-width: 800px;
}

/* ===== SHARED SECTION UTILITIES ===== */
.home-section-header {
  text-align: center;
}

.home-section-title {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
}

.home-section-subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  max-width: 700px;
  margin: 0.25rem auto 0 auto;
}

/* ===== BENEFITS SECTION ===== */
.home-benefits {
  padding: var(--home-section-gap) 0;
  background: var(--color-bg-light);
}

.home-benefits__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  margin-top: 2rem;
}

.home-benefit-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow);
}

.home-benefit-card__header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.home-benefit-card__icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--home-gradient-start);
}

.home-benefit-card__title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin: 0;
}

.home-benefit-card__description {
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Expandable Benefit Card (<details>) - TODO - RENO-691: move to component when adding new section */
.home-benefit-card--expandable {
  padding: 0;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.home-benefit-card--expandable[open] {
  border-color: var(--home-gradient-start);
  box-shadow: var(--shadow-hover);
}

@media (min-width: 821px) {
  .home-benefit-card--expandable:hover {
    border-color: var(--home-gradient-start);
    box-shadow: var(--shadow-hover);
  }
}

.home-benefit-card__summary {
  padding: 2rem;
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}

.home-benefit-card__summary::-webkit-details-marker {
  display: none;
}

.home-benefit-card--expandable .home-benefit-card__header {
  justify-content: space-between;
}

.home-benefit-card__chevron {
  color: var(--color-text-secondary);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
  margin-left: auto;
  display: flex;
}

.home-benefit-card--expandable[open] .home-benefit-card__chevron {
  transform: rotate(180deg);
}

.home-benefit-card__details {
  border-top: 1px solid var(--color-border);
  margin-top: 0;
  padding: 1rem 2rem 2rem;
}

.home-benefit-card__detail-section {
  margin-bottom: 0.75rem;
}

.home-benefit-card__detail-section:last-of-type {
  margin-bottom: 0;
}

.home-benefit-card__detail-title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin: 0 0 0.25rem 0;
}

.home-benefit-card__detail-list {
  list-style: none;
  padding: 0 0 0 0.5rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.home-benefit-card__detail-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.home-benefit-card__detail-list li::before {
  content: '•';
  color: var(--color-pink);
  font-weight: var(--font-weight-bold);
  flex-shrink: 0;
}

.home-benefit-card__preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  max-width: 240px;
  margin: 1rem auto 0;
}

.home-benefit-card__preview-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

.home-benefit-card__preview-card:hover {
  transform: translateY(-2px);
}

.home-benefit-card__preview-image {
  aspect-ratio: 1 / 1.414;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: top;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-base);
  display: block;
  transition: var(--transition-fast);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  background: var(--color-white);
}

.home-benefit-card__preview-card:hover .home-benefit-card__preview-image {
  border-color: var(--color-pink);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.home-benefit-card__preview-label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  text-align: center;
  margin: 0;
}

.home-benefit-card__preview-card:hover .home-benefit-card__preview-label {
  color: var(--color-pink);
}

.home-section-note {
  text-align: center;
  color: var(--color-text-secondary);
  font-size: var(--font-size-base);
  line-height: 1.6;
  max-width: 700px;
  margin: 2rem auto 0;
}

/* ===== VERIFICATION SECTION ===== */
.home-verification {
  padding: var(--home-section-gap) 0;
  background: var(--color-white);
}

.home-verification__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ===== CTA SECTION ===== */
.home-cta {
  padding: 6rem 0;
  color: var(--color-white);
  text-align: center;
}

.home-cta__title {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: 1rem;
}

.home-cta__note {
  margin-top: 0.5rem;
  font-size: var(--font-size-sm);
}

/* CTA with background image - updated for tradesperson page */
.home-cta.section-bg-image {
  padding: 5rem 0;
  border-top: 1px solid var(--color-border);
  background-size: cover;
  background-position: center;
}

.home-cta.section-bg-image .home-cta__title {
  color: var(--color-white);
}

.home-cta.section-bg-image .home-cta__note {
  color: rgba(255, 255, 255, 0.85);
}

/* ===================================================================
   RESPONSIVE BREAKPOINTS (Mobile-First)
   =================================================================== */


/* ===== 821px+ : Desktop Styles ===== */
@media (min-width: 821px) {
  /* CSS Variables */
  :root {
    --home-section-gap: 4rem;
  }

  .home-container {
    padding: 0 2rem;
  }

  /* ===== HERO - DESKTOP ===== */
  .landing-hero {
    position: relative;
    min-height: 500px;
    padding: 0;
  }

  .landing-hero .home-container {
    padding: 0;
  }

  .landing-hero::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 60%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.6) 60%, transparent 100%);
    z-index: 0;
  }

  .landing-hero__content-box {
    position: relative;
    z-index: 1;
    text-align: left;
    max-width: 550px;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
    /* Reset mobile glassmorphism */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 0;
    box-shadow: none;
    background: none;
  }

  .hero__cta {
    display: inline-block;
    margin: 0;
    text-align: center;
    max-width: 270px;
  }

  .landing-hero .hero__actions {
    justify-content: flex-start;
  }

  /* Parallax Break */
  .home-parallax-break {
    padding: 6rem 0;
    min-height: 500px;
  }

  .home-parallax-break__text {
    font-size: var(--font-size-4xl);
  }

  /* Parallax Background */
  .section-bg-parallax {
    background-attachment: fixed;
  }

  /* Showcase - Grid layout (2 rows of 3) */
  .landing-showcase {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    width: auto;
    margin-left: 0;
    margin-right: 0;
    min-height: auto;
    perspective: none;
    overflow: visible;
  }

  .landing-showcase__item {
    position: static;
    transform: none;
    max-width: none;
  }

  /* Smaller mockup images on desktop */
  .landing-mockup__image {
    max-width: 250px;
  }

  /* Benefits - 2 columns */
  .home-benefits__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* CTA Section */
  .home-cta__title {
    font-size: var(--font-size-4xl);
  }

}

/* ===== 1024px+ : Wide Desktop ===== */
@media (min-width: 1024px) {
  /* Benefits - 3 columns */
  .home-benefits__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
