/* ===================================================================
   HOME PAGE — page-specific styles for front-page.php
   Requires style.css to be loaded first (variables, nav, buttons,
   section/footer/reveal utilities, breakpoints).
   =================================================================== */

/* ============ FIXED HERO VIDEO ============ */
/* pointer-events: none — these are decorative and fixed over the full
   viewport at every scroll depth. Without this they silently swallow
   clicks on anything below them once faded (e.g. the industries-teaser
   CTA), even at opacity 0. */
#hero-bg-video{
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  object-fit: cover; z-index: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
#hero-video-overlay{
  position: fixed; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(10,22,40,0.58) 0%, rgba(10,22,40,0.32) 38%, rgba(10,22,40,0.62) 100%);
  pointer-events: none;
  transition: opacity 0.5s ease, background 0.5s ease;
}
body.curtain-passed #hero-bg-video,
body.curtain-passed #hero-video-overlay{ opacity: 0; }

/* Mobile skips the (34MB) autoplay video entirely to save data/battery —
   see the breakpoint-driven loader in the page script — and falls back
   to a solid navy backdrop so the hero text stays readable. */
body.no-hero-video #hero-bg-video{ display: none; }
body.no-hero-video #hero-video-overlay{
  background: linear-gradient(180deg, rgba(10,22,40,0.94) 0%, rgba(10,22,40,0.88) 38%, rgba(10,22,40,0.94) 100%), var(--navy);
}

/* ============ CURTAIN: fixed video + scrolling hero/second/third layers ============ */
#curtain{ position: relative; z-index: 2; }
.curtain-hero{
  position: relative; height: 100vh; width: 100%;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 0 24px;
  background: transparent;
}
.curtain-hero-inner{
  animation: curtainHeroIn 1.15s cubic-bezier(.16,1,.3,1) both;
  animation-delay: 0.15s;
}
@keyframes curtainHeroIn{
  from{ opacity: 0; transform: translateY(28px); }
  to{ opacity: 1; transform: translateY(0); }
}
.curtain-hero-headline{
  font-family: 'Playfair Display', serif; font-weight: 600;
  font-size: clamp(40px, 5.4vw, 84px); line-height: 1.16;
  color: #F7F9FB; margin: 0 auto; max-width: 20ch;
  text-shadow: 0 2px 30px rgba(0,0,0,0.35);
}
.curtain-hero-sub{
  font-family: 'Inter', sans-serif;
  font-size: clamp(16px, 1.4vw, 21px); line-height: 1.65;
  color: #F7F9FB; opacity: 0.86; margin: 24px auto 0; max-width: 560px;
  text-shadow: 0 2px 16px rgba(0,0,0,0.3);
}
.curtain-scroll-indicator{
  margin-top: 56px; font-family: 'Inter', sans-serif;
  font-size: 12.5px; letter-spacing: 0.28em; text-transform: uppercase;
  color: #F7F9FB; opacity: 0.75;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.curtain-scroll-indicator span{
  display: inline-block; font-size: 16px;
  animation: curtainBounce 1.8s ease-in-out infinite;
}
@keyframes curtainBounce{
  0%, 100%{ transform: translateY(0); }
  50%{ transform: translateY(8px); }
}

/* 500vh block height must stay in sync with CURTAIN_SECOND_BLOCK_VH in the page script */
.curtain-second{
  position: relative; height: 500vh; width: 100%;
  background: var(--frost);
}
/* Sticks the moment its 500vh parent's top reaches the viewport top, releases
   at the parent's bottom. Nothing in this box moves except the .cs-line children. */
.curtain-second-sticky{
  position: sticky; top: 0; height: 100vh; width: 100%;
  display: flex; align-items: center; justify-content: flex-start;
  text-align: left; padding: 110px 7vw 0; /* top padding clears the fixed nav at any viewport height */
  overflow: hidden;
}
.curtain-second-inner{
  width: min(1240px, 86vw);
  display: flex; flex-direction: column; align-items: flex-start; gap: 30px;
}
.cs-line{
  opacity: 0;
  transform: translateY(46px);
  will-change: opacity, transform;
}
.cs-intro{
  font-family: 'Playfair Display', serif; font-weight: 400;
  font-size: clamp(20px, 2.1vw, 28px); line-height: 1.5;
  color: var(--navy); margin: 0;
}
.cs-headline{
  font-family: 'Playfair Display', serif; font-weight: 700;
  font-size: clamp(44px, 5.6vw, 82px); line-height: 1.1;
  color: var(--navy); margin: 0; width: 100%;
}
.cs-support{
  font-family: 'Playfair Display', serif; font-weight: 400;
  font-size: clamp(20px, 2.1vw, 28px); line-height: 1.5;
  color: var(--navy); margin: 0; max-width: 620px;
}
/* .cs-cta composes with the shared .btn-gold class (style.css) for its
   background/color/shape — this just handles its position in the stack. */
.cs-cta{ margin-top: 10px; align-self: flex-end; }

/* Chapter 3 ("How We Work") — same continuous background as chapter 2, no seam. */
.curtain-third{
  position: relative; height: 500vh; width: 100%;
  background: var(--frost);
}
.curtain-third-sticky{
  position: sticky; top: 0; height: 100vh; width: 100%;
  display: flex; align-items: flex-start; justify-content: flex-start;
  padding: 15vh 0 0 5.6vw;
  overflow: hidden;
}
.curtain-third-inner{
  position: relative;
  width: 100%; height: 100%;
  overflow: visible;
}
.ct-line{
  opacity: 0;
  transform: translateY(46px);
  will-change: opacity, transform;
}
.ct-text-col{
  display: flex; flex-direction: column; align-items: flex-start; gap: 28px;
  width: 56%; max-width: 880px; flex-shrink: 0;
}
.ct-eyebrow{
  font-family: 'Playfair Display', serif; font-size: 2.05vw; font-weight: 400;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--navy);
  margin: 0;
}
.ct-headline{
  font-family: 'Playfair Display', serif; font-weight: 400;
  font-size: 3.5vw; line-height: 1.15;
  color: var(--navy); margin: 0; width: 58vw;
  margin-top: 5.2vw;
}
/* .ct-cta composes with the shared .btn-gold class (style.css) for its
   background/color/shape — this just handles its position in the stack. */
.ct-cta{ margin-top: 3.8vw; }
.ct-graphic{
  position: absolute;
  left: 58vw; top: 9.7vh; width: 42vw;
  opacity: 0; transform: translateY(0px);
  will-change: opacity, transform;
}
.ct-graphic img{ width: 100%; height: auto; display: block; }

/* ============ INDUSTRIES TEASER ============ */
/* Pinned exactly like .curtain-second/.curtain-third: .teaser-block is the
   500vh scroll-spacer (must stay in sync with the page script's pin-height
   math, same as .curtain-second/.curtain-third), .teaser-frame is the
   position:sticky inner frame that stays fixed in place — its background
   never moves — while only the .wp-line content animates in and out.
   Plain frost background, navy text (the shared .teaser-eyebrow/
   .teaser-headline defaults from style.css apply unchanged). */
.teaser-block{
  position: relative; height: 500vh; width: 100%;
}
.teaser-frame{
  position: sticky; top: 0;
  height: 100vh; width: 100%;
  display: flex; align-items: center; justify-content: flex-start;
  padding: 0 8vw 0 5.6vw;
  background: var(--frost);
  overflow: hidden;
}
/* Same init state as .cs-line/.ct-line — hidden and dropped 46px until
   updateIndustriesTeaser() (in home.js) animates it in. */
.wp-line{
  opacity: 0;
  transform: translateY(46px);
  will-change: opacity, transform;
}
.teaser-column{
  display: flex; flex-direction: column; align-items: flex-start;
  max-width: min(640px, 60vw);
}
#industries-teaser .teaser-eyebrow{
  font-size: clamp(18px, 2.09vw, 30px);
  margin: 0;
}
#industries-teaser .teaser-headline{
  font-size: clamp(34px, 4.03vw, 58px);
  margin: clamp(16px, 4.36vw, 64px) 0 0;
  max-width: none;
  white-space: nowrap;
}
#industries-teaser .btn-gold{
  margin-top: clamp(32px, 11.92vw, 160px);
}

/* ============ FAQ ============ */
.faq-section{
  background: var(--navy);
  color: var(--frost);
  padding: 150px 0;
}
.faq-title{
  font-family: 'Playfair Display', serif; font-weight: 700;
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.3;
  color: var(--frost);
  margin: 0 0 90px;
  max-width: none;
  white-space: nowrap;
}
.faq-category{
  display: grid;
  grid-template-columns: minmax(160px, 22%) 1fr;
  gap: 48px;
  padding: 56px 0;
  border-top: 1px solid rgba(247,249,251,0.14);
}
.faq-category:first-of-type{ border-top: none; padding-top: 0; }
.faq-cat-label{
  font-family: 'Playfair Display', serif; font-weight: 700; font-size: 19px;
  color: var(--frost);
  align-self: center;
  margin: 0;
}
.faq-items{
  border-left: 1px solid rgba(247,249,251,0.22);
  padding-left: 48px;
  display: flex; flex-direction: column;
  gap: 40px;
}
.faq-item{ border: none; padding: 0; }
.faq-item summary{
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
}
.faq-item summary::-webkit-details-marker{ display: none; }
.faq-q{
  font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 400;
  color: var(--frost);
}
.faq-item summary::after{
  content: '+'; font-family: 'Inter', sans-serif; font-weight: 400; font-size: 20px;
  color: var(--gold); flex-shrink: 0;
}
.faq-item[open] summary::after{ content: '\2212'; }
.faq-item .faq-answer{
  margin-top: 16px;
  font-family: 'Playfair Display', serif;
  font-size: 15.5px; line-height: 1.7;
  color: var(--frost); opacity: 0.78;
  text-align: justify;
  max-width: 640px;
}
.faq-item .faq-answer p{ margin: 0; }

/* ============ FINAL CTA ============ */
.final-cta-block{
  position: relative; height: 500vh; width: 100%;
}
.final-cta-frame{
  position: sticky; top: 0; height: 100vh; width: 100%;
  display: flex; align-items: center; justify-content: flex-start;
  padding: 110px 7vw 0;
  background: var(--frost);
  overflow: hidden;
}
.final-cta-inner{
  width: min(1240px, 86vw);
  display: flex; flex-direction: column; align-items: flex-start; gap: 30px;
}
.fc-line{
  opacity: 0;
  transform: translateY(46px);
  will-change: opacity, transform;
}
.fc-intro{
  font-family: 'Playfair Display', serif; font-weight: 400;
  font-size: clamp(20px, 2.1vw, 28px); line-height: 1.5;
  color: var(--navy); margin: 0;
}
.fc-headline{
  font-family: 'Playfair Display', serif; font-weight: 700;
  font-size: clamp(44px, 5.6vw, 82px); line-height: 1.1;
  color: var(--navy); margin: 0; width: 100%;
}
.fc-cta{ margin-top: 48px; align-self: flex-end; }

/* ============ RESPONSIVE — tablet ============ */
@media (max-width: 1024px){
  .teaser-frame{ padding-left: 6vw; }
  .teaser-column{ max-width: 80vw; }

  .faq-category{ grid-template-columns: 1fr; gap: 20px; }
  .faq-items{
    border-left: none; padding-left: 0;
    border-top: 1px solid rgba(247,249,251,0.14); padding-top: 28px;
  }

  .faq-title{ white-space: normal; max-width: 22ch; }
}

/* ============ RESPONSIVE — mobile ============ */
@media (max-width: 640px){
  .teaser-column{ max-width: 88vw; }
  #industries-teaser .teaser-headline{
    white-space: normal;
    max-width: 16ch;
  }
  .curtain-hero-headline{ font-size: 9.4vw; }

  .faq-section{ padding: 90px 0; }
  .faq-title{ margin-bottom: 56px; }
  .faq-category{ padding: 40px 0; }
  .faq-items{ gap: 28px; }
  .faq-item .faq-answer{ text-align: left; }

  .curtain-second-sticky{ padding: 96px 6vw 0; }
  .cs-cta{ align-self: flex-start; }

  .curtain-third-sticky{ padding: 12vh 0 0 6vw; }
  .curtain-third-inner{ flex-direction: column; }
  .ct-text-col{ width: 100%; max-width: none; }
  .ct-eyebrow{ font-size: 4vw; }
  .ct-headline{ font-size: 6.5vw; width: 86vw; margin-top: 6vh; }
  .ct-graphic{ position: relative; left: 0; top: 5vh; width: 86vw; }

  .final-cta-frame{ padding: 96px 6vw 0; }
  .fc-cta{ align-self: flex-start; margin-top: 28px; }
}
