/* RSG homepage — v4. Same graphite world as every other page (assets/rsg/dark.css
   carries the palette, the top bar, buttons, dialog and footer); this file is the
   homepage's own composition.

   Photographs are never framed here: each one is a layer of the page, held by a
   scrim that is solid behind the copy and melts into the canvas at its edges.
   Class names the scripts rely on (hp-hero, hp-hero-copy, hp-hero-visual,
   hp-gallery-*, trust, hp-tile, category-link ...) are unchanged. CSP is
   style-src 'self': no inline styles anywhere in the markup. */

.home-page {
  --hx-bg: var(--canvas);
  --hx-bg-2: var(--surface-muted);
  --hx-surface: var(--surface);
  --hx-surface-2: var(--surface-sunken);
  --hx-line: var(--hairline-soft);
  --hx-line-strong: var(--hairline);
  --hx-ink: var(--ink);
  --hx-ink-2: var(--ink-soft);
  --hx-ink-3: var(--ink-muted);
  --hx-blue: var(--brand-fill);
  --hx-blue-hover: var(--brand-hover);
  --hx-blue-press: var(--brand-strong);
  --hx-blue-hi: var(--brand);
  --hx-scrim: var(--scrim);
  --hp-dark: var(--hx-bg);
  --section-y: clamp(64px, 7.5vw, 112px);
  --hx-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 14px 32px rgba(0, 0, 0, 0.35);
}

.hp-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: end;
  gap: var(--space-6);
  margin-bottom: clamp(28px, 4vw, 48px);
}

.hp-section-head h2 {
  font-size: clamp(2rem, 1.25rem + 2.3vw, 3.125rem);
  font-weight: 680;
  letter-spacing: var(--tracking-hero);
  line-height: 1.08;
  color: #fff;
  text-wrap: balance;
}

.hp-lines .hp-section-head h2 {
  font-size: var(--text-3xl);
}

.hp-section-head p {
  max-width: 54ch;
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--hx-ink-2);
  text-wrap: pretty;
}

.hp-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

/* ------------------------------------------------------------------ hero */
/* Full-bleed photograph (the old promo <figure>, kept so the GSAP entrance and
   parallax in motion.js still run). The figure is oversized on every side so
   the entrance scale and parallax shift never expose the background. */

.hp-hero {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  height: clamp(560px, calc(100svh - var(--topbar-h) - 56px), 860px);
  padding: clamp(24px, 4.5vh, 56px) 0 clamp(88px, 12vh, 120px);
  background: var(--hx-bg);
  color: var(--hx-ink);
  overflow: hidden;
  isolation: isolate;
}

.hp-hero-visual {
  position: absolute;
  inset: -10% -3%;
  z-index: 0;
  margin: 0;
}

.hp-hero-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 50%;
}

/* The scrim is part of the picture: solid enough behind the copy that the lead
   paragraph clears 7:1, open on the photograph side, and melting into the page
   at the bottom so the facts row below sits on plain canvas. */
.hp-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(var(--hx-scrim), 0.95) 0%, rgba(var(--hx-scrim), 0.88) 34%, rgba(var(--hx-scrim), 0.5) 58%, rgba(var(--hx-scrim), 0.12) 100%),
    linear-gradient(180deg, rgba(var(--hx-scrim), 0.72) 0%, transparent 24%, transparent 60%, var(--hx-bg) 100%);
}

.hp-hero-copy {
  position: relative;
  z-index: 3;
  width: min(100% - (var(--gutter) * 2), var(--measure-wide));
  margin-inline: auto;
  text-align: left;
}

.hp-hero h1 {
  max-width: 13em;
  font-size: clamp(2.3rem, min(5vw, 8.2vh), 4.6rem);
  font-weight: 700;
  letter-spacing: -0.038em;
  line-height: 1.04;
  color: #fff;
  text-wrap: balance;
}

.hp-hero h1 .hero-title-line {
  display: block;
}

.hp-hero h1 em {
  font-style: normal;
  font-weight: 700;
  color: #fff;
}

.hp-hero .lead {
  max-width: 50ch;
  margin: clamp(16px, 2.4vh, 26px) 0 0;
  font-size: clamp(1.0625rem, 0.95rem + 0.4vw, 1.25rem);
  line-height: 1.55;
  color: var(--hx-ink-2);
  text-wrap: pretty;
}

.hp-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-top: clamp(24px, 4vh, 40px);
}

.hp-search {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: min(100%, 460px);
  padding: 5px;
  border-radius: var(--radius-pill);
  background: var(--hx-surface);
  box-shadow: inset 0 0 0 1px var(--hx-line-strong);
  transition: box-shadow var(--dur-base) var(--ease-out);
}

.hp-search:focus-within {
  box-shadow: inset 0 0 0 1px var(--hx-blue-hi), 0 0 0 3px rgba(131, 196, 255, 0.25);
}

.hp-search > span[aria-hidden] {
  padding-inline-start: var(--space-3);
  font-size: 16px;
  color: var(--hx-ink-3);
}

.hp-search input {
  flex: 1 1 auto;
  min-width: 0;
  height: 42px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: var(--text-base);
}

.hp-search input::placeholder {
  color: var(--hx-ink-3);
}

.hp-search input:focus {
  outline: none;
}

.hp-search button {
  flex: 0 0 auto;
  height: 42px;
  padding-inline: var(--space-5);
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--hx-ink);
  color: var(--hx-bg);
  font-size: var(--text-sm);
  font-weight: 650;
  transition: background var(--dur-fast) var(--ease-soft);
}

.hp-search button:hover {
  background: #fff;
}

.hp-hero-quote {
  min-height: 52px;
  padding-inline: var(--space-6);
}

/* Straight to a product line: the two things we make, one tap each. The small
   round photographs are real catalogue shots. */
.hx-quick {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.hx-quick-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 48px;
  padding: 5px var(--space-5) 5px 5px;
  border-radius: var(--radius-pill);
  background: rgba(var(--hx-scrim), 0.72);
  box-shadow: inset 0 0 0 1px var(--hx-line-strong);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--hx-ink);
  transition: background var(--dur-fast) var(--ease-soft), box-shadow var(--dur-fast) var(--ease-soft);
}

.hx-quick-link--text {
  padding-inline-start: var(--space-5);
}

.hx-quick-link:hover {
  background: var(--hx-surface-2);
  box-shadow: inset 0 0 0 1px var(--hx-blue-hi);
}

.hx-quick-img {
  display: block;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  overflow: hidden;
}

.hx-quick-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hx-quick-link i {
  font-style: normal;
  color: var(--hx-blue-hi);
  transition: transform var(--dur-base) var(--ease-out);
}

.hx-quick-link:hover i {
  transform: translateX(3px);
}

/* Credit line for the stock photography: plain text, top-right of the hero. */
.hx-hero-tag {
  position: absolute;
  z-index: 3;
  top: var(--space-4);
  right: var(--gutter);
  max-width: 30ch;
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: right;
  color: var(--hx-ink-2);
}

/* Functional jump link from the original page, kept as a quiet text control. */
.hp-hero .home-scroll-nav {
  position: absolute;
  z-index: 3;
  right: var(--gutter);
  bottom: clamp(76px, 11vh, 108px);
  margin: 0;
  padding: var(--space-2) 0;
  background: none;
  box-shadow: none;
  border-radius: 0;
  color: var(--hx-ink-2);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0;
  text-decoration: underline;
  text-decoration-color: var(--hx-line-strong);
  text-underline-offset: 6px;
}

.hp-hero .home-scroll-nav:hover {
  color: #fff;
  text-decoration-color: #fff;
}

/* ------------------------------------------------------------ facts row */
/* A plain row under the photograph: one hairline above, no box. site-49.js
   rewrites the first <span> with the live catalog count, so keep plain spans. */

.trust {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(100% - (var(--gutter) * 2), var(--measure-wide));
  margin: calc(-1 * clamp(56px, 8vh, 80px)) auto 0;
  border-top: 1px solid var(--hx-line-strong);
}

.trust > span {
  display: grid;
  gap: 4px;
  padding: var(--space-5) var(--space-5) 0 0;
  text-align: left;
}

.trust > span + span {
  padding-left: var(--space-5);
  border-left: 1px solid var(--hx-line);
}

.trust b {
  font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.125rem);
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.trust small {
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--hx-ink-3);
}

/* ------------------------------------------------------- product range */
/* Our own studio photograph of the range, used as a stage rather than a picture
   in a frame: it runs edge to edge, its backdrop is masked away on every side so
   the parts stand on the page itself, and the heading and the closing line overlap
   the photograph's empty top band and its reflective floor. Three plain labels
   name what is on the table. The navy light of the original shot is continued by
   a wash behind the picture so it never ends at an edge. */

.hx-stage {
  position: relative;
  padding-block: clamp(72px, 9vw, 128px) clamp(40px, 5vw, 72px);
  overflow: hidden;
  isolation: isolate;
}

.hx-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(52% 60% at 82% 56%, rgba(14, 52, 112, 0.5), transparent 72%),
    radial-gradient(40% 46% at 22% 62%, rgba(40, 48, 62, 0.4), transparent 74%);
  pointer-events: none;
}

.hx-stage .hp-section-head {
  position: relative;
  z-index: 2;
  margin-bottom: 0;
}

.hx-stage .hp-section-head h2 {
  max-width: 11em;
  font-size: var(--text-3xl);
}

.hx-stage-photo {
  position: relative;
  z-index: 1;
  width: min(100%, 1680px);
  margin: calc(-1 * clamp(40px, 7.5vw, 120px)) auto 0;
}

.hx-stage-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 20%, #000 76%, transparent 100%), linear-gradient(90deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 20%, #000 76%, transparent 100%), linear-gradient(90deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

/* Labels: a dot on the part, a hairline leader, the name at its end. */
.hx-spots {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hx-spot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 0;
  height: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: #fff;
  white-space: nowrap;
}

.hx-spot::before {
  content: "";
  position: absolute;
  left: -5px;
  top: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 5px rgba(140, 198, 255, 0.28), 0 2px 8px rgba(0, 0, 0, 0.6);
}

.hx-spot::after {
  content: "";
  position: absolute;
  left: 0;
  width: 1px;
  height: var(--lead);
  background: linear-gradient(var(--hx-ink-2), rgba(201, 205, 210, 0.3));
}

.hx-spot > span {
  position: absolute;
  left: 0;
  padding: 0 0 0 var(--space-3);
  line-height: 1.2;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.9);
}

.hx-spot--up::after {
  bottom: 9px;
}

.hx-spot--up > span {
  bottom: calc(var(--lead) - 2px);
}

.hx-spot--down::after {
  top: 9px;
  background: linear-gradient(rgba(201, 205, 210, 0.3), var(--hx-ink-2));
}

.hx-spot--down > span {
  top: calc(var(--lead) - 2px);
}

.hx-spot--end > span {
  left: auto;
  right: 0;
  padding: 0 var(--space-3) 0 0;
}

.hx-spot--housings {
  --x: 16.6%;
  --y: 42.5%;
  --lead: clamp(80px, 13vw, 220px);
}

.hx-spot--thermostats {
  --x: 32.5%;
  --y: 73.5%;
  --lead: clamp(40px, 4.6vw, 76px);
}

.hx-spot--cooling {
  --x: 86%;
  --y: 44%;
  --lead: clamp(56px, 7.4vw, 118px);
}

.hx-stage-foot {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4) var(--space-6);
  margin-top: calc(-1 * clamp(8px, 3.4vw, 56px));
}

.hx-stage-foot p {
  max-width: 46ch;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--hx-ink-2);
}

.hx-stage-foot .btn {
  min-height: 52px;
  padding-inline: var(--space-6);
}

/* The table lights up as it scrolls into view, then the labels arrive. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .hx-stage-img {
      animation: hx-stage-light linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 42%;
    }
    .hx-stage-photo {
      view-timeline-name: --hx-stage;
    }
    .hx-spot {
      animation: hx-spot-in linear both;
      animation-timeline: --hx-stage;
      animation-range: cover 34% cover 44%;
    }
    .hx-spot--thermostats {
      animation-range: cover 38% cover 48%;
    }
    .hx-spot--cooling {
      animation-range: cover 42% cover 52%;
    }
    @keyframes hx-stage-light {
      from {
        filter: brightness(0.28) saturate(0.5);
        transform: scale(1.045);
      }
    }
    @keyframes hx-spot-in {
      from {
        opacity: 0;
        translate: 0 10px;
      }
    }
  }
}

/* ---------------------------------------------------------- product lines */

.hp-lines {
  padding-block: clamp(56px, 9vw, 104px) var(--section-y);
}

/* Each line is a band, not a card: its photograph runs to the edge of the window
   on one side and dissolves into the page toward the copy on the other. A coolant
   temperature gauge for the thermostat, a tachometer at idle for the idle valve. */

.hp-lines {
  overflow-x: clip;
}

.hx-line-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.hx-line {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  min-height: clamp(500px, 42vw, 640px);
  isolation: isolate;
}

.hx-line + .hx-line {
  border-top: 1px solid var(--hx-line);
}

.hx-line-bg {
  position: absolute;
  inset-block: 0;
  left: calc(50% - 50vw);
  z-index: -2;
  width: 58vw;
  max-width: none;
  height: 100%;
  object-fit: cover;
  object-position: 34% 50%;
  -webkit-mask-image: linear-gradient(90deg, #000 38%, transparent 96%), linear-gradient(180deg, transparent 0%, #000 16%, #000 84%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 38%, transparent 96%), linear-gradient(180deg, transparent 0%, #000 16%, #000 84%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
  transition: transform 1.4s var(--ease-expo), filter 0.6s var(--ease-soft);
}

.hx-line:nth-child(2) .hx-line-bg {
  left: auto;
  right: calc(50% - 50vw);
  object-position: 46% 50%;
  -webkit-mask-image: linear-gradient(270deg, #000 38%, transparent 96%), linear-gradient(180deg, transparent 0%, #000 16%, #000 84%, transparent 100%);
  mask-image: linear-gradient(270deg, #000 38%, transparent 96%), linear-gradient(180deg, transparent 0%, #000 16%, #000 84%, transparent 100%);
}

.hx-line:hover .hx-line-bg {
  transform: scale(1.03);
  filter: brightness(1.12);
}

.hx-line-body {
  grid-column: 2;
  display: grid;
  gap: var(--space-5);
  padding-block: clamp(40px, 5vw, 72px);
  padding-inline-start: clamp(24px, 4vw, 64px);
}

.hx-line:nth-child(2) .hx-line-body {
  grid-column: 1;
  grid-row: 1;
  padding-inline: 0 clamp(24px, 4vw, 64px);
}

.hp-line-head {
  display: grid;
  gap: var(--space-4);
}

.hp-line-title h3 {
  font-size: clamp(1.875rem, 1.2rem + 2.2vw, 2.875rem);
  font-weight: 680;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: #fff;
  text-wrap: balance;
}

.hx-line-does {
  max-width: 34ch;
  margin-top: calc(-1 * var(--space-2));
  font-size: var(--text-lg);
  line-height: 1.45;
  color: var(--hx-ink-2);
  text-wrap: pretty;
}

.hp-line-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-7);
  margin: 0;
}

.hp-line-meta > div {
  display: grid;
  gap: 2px;
}

.hp-line-meta dt {
  font-size: 0.875rem;
  color: var(--hx-ink-3);
}

.hp-line-meta dd {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 620;
  color: #fff;
  white-space: nowrap;
}

.hp-line-meta dd small {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--hx-ink-2);
}

.hx-line-foot {
  display: grid;
  gap: var(--space-4);
  padding-top: var(--space-5);
  border-top: 1px solid var(--hx-line);
}

.hx-skus-label {
  font-size: 0.875rem;
  color: var(--hx-ink-3);
}

/* Real product photographs: white-backdrop catalogue shots as small swatches. */
.hx-skus {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: calc(-1 * var(--space-2));
}

.hx-sku {
  display: grid;
  gap: 6px;
  justify-items: center;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 550;
  color: var(--hx-ink-2);
  font-variant-numeric: tabular-nums;
  transition: color var(--dur-fast) var(--ease-soft);
}

.hx-sku-img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  background: #fff;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--hx-line-strong);
  transition: box-shadow var(--dur-fast) var(--ease-soft), transform var(--dur-base) var(--ease-out);
}

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

.hx-sku:hover {
  color: #fff;
}

.hx-sku:hover .hx-sku-img {
  box-shadow: 0 0 0 2px var(--hx-blue-hi);
  transform: translateY(-2px);
}

/* The category link's ::after stretches over the whole card. */
.hp-line-link {
  justify-self: start;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-pill);
  background: var(--hx-blue);
  font-size: var(--text-sm);
  font-weight: 650;
  color: #fff;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transition: background var(--dur-fast) var(--ease-soft);
}

.hp-line-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hx-line:hover .hp-line-link,
.hp-line-link:focus-visible {
  background: var(--hx-blue-hover);
}

.hp-sourcing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  margin-top: var(--space-4);
  padding: clamp(22px, 2.8vw, 36px);
  border-radius: var(--radius-lg);
  background: var(--hx-surface);
  box-shadow: inset 0 0 0 1px var(--hx-line);
}

.hp-sourcing h3 {
  font-size: var(--text-xl);
  font-weight: 650;
  color: #fff;
  text-wrap: balance;
}

.hp-sourcing p {
  max-width: 66ch;
  margin-top: var(--space-3);
  line-height: 1.65;
  color: var(--hx-ink-2);
  text-wrap: pretty;
}

/* ------------------------------------------------------- road statement */
/* Full-bleed aerial photograph in graphite; the image is taller than the band
   and drifts with scroll where the browser supports scroll-driven animation.
   The copy sits on the solid part of the scrim. */

.hx-road {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(460px, 62vh, 700px);
  padding-block: var(--space-9);
  overflow: hidden;
  isolation: isolate;
}

.hx-road-bg {
  position: absolute;
  inset: -12% 0;
  z-index: -2;
  width: 100%;
  height: 124%;
  object-fit: cover;
  object-position: 50% 50%;
  transform: scaleX(-1);
}

.hx-road::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(var(--hx-scrim), 0.96) 0%, rgba(var(--hx-scrim), 0.84) 34%, rgba(var(--hx-scrim), 0.3) 62%, rgba(var(--hx-scrim), 0.1) 100%),
    linear-gradient(180deg, var(--hx-bg) 0%, transparent 18%, transparent 78%, var(--hx-bg) 100%);
}

.hx-road-inner {
  display: grid;
  gap: var(--space-4);
  justify-items: start;
}

.hx-road-inner h2 {
  max-width: 13em;
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: var(--tracking-hero);
  line-height: 1.06;
  color: #fff;
  text-wrap: balance;
}

.hx-road-body {
  max-width: 50ch;
  font-size: var(--text-lg);
  line-height: 1.6;
  color: var(--hx-ink-2);
  text-wrap: pretty;
}

.hx-image-note {
  max-width: 50ch;
  margin-top: var(--space-4);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--hx-ink-3);
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .hx-road-bg {
      animation: hx-drift linear both;
      animation-timeline: view();
    }
    @keyframes hx-drift {
      from { transform: scaleX(-1) translateY(-5%); }
      to { transform: scaleX(-1) translateY(5%); }
    }
  }
}

/* ----------------------------------------------------------- facts bento */

.hp-facts {
  padding-block: var(--section-y);
}

.hp-bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-4);
}

.hp-tile {
  position: relative;
  display: grid;
  align-content: end;
  gap: var(--space-2);
  min-height: 188px;
  padding: var(--space-6);
  border-radius: var(--radius-md);
  background: var(--hx-surface);
  box-shadow: 0 0 0 1px var(--hx-line);
  overflow: hidden;
}

.hp-tile b {
  font-size: clamp(2rem, 1.2rem + 2.6vw, 3.25rem);
  font-weight: 680;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #fff;
}

.hp-tile b[data-count-to] {
  font-variant-numeric: tabular-nums;
}

.hp-tile span {
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--hx-ink-2);
}

.hp-tile--wide,
.hp-tile--photo {
  grid-column: span 3;
}

.hp-tile--third {
  grid-column: span 2;
}

a.hp-tile {
  color: inherit;
  text-decoration: none;
  transition: box-shadow var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
}

a.hp-tile:hover {
  background: var(--hx-surface-2);
  box-shadow: 0 0 0 1px var(--hx-line-strong), var(--hx-shadow);
}

/* The one saturated block on the page: the headline capacity figure. */
.hp-tile--brand {
  background: var(--hx-blue);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.hp-tile--brand span {
  color: #fff;
}

.hp-tile--accent {
  background: var(--hx-surface-2);
  box-shadow: 0 0 0 1px var(--hx-line-strong);
}

.hp-tile--photo {
  min-height: 260px;
  padding: 0;
}

.hp-tile--photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* -------------------------------------------------------- factory gallery */
/* Real factory photographs. The pinned gallery must fit inside one screen. */

.hp-gallery {
  padding-block: clamp(56px, 9vh, 104px) clamp(36px, 6vh, 64px);
  background: var(--hx-bg-2);
  border-block: 1px solid var(--hx-line);
  color: var(--hx-ink);
}

.hp-gallery .hp-section-head {
  margin-bottom: clamp(24px, 4vh, 40px);
}

.hp-gallery-viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.hp-gallery-viewport::-webkit-scrollbar {
  display: none;
}

.hp-gallery-track {
  display: flex;
  gap: var(--space-3);
  padding-inline: var(--gutter);
  width: max-content;
  will-change: transform;
}

.hp-shot {
  --shot-h: clamp(200px, 36vh, 380px);
  position: relative;
  flex: 0 0 auto;
  height: var(--shot-h);
  aspect-ratio: 4 / 3;
  scroll-snap-align: start;
  border-radius: var(--radius-md);
  box-shadow: 0 0 0 1px var(--hx-line);
  overflow: hidden;
  background: var(--hx-bg);
}

.hp-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}

.hp-shot:hover img {
  transform: scale(1.04);
}

.hp-shot figcaption {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  padding: var(--space-7) var(--space-4) var(--space-3);
  background: linear-gradient(transparent, rgba(var(--hx-scrim), 0.92));
  font-size: 0.9375rem;
  font-weight: 500;
  color: #fff;
}

.hp-gallery-foot {
  display: flex;
  justify-content: center;
  padding: clamp(20px, 3vh, 32px) var(--gutter) 0;
}

.hp-gallery-foot a {
  padding-bottom: 2px;
  border-bottom: 1px solid var(--hx-line-strong);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--hx-blue-hi);
  transition: color var(--dur-fast) var(--ease-soft), border-color var(--dur-fast) var(--ease-soft);
}

.hp-gallery-foot a:hover {
  color: #fff;
  border-color: #fff;
}

/* ------------------------------------------------------------- OEM steps */

.hp-oem {
  padding-block: var(--section-y);
}

.hp-oem-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
}

.hp-oem-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: var(--space-3);
  padding: var(--space-6);
  border-radius: var(--radius-md);
  background: var(--hx-surface);
  box-shadow: 0 0 0 1px var(--hx-line);
  overflow: hidden;
  transition: box-shadow var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
}

.hp-oem-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(240px circle at var(--spot-x, 50%) var(--spot-y, 0%), rgba(255, 255, 255, 0.05), transparent 60%);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-soft);
}

.hp-oem-card:hover {
  background: var(--hx-surface-2);
  box-shadow: 0 0 0 1px var(--hx-line-strong);
}

.hp-oem-card:hover::after {
  opacity: 1;
}

.hp-oem-card h3 {
  font-size: var(--text-lg);
  font-weight: 650;
  color: #fff;
}

.hp-oem-card p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--hx-ink-2);
}

/* ------------------------------------------------------------ resources */

.hp-resources {
  padding-block: 0 var(--section-y);
}

.hp-resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}

.hp-resource-grid a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: space-between;
  gap: var(--space-6);
  min-height: 172px;
  padding: var(--space-6);
  border-radius: var(--radius-md);
  background: var(--hx-surface);
  box-shadow: 0 0 0 1px var(--hx-line);
  transition: box-shadow var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
}

.hp-resource-grid a:hover {
  background: var(--hx-surface-2);
  box-shadow: 0 0 0 1px var(--hx-line-strong);
}

.hp-resource-grid h3 {
  font-size: var(--text-lg);
  font-weight: 650;
  color: #fff;
}

.hp-resource-grid a > div > span {
  display: block;
  margin-top: var(--space-2);
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--hx-ink-2);
}

.hp-resource-grid a > span[aria-hidden] {
  align-self: end;
  font-size: 22px;
  color: var(--hx-blue-hi);
  transition: transform var(--dur-base) var(--ease-out);
}

.hp-resource-grid a:hover > span[aria-hidden] {
  transform: translate(3px, -3px);
}

/* -------------------------------------------------------------- contact */

.hp-contact {
  position: relative;
  padding-block: var(--section-y);
  color: var(--hx-ink);
  overflow: hidden;
  isolation: isolate;
}

.hx-contact-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 62%;
}

.hp-contact::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(var(--hx-scrim), 0.94) 0%, rgba(var(--hx-scrim), 0.74) 46%, rgba(var(--hx-scrim), 0.5) 100%),
    linear-gradient(180deg, var(--hx-bg) 0%, transparent 25%, transparent 80%, var(--hx-bg) 100%);
}

.hp-contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(32px, 6vw, 88px);
}

.hp-contact h2 {
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: var(--tracking-hero);
  line-height: 1.08;
  color: #fff;
  text-wrap: balance;
}

.hp-contact .hp-contact-note {
  margin-top: var(--space-4);
  color: var(--hx-ink-2);
}

.hp-contact-list {
  display: grid;
  gap: var(--space-3);
  align-content: start;
  font-size: var(--text-base);
}

.hp-contact-list a,
.hp-contact-list span {
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--hx-line-strong);
  color: var(--hx-ink);
  overflow-wrap: anywhere;
}

.hp-contact-list a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.hp-contact-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 960px) {
  .hp-section-head,
  .hp-contact-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-4);
  }
  .hp-hero {
    height: auto;
    min-height: 620px;
    padding-top: var(--space-8);
  }
  .hp-hero::after {
    background:
      linear-gradient(90deg, rgba(var(--hx-scrim), 0.88) 0%, rgba(var(--hx-scrim), 0.58) 100%),
      linear-gradient(180deg, rgba(var(--hx-scrim), 0.4) 0%, transparent 24%, transparent 52%, var(--hx-bg) 100%);
  }
  .hx-hero-tag,
  .hp-hero .home-scroll-nav {
    display: none;
  }
  /* Stage on a phone: a taller crop of the table, and the three labels become
     a plain list under it. */
  .hx-stage-photo {
    margin-top: calc(-1 * var(--space-4));
  }
  .hx-stage-img {
    aspect-ratio: 5 / 4;
    object-position: 44% 50%;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 16%, #000 80%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 16%, #000 80%, transparent 100%);
  }
  .hx-spots {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-5);
    width: min(100% - (var(--gutter) * 2), var(--measure-wide));
    margin: calc(-1 * var(--space-5)) auto 0;
  }
  .hx-spot {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    height: auto;
    padding-inline-start: 18px;
    animation: none;
  }
  .hx-spot::before {
    left: 0;
    top: 50%;
    width: 8px;
    height: 8px;
    margin-top: -4px;
    box-shadow: 0 0 0 3px rgba(140, 198, 255, 0.28);
  }
  .hx-spot::after {
    display: none;
  }
  .hx-spot > span,
  .hx-spot--end > span {
    position: static;
    padding: 0;
  }
  .hx-stage-foot {
    margin-top: var(--space-6);
  }
  .trust {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .trust > span:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }
  .trust > span:nth-child(n + 3) {
    margin-top: var(--space-5);
    border-top: 1px solid var(--hx-line);
  }
  /* Stacked bands: the picture on top, fading into the copy. */
  .hx-line,
  .hx-line:nth-child(2) {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    min-height: 0;
  }
  .hx-line-bg,
  .hx-line:nth-child(2) .hx-line-bg {
    inset-block: 0 auto;
    left: calc(50% - 50vw);
    right: auto;
    width: 100vw;
    height: clamp(240px, 62vw, 400px);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 52%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 52%, transparent 100%);
  }
  .hx-line-body,
  .hx-line:nth-child(2) .hx-line-body {
    grid-column: 1;
    padding: clamp(204px, 56vw, 340px) 0 var(--space-7);
  }
  .hp-sourcing {
    flex-direction: column;
    align-items: flex-start;
  }
  .hp-bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hp-tile--wide,
  .hp-tile--third,
  .hp-tile--photo {
    grid-column: span 2;
  }
  .hp-oem-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hp-resource-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hx-road::before {
    background:
      linear-gradient(90deg, rgba(var(--hx-scrim), 0.9) 0%, rgba(var(--hx-scrim), 0.66) 100%),
      linear-gradient(180deg, var(--hx-bg) 0%, transparent 18%, transparent 78%, var(--hx-bg) 100%);
  }
}

@media (max-width: 620px) {
  .hp-hero h1 {
    font-size: clamp(2.1rem, 9.4vw, 2.7rem);
  }
  .hp-search,
  .hp-hero-quote {
    width: 100%;
  }
  /* Give the placeholder ("Search SHENGGUANG SKU") room on a 360-390px screen. */
  .hp-search > span[aria-hidden] {
    display: none;
  }
  .hp-search input {
    padding-inline-start: var(--space-4);
  }
  .hp-oem-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hp-shot {
    --shot-h: 58vw;
  }
  .hx-skus {
    gap: var(--space-2);
  }
  .hp-line-link {
    justify-self: stretch;
    text-align: center;
  }
  .hx-quick-link {
    flex: 1 1 100%;
  }
  .hx-quick-link span:not(.hx-quick-img) {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hx-line,
  .hx-line-bg,
  .hx-sku-img,
  .hp-oem-card,
  .hp-resource-grid a,
  a.hp-tile {
    transition: none;
  }
}

/* ------------------------------------------------------------ CJK tuning */
/* The accent half of the headline reads best on its own line in Chinese. */

:lang(zh-CN) .hp-hero h1 .hero-title-line--accent {
  display: block;
}

:lang(zh-CN) .hp-hero h1 {
  max-width: 16em;
  letter-spacing: -0.02em;
}

:lang(zh-CN) .hp-section-head p,
:lang(zh-CN) .hx-road-body,
:lang(zh-CN) .hp-sourcing p {
  line-height: 1.75;
}
