/**
 * How It Works Page Styles
 * Template: page-templates/how-it-works.php
 *
 * @package APL Theme
 */

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hiw-hero {
  position: relative;
  height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: url('/wp-content/uploads/2019/05/rent-string-lights-landing-page-hero2.jpg') center center / cover no-repeat;
}

.hiw-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(26,21,16,0.55) 0%, rgba(26,21,16,0.7) 100%);
}

.hiw-hero-content {
  position: relative;
  z-index: 2;
}

.hiw-hero h1 {
  font-family: var(--serif);
  font-size: 64px;
  font-weight: 300;
  color: #FFFFFF;
  letter-spacing: 2px;
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(40px);
  animation: hiwHeroIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.3s;
}

.hiw-hero-sub {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 400;
  color: var(--sand);
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(30px);
  animation: hiwHeroIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.6s;
}

.hiw-hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  opacity: 0;
  animation: hiwHeroIn 1s ease forwards 1.2s;
}

.hiw-hero-scroll svg {
  width: 24px;
  height: 24px;
  stroke: var(--gold-light, #D4B896);
  animation: hiwScrollBounce 2s ease-in-out infinite;
}

@keyframes hiwHeroIn {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes hiwScrollBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ==========================================================================
   Overview Section (3-step summary)
   ========================================================================== */

.hiw-overview {
  padding: 100px 40px;
  background: #FFFFFF;
}

.hiw-overview-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 60px;
}

.hiw-overview-step {
  text-align: center;
  opacity: 0;
  transform: translateY(80px);
  transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.hiw-overview-step.visible {
  opacity: 1;
  transform: translateY(0);
}

.hiw-overview-step:nth-child(2) { transition-delay: 0.2s; }
.hiw-overview-step:nth-child(3) { transition-delay: 0.4s; }

.hiw-step-number {
  font-family: var(--serif);
  font-size: 80px;
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 20px;
  display: block;
  opacity: 0;
  transform: scale(0.3);
  transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hiw-overview-step.visible .hiw-step-number {
  opacity: 1;
  transform: scale(1);
}

.hiw-overview-step:nth-child(2) .hiw-step-number { transition-delay: 0.2s; }
.hiw-overview-step:nth-child(3) .hiw-step-number { transition-delay: 0.4s; }

.hiw-step-line {
  width: 40px;
  height: 1px;
  background: var(--accent);
  margin: 0 auto 20px;
  transform: scaleX(0);
  transition: transform 0.6s ease;
}

.hiw-overview-step.visible .hiw-step-line {
  transform: scaleX(1);
}

.hiw-overview-step:nth-child(1) .hiw-step-line { transition-delay: 0.3s; }
.hiw-overview-step:nth-child(2) .hiw-step-line { transition-delay: 0.5s; }
.hiw-overview-step:nth-child(3) .hiw-step-line { transition-delay: 0.7s; }

.hiw-overview-step h3 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  margin-bottom: 12px;
  line-height: 1.2;
}

.hiw-overview-step p {
  font-size: 14px;
  color: var(--warm-gray);
  line-height: 1.8;
  max-width: 300px;
  margin: 0 auto;
}

/* ==========================================================================
   Detail Steps Section
   ========================================================================== */

.hiw-detail-section {
  padding: 0;
}

.hiw-detail-wrap {
  overflow: hidden;
}

.hiw-detail-wrap:nth-child(odd) {
  background: #FAF8F5;
}

.hiw-detail-wrap:nth-child(even) {
  background: #FFFFFF;
}

.hiw-detail-step {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 520px;
  max-width: 1400px;
  margin: 0 auto;
  overflow: hidden;
}

.hiw-detail-wrap:nth-child(even) .hiw-detail-visual {
  order: 2;
}

.hiw-detail-wrap:nth-child(even) .hiw-detail-content {
  order: 1;
}

.hiw-detail-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  position: relative;
  overflow: hidden;
  color: var(--accent);
}

.hiw-svg-wrap {
  opacity: 0;
  transform: scale(0.7);
  transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}

.hiw-detail-wrap.visible .hiw-svg-wrap {
  opacity: 1;
  transform: scale(1);
}

.hiw-detail-svg {
  width: 100%;
  max-width: 300px;
  height: auto;
  display: block;
}

.hiw-detail-img {
  display: block;
  width: 100%;
  height: auto;
}

.hiw-detail-wrap:nth-child(4) .hiw-detail-img {
  max-width: 280px;
}

.hiw-detail-wrap:nth-child(5) .hiw-detail-img {
  max-width: 150px;
}

.hiw-detail-svg .draw-line {
  stroke-dasharray: 800;
  stroke-dashoffset: 800;
  transition: stroke-dashoffset 2s cubic-bezier(0.16, 1, 0.3, 1) 0.5s;
}

.hiw-detail-wrap.visible .hiw-detail-svg .draw-line {
  stroke-dashoffset: 0;
}

.hiw-detail-svg .pop-in {
  opacity: 0;
  transform-origin: center;
  transition: opacity 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hiw-detail-wrap.visible .hiw-detail-svg .pop-in { opacity: 1; }
.hiw-detail-wrap.visible .hiw-detail-svg .pop-in-d1 { transition-delay: 0.8s; }
.hiw-detail-wrap.visible .hiw-detail-svg .pop-in-d2 { transition-delay: 1s; }
.hiw-detail-wrap.visible .hiw-detail-svg .pop-in-d3 { transition-delay: 1.2s; }
.hiw-detail-wrap.visible .hiw-detail-svg .pop-in-d4 { transition-delay: 1.4s; }

.hiw-detail-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 72px;
}

.hiw-detail-label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hiw-detail-wrap.visible .hiw-detail-label {
  opacity: 1;
  transform: translateY(0);
}

.hiw-detail-content h2 {
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.1s;
}

.hiw-detail-wrap.visible .hiw-detail-content h2 {
  opacity: 1;
  transform: translateY(0);
}

.hiw-detail-content p {
  font-size: 15px;
  color: var(--warm-gray);
  line-height: 1.9;
  max-width: 440px;
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}

.hiw-detail-wrap.visible .hiw-detail-content p {
  opacity: 1;
  transform: translateY(0);
}

.hiw-detail-content p + p {
  margin-top: 16px;
  transition-delay: 0.3s;
}

.hiw-detail-highlight {
  margin-top: 24px;
  padding: 16px 20px;
  background: #FAF8F5;
  border-left: 3px solid var(--accent);
  font-size: 13px;
  color: var(--charcoal);
  line-height: 1.7;
  opacity: 0;
  transform: translateX(-40px);
  transition: all 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.4s;
}

.hiw-detail-wrap:nth-child(even) .hiw-detail-highlight {
  transform: translateX(40px);
  background: #FAF8F5;
}

.hiw-detail-wrap.visible .hiw-detail-highlight {
  opacity: 1;
  transform: translateX(0);
}

/* ==========================================================================
   Reassurance Section (Good to Know)
   ========================================================================== */

.hiw-reassurance {
  padding: 100px 40px;
  background: #FAF8F5;
}

.hiw-reassurance-header {
  text-align: center;
  margin-bottom: 64px;
}

.hiw-reassurance-header h2 {
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 300;
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hiw-reassurance-header.visible h2 {
  opacity: 1;
  transform: translateY(0);
}

.hiw-reassurance-header p {
  font-size: 15px;
  color: var(--warm-gray);
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s;
}

.hiw-reassurance-header.visible p {
  opacity: 1;
  transform: translateY(0);
}

.hiw-reassurance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto;
}

.hiw-reassurance-card {
  background: #FFFFFF;
  padding: 40px 32px;
  border: 1px solid var(--taupe);
  opacity: 0;
  transform: translateY(60px) scale(0.95);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hiw-reassurance-card.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.hiw-reassurance-card:nth-child(1) { transition-delay: 0s; }
.hiw-reassurance-card:nth-child(2) { transition-delay: 0.15s; }
.hiw-reassurance-card:nth-child(3) { transition-delay: 0.3s; }
.hiw-reassurance-card:nth-child(4) { transition-delay: 0.15s; }
.hiw-reassurance-card:nth-child(5) { transition-delay: 0.3s; }
.hiw-reassurance-card:nth-child(6) { transition-delay: 0.45s; }

.hiw-reassurance-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 24px;
}

.hiw-reassurance-icon svg {
  width: 100%;
  height: 100%;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hiw-reassurance-icon img {
  display: block;
  max-width: 40px;
  height: auto;
}

.hiw-reassurance-card h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  margin-bottom: 12px;
  line-height: 1.3;
}

.hiw-reassurance-card p {
  font-size: 13px;
  color: var(--warm-gray);
  line-height: 1.8;
}

/* ==========================================================================
   CTA Section
   ========================================================================== */

.hiw-cta {
  padding: 120px 40px;
  text-align: center;
  background: var(--charcoal);
  position: relative;
  overflow: hidden;
}

.hiw-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(196,162,101,0.08) 0%, transparent 70%);
}

.hiw-cta-content {
  position: relative;
  z-index: 2;
}

.hiw-cta h2 {
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 300;
  color: #FFFFFF;
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(50px);
  transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.hiw-cta.visible h2 {
  opacity: 1;
  transform: translateY(0);
}

.hiw-cta p {
  font-size: 15px;
  color: var(--sand);
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(40px);
  transition: all 1s cubic-bezier(0.16, 1, 0.3, 1) 0.15s;
}

.hiw-cta.visible p {
  opacity: 1;
  transform: translateY(0);
}

.hiw-cta-btn {
  display: inline-block;
  padding: 16px 48px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--charcoal);
  background: var(--accent);
  border: 1px solid var(--accent);
  opacity: 0;
  transform: translateY(40px);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.hiw-cta.visible .hiw-cta-btn {
  opacity: 1;
  transform: translateY(0);
  transition: background 0.3s ease, border-color 0.3s ease, opacity 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s, transform 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}

.hiw-cta-btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media (max-width: 900px) {
  .hiw-overview-inner {
    grid-template-columns: 1fr;
    gap: 48px;
    max-width: 400px;
  }

  .hiw-detail-step {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hiw-detail-wrap:nth-child(even) .hiw-detail-visual { order: 0; }
  .hiw-detail-wrap:nth-child(even) .hiw-detail-content { order: 0; }

  .hiw-detail-visual {
    padding: 48px 40px;
    min-height: 300px;
  }

  .hiw-detail-content {
    padding: 48px 40px;
  }

  .hiw-detail-content h2 {
    font-size: 30px;
  }

  .hiw-reassurance-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
  }

  .hiw-hero h1 {
    font-size: 44px;
  }

  .hiw-cta h2 {
    font-size: 36px;
  }
}

@media (max-width: 600px) {
  .hiw-hero {
    height: 400px;
  }

  .hiw-hero h1 {
    font-size: 36px;
    padding: 0 20px;
  }

  .hiw-hero-sub {
    font-size: 12px;
    letter-spacing: 2px;
    padding: 0 20px;
  }

  .hiw-overview {
    padding: 64px 24px;
  }

  .hiw-step-number {
    font-size: 56px;
  }

  .hiw-detail-visual {
    padding: 40px 24px;
    min-height: 250px;
  }

  .hiw-detail-content {
    padding: 40px 24px;
  }

  .hiw-detail-content h2 {
    font-size: 26px;
  }

  .hiw-detail-content p {
    font-size: 14px;
  }

  .hiw-reassurance {
    padding: 64px 24px;
  }

  .hiw-reassurance-header h2 {
    font-size: 32px;
  }

  .hiw-reassurance-card {
    padding: 32px 24px;
  }

  .hiw-cta {
    padding: 72px 24px;
  }

  .hiw-cta h2 {
    font-size: 30px;
  }
}
