/* ════════════════════════════════════════════════════════════════════
   GALLERY HERO — single cinematic artwork (Hero/Gallery.jpg/webp/avif:
   a dark-navy plate with a diagonal-cut photo collage — steel coils,
   sparks on rebar, a plant office, a handshake, rod bundles, a mill
   aisle and a bridge — bordered by thin orange accent lines). Same
   family as steel-strip-hero.css / nails-hardware-hero.css / wire-
   rods-hero.css / structural-tubes-hero.css: content column on the
   left over the artwork's own flat-navy plate, full-bleed visual on
   the right, one readability scrim, a barely-visible breathing glow
   along the artwork's own orange diagonal, and a bottom stats strip.
   The artwork is the single, complete composition — nothing here adds
   a second background, a second photo grid or new orange shapes; the
   glow/sweep only animate emphasis on lines already baked into the
   photo. Decorative ambient (grid dots + drifting particles) is masked
   to the left content zone only, so it never sits over the artwork.

   Motion contract: only transform / opacity are animated on anything
   that runs continuously. Width, height, margin, left and top are
   never transitioned.
   ════════════════════════════════════════════════════════════════════ */

.glh {
  --glh-navy-deep: #030814;
  --glh-navy: #050C1F;
  --glh-navy2: #0A1830;
  --glh-orange: #FF5A00;
  --glh-orange-hot: #FF7A18;
  --glh-white: #F5F7FA;
  --glh-silver: #B8C0CA;

  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 2rem) 1.75rem 6.5rem;
  /* .site-nav is position:fixed (zero flow height), so this box starts at
     the true document top; it must span the full viewport (not 100svh
     minus nav-h) to reach the bottom edge, or .page-shell's top padding
     shows through as a gap. The top padding above already reserves clear
     space under the nav independently of this. */
  min-height: 100svh;
  background: linear-gradient(150deg, var(--glh-navy-deep) 0%, var(--glh-navy) 60%, var(--glh-navy2) 100%);
  color: var(--glh-white);
}

/* ── ambient decoration: faint dot grid + drifting particles, masked to
   the left content zone only so nothing ever paints over the artwork ── */
.glh-bg {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 42%, transparent 62%);
  mask-image: linear-gradient(90deg, #000 0%, #000 42%, transparent 62%);
}
.glh-grid {
  position: absolute; inset: 0;
  opacity: .05;
  background-image:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .5) 0px, rgba(255, 255, 255, .5) 1px, transparent 1px, transparent 42px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .5) 0px, rgba(255, 255, 255, .5) 1px, transparent 1px, transparent 42px);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 30% 30%, #000 0%, transparent 70%);
  mask-image: radial-gradient(ellipse 70% 60% at 30% 30%, #000 0%, transparent 70%);
}
.glh-glow { position: absolute; top: -14%; left: -8%; width: 42vw; height: 42vw; border-radius: 50%; filter: blur(60px); opacity: .45; background: radial-gradient(circle, rgba(255, 122, 24, .28), transparent 70%); }

.glh-particles { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.glh-particle {
  position: absolute; bottom: -5%; left: var(--x, 30%);
  width: var(--size, 3px); height: var(--size, 3px); border-radius: 50%;
  background: var(--hue, var(--glh-orange-hot));
  box-shadow: 0 0 6px 1px var(--hue, rgba(255, 122, 24, .6));
  opacity: 0;
  animation: glhParticleFloat var(--dur, 16s) ease-in var(--delay, 0s) infinite;
}
@keyframes glhParticleFloat {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  12% { opacity: .7; }
  85% { opacity: .3; }
  100% { transform: translateY(-115vh) translateX(var(--drift, 16px)); opacity: 0; }
}

/* ══ LAYOUT — content column over the artwork's own flat-navy plate ══ */
.glh-inner { position: relative; z-index: 5; width: 100%; max-width: 1420px; margin: 0 auto; }
.glh-content { min-width: 0; max-width: 620px; }
@media (min-width: 960px) { .glh-content { max-width: min(600px, 42%); } }

.glh-badge {
  display: inline-flex; align-items: center; gap: .65rem; margin-bottom: 1rem;
  font-family: var(--font-mono); font-size: .78rem; font-weight: 700; letter-spacing: .28em; text-transform: uppercase;
  color: var(--glh-orange-hot);
}
.glh-badge-rule { width: 28px; height: 2px; flex-shrink: 0; border-radius: 2px; background: linear-gradient(90deg, var(--glh-orange), var(--glh-orange-hot)); }

.glh-heading {
  font-family: var(--font-display); text-transform: uppercase;
  font-size: clamp(3rem, 5.2vw, 6.2rem); font-weight: 800; line-height: .9; letter-spacing: -.01em;
  margin: 0 0 1.15rem;
}
.glh-heading .line { display: block; overflow: hidden; padding-bottom: .08em; }
.glh-heading .line-inner { display: block; color: #fff; }
.glh-heading .line-inner.accent {
  background: linear-gradient(100deg, var(--glh-orange), var(--glh-orange-hot));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 200% 100%;
  animation: glhEmberShift 6s ease-in-out infinite, glhGradGlow 4s ease-in-out infinite;
}
@keyframes glhEmberShift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes glhGradGlow { 0%, 100% { filter: drop-shadow(0 0 6px rgba(255, 90, 0, .25)); } 50% { filter: drop-shadow(0 0 18px rgba(255, 90, 0, .5)); } }

.glh-desc { margin: 0 0 1.7rem; max-width: 46ch; font-size: 1.02rem; line-height: 1.7; color: var(--glh-silver); }

.glh-cta-row { display: flex; }
.glh-cta {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: .9rem;
  padding: .5rem .5rem .5rem 1.55rem; border-radius: 3rem;
  text-decoration: none; color: #fff;
  background: linear-gradient(135deg, var(--glh-orange-hot), var(--glh-orange));
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 10px 26px rgba(255, 90, 0, .32);
  transition: box-shadow .28s ease, transform .28s cubic-bezier(.22, 1, .36, 1);
}
.glh-cta:hover, .glh-cta:focus-visible { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(255, 90, 0, .46); }
.glh-cta:focus-visible { outline: 2px solid var(--glh-orange-hot); outline-offset: 3px; }
.glh-cta-label { font-family: var(--font-mono); font-size: .78rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.glh-cta-arrow { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--glh-orange); flex-shrink: 0; transition: transform .28s cubic-bezier(.22, 1, .36, 1); }
.glh-cta-arrow svg { width: 16px; height: 16px; }
.glh-cta:hover .glh-cta-arrow, .glh-cta:focus-visible .glh-cta-arrow { transform: translateX(4px); }
.glh-cta::after {
  content: ''; position: absolute; top: 0; left: -75%; width: 45%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, .4), transparent);
  transform: skewX(-20deg); transition: left .6s ease; pointer-events: none;
}
.glh-cta:hover::after { left: 125%; }

/* ══ HERO VISUAL — the single artwork, full-bleed, one scrim ══ */
.glh-visual { position: absolute; inset: 0; z-index: 0; overflow: hidden; margin: 0; opacity: 0; transform: scale(1.02); transition: opacity 1.3s cubic-bezier(.22, 1, .36, 1), transform 1.4s cubic-bezier(.22, 1, .36, 1); }
.glh-loaded .glh-visual { opacity: 1; transform: none; }

.glh-visual-frame { position: absolute; inset: 0; }
.glh-visual-frame img {
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: 88% center;
}
.glh-loaded .glh-visual-frame img { animation: glhFlex 13s ease-in-out infinite; }
@keyframes glhFlex {
  0%   { transform: scale(1.004) translate3d(-2px, -1px, 0); }
  50%  { transform: scale(1.01) translate3d(2px, 1px, 0); }
  100% { transform: scale(1.004) translate3d(-2px, -1px, 0); }
}

/* readability scrim: blends into the artwork's own flat-navy plate on
   the text side, fully transparent by the diagonal collage */
.glh-visual-scrim {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(90deg, var(--glh-navy) 0%, rgba(5, 12, 31, .8) 26%, rgba(5, 12, 31, .35) 42%, rgba(5, 12, 31, .05) 58%, transparent 68%),
    linear-gradient(180deg, rgba(3, 8, 20, .3) 0%, transparent 16%, transparent 78%, rgba(3, 8, 20, .55) 100%);
}

/* very subtle breathing glow along the artwork's own orange diagonal —
   emphasis on an existing line, never a new shape */
.glh-visual-glow {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: radial-gradient(ellipse 46% 52% at 66% 48%, rgba(255, 90, 0, .16), transparent 70%);
  mix-blend-mode: screen;
  opacity: .9;
}
.glh-loaded .glh-visual-glow { animation: glhGlowBreathe 7s ease-in-out infinite; }
@keyframes glhGlowBreathe { 0%, 100% { opacity: .9; } 50% { opacity: 1; } }

/* barely-visible light sweep, like a reflection passing over the
   artwork's own orange diagonal edge */
.glh-sweep {
  position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background: linear-gradient(122deg, transparent 44%, rgba(255, 210, 160, .08) 49%, rgba(255, 210, 160, .12) 50%, rgba(255, 210, 160, .08) 51%, transparent 56%);
  background-size: 260% 260%; background-position: 120% 0%;
  animation: glhSweep 8s ease-in-out infinite; mix-blend-mode: screen;
}
@keyframes glhSweep { 0%, 100% { background-position: 120% 0%; } 50% { background-position: -20% 100%; } }

/* ══ BOTTOM STATS STRIP — overlaid on the artwork's own bottom accent line ══ */
.glh-stats {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 6;
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 2.6rem; padding: 1.1rem 1.75rem;
  background: rgba(3, 8, 20, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border-top: 1px solid rgba(255, 90, 0, .22);
  opacity: 0; transform: translateY(10px);
  transition: opacity .6s cubic-bezier(.22, 1, .36, 1), transform .6s cubic-bezier(.22, 1, .36, 1);
  transition-delay: .9s;
}
.glh-loaded .glh-stats { opacity: 1; transform: none; }

.glh-stat { position: relative; text-align: center; transition: transform .3s cubic-bezier(.16, .84, .44, 1); }
.glh-stat:not(:last-child)::after {
  content: ''; position: absolute; right: -1.3rem; top: 10%; bottom: 10%; width: 1px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .16), transparent);
}
.glh-stat-num { display: block; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.5rem, 2.2vw, 1.9rem); color: #fff; line-height: 1; transition: filter .3s ease; }
.glh-stat-label { display: block; margin-top: .35rem; font-family: var(--font-mono); font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--glh-orange-hot); }
@media (hover: hover) and (pointer: fine) {
  .glh-stat:hover { transform: translateY(-2px); }
  .glh-stat:hover .glh-stat-num { filter: brightness(1.2); }
}

/* ══ ENTRANCE (JS flips .glh-loaded on .glh) ══ */
.glh-badge, .glh-heading .line-inner, .glh-desc, .glh-cta {
  opacity: 0; transform: translateY(16px);
  transition: opacity .5s cubic-bezier(.22, 1, .36, 1), transform .5s cubic-bezier(.22, 1, .36, 1);
}
.glh-loaded .glh-badge { opacity: 1; transform: none; transition-delay: .1s; }
.glh-loaded .glh-heading .line:nth-child(1) .line-inner { opacity: 1; transform: none; transition-delay: .2s; }
.glh-loaded .glh-heading .line:nth-child(2) .line-inner { opacity: 1; transform: none; transition-delay: .3s; }
.glh-loaded .glh-desc { opacity: 1; transform: none; transition-delay: .42s; }
.glh-loaded .glh-cta { opacity: 1; transform: none; transition-delay: .54s; }
.glh-cta { transform: translateY(16px) scale(.97); }
.glh-loaded .glh-cta { transform: none; }

.glh-bg, .glh-visual-frame, .glh-content { transition: transform .4s ease-out; will-change: transform; }

/* ══ TABLET / MOBILE — content stacks centered over the same full-bleed
   artwork; bias the crop further right so the collage stays intact as
   the viewport narrows and the flat-navy plate crops away instead ══ */
@media (max-width: 959px) {
  .glh { display: block; padding: calc(var(--nav-h) + 1.75rem) 1.5rem 8rem; min-height: auto; text-align: center; }
  .glh-content { max-width: none; margin: 0 auto; }
  .glh-badge { justify-content: center; }
  .glh-desc { margin-left: auto; margin-right: auto; }
  .glh-cta-row { justify-content: center; }

  /* at portrait aspect ratios the collage's full height (not just its
     width) has to be squeezed into frame, so there is no flat-navy
     strip left to land the crop on — every horizontal position shows
     some part of the busy collage behind the text. Compensate with a
     strong, mostly-uniform scrim rather than chasing a "clean" crop. */
  .glh-visual-frame img { object-position: 100% center; }
  .glh-visual-scrim {
    background:
      linear-gradient(180deg, rgba(3, 8, 20, .88) 0%, rgba(3, 8, 20, .8) 55%, rgba(3, 8, 20, .84) 72%, rgba(3, 8, 20, .92) 85%, var(--glh-navy-deep) 97%),
      linear-gradient(90deg, rgba(3, 8, 20, .4) 0%, transparent 45%);
  }
  .glh-stats { gap: 1.6rem 2rem; }
}

@media (max-width: 640px) {
  .glh { padding: calc(var(--nav-h) + 1.4rem) 1.15rem 10.5rem; }
  .glh-heading { font-size: clamp(2.6rem, 14vw, 3.6rem); }
  .glh-desc { max-width: none; margin-bottom: 1.3rem; }
  .glh-cta { width: 100%; justify-content: center; }
  .glh-cta-row { display: block; }
  .glh-stats { gap: 1.2rem 1.6rem; padding: .9rem 1.15rem; }
}

/* ══ ACCESSIBILITY: reduced motion ══ */
@media (prefers-reduced-motion: reduce) {
  .glh-badge, .glh-heading .line-inner, .glh-desc, .glh-cta, .glh-visual, .glh-stats {
    transition: opacity .4s ease !important; transform: none !important;
  }
  .glh-particle, .glh-sweep, .glh-loaded .glh-visual-frame img, .glh-heading .line-inner.accent, .glh-loaded .glh-visual-glow { animation: none !important; }
  .glh-particles { display: none; }
  .glh-bg, .glh-visual-frame, .glh-content { transition: none !important; }
  .glh-stat:hover { transform: none !important; }
  .glh-cta::after { display: none; }
}

/* ══ LOW-END MOBILE / LOW-POWER MODE: drop the sweep/glow repaint cost —
   neither is essential on a small or constrained screen ══ */
@media (max-width: 760px) {
  .glh-sweep, .glh-visual-glow { display: none; }
}
.low-power-mode .glh-sweep, .low-power-mode .glh-visual-glow { display: none; }
.low-power-mode .glh-particles { display: none; }
