/* =====================================================================
   Eralux Homepage — page-specific styles only — theme tokens come from
   design-system.css (mobile boundary: 900px — see --eralux-mobile-breakpoint)
   ===================================================================== */

:root {
  /* Aliases to master theme tokens (design-system.css) */
  --ink: var(--ews-ink);
  --paper: var(--ews-paper);
  --muted: var(--ews-muted);
  --accent: var(--ews-accent);
  --gut: var(--ews-gutter);

  /* Font aliases kept for template compatibility — all resolve to the
     single theme font (Montserrat) provided by design-system.css */
  --fx-display: var(--ews-font);
  --fx-body: var(--ews-font);
  --fx-mono: var(--ews-font);

  /* Decorative placeholder gradients — now theme tokens. */
  --fx-ph-grad: var(--ews-placeholder-grad);
  --fx-ph-grad-media: var(--ews-placeholder-grad-media);
  --fx-showcase-placeholder-grad: var(--ews-placeholder-grad-showcase);
  --fx-ph-grad-light: var(--ews-placeholder-grad-light);
  --fx-ph-grad-tone-1: var(--ews-placeholder-grad-1);
  --fx-ph-grad-tone-2: var(--ews-placeholder-grad-2);
  --fx-ph-grad-tone-3: var(--ews-placeholder-grad-3);

  --fx-accent-bright: var(--ews-accent-light);
}

/* Reset scoped to the standalone homepage template wrapper
   (body class set in homepage.php). :where() keeps the original
   zero specificity of the bare `*` reset. */
:where(body.eralux-homepage-template),
:where(body.eralux-homepage-template) * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body.eralux-homepage-template {
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
}

/* ---------- placeholder architectural image ---------- */
/* =====================================================
     IMAGE SLOT CONVENTION
     Every real image in this page lives inside a div with
     class "ph" (or "intro-media") plus a unique "image-slot-*"
     class. To swap in a real photo later:
       1. Remove the gradient background from that specific
          image-slot-* class (or override it).
       2. Add an <img> tag inside the div, e.g.:
             <div class="image-placeholder image-slot-hero">
               <img src="your-photo.jpg" alt="..." />
             </div>
       3. Delete the matching <span class="ph-tag">...</span>
          caption once the real image is in place — it exists
          only to label placeholders during development.
     The dark gradient + grain (::after) are placeholder-only
     and are not part of the final visual design.
  ===================================================== */
.image-placeholder {
  position: absolute;
  inset: 0;
  height: 100%;
  background: var(--fx-ph-grad);
  overflow: hidden;
  transform-origin: center center;
}

.image-placeholder::after {
  /* grain texture, not a fixture */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.3;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* Real images dropped into an .image-placeholder slot fill the container edge-to-edge. */
.image-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Slots with a real image no longer need the placeholder grain texture. */
.image-placeholder.has-image::after {
  display: none;
}

/* =====================================================
     SECTION 1 — CINEMATIC PINNED HERO
  ===================================================== */
/* The hero fills the viewport MINUS the site chrome above it. Plain
   100vh overflows by exactly the header's height, because the hero
   starts below the header rather than at the top of the viewport.
   --ews-chrome-top is published by header.js (header + admin bar) and
   re-measured on resize, so the collapsed and mobile header heights are
   covered too. No min-height: the brief is to fill the remaining
   viewport and never exceed it. */
.hero-pin {
  position: relative;
  height: calc(100vh - var(--ews-chrome-top, 0px));
}

.hero {
  position: relative;
  height: calc(100vh - var(--ews-chrome-top, 0px));
  overflow: hidden;
  background: var(--ink);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* hero slideshow — one .hero-slide per image/video, crossfaded */
.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  height: 100%;
  opacity: 0;
  transition: opacity 1.1s ease;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

/* bottom-right manual slide controls — minimal, architectural */
.hero-slide-nav {
  position: absolute;
  right: var(--gut);
  bottom: clamp(48px, 7vh, 84px);
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-slide-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid rgba(var(--ews-paper-rgb), 0.35);
  color: rgba(var(--ews-paper-rgb), 0.85);
  cursor: pointer;
  transition:
    border-color 0.3s ease,
    background 0.3s ease;
}

.hero-slide-btn:hover {
  border-color: rgba(var(--ews-paper-rgb), 0.9);
  background: rgba(var(--ews-paper-rgb), 0.08);
}

@media (prefers-reduced-motion: reduce) {
  .hero-media .image-placeholder img {
    animation: none;
  }
}

.hero-inner {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  text-align: left;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 clamp(36px, 14.5vw, 300px) clamp(72px, 12vh, 132px);
  color: var(--paper);
}

.hero h1 {
  color: var(--ews-contrast-ink) !important;
}

.hero-subtitle {
  margin-top: 34px;
  color: var(--ews-contrast-ink) !important;
}

/* =====================================================
     SECTION 2 — EDITORIAL INTRO
  ===================================================== */
/* Two stacked bands: a full-bleed image carrying the heading and sub text
   over it, and a row of value cards under it on the paper background.

   The section used to be sized to exactly one viewport, with the heading in
   its own band above the image and the image flexing to absorb whatever was
   left. That geometry only worked because the section held one text block and
   one image. It now holds a text block ON the image plus a card row beneath
   it, and forcing all of that into one viewport would either crush the cards
   or shrink the image to a strip. So the section is content-height: the image
   band takes a fixed slice of the viewport, the card row takes what it needs,
   and the whole thing is a little taller than the screen.

   The proximity snap in homepage.html needed a second target because of this.
   It snaps whichever listed element's TOP is nearest the header line, and it
   has no notion of a section being too tall to snap — with only `#intro`
   listed, coming to rest anywhere within a quarter-viewport of the image
   band's top while scrolling DOWN toward the cards would pull the reader back
   up to the image. `#introValues` is listed alongside it so the card row is a
   resting place of its own. */
.intro {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  /* One content viewport — the viewport minus whatever the sticky header
     covers, per --ews-header-overlay (0 when the header is not sticky).
     min-height rather than height, so a window too short for the card row
     grows instead of clipping it. */
  min-height: var(--ews-content-viewport-height);
  background: var(--paper);
}

/* margin-inline 0, not auto: an `auto` side margin on a FLEX ITEM absorbs the
   free space and shrinks the item to fit its content, which collapsed this
   wrap the moment the section became a flex container. Kept as a plain block
   stack now, but the zeroed margins stay — the wrap is still a flex item on
   any ancestor that decides to become a flex container. */
/* Carries the section's height down to the two bands. min-height:0 is the one
   non-obvious part: a column flex item's default min-height is auto, which
   refuses to shrink below its content and would let a tall card row push the
   section past the viewport before the image band ever gave up a pixel.

   Nothing sets width/margin/padding here on purpose — an `auto` side margin on
   a flex item absorbs the free space and collapses the item to its content
   width, so this wrap must never be given one. */
.intro-wrap {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

/* The image band. A fixed height rather than an aspect ratio: the crop is a
   wide architectural shot and its natural ratio would make the band absurdly
   tall on a narrow desktop window. Clamped against the viewport so it fills
   most of the first screen after the hero without ever pushing the card row
   completely out of reach. */
/* The image band takes whatever the card row does not. That is what makes the
   section EQUAL a viewport rather than merely reach past it: sized the other
   way round — a fixed image height plus a content-height card row — the total
   lands wherever it lands, and the next section starts partway up the screen.
   min-height is the floor for a short window, where the cards win and the
   image gives up its space rather than being squeezed to a strip. */
.intro-media {
  position: relative;
  flex: 1 1 auto;
  /* Grid with ONE in-flow child — the text overlay. The image stays absolutely
     positioned and contributes no height, so the grid row is exactly the
     overlay's own height plus its padding.

     That is the whole point, and it replaces the `min-height: 220px` that used
     to be here. As a flex item this box keeps min-height:auto, whose automatic
     minimum is that content height — so the band can never be squeezed
     narrower than the heading and sub text plus their breathing room, however
     tall the card row below it grows. A fixed floor could not do that: the
     text is editable, and 220px was already less than the ~223px two lines of
     heading and three of sub text actually occupy, which is why the padding
     collapsed to almost nothing at some widths. */
  display: grid;
  overflow: hidden;
  background: var(--fx-ph-grad-light);
  /* NO clip-path here, deliberately. The wipe is applied by homepage.html's
     script (gsap.set on #introMedia) and only after it has confirmed GSAP
     actually loaded — it comes off a CDN, and the script's first line bails
     out with "content already visible without JS" when it did not.

     A clip-path in the stylesheet would be applied whether or not that script
     ever runs. That was survivable when this band held nothing but a
     decorative image; the heading and the sub text live inside it now, so a
     blocked CDN, a CSP rule or any earlier JS error would leave the section
     as an empty paper band with its entire message invisible and no way to
     recover. The band is below the fold on load, so there is no flash to
     trade against. */
}

.intro-media img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Scrim for the overlaid text. The heading is white and the image is chosen
   by an administrator, so legibility cannot rest on the photograph being dark
   in the right place. Horizontal rather than a flat wash: it holds the left
   third, where the text sits, and fades out well before the right edge so the
   image itself is barely touched. */
.intro-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    100deg,
    rgba(var(--ews-dark-rgb), 0.62) 0%,
    rgba(var(--ews-dark-rgb), 0.42) 34%,
    rgba(var(--ews-dark-rgb), 0.12) 62%,
    rgba(var(--ews-dark-rgb), 0) 82%
  );
  pointer-events: none;
}

.intro-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.28;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* The text block over the image: left-aligned, centred vertically, and held
   to the page gutter so it lines up with every other section's content edge. */
/* In flow (grid-area 1/1) rather than absolutely positioned, so that it HAS a
   height the band can be sized from. Stretched to the row by default, so when
   the band is taller than the text the flex centring still applies.

   The vertical padding is the real fix the layout was missing: it used to be
   `0`, which was invisible while the band had slack and became a heading
   touching the top edge the moment it did not. */
.intro-overlay {
  /* No grid-area and no position: it is the only in-flow child, so auto
     placement already puts it in the single cell, and z-index applies to a
     grid item without needing one. */
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(14px, 1.5vw, 22px);
  padding: clamp(56px, 7.5vh, 110px) clamp(24px, 4vw, 64px);
  color: var(--ews-contrast-ink);
}

/* Type comes entirely from the design system: this is an <h2>, so it takes
   the theme's h2 step. The only thing set here is the measure, which is what
   breaks the heading over two lines the way the approved design does. */
/* !important on the colour, matching .hero h1, .hero-subtitle, .path-title and
   .path-sub: every other light-on-image string in this file needs it to beat
   the theme, and .path-title is an <h4> at exactly this specificity. Without
   it the heading falls back to --ews-ink over a 62%-black scrim. */
.intro-head {
  max-width: 16ch;
  color: var(--ews-contrast-ink) !important;
}

/* Likewise a <p> on the theme's body step. Slightly softened against the
   image so it reads as secondary to the heading without becoming a second
   type size. */
.intro-sub {
  max-width: 44ch;
  color: rgba(var(--ews-contrast-ink-rgb), 0.88) !important;
}

/* The value-card row. Equal columns so the hairline dividers land at even
   intervals regardless of how much copy each card carries; the cards
   themselves are top-aligned so their icons form one line across the row even
   when one description wraps to three lines and its neighbour to two. */
/* grid-auto-flow: column over grid-auto-columns, rather than a fixed
   repeat(4, 1fr): the card count is whatever survives the empty-card filter in
   eralux_homepage_render_intro_cards, so a row of three has to divide into
   three equal columns, not into four with a hole where the fourth was.
   (repeat(auto-fit, minmax(0, 1fr)) expresses the same intent but is invalid —
   auto-fit cannot resolve a repetition count from a track whose minimum is 0,
   and the whole declaration is dropped.) */
.intro-values {
  display: grid;
  /* Content height, and the image band absorbs the remainder. */
  flex: 0 0 auto;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  /* No align-items here, deliberately: the grid default stretches every card
     to the height of the tallest, and that is what the dividers need. The
     divider is a border on the card, so the card's height IS the divider's
     height — under `align-items: start` each card was only as tall as its own
     copy and the four rules came out at four different lengths. */
  /* The bottom is deliberately tighter than the top now. The band above needs
     the room more than the gap under the last rule does, and this is where it
     comes from. */
  padding: clamp(32px, 3.6vw, 56px) clamp(24px, 4vw, 64px) clamp(24px, 2.4vw, 40px);
}

.intro-value {
  display: flex;
  flex-direction: column;
  /* No justify-content: a column flex box already packs to the top, which is
     what keeps the icons on one line across the row and each card's rule just
     under its own last line of copy rather than on a shared baseline. */
  align-items: center;
  gap: clamp(10px, 1vw, 16px);
  /* The vertical padding is what lets the dividers overshoot the content top
     and bottom, the way the approved design draws them. It comes off the
     row's own padding above, so the band is the same height either way. */
  padding: clamp(12px, 1.3vw, 22px) clamp(16px, 2.4vw, 40px) clamp(14px, 1.6vw, 26px);
  text-align: center;
}

/* Divider between cards, drawn by the card on the right so the row never ends
   with a trailing rule. */
.intro-value + .intro-value {
  border-inline-start: 1px solid var(--ews-line);
}

/* The short rule under each card in the approved design. A pseudo-element
   rather than a border on the card, which would run the card's full width. */
.intro-value::after {
  content: "";
  width: clamp(34px, 3vw, 52px);
  height: 1px;
  margin-top: clamp(4px, 0.7vw, 10px);
  background: var(--ews-line-strong);
}

/* currentColor on the icon set means one declaration colours every drawing.
   --ews-muted is the warm taupe the design system already carries for
   secondary marks, which is what these are. */
.intro-value-icon {
  display: block;
  width: clamp(38px, 3.2vw, 50px);
  height: clamp(38px, 3.2vw, 50px);
  margin-bottom: clamp(2px, 0.5vw, 8px);
  color: var(--ews-muted);
}

.intro-value-icon svg,
.intro-value-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* No font declarations on either of these: the title is an <h4> and the
   description a <p>, so both take the design system's steps as they are. */
.intro-value-title {
  color: var(--ews-ink);
}

.intro-value-text {
  max-width: 26ch;
  color: var(--ews-muted-ink);
}

/* -------- Section 2 on tablet --------
   Between the phone breakpoint and a comfortable desktop the four cards are
   still side by side, but each column is roughly 230px wide — enough for
   "Operational Excellence" to wrap to three lines while its neighbour wraps to
   one, which reads as four mismatched columns rather than one row. Two by two
   gives every card about twice the measure and the row balances again.

   Scoped ABOVE the 900px phone rules in the cascade order of this file, and
   bounded at both ends, so it governs only this band. */
@media (min-width: 901px) and (max-width: 1180px) {
  /* No .intro-media floor here any more: an explicit min-height would replace
     the automatic one the desktop rule now relies on, and the automatic one is
     strictly better — it is the height of the text this band has to carry. */

  .intro-values {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: row;
    row-gap: clamp(30px, 4vw, 46px);
    padding: clamp(40px, 5vw, 64px) clamp(24px, 4vw, 56px) clamp(46px, 5.5vw, 72px);
  }

  /* The divider rules are rebuilt for a 2x2 grid: the desktop
     `.intro-value + .intro-value` would draw a vertical rule down the left of
     cards 2, 3 and 4, which puts one in the middle of the second row's left
     column. Here the vertical rule belongs to the RIGHT-hand card of each row
     (the even ones) and the horizontal rule to the second row (cards 3 and 4). */
  .intro-value + .intro-value {
    border-inline-start: 0;
  }

  .intro-value:nth-child(even) {
    border-inline-start: 1px solid var(--ews-line);
  }

  .intro-value:nth-child(n + 3) {
    border-top: 1px solid var(--ews-line);
    padding-top: clamp(30px, 4vw, 46px);
  }

  .intro-value-text {
    max-width: 32ch;
  }
}

/* =====================================================
     SECTION 3 — STICKY FIXTURE SHOWCASE
     (integrated from the approved eralux-sticky-fixture-showcase.html
     prototype; .image-placeholder renamed to .showcase-placeholder to avoid colliding with
     the homepage's own .image-placeholder image-slot convention used elsewhere.)
  ===================================================== */
.showcase-placeholder {
  position: absolute;
  inset: 0;
  background: var(--fx-showcase-placeholder-grad);
  overflow: hidden;
}

/* No blur here: this rule also wraps the FEATURED PRODUCT fixture image,
   which must stay perfectly sharp. The soft 1px blur is applied only to
   the application BACKGROUND images below. */
.showcase-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.scene-bg .showcase-placeholder img,
.scene-media-m > .showcase-placeholder img {
  filter: blur(1px);
}

.showcase-placeholder.is-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  border: 1px dashed rgba(var(--ews-paper-rgb), 0.22);
}

.scene-pin {
  position: relative;
  z-index: 5;
}

.scene-stage {
  position: relative;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
  background: var(--ink);
  cursor: pointer;
}

/* -------- backgrounds -------- */
.scene-bgs {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.scene-bg {
  position: absolute;
  inset: 0;
  opacity: 0;
  will-change: transform, opacity;
}

.scene-bg .showcase-placeholder {
  transform-origin: 60% 40%;
}

.scene-bg .showcase-placeholder img {
  opacity: 1;
  transform: scale(1.025);
}

/* -------- foreground fixture: three nested layers so scroll-parallax,
     entrance scale/rotate/slide, and idle float never collide on `transform`.
     The fixture is the hero object here — no card, no frame, just the
     cutout PNG floating over the (dimmed) application background. -------- */
.scene-fixtures {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.scene-fixture-outer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.scene-fixture-outer.is-active {
  opacity: 1;
  visibility: visible;
}

.scene-fixture-anim {
  will-change: transform;
}

.scene-fixture-float {
  animation: fixtureFloat 5.2s ease-in-out infinite;
}

.scene-fixture {
  position: relative;
  width: min(70vw, 980px);
  height: min(66vh, 760px);
  max-width: 88vw;
  filter: drop-shadow(0 50px 90px rgba(var(--ews-ink-rgb), 0.65));
}

.scene-fixture-image-link {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  pointer-events: auto;
  cursor: pointer;
}

.scene-fixture-image-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}

.scene-fixture-image-link .showcase-placeholder {
  position: absolute;
  inset: 0;
}

.scene-fixture img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* no background, no border, no radius — a real image renders as a floating cutout.
     The placeholder look only appears via .is-placeholder (missing-asset fallback). */
.scene-fixture .showcase-placeholder {
  position: absolute;
  inset: 0;
  background: none;
  overflow: visible;
}

.scene-fixture .showcase-placeholder.is-placeholder {
  background: var(--fx-showcase-placeholder-grad);
  border: 1px dashed rgba(var(--ews-paper-rgb), 0.22);
  border-radius: 8px;
}

@keyframes fixtureFloat {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-22px) rotate(0.6deg);
  }
}

/* -------- text content -------- */
.scene-content {
  position: absolute;
  left: var(--gut);
  bottom: clamp(150px, 20vh, 220px);
  z-index: 5;
  max-width: 640px;
  /* wide enough for the longest single-line title ("Commercial Lighting") at max font size */
}

.scene-block {
  position: absolute;
  inset: auto 0 0 0;
}

/* descender room: overflow:hidden + line-height 1.05 clips the "g" in "Eleganza" —
     same fix as the hero h1 masks, margin-compensated so spacing is unchanged */
.scene-family {
  display: inline-block;
  overflow: hidden;
  padding-bottom: 0.15em;
  margin-bottom: calc(10px - 0.15em);
}

.scene-family span {
  display: inline-block;
  white-space: nowrap;
  font-weight: var(--ews-weight-medium);
  font-size: clamp(1.8rem, 3.8vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--accent);
  will-change: transform, opacity;
}

/* single-line titles + fixed 1-line height: with the block bottom-anchored,
     every family name lands at the same vertical position above the tab row */
.scene-title {
  font-weight: var(--ews-weight-medium);
  font-size: clamp(2rem, 4.4vw, 3.6rem);
  line-height: 1.03;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  min-height: 1.03em;
}

.scene-fixture-name {
  font-size: clamp(1.05rem, 1.25vw, 1.3rem) !important;
  line-height: 1.3 !important;
  font-weight: var(--ews-weight-medium) !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(var(--ews-paper-rgb), 0.5);
  margin-bottom: 16px;
  will-change: transform, opacity;
}

.scene-view-more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  margin-bottom: 16px;
  color: var(--ews-contrast-ink);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--ews-radius);
  box-shadow: 0 12px 30px rgba(var(--ews-accent-rgb), 0.2);
  transition:
    border-color 0.3s ease,
    background 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease;
  white-space: nowrap;
}

.scene-view-more:hover,
.scene-view-more:focus-visible {
  border-color: var(--fx-accent-bright);
  background: var(--fx-accent-bright);
  transform: translateX(3px);
  box-shadow: 0 16px 38px rgba(var(--ews-accent-rgb), 0.32);
}

.scene-desc {
  max-width: 36ch;
  color: rgba(var(--ews-paper-rgb), 0.78);
  font-size: 1.02rem;
  line-height: 1.6;
  will-change: transform, opacity;
}

/* -------- scene tabs -------- */
.scene-tabs {
  position: absolute;
  left: var(--gut);
  right: auto;
  bottom: clamp(28px, 4.5vh, 46px);
  z-index: 6;
  width: max-content;
  max-width: calc(100% - (2 * var(--gut)));
  display: flex;
  gap: clamp(16px, 3vw, 36px);
  flex-wrap: wrap;
  padding: 20px clamp(22px, 2.4vw, 36px) 8px;
  border: 1px solid rgba(var(--ews-contrast-ink-rgb), 0.1);
  border-top-color: rgba(var(--ews-contrast-ink-rgb), 0.18);
  border-radius: 14px;
  background: rgba(var(--ews-cool-ink-rgb), 0.48);
  -webkit-backdrop-filter: blur(24px) saturate(0.72);
  backdrop-filter: blur(24px) saturate(0.72);
  box-shadow:
    0 18px 48px rgba(var(--ews-ink-rgb), 0.34),
    inset 0 1px 0 rgba(var(--ews-contrast-ink-rgb), 0.05);
  isolation: isolate;
}

.scene-tab {
  background: none;
  border: none;
  padding: 0 0 12px;
  cursor: pointer;
  position: relative;
  font-size: clamp(0.9rem, 1.15vw, 1.05rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(var(--ews-paper-rgb), 0.85);
  transition:
    color 0.3s ease,
    text-shadow 0.3s ease,
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    letter-spacing 0.3s ease;
  transform-origin: left center;
}

.scene-tab::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.5s cubic-bezier(0.76, 0, 0.24, 1);
  box-shadow: 0 0 12px rgba(var(--ews-accent-rgb), 0.6);
}

.scene-tab.is-active {
  color: var(--ews-contrast-ink);
  letter-spacing: 0.16em;
  text-shadow: 0 0 18px rgba(var(--ews-accent-rgb), 0.55);
}

.scene-tab.is-active::after {
  transform: scaleX(1);
}

.scene-tab:hover {
  color: rgba(var(--ews-paper-rgb), 0.9);
  transform: translateY(-2px);
}

.scene-tab:active {
  transform: translateY(0) scale(0.96);
}

@media (prefers-reduced-motion: reduce) {
  .scene-fixture-float {
    animation: none;
  }
}

/* -------- mobile: no pin, stack each scene -------- */
.scene-track-mobile {
  display: none;
}

/* 1.3.16 — use more of the desktop image stage while preserving a safe
     top/bottom lane for the controls and floating tab panel. */
@media (min-width: 901px) {
  .scene-fixtures {
    inset: clamp(28px, 4vh, 48px) 0 clamp(118px, 15vh, 160px);
  }

  /* Give the animation/float wrappers a real height so the fixture's
     height:100% resolves. Previously these wrappers were auto-height
     (their content is absolutely positioned), which collapsed the
     product hero image to 0px — the reason the foreground fixture
     never appeared over the application background. */
  .scene-fixture-outer {
    align-items: stretch;
  }

  .scene-fixture-anim,
  .scene-fixture-float {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
  }

  .scene-fixture {
    width: min(94vw, 1520px);
    height: 100%;
    max-width: 96vw;
    max-height: 100%;
  }

  .scene-fixture img {
    max-width: 100%;
    max-height: 100%;
  }
}

/* =====================================================
     SECTION 4 — THREE PRODUCT PATHS
  ===================================================== */
/* Breakpoint-specific rules below make the desktop row one shared screen
   and each stacked mobile card one screen of its own. */
.paths {
  position: relative;
  z-index: 5;
  background: var(--paper);
  padding: clamp(48px, 8vh, 96px) 0;
}

/* See .intro-wrap: auto margins would collapse this to its content width
   now that .paths is a flex container. */
.paths-wrap {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 clamp(10px, 1.2vw, 20px);
}

.paths-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.path-card {
  display: block;
  color: var(--ink);
}

.path-media {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--fx-ph-grad-media);
}

.path-media .image-placeholder {
  position: absolute;
  inset: 0;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transform: scale(1);
}

.path-card:hover .path-media .image-placeholder,
.path-card:focus-visible .path-media .image-placeholder {
  transform: scale(1.07);
}

.path-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(var(--ews-dark-rgb), 0) 45%,
    rgba(var(--ews-dark-rgb), 0.55) 100%
  );
}

.path-tone-1 .image-placeholder {
  background: var(--fx-ph-grad-tone-1);
}

.path-tone-2 .image-placeholder {
  background: var(--fx-ph-grad-tone-2);
}

.path-tone-3 .image-placeholder {
  background: var(--fx-ph-grad-tone-3);
}

.path-num {
  position: absolute;
  left: 20px;
  top: 18px;
  z-index: 2;
}

.path-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 26px 24px;
}

.path-title {
  color: var(--ews-contrast-ink) !important;
  margin-bottom: 8px;
}

.path-sub {
  color: var(--ews-muted) !important;
}

.path-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: var(--accent);
}

.path-link .arrow {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.path-card:hover .path-link .arrow {
  transform: translateX(6px);
}

/* Desktop: the three cards share one full-height row. Mobile sizing lives
   in the consolidated block below. */
@media (min-width: 901px) {
  .paths {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100vh - var(--ews-header-overlay, 0px));
  }

  /* The cards absorb the leftover height instead of their 3:4 ratio
     setting it, so the row fills the section exactly at any window
     height rather than overshooting on a short one. */
  .paths-wrap {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
  }

  .paths-grid {
    grid-template-columns: repeat(3, 1fr);
    flex: 1;
    min-height: 0;
  }

  .path-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .path-media {
    flex: 1;
    min-height: 0;
    aspect-ratio: auto;
  }
}

/* =====================================================
     MOBILE ADAPTATION — single boundary: 900px
     (see --eralux-mobile-breakpoint) — every max-width:900px
     rule for this page lives in this one block.
  ===================================================== */
@media (max-width: 900px) {
  :root {
    /* module-specific mobile gutter (wider than the theme's 16px) */
    --gut: clamp(18px, 5.5vw, 32px);
  }

  body.eralux-homepage-template {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  /* -------- Section 1: hero -------- */
  /* Same rule as desktop, on the small-viewport unit so the mobile
     browser's collapsing toolbars do not make the hero taller than the
     screen. The chrome above it still has to come off. */
  .hero-pin,
  .hero {
    height: calc(100svh - var(--ews-chrome-top, 0px));
  }

  .hero-inner {
    min-height: 100%;
    justify-content: flex-end;
    padding: 0 var(--gut) max(38px, calc(7svh + env(safe-area-inset-bottom)));
  }

  .hero-subtitle {
    width: min(100%, 35ch);
    max-width: none;
    margin-top: 22px;
    font-size: 0.94rem;
    line-height: 1.55;
  }

  .hero-slide-nav {
    display: none;
  }

  .hero-media .image-placeholder img {
    object-position: center center;
  }

  /* -------- Section 2: editorial intro -------- */
  /* The image band is a full screen of its own on a phone: the viewport minus
     whatever the sticky header covers.

     It cannot be sized the way desktop sizes it — as the flex item that
     absorbs whatever the card row leaves. The card row is a single column
     here and is already about a screen tall by itself, so there is no slack
     to absorb: sized that way the picture collapses onto its floor and the
     section runs past the fold anyway. One of the two has to be cropped or
     scrolled, and the picture is the one that survives cropping, so it takes
     the screen and fills it.

     No local svh calc: --ews-content-viewport-height already switches from vh
     to svh below this same 900px breakpoint in design-system.css, so it
     already accounts for a mobile browser's collapsing toolbars. A second
     copy of that calc would be a second place to keep in step. */
  .intro-media {
    min-height: var(--ews-content-viewport-height);
    /* Nothing else. The desktop `flex: 1 1 auto` and `min-height: 220px` are
       both left standing: with a definite height that is already a full
       screen there is no slack for the flex factors to act on and nothing
       ever comes near the floor, so overriding either would only be a line to
       keep in step. No clip-path either, for the reason given on the desktop
       rule — and doubly so here, where a blocked CDN is a likelier way to
       arrive. */
  }

  /* Nothing overrides .intro-media img or .intro-overlay here on purpose. The
     band has a definite height again, so the desktop treatment — the image
     absolutely positioned and cropped with object-fit: cover, the text
     absolutely positioned over it — is exactly right, and the picture is no
     longer at risk of being too short for the text to sit on. */

  /* The scrim turns vertical below the phone breakpoint. A left-to-right fade
     works when the text occupies the left third; here it runs the full width,
     so the gradient has to sit under the text rather than beside it. */
  .intro-media::before {
    background: linear-gradient(
      to top,
      rgba(var(--ews-dark-rgb), 0.72) 0%,
      rgba(var(--ews-dark-rgb), 0.52) 42%,
      rgba(var(--ews-dark-rgb), 0.24) 72%,
      rgba(var(--ews-dark-rgb), 0.08) 100%
    );
  }

  /* Bottom-anchored rather than centred, matching the mobile hero above it,
     so the two screens share one rhythm as you scroll between them. */
  .intro-overlay {
    justify-content: flex-end;
    gap: 14px;
    padding: clamp(28px, 5svh, 48px) var(--gut);
  }

  /* Measure only — the size still comes from the design system's h2 step,
     which already clamps down to 32px at this width. The old override set its
     own font-size here; the heading sits on the image now and the theme step
     is the right size for it, so the override is gone rather than retuned. */
  .intro-head {
    max-width: 20ch;
  }

  .intro-sub {
    max-width: 40ch;
  }

  /* One column. Two would leave "Operational Excellence" wrapping to three
     lines in a 160px column next to a card with a one-line title, and the
     divider between them makes that imbalance the most visible thing in the
     section. Stacked, each card gets the full width and the dividers become
     horizontal rules between rows. */
  /* A screen of its own, following the image's. Not `flex: 1 1 auto` any
     more: the image band now takes the whole of the section's first viewport,
     so there is no slack left inside the section for the cards to claim — the
     card row has to ask for its own height rather than inherit a remainder
     that is zero. align-content spreads the cards through it when four of
     them come in under a screen, and when they run over it the row simply
     grows; the min-height is a floor, not a cap. */
  .intro-values {
    min-height: var(--ews-content-viewport-height);
    grid-template-columns: 1fr;
    grid-auto-flow: row;
    align-content: space-evenly;
    gap: clamp(22px, 5vw, 34px);
    padding: clamp(32px, 8vw, 52px) var(--gut) clamp(38px, 9vw, 60px);
  }

  /* Stacked, the cards are full width and the dividers are horizontal rules
     between them, so the padding that made room for vertical dividers is not
     wanted — the rule spacing below sets the rhythm instead. */
  .intro-value {
    padding: 0;
  }

  /* The vertical rule between columns becomes a horizontal one between rows.
     Both directions are set, not just the new one: border-inline-start would
     otherwise survive from the desktop rule and draw a stray vertical line
     down the left of every card but the first. */
  .intro-value + .intro-value {
    border-inline-start: 0;
    border-top: 1px solid var(--ews-line);
    padding-top: clamp(26px, 6vw, 38px);
  }

  .intro-value-text {
    max-width: 34ch;
  }

  /* -------- Section 3: fixture showcase, unpinned and stacked -------- */
  .scene-stage {
    height: auto;
    min-height: 0;
    overflow: visible;
    background: var(--paper);
  }

  .scene-tabs,
  .scene-bgs,
  .scene-fixtures,
  .scene-content {
    display: none;
  }

  .scene-track-mobile {
    display: block;
    padding: 0;
    overflow: hidden;
    background: var(--paper);
  }

  .scene-unit-m {
    position: relative;
    display: flex;
    flex-direction: column;
    height: var(--ews-content-viewport-height);
    min-height: 0;
    margin: 0;
    padding: 0 var(--gut) clamp(54px, 14vw, 84px);
    background: var(--paper);
    opacity: 0;
    transform: translateY(14px);
    transition:
      opacity 0.45s ease,
      transform 0.45s ease;
  }

  .scene-unit-m.is-visible {
    opacity: 1;
    transform: none;
  }

  .scene-media-m {
    position: relative;
    flex: 1 1 0;
    width: auto;
    height: auto;
    min-height: 0;
    max-height: none;
    aspect-ratio: auto;
    margin: 0 calc(-1 * var(--gut));
    border-radius: 0;
    overflow: hidden;
  }

  .scene-media-m .showcase-placeholder:first-child {
    position: absolute;
    inset: 0;
  }

  .scene-media-m .showcase-placeholder:first-child img {
    opacity: 1;
    transform: scale(1.025);
  }

  .scene-fixture-m {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(18px, 6vw, 36px);
  }

  .scene-fixture-m .scene-fixture {
    width: 96%;
    height: 86%;
    max-width: none;
  }

  .scene-fixture-m .scene-fixture,
  .scene-fixture-m .scene-fixture-float {
    filter: none;
    animation: none;
  }

  .scene-media-m .showcase-placeholder,
  .scene-fixture-m .scene-fixture {
    will-change: auto;
  }

  .scene-fixture,
  .scene-fixture * {
    animation: none !important;
    filter: none !important;
    backdrop-filter: none !important;
  }

  .scene-content-m {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    max-width: none;
    padding: 24px 0 0;
    background: var(--paper);
  }

  .scene-family-m {
    display: block;
    margin-bottom: 10px;
    color: var(--accent);
    font-weight: var(--ews-weight-medium);
    font-size: clamp(1.25rem, 6vw, 1.75rem);
    line-height: 1.1;
    letter-spacing: -0.01em;
    text-transform: none;
    white-space: normal;
  }

  .scene-title-m {
    margin-bottom: 8px;
    color: var(--ink);
    font-weight: var(--ews-weight-medium);
    font-size: clamp(1.8rem, 8vw, 2.5rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
  }

  .scene-view-more {
    min-height: 48px;
    margin: 10px 0 14px;
    padding: 13px 20px;
    color: var(--ews-ink);
    background: transparent;
    border: 1px solid rgba(var(--ews-cool-ink-rgb), 0.55);
    box-shadow: none;
  }

  .scene-view-more:hover,
  .scene-view-more:focus-visible {
    color: var(--ews-ink);
    background: transparent;
    border-color: var(--ink);
    box-shadow: none;
  }

  /* -------- Section 4: three product paths -------- */
  .paths {
    padding: 0;
  }

  .paths-wrap {
    /* Each Environment card reaches both viewport edges on mobile. Text
       keeps its own readable inset through .path-caption. */
    padding: 0;
  }

  .paths-grid {
    gap: 16px;
  }

  /* On mobile each path is its own screen instead of the three paths
     sharing one row as they do on desktop. */
  .path-card {
    height: var(--ews-content-viewport-height);
    min-height: 0;
  }

  .path-media {
    height: 100%;
    min-height: 0;
    aspect-ratio: auto;
  }

  .path-caption {
    padding: 24px 20px;
  }
}

/* =====================================================
     FEATURED PRODUCTS — server-rendered first slide
     The product hero image floats on top of the product's
     application-image background (both layers exist before
     the showcase script enhances the section).
  ===================================================== */
.scene-first-fallback .scene-first-fallback-fixture {
  position: absolute;
  inset: clamp(28px, 6vh, 64px) 8% clamp(96px, 16vh, 160px);
  width: auto;
  height: auto;
  max-width: 84%;
  max-height: 70%;
  margin: auto;
  object-fit: contain;
  filter: drop-shadow(0 50px 90px rgba(var(--ews-ink-rgb), 0.65));
}
