/*
 * home.css — Bunker Box Homepage Styles
 * Page-specific styles for index.html only.
 * Depends on: styles.css (must be loaded first)
 */


/* ============================================================
   ACTIVE NAV LINK — homepage
   ============================================================ */

.nav-link.active {
  color: var(--color-gold);
}

.nav-link.active::after {
  width: 100%;
}


/* ============================================================
   SECTION 1 — HERO
   ============================================================ */

.hero {
  min-height: 100vh;
  min-height: 100svh; /* iOS Safari safe viewport */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding-top: var(--nav-height);
  overflow: hidden;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 2;
  position: relative;
  padding: 0 60px;
  max-width: 1400px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* Tag row */
.hero-tag {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 32px;
  opacity: 1;
}

/*
 * GSAP FALLBACK — if GSAP CDN fails, these elements would be
 * permanently invisible. The @supports block detects JS execution
 * via a class added by nav.js. If that class never arrives
 * (CDN blocked) the elements revert to visible after 3s via animation.
 */
@keyframes fadeInFallback {
  to { opacity: 1; transform: none; }
}

.no-gsap .hero-tag,
.no-gsap .hero-subheadline,
.no-gsap .hero-cta,
.no-gsap .hero-headline .char {
  animation: fadeInFallback 0.6s ease forwards;
}

.hero-tag-line {
  width: 50px;
  height: 1px;
  background: #c9a84c;
  opacity: 1;
  display: block;
  flex-shrink: 0;
}

.hero-tag-text {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 4.62px;
  color: #ffffff;
  text-transform: uppercase;
  opacity: 1;
  white-space: nowrap;
}

/* Headline */
.hero-headline {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: clamp(3.7rem, 6.3vw, 7.5rem);
  letter-spacing: -0.5px;
  line-height: 1.05;
  color: #ffffff;
  text-align: center;
  text-shadow: 0 1px 20px rgba(0,0,0,0.25);
  white-space: nowrap;
  width: 100%;
  text-transform: none;
  margin-bottom: 24px;
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}

/* Ensure .hero itself is fully centered */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* Splitting.js wrapper spans — inherit font and preserve casing */
.hero-headline .word,
.hero-headline .char {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  text-transform: none;
}

/* Splitting.js sets each char invisible — GSAP animates them in */
.hero-headline .char {
  display: inline-block;
  opacity: 0;
  will-change: transform, opacity;
}

/* Subheadline */
.hero-subheadline {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 15px;
  letter-spacing: 3px;
  color: #ffffff;
  text-transform: uppercase;
  margin-bottom: 48px;
  opacity: 0; /* GSAP animates in */
  will-change: transform, opacity;
}

/* CTA */
.hero-cta {
  margin: 0 auto;
  opacity: 0; /* GSAP animates in */
  will-change: transform, opacity;
}

.cta-arrow {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-button:hover .cta-arrow,
.cta-button-ghost:hover .cta-arrow {
  transform: translateX(6px);
}


/* ============================================================
   SECTION 2 — HERO VIDEO
   ============================================================ */

.hero-video-section {
  width: 100%;
  background: var(--color-charcoal);
  padding: 0;
}

.hero-video-wrapper {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  border: 1.5px solid #141414;
  overflow: hidden;
  line-height: 0; /* eliminate inline gap under video */
}

.hero-video {
  width: 100%;
  height: auto;
  display: block;
  min-height: 300px;
  object-fit: cover;
}

.hero-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(20, 20, 20, 0.1) 0%,
    rgba(20, 20, 20, 0) 30%,
    rgba(20, 20, 20, 0) 70%,
    rgba(20, 20, 20, 0.3) 100%
  );
  z-index: 1;
  pointer-events: none;
}


/* ============================================================
   SECTION 3 — THREE BUILDS
   ============================================================ */

.three-builds {
  padding: 120px 40px;
  position: relative;
}

.three-builds-inner {
  max-width: 1300px;
  margin: 0 auto;
}

/* Stack the intro text with consistent rhythm */
.three-builds .section-tag {
  margin-bottom: 16px;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 4.62px;
  color: #ffffff;
  opacity: 1;
}

.three-builds .section-tag::before,
.three-builds .section-tag::after {
  background: #c9a84c;
  opacity: 1;
  height: 1px;
  width: 40px;
}

.three-builds .section-headline {
  margin-bottom: 16px;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: clamp(2.3rem, 4vw, 4rem);
  letter-spacing: -0.3px;
  text-transform: none !important;
}

.three-builds .section-subheadline {
  margin-bottom: 0;
}

/* Grid */
.builds-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 80px;
  align-items: stretch;
}

/* Prevent grid blowout when content is wider than cell */
.builds-grid > * {
  min-width: 0;
}

/* Individual card */
.build-card {
  background: var(--color-charcoal);
  border: var(--gold-border);
  overflow: hidden;
  transition: var(--transition-smooth);
  cursor: default;
  display: flex;
  flex-direction: column;
  /* Override gold-card padding — layout is split between video + content */
  padding: 0;
  box-shadow: var(--shadow-gold);
}

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

/* Video area */
.build-card-video-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.build-card-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Text area */
.build-card-content {
  padding: 32px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.build-card-number {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 4px;
  color: var(--color-gold);
  display: block;
  margin-bottom: 12px;
}

.build-card-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 1.6rem;
  letter-spacing: 1px;
  text-transform: none !important;
  color: var(--color-white);
  margin-bottom: 16px;
}

.build-card-desc {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 16px;
  letter-spacing: 0.3px;
  color: var(--color-white-80);
  line-height: 1.7;
  margin-bottom: 24px;
  flex: 1; /* pushes link to the bottom of the card */
}

.build-card-link {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--color-gold);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
  align-self: flex-start;
}

.build-card-link:hover {
  gap: 16px;
}

.build-card-link span {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.build-card-link:hover span {
  transform: translateX(4px);
}


/* ============================================================
   SECTION 4 — HOW IT WORKS
   ============================================================ */

.how-it-works {
  background: var(--color-charcoal);
  padding: 120px 40px;
  border-top: var(--gold-border);
  border-bottom: var(--gold-border);
}

.how-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.how-it-works .section-tag {
  margin-bottom: 16px;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 4.62px;
  color: #c9a84c;
  opacity: 1;
}

.how-it-works .section-tag::before,
.how-it-works .section-tag::after {
  background: #c9a84c;
  opacity: 1;
  height: 1px;
  width: 40px;
}

.how-it-works .section-headline {
  margin-bottom: 80px;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: clamp(2.3rem, 4vw, 4rem);
  letter-spacing: -0.3px;
  text-transform: none !important;
}

/* Steps grid */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}

/* Gold connector line across step numbers */
.steps-grid::before {
  content: '';
  position: absolute;
  top: 28px; /* vertically centered through the large numerals */
  left: calc(12.5%);
  width: 75%;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--color-gold) 10%,
    var(--color-gold) 90%,
    transparent
  );
  z-index: 0;
}

.step {
  text-align: center;
  padding: 0 24px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.step-number {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 4rem;
  letter-spacing: -0.5px;
  color: var(--color-gold);
  display: block;
  text-align: center;
  width: 100%;
  margin-bottom: 20px;
  line-height: 1;
  background: var(--color-charcoal); /* lifts above the ::before line */
  position: relative;
  padding: 0 8px;
}

.step-divider {
  width: 1px;
  height: 40px;
  background: var(--color-gold);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 24px;
  opacity: 0.5;
}

.step-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 1.3rem;
  letter-spacing: 1px;
  text-transform: none !important;
  color: var(--color-white);
  margin-bottom: 16px;
  text-align: center;
  width: 100%;
}

.step-desc {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 16px;
  letter-spacing: 0.3px;
  color: var(--color-white-60);
  line-height: 1.7;
  text-align: center;
  width: 100%;
}


/* ============================================================
   SECTION 5 — FINAL CTA
   ============================================================ */

.final-cta {
  padding: 160px 40px;
  text-align: center;
}

.final-cta-inner {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.final-cta .section-tag {
  margin-bottom: 24px;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 4.62px;
  color: #ffffff;
  opacity: 1;
}

.final-cta .section-tag::before,
.final-cta .section-tag::after {
  background: #c9a84c;
  opacity: 1;
  height: 1px;
  width: 40px;
}

.final-cta-headline {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: clamp(2.9rem, 5.2vw, 5.8rem);
  letter-spacing: -0.3px;
  text-transform: none;
  color: var(--color-white);
  margin-bottom: 24px;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.final-cta-sub {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 17px;
  letter-spacing: 0.5px;
  color: var(--color-white-80);
  max-width: 560px;
  margin: 0 auto 48px;
  line-height: 1.7;
}

.final-cta-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 12px;
}

.final-cta-phone {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 3rem;
  letter-spacing: 4px;
  color: #ffffff;
  border-bottom: 1.5px solid #c9a84c;
  padding-bottom: 4px;
  transition: color 0.3s ease;
}

.final-cta-phone:hover {
  color: #c9a84c;
}


/* ============================================================
   RESPONSIVE — 1024px
   ============================================================ */

@media (max-width: 1024px) {
  .three-builds {
    padding: 100px 28px;
  }

  .builds-grid {
    gap: 24px;
  }

  .build-card-content {
    padding: 24px;
  }

  .how-it-works {
    padding: 100px 28px;
  }

  .final-cta {
    padding: 120px 28px;
  }
}


/* ============================================================
   RESPONSIVE — 768px
   ============================================================ */

@media (max-width: 768px) {
  /* Hero */
  .hero {
    padding-top: var(--nav-height);
    padding-left: 24px;
    padding-right: 24px;
  }

  .hero-headline {
    white-space: normal;
    font-size: clamp(2.8rem, 10vw, 4.5rem) !important;
  }

  .hero-subheadline {
    letter-spacing: 2px;
  }

  .hero-cta {
    font-size: 11px;
    padding: 16px 28px;
    letter-spacing: 2px;
  }

  /* Three builds — single column */
  .builds-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .three-builds {
    padding: 80px 24px;
  }

  /* How it works — 2 columns */
  .how-it-works {
    padding: 80px 24px;
  }

  .how-it-works .section-headline {
    margin-bottom: 56px;
  }

  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 48px;
  }

  /* Hide the horizontal connector line on mobile */
  .steps-grid::before {
    display: none;
  }

  /* Final CTA */
  .final-cta {
    padding: 100px 24px;
  }

  .final-cta-actions {
    flex-direction: column;
    gap: 24px;
  }

  .final-cta-phone {
    font-size: 1.1rem;
  }
}


/* ============================================================
   RESPONSIVE — 375px
   ============================================================ */

@media (max-width: 375px) {
  /* Hero */
  .hero-content {
    padding: 0 16px;
  }

  .hero-headline {
    letter-spacing: 1px;
  }

  .hero-cta {
    font-size: 10px;
    padding: 14px 20px;
    letter-spacing: 1.5px;
    gap: 8px;
  }

  .hero-subheadline {
    letter-spacing: 1px;
    margin-bottom: 36px;
  }

  /* Three builds */
  .three-builds {
    padding: 80px 20px;
  }

  .build-card-content {
    padding: 20px;
  }

  /* How it works — single column */
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .how-it-works {
    padding: 80px 20px;
  }

  /* Final CTA */
  .final-cta {
    padding: 80px 20px;
  }

  .final-cta-actions .cta-button {
    font-size: 10px;
    padding: 14px 20px;
    letter-spacing: 1.5px;
    gap: 8px;
  }
}


/* ============================================================
   VISIBILITY SAFETY OVERRIDE
   Ensures elements are always visible if GSAP/AOS fails to fire.
   Hover transitions preserved via explicit transition.
   ============================================================ */

.hero-tag,
.hero-subheadline,
.hero-cta,
.section-tag,
.section-headline,
.section-subheadline,
.build-card,
.step,
.pillar-card {
  opacity: 1 !important;
  transform: none !important;
  transition: box-shadow 0.3s ease, transform 0.3s ease !important;
}
