/* ============================================================================
   Skyline v3.11 — DJI-inspired patterns
   ----------------------------------------------------------------------------
   Additive stylesheet. Load AFTER v3.css so tokens are available.
   Applies to: index.html + cleaning.html (opt-in via classes/data-attrs).
   Patterns implemented:
     #8 Sub-nav (per-page contextual sticky bar)
     #9 Gradient-fill headlines on dark sections
     #5 Homepage hero carousel (crossfade over hero video slot)
     #1 Scroll-pinned "chapter" template (pinned media + fading text panels)
     #3 Bento feature grid with macro imagery + big numeric callouts
     #6 Stories / case-studies section
   ============================================================================ */


/* ---------------------------------------------------------------------------
   #8  PER-PAGE SUB-NAV
   --------------------------------------------------------------------------- */
.subnav {
  position: sticky;
  top: 62px;                                    /* sits under main nav */
  z-index: 40;
  background: rgba(6, 6, 8, 0.86);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 240ms var(--ease-luke, ease), transform 240ms var(--ease-luke, ease);
  pointer-events: none;
}
.subnav.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.subnav-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 10px clamp(20px, 4vw, 40px);
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 22px);
  overflow-x: auto;
  scrollbar-width: none;
}
.subnav-inner::-webkit-scrollbar { display: none; }
.subnav-label {
  color: rgba(255, 255, 255, 0.94);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
  padding-right: 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}
.subnav-links {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.8vw, 20px);
  flex: 1;
  min-width: 0;
}
.subnav-link {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  padding: 4px 2px;
  border-bottom: 1px solid transparent;
  transition: color 180ms ease, border-color 180ms ease;
}
.subnav-link:hover,
.subnav-link.is-active {
  color: #fff;
  border-bottom-color: var(--gold-500, #E8B84B);
}
.subnav-cta {
  margin-left: auto;
  color: #050507;
  background: var(--gold-500, #E8B84B);
  padding: 8px 16px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 180ms ease, background 180ms ease;
}
.subnav-cta:hover {
  background: #FFC85A;
  transform: translateY(-1px);
}
@media (max-width: 720px) {
  .subnav { top: 56px; }
  .subnav-inner { padding: 8px 16px; gap: 14px; }
  .subnav-label { display: none; }
  .subnav-link { font-size: 11.5px; letter-spacing: 0.14em; }
  /* Hide subnav CTA on small screens — header CTA already covers it */
  .subnav-cta { display: none; }
  /* Give scrollable links some right-hand padding so the last item isn’t clipped */
  .subnav-links { padding-right: 16px; }
}


/* ---------------------------------------------------------------------------
   #9  GRADIENT-FILL HEADLINES (dark sections)
   ---------------------------------------------------------------------------
   Additive: opt-in via .headline-gradient on .cine-head h2 or .headline-editorial
   Variants: default (gold→white), .is-red, .is-teal, .is-blue
   --------------------------------------------------------------------------- */
.headline-gradient,
.cine-head h2.headline-gradient,
h2.headline-gradient,
h1.headline-gradient {
  background: linear-gradient(180deg, #FFFFFF 0%, #FFE8A3 45%, var(--gold-500, #E8B84B) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.headline-gradient em,
.cine-head h2.headline-gradient em {
  background: linear-gradient(180deg, var(--gold-500, #E8B84B) 0%, #FFC85A 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  font-style: normal;
}
.headline-gradient.is-red { background: linear-gradient(180deg, #FFFFFF 0%, #FFB4A6 45%, #E24C3B 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.headline-gradient.is-teal { background: linear-gradient(180deg, #FFFFFF 0%, #B4EFEA 45%, var(--aqua-500, #1FA9A0) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.headline-gradient.is-blue { background: linear-gradient(180deg, #FFFFFF 0%, #B8CFEE 45%, var(--azure-500, #3D6FB8) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }


/* ---------------------------------------------------------------------------
   #5  HOMEPAGE HERO CAROUSEL (3 slides, auto-rotate, dot pagination)
   ---------------------------------------------------------------------------
   Structure:
     <section class="cine-hero has-carousel">
       <div class="hero-carousel">
         <div class="hero-slide is-active" data-slide-index="0">
           <div class="hero-slide-media"><video ...></video></div>
           <div class="hero-slide-scrim"></div>
           <div class="hero-slide-content container">... slide 1 content ...</div>
         </div>
         <div class="hero-slide" data-slide-index="1"> ... </div>
         <div class="hero-slide" data-slide-index="2"> ... </div>
       </div>
       <div class="hero-dots">
         <button class="hero-dot is-active" data-dot="0"><span></span></button>
         <button class="hero-dot" data-dot="1"><span></span></button>
         <button class="hero-dot" data-dot="2"><span></span></button>
       </div>
     </section>
   --------------------------------------------------------------------------- */
.cine-hero.has-carousel { position: relative; }
.hero-carousel {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 900ms ease;
  pointer-events: none;
}
.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}
.hero-slide-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero-slide-media > video,
.hero-slide-media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.hero-slide-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5,5,7,0.15) 0%, rgba(5,5,7,0.55) 55%, rgba(5,5,7,0.90) 100%),
    linear-gradient(90deg, rgba(5,5,7,0.55) 0%, rgba(5,5,7,0) 55%);
  z-index: 1;
}
.hero-slide-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: clamp(120px, 15vh, 170px);
  padding-top: clamp(140px, 20vh, 220px);
}
/* Hero-carousel headline: keep the type impactful but bounded to fit in-viewport */
.cine-hero.has-carousel .cine-hero-headline {
  font-size: clamp(2.4rem, 5.6vw, 5rem);
  line-height: 0.95;
  max-width: 22ch;
}
.hero-dots {
  position: absolute;
  bottom: clamp(64px, 9vh, 96px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 14px;
  padding: 8px 14px;
  background: rgba(5, 5, 7, 0.42);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.hero-dot {
  width: 34px;
  height: 3px;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background 200ms ease;
}
.hero-dot:hover { background: rgba(255, 255, 255, 0.48); }
.hero-dot.is-active { background: rgba(255, 255, 255, 0.24); }
.hero-dot.is-active::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gold-500, #E8B84B);
  transform-origin: left center;
  transform: scaleX(0);
  animation: heroDotFill 6800ms linear forwards;
}
@keyframes heroDotFill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: none; }
  .hero-dot.is-active::after { animation: none; transform: scaleX(1); }
}

/* Secondary "Watch Video" CTA on hero (pairs with #2 recommendation earlier) */
.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.btn-video {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}
.btn-video:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}
.btn-video-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gold-500, #E8B84B);
  color: #050507;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.btn-video-icon svg { width: 10px; height: 10px; display: block; }


/* ---------------------------------------------------------------------------
   #1  SCROLL-PINNED "CHAPTER" TEMPLATE
   ---------------------------------------------------------------------------
   Structure:
     <section class="chapter-scroll" data-chapter>
       <div class="chapter-media">
         <img src="..."> or <video ...></video>
         <div class="chapter-media-scrim"></div>
       </div>
       <div class="chapter-panels">
         <div class="chapter-panel is-active" data-panel="0">
           <div class="eyebrow">Chapter · One</div>
           <h3>Panel headline one</h3>
           <p>Panel body text one.</p>
         </div>
         <div class="chapter-panel" data-panel="1">...</div>
         <div class="chapter-panel" data-panel="2">...</div>
       </div>
       <div class="chapter-progress">
         <span class="chapter-progress-item is-active">01 · Label</span>
         <span class="chapter-progress-item">02 · Label</span>
         <span class="chapter-progress-item">03 · Label</span>
       </div>
     </section>
   --------------------------------------------------------------------------- */
.chapter-scroll {
  position: relative;
  background: #050507;
}
.chapter-scroll .chapter-media {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  z-index: 1;
}
.chapter-scroll .chapter-media > img,
.chapter-scroll .chapter-media > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transform: scale(1.04);
}
.chapter-media-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5,5,7,0.35) 0%, rgba(5,5,7,0.55) 55%, rgba(5,5,7,0.90) 100%),
    linear-gradient(90deg, rgba(5,5,7,0.62) 0%, rgba(5,5,7,0) 60%);
  z-index: 2;
}
.chapter-panels {
  position: relative;
  z-index: 3;
  margin-top: -100vh;                          /* stack over sticky media */
}
.chapter-panel {
  min-height: 100vh;
  padding: clamp(80px, 12vh, 140px) clamp(20px, 6vw, 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 640px;
  color: #fff;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms var(--ease-luke, ease), transform 600ms var(--ease-luke, ease);
}
.chapter-panel.is-active {
  opacity: 1;
  transform: translateY(0);
}
.chapter-panel .eyebrow {
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-500, #E8B84B);
  margin: 0 0 20px;
  font-weight: 600;
}
.chapter-panel h3 {
  font-family: var(--font-display, "Inter", sans-serif);
  font-size: clamp(2rem, 4.4vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
  font-weight: 700;
  text-wrap: balance;
}
.chapter-panel h3 em {
  font-style: normal;
  color: var(--gold-500, #E8B84B);
}
.chapter-panel p {
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
  margin: 0;
  max-width: 46ch;
}
.chapter-progress {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  gap: 24px;
  padding: 12px 18px;
  background: rgba(5, 5, 7, 0.55);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.chapter-progress-item {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  font-weight: 600;
  white-space: nowrap;
  transition: color 240ms ease;
}
.chapter-progress-item.is-active {
  color: #fff;
}
@media (max-width: 820px) {
  .chapter-scroll .chapter-media { position: relative; height: 60vh; }
  .chapter-panels { margin-top: 0; }
  .chapter-panel { min-height: auto; padding: 60px 20px; }
  .chapter-panel.is-active,
  .chapter-panel { opacity: 1; transform: none; }
  .chapter-progress { display: none; }
}


/* ---------------------------------------------------------------------------
   #3  BENTO FEATURE GRID (macro imagery + big numeric callouts)
   ---------------------------------------------------------------------------
   Grid: 3 cols desktop / 2 tablet / 1 mobile
   Tile variants:
     .bento-tile.is-tall  (spans 2 rows)
     .bento-tile.is-wide  (spans 2 cols)
     .bento-tile.is-stat  (numeric-callout tile; big number + unit + caption)
     .bento-tile.is-hero  (hero product tile, top-left, larger)
   --------------------------------------------------------------------------- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(220px, 1fr);
  gap: 16px;
}
.bento-tile {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(180deg, #14151A 0%, #0A0B0F 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #fff;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  isolation: isolate;
  transition: transform 320ms var(--ease-luke, ease), border-color 320ms ease;
}
.bento-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(232, 184, 75, 0.35);
}
.bento-tile.is-wide { grid-column: span 2; }
.bento-tile.is-tall { grid-row: span 2; }
.bento-tile.is-hero { grid-column: span 2; grid-row: span 2; }

.bento-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.bento-media > img,
.bento-media > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.bento-media-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5,5,7,0.10) 0%, rgba(5,5,7,0.65) 65%, rgba(5,5,7,0.92) 100%);
}

.bento-body {
  position: relative;
  z-index: 1;
  padding: 28px 28px 28px;
}
.bento-eyebrow {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-500, #E8B84B);
  margin: 0 0 12px;
  font-weight: 600;
}
.bento-title {
  font-family: var(--font-display, "Inter", sans-serif);
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  font-weight: 700;
  color: #fff;
  text-wrap: balance;
}
.bento-title em {
  font-style: normal;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.02em;
}
.bento-desc {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
  max-width: 44ch;
}

/* Stat tile: big number + unit + label */
.bento-tile.is-stat .bento-body {
  padding-bottom: 32px;
}
.bento-stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 6px;
}
.bento-stat-num {
  font-family: var(--font-display, "Inter", sans-serif);
  font-size: clamp(3.5rem, 7vw, 5.5rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: #fff;
}
.bento-stat-unit {
  font-size: clamp(0.9rem, 1.4vw, 1.2rem);
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 300;
  text-transform: lowercase;
}
.bento-stat-label {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  margin: 0;
  font-weight: 500;
}

@media (max-width: 960px) {
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
  .bento-tile.is-hero { grid-column: span 2; grid-row: span 1; }
}
@media (max-width: 640px) {
  .bento-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .bento-tile,
  .bento-tile.is-wide,
  .bento-tile.is-tall,
  .bento-tile.is-hero { grid-column: auto; grid-row: auto; min-height: 320px; }
  .bento-body { padding: 22px; }
  .bento-stat-num { font-size: 4rem; }
}


/* ---------------------------------------------------------------------------
   #6  STORIES / CASE-STUDIES SECTION
   ---------------------------------------------------------------------------
   Editorial hub scaffold — 4x1 tile grid, real photography, filterable
   caption + "Read Story →" link, styled distinctly from product pages.
   --------------------------------------------------------------------------- */
.stories-section {
  padding: clamp(80px, 12vh, 140px) 0;
  background: #050507;
}
.stories-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: clamp(40px, 6vw, 60px);
  flex-wrap: wrap;
}
.stories-header .cine-head {
  margin: 0;
  max-width: 620px;
}
.stories-header .cine-head h2 {
  margin-bottom: 0;
}
.stories-link {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  font-weight: 500;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  transition: color 180ms ease, border-color 180ms ease;
  white-space: nowrap;
}
.stories-link:hover {
  color: var(--gold-500, #E8B84B);
  border-bottom-color: var(--gold-500, #E8B84B);
}
.stories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.story-card {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  text-decoration: none;
  isolation: isolate;
  transition: transform 320ms var(--ease-luke, ease);
}
.story-card:hover { transform: translateY(-4px); }
.story-card:hover .story-media > img { transform: scale(1.05); }
.story-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, #14151A, #0A0B0F);
}
.story-media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms var(--ease-luke, ease);
}
.story-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5,5,7,0.15) 0%, rgba(5,5,7,0.7) 65%, rgba(5,5,7,0.95) 100%);
}
.story-body {
  position: relative;
  z-index: 1;
  padding: 24px 22px 22px;
}
.story-tag {
  display: inline-block;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #050507;
  background: var(--gold-500, #E8B84B);
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  margin-bottom: 12px;
}
.story-tag.is-response { background: #E24C3B; color: #fff; }
.story-tag.is-water { background: var(--aqua-500, #1FA9A0); color: #fff; }
.story-tag.is-imaging { background: var(--azure-500, #3D6FB8); color: #fff; }
.story-title {
  font-family: var(--font-display, "Inter", sans-serif);
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -0.005em;
  margin: 0 0 8px;
  font-weight: 600;
  color: #fff;
  text-wrap: balance;
}
.story-meta {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 14px;
}
.story-read {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-500, #E8B84B);
  font-weight: 600;
}
.story-read::after { content: " →"; }

@media (max-width: 980px) {
  .stories-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .stories-grid { grid-template-columns: 1fr; gap: 18px; }
  .story-card { aspect-ratio: 16 / 11; }
}


/* ---------------------------------------------------------------------------
   Section padding compensation when subnav is present
   --------------------------------------------------------------------------- */
body.has-subnav .cine-hero { padding-top: 0; }        /* hero unchanged */
body.has-subnav [id]:not(.subnav) {
  scroll-margin-top: 120px;                            /* nav + subnav offset */
}

/* =====================================================
   v3.12 MOBILE HERO CLIPPING FIX (BLOCK-8)
   Long uppercase words like "FIREFIGHTING", "REPEATABLE"
   were clipping at 390px viewport width. Ratchet down
   font-size at narrow widths and add safe wrapping.
   ===================================================== */
@media (max-width: 600px) {
  .cine-hero-headline {
    font-size: clamp(2.2rem, 12.5vw, 4rem);
    letter-spacing: -0.03em;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
  }
  .cine-hero-content {
    padding-left: 20px;
    padding-right: 20px;
  }
}
@media (max-width: 420px) {
  .cine-hero-headline {
    font-size: clamp(2rem, 11.5vw, 3.4rem);
  }
}
