.hero-sequence-track {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  height: calc(var(--track-vh) * 1vh);
  min-height: 380vh;
  background: #161817;
}

.hero-sequence-sticky {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100svh;
  min-height: 540px;
  overflow: hidden;
  background: #161817;
}

#sequence-canvas,
.hero-poster,
.hero-contrast {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.hero-poster {
  z-index: 0;
  object-fit: cover;
  object-position: center;
  opacity: 1;
  transition: opacity 120ms ease;
}

.hero-poster.poster-hidden { opacity: 0; }

#sequence-canvas {
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

#sequence-canvas.canvas-ready { opacity: 1; }

html[data-flicker-test="static"] #sequence-canvas,
html[data-flicker-test="static"] .hero-poster,
html[data-flicker-isolation="f0"] #sequence-canvas,
html[data-flicker-isolation="f0"] .hero-poster,
html[data-flicker-isolation="f1"] #sequence-canvas,
html[data-flicker-isolation="f1"] .hero-poster,
html[data-flicker-isolation="f2"] #sequence-canvas,
html[data-flicker-isolation="f2"] .hero-poster {
  transition: none !important;
}

html[data-flicker-isolation="f0"] .hero-copy,
html[data-flicker-isolation="f1"] .hero-copy,
html[data-flicker-isolation="f2"] .hero-copy,
html[data-flicker-test="static"] .hero-copy {
  transition: none !important;
}

.hero-contrast {
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse 38% 52% at 53% 50%, rgba(18, 20, 17, 0.12) 0%, rgba(18, 20, 17, 0.045) 44%, rgba(18, 20, 17, 0) 78%);
  opacity: 0;
}

.hero-copy {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: clamp(28px, 7vw, 124px);
  width: min(440px, calc(100% - 56px));
  color: #fff;
  transform: translateY(-46%);
  transform-origin: left center;
  will-change: opacity, transform;
}

.hero-line {
  display: block;
  margin: 0;
  overflow: visible;
  transform: none;
  filter: none;
}

.hero-eyebrow {
  margin-bottom: 18px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 620px;
  margin-bottom: 22px;
  font-family: Inter, Manrope, "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(72px, 6.3vw, 108px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.9;
  overflow: visible;
  word-break: normal;
}

.hero-copy h1 .hero-line,
.hero-primary-line {
  white-space: nowrap;
}

.hero-secondary {
  max-width: 380px;
  margin-bottom: 30px;
  font-family: Inter, Manrope, "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(25px, 2.1vw, 36px);
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.12;
}

.hero-body {
  max-width: 390px;
  margin-bottom: 30px;
  font-size: 16px;
  line-height: 1.48;
}

.hero-copy .ib-home-hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  max-width: 430px;
  margin-top: 20px;
}

.hero-copy .ib-home-hero-chips span {
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.84);
  font-size: 10px;
  line-height: 1.1;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: center;
}

.hero-sequence-track .button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.hero-sequence-track .button-primary { background: #fff; color: #1b2420; border-color: #fff; }
.hero-sequence-track .button-secondary { background: rgba(0, 0, 0, 0.06); color: #fff; }

.hero-progress {
  position: absolute;
  z-index: 4;
  right: 42px;
  bottom: 28px;
  left: 42px;
  height: 1px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.3);
}

.hero-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: #fff;
  transform-origin: left center;
}

.debug-panel {
  position: absolute;
  z-index: 8;
  top: 98px;
  right: 42px;
  width: 290px;
  padding: 14px 16px 15px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(10, 13, 12, 0.82);
  color: #edf3ef;
  font: 11px/1.35 Consolas, "SFMono-Regular", monospace;
  backdrop-filter: blur(10px);
}

.debug-heading {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  color: #9fc8b7;
  font-weight: 700;
}

.debug-panel dl { margin: 0; }
.debug-panel dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 3px 0; }
.debug-panel dt { color: rgba(237, 243, 239, 0.64); }
.debug-panel dd { margin: 0; color: #fff; text-align: right; }
.debug-status { margin-top: 11px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.15); color: #d6e8df; }

@media (max-width: 1199px) {
  .hero-progress { right: 28px; left: 28px; }
  .hero-copy h1 { font-size: 50px; }
  .debug-panel { right: 28px; }
}

html[data-hero-rc1="off"] .hero-sequence-track { display: none !important; }
html[data-hero-rc1="off"] .ib-home-hero--legacy { display: none !important; }

@media (max-width: 680px) {
  .hero-copy h1 { font-size: 42px; }
  .hero-progress { right: 20px; bottom: 18px; left: 20px; }
  .debug-panel { top: 78px; right: 20px; left: 20px; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-copy, .hero-line { transition: none !important; }
  #sequence-canvas, .hero-poster { transition: none; }
}


/* Motion controls stay inside the active viewport and never alter hero geometry. */
.installbox-motion-controls {
  position: absolute;
  z-index: 9;
  right: clamp(24px, 2.4vw, 32px);
  bottom: clamp(24px, 3.2vh, 32px);
  display: inline-flex;
  gap: 10px;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 180ms ease, transform 180ms ease;
}
.installbox-motion-controls.is-active { opacity: 1; pointer-events: auto; transform: none; }
.installbox-motion-control {
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 2px;
  background: rgba(16,24,21,.38);
  color: rgba(255,255,255,.9);
  font: 600 14px/1.1 Inter, Manrope, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: .04em;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}
.installbox-motion-control:hover,
.installbox-motion-control:focus-visible { border-color: rgba(255,255,255,.8); background: rgba(16,24,21,.64); color: #fff; }
.installbox-motion-control:focus-visible { outline: 2px solid rgba(0,186,194,.8); outline-offset: 3px; }
.installbox-motion-control:disabled { cursor: default; opacity: .55; }
.hero-sequence-track.is-motion-skipped { height: 100svh; min-height: 0; }
.hero-sequence-track.is-motion-skipped .hero-sequence-sticky,
.hero-sequence-track.is-reduced-motion .hero-sequence-sticky { position: relative; top: auto; }
.hero-sequence-track.is-reduced-motion { height: 100svh; min-height: 0; }
.hero-sequence-track.is-reduced-motion .installbox-motion-controls { display: none; }
@media (max-width: 680px) {
  .installbox-motion-controls { position: fixed; right: 16px; bottom: 16px; }
  .installbox-motion-control { min-height: 42px; padding-inline: 13px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .installbox-motion-controls { display: none; }
}
