.product-trailer {
  position: relative;
  padding: 18px;
  overflow: hidden;
  background: var(--fog);
}

.product-trailer .visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.trailer-stage {
  position: relative;
  width: min(100%, 1280px);
  aspect-ratio: 16 / 9;
  margin-inline: auto;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(0, 31, 61, .12);
  border-radius: var(--radius-xl);
  background: #f8fafb;
  box-shadow: 0 30px 90px -54px rgba(0, 31, 61, .55), 0 12px 28px -24px rgba(0, 31, 61, .34);
}

.trailer-blueprint {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .5;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 31, 61, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 31, 61, .055) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(to bottom, #000, rgba(0, 0, 0, .35) 78%, transparent);
  mask-image: linear-gradient(to bottom, #000, rgba(0, 0, 0, .35) 78%, transparent);
}

.trailer-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
}

.trailer-scene-fragments {
  opacity: 1;
  visibility: visible;
}

.trailer-scene-copy {
  position: absolute;
  top: 8.5%;
  left: 6.5%;
  z-index: 4;
  max-width: 50%;
}

.trailer-scene-copy p,
.trailer-workflow-copy > p,
.trailer-overview-panel > p,
.trailer-final-copy > p {
  margin: 0 0 9px;
  color: var(--amber-600);
  font-size: clamp(10px, 1vw, 13px);
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.trailer-scene-copy h2,
.trailer-workflow-copy h2,
.trailer-overview-panel h2 {
  margin: 0;
  color: var(--navy-950);
  font-family: var(--font-sans);
  font-size: clamp(28px, 3.2vw, 48px);
  font-weight: 760;
  letter-spacing: -.045em;
  line-height: 1.02;
  text-wrap: balance;
}

.trailer-signals {
  position: absolute;
  inset: 0;
}

.trailer-signal {
  position: absolute;
  z-index: 2;
  display: grid;
  width: clamp(210px, 22%, 284px);
  min-height: 78px;
  align-items: center;
  grid-template-columns: 42px minmax(0, 1fr) 8px;
  gap: 11px;
  padding: 13px 14px;
  border: 1px solid rgba(0, 31, 61, .11);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-card);
  transform-origin: center;
}

.trailer-signal > span:nth-child(2) {
  min-width: 0;
}

.trailer-signal strong,
.trailer-signal small {
  display: block;
}

.trailer-signal strong {
  overflow: hidden;
  color: var(--navy-950);
  font-size: clamp(11px, 1.05vw, 14px);
  font-weight: 800;
  letter-spacing: -.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trailer-signal small {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: clamp(8px, .78vw, 10px);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trailer-signal-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: var(--radius-sm);
  color: var(--navy-800);
  background: var(--blue-50);
}

.trailer-signal-icon svg {
  width: 20px;
  height: 20px;
}

.trailer-signal > i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--navy-700);
}

.trailer-signal.is-danger .trailer-signal-icon { color: var(--danger); background: #fff0ee; }
.trailer-signal.is-danger > i { background: var(--danger); }
.trailer-signal.is-warning .trailer-signal-icon { color: var(--amber-600); background: var(--amber-50); }
.trailer-signal.is-warning > i { background: var(--amber-500); }

.trailer-signal-1 { top: 28%; left: 4.5%; transform: rotate(-1.5deg); }
.trailer-signal-2 { top: 20%; right: 6%; transform: rotate(1.2deg); }
.trailer-signal-3 { top: 49%; left: 13%; transform: rotate(.9deg); }
.trailer-signal-4 { top: 43%; right: 3.5%; transform: rotate(-1deg); }
.trailer-signal-5 { bottom: 10%; left: 29%; transform: rotate(-.7deg); }
.trailer-signal-6 { right: 22%; bottom: 8%; transform: rotate(1deg); }

.trailer-connections {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.trailer-connections path {
  fill: none;
  stroke: rgba(250, 168, 15, .8);
  stroke-width: 2;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.trailer-organize-preview {
  position: absolute;
  top: 19%;
  left: 17.5%;
  width: 65%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 8px solid var(--navy-950);
  border-radius: var(--radius-lg);
  background: var(--navy-950);
  box-shadow: 0 36px 80px -46px rgba(0, 31, 61, .8);
}

.trailer-organize-preview img,
.trailer-overview-screen img,
.trailer-final-product > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}

.trailer-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  display: grid;
  width: 180px;
  min-height: 140px;
  place-items: center;
  padding: 18px;
  border: 1px solid rgba(250, 168, 15, .7);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: 0 28px 65px -38px rgba(0, 31, 61, .75);
  text-align: center;
  transform: translate(-50%, -50%);
}

.trailer-hub img { width: 50px; height: 50px; border-radius: var(--radius-sm); }
.trailer-hub strong { color: var(--navy-950); font-size: 19px; letter-spacing: -.03em; }
.trailer-hub small { color: var(--muted); font-size: 10px; font-weight: 700; }

.trailer-scene-workflow {
  display: grid;
  grid-template-columns: minmax(300px, .72fr) minmax(0, 1.28fr);
  gap: 4%;
  padding: 7% 5.8% 10%;
  background: #f8fafb;
}

.trailer-workflow-copy {
  align-self: center;
}

.trailer-workflow-copy h2 { max-width: 11ch; }

.trailer-workflow-list {
  position: relative;
  display: grid;
  gap: 5px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.trailer-workflow-step {
  display: grid;
  min-height: 58px;
  align-items: center;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 10px;
  border-left: 2px solid var(--line);
  color: var(--muted);
  opacity: .46;
  transition: color .2s ease, opacity .2s ease, border-color .2s ease, background .2s ease;
}

.trailer-workflow-step.is-active {
  border-left-color: var(--amber-500);
  color: var(--navy-950);
  opacity: 1;
  background: rgba(255, 255, 255, .82);
}

.trailer-workflow-step > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: var(--navy-950);
  background: var(--amber-100);
  font-size: 11px;
  font-weight: 900;
}

.trailer-workflow-step strong,
.trailer-workflow-step small { display: block; }
.trailer-workflow-step strong { font-size: clamp(10px, 1vw, 13px); line-height: 1.25; }
.trailer-workflow-step small { margin-top: 2px; font-size: clamp(8px, .76vw, 10px); line-height: 1.35; }

.trailer-screen-stack {
  align-self: center;
  overflow: hidden;
  border: 7px solid var(--navy-950);
  border-radius: var(--radius-lg);
  background: var(--navy-950);
  box-shadow: 0 38px 90px -50px rgba(0, 31, 61, .8);
}

.trailer-screen-bar {
  display: flex;
  height: 28px;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  color: rgba(255, 255, 255, .82);
  font-size: 8px;
}

.trailer-screen-bar i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .25); }
.trailer-screen-bar i:nth-child(2) { background: var(--amber-500); }
.trailer-screen-bar strong { margin-left: auto; font-size: 8px; }

.trailer-screen-layers {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: calc(var(--radius-lg) - 8px);
  background: var(--white);
}

.trailer-screen-layers > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}

.trailer-screen-focus {
  position: absolute;
  z-index: 5;
  border: 2px solid var(--amber-500);
  border-radius: var(--radius-sm);
  box-shadow: 0 0 0 999px rgba(0, 31, 61, .22);
  pointer-events: none;
}

.trailer-scene-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(285px, .55fr);
  gap: 2.5%;
  align-items: center;
  padding: 6% 5.8% 10%;
  background: #f8fafb;
}

.trailer-overview-screen {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 8px solid var(--navy-950);
  border-radius: var(--radius-lg);
  background: var(--navy-950);
  box-shadow: 0 38px 90px -50px rgba(0, 31, 61, .8);
}

.trailer-overview-panel h2 { font-size: clamp(25px, 2.7vw, 41px); }

.trailer-overview-panel ul {
  display: grid;
  gap: 6px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.trailer-overview-panel li {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border-bottom: 1px solid var(--line);
  color: var(--navy-950);
  font-size: clamp(9px, .9vw, 12px);
}

.trailer-overview-panel li:last-child {
  border: 1px solid rgba(250, 168, 15, .5);
  border-radius: var(--radius-sm);
  background: var(--amber-50);
}

.trailer-overview-panel li span {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  color: var(--navy-800);
  background: var(--blue-50);
}

.trailer-overview-panel li svg { width: 15px; height: 15px; }

.trailer-scene-final {
  display: grid;
  grid-template-columns: minmax(330px, .82fr) minmax(0, 1.18fr);
  gap: 5%;
  align-items: center;
  padding: 7.5% 6.5% 11%;
  background: #f8fafb;
}

.trailer-final-copy { position: relative; z-index: 2; }

.trailer-final-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(16px, 2vw, 28px);
  color: var(--navy-950);
  font-size: clamp(17px, 1.55vw, 22px);
  text-decoration: none;
}

.trailer-final-brand img { width: clamp(38px, 4vw, 52px); height: auto; border-radius: var(--radius-sm); }
.trailer-final-copy h1 {
  max-width: 12ch;
  margin: 0;
  color: var(--navy-950);
  font-family: var(--font-display);
  font-size: clamp(42px, 5vw, 72px);
  font-weight: 500;
  letter-spacing: -.052em;
  line-height: .94;
  text-wrap: balance;
}

.trailer-final-copy h1 em { color: var(--amber-600); font-weight: 500; line-height: 1.1; }
.trailer-final-subtitle { max-width: 48ch; margin-top: 18px; color: var(--muted); font-size: clamp(12px, 1.1vw, 16px); line-height: 1.55; }
.trailer-final-actions { display: flex; gap: 10px; margin-top: 24px; }
.trailer-final-actions .button { min-height: 44px; white-space: nowrap; }
.trailer-secondary-action { color: var(--navy-950); background: var(--white); box-shadow: inset 0 0 0 1px rgba(0, 31, 61, .2); }
.trailer-secondary-action svg { width: 17px; height: 17px; }

.trailer-final-product {
  overflow: hidden;
  margin: 0;
  border: 7px solid var(--navy-950);
  border-radius: var(--radius-lg);
  background: var(--navy-950);
  box-shadow: 0 38px 90px -48px rgba(0, 31, 61, .82);
  transform: rotate(.6deg);
}

.trailer-final-product-bar {
  display: flex;
  height: 28px;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  color: rgba(255, 255, 255, .8);
  font-size: 8px;
}
.trailer-final-product-bar span { width: 6px; height: 6px; border-radius: 50%; background: var(--amber-500); }
.trailer-final-product > img { aspect-ratio: 16 / 10; }

@media (min-width: 701px) {
  html[lang="en"] .trailer-scene-final {
    grid-template-columns: minmax(390px, .9fr) minmax(0, 1.1fr);
    gap: 3.5%;
    padding: 4.5% 5.5% 9%;
  }

  html[lang="en"] .trailer-final-brand {
    margin-bottom: clamp(10px, 1.2vw, 16px);
  }

  html[lang="en"] .trailer-final-copy h1 {
    max-width: 14ch;
    font-size: clamp(38px, 4.35vw, 62px);
  }

  html[lang="en"] .trailer-final-subtitle {
    margin-top: 12px;
  }

  html[lang="en"] .trailer-final-actions {
    margin-top: 16px;
  }
}

.trailer-chrome {
  position: absolute;
  right: 3.2%;
  bottom: 3.2%;
  left: 3.2%;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  pointer-events: none;
}

.trailer-progress-wrap { width: min(36%, 360px); color: var(--navy-700); }
.trailer-progress-wrap > span { display: block; margin-bottom: 7px; font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.trailer-progress { width: 100%; height: 3px; overflow: hidden; border-radius: 2px; background: rgba(0, 31, 61, .14); }
.trailer-progress i { display: block; width: 100%; height: 100%; background: var(--amber-500); transform: scaleX(0); transform-origin: left center; }

.trailer-controls { display: flex; gap: 7px; pointer-events: auto; }
.trailer-controls button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid rgba(0, 31, 61, .15);
  border-radius: 999px;
  color: var(--navy-950);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 14px 30px -24px rgba(0, 31, 61, .7);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.trailer-controls button:hover { border-color: var(--amber-500); background: var(--white); transform: translateY(-1px); }
.trailer-controls button:active { transform: scale(.98); }
.trailer-controls button:disabled { cursor: default; opacity: .5; transform: none; }

.trailer-control-pause { display: grid; width: 12px; height: 12px; grid-template-columns: repeat(2, 3px); justify-content: space-between; }
.trailer-control-pause::before, .trailer-control-pause::after { border-radius: 1px; background: currentColor; content: ""; }
.trailer-controls button.is-paused .trailer-control-pause { display: block; width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 9px solid currentColor; }
.trailer-control-replay { font-size: 18px; line-height: .6; }

.trailer-stage.is-reduced-motion .trailer-scene:not(.trailer-scene-final),
.trailer-stage.is-static-final .trailer-scene:not(.trailer-scene-final) { display: none; }
.trailer-stage.is-reduced-motion .trailer-scene-final,
.trailer-stage.is-static-final .trailer-scene-final { opacity: 1 !important; visibility: visible !important; transform: none !important; }
.trailer-stage.is-reduced-motion [data-trailer-pause],
.trailer-stage.is-static-final [data-trailer-pause] { display: none; }
.trailer-stage.is-reduced-motion .trailer-progress i,
.trailer-stage.is-static-final .trailer-progress i { transform: scaleX(1) !important; }

@media (max-width: 960px) {
  .product-trailer { padding: 12px; }
  .trailer-stage { border-radius: var(--radius-lg); }
  .trailer-scene-workflow { grid-template-columns: minmax(250px, .75fr) minmax(0, 1.25fr); padding-inline: 4.5%; }
  .trailer-scene-overview { grid-template-columns: minmax(0, 1.35fr) minmax(240px, .65fr); padding-inline: 4.5%; }
  .trailer-scene-final { grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr); padding-inline: 5%; }
  .trailer-final-copy h1 { font-size: clamp(36px, 5.6vw, 56px); }
  .trailer-signal { min-height: 68px; padding: 10px; grid-template-columns: 36px minmax(0, 1fr) 7px; }
  .trailer-signal-icon { width: 36px; height: 36px; }
}

@media (max-width: 700px) {
  .product-trailer { padding: 0; background: #f8fafb; }
  .trailer-stage {
    width: 100%;
    height: max(610px, calc(100dvh - 72px));
    min-height: 610px;
    aspect-ratio: auto;
    border-width: 0 0 1px;
    border-radius: 0;
    box-shadow: none;
  }
  .trailer-blueprint { background-size: 36px 36px; }
  .trailer-scene-copy { top: 7%; left: 6%; max-width: 88%; }
  .trailer-scene-copy h2 { max-width: 12ch; font-size: clamp(31px, 10vw, 44px); }
  .trailer-scene-copy p { max-width: 29ch; font-size: 9px; }
  .trailer-signal { width: 76%; min-height: 68px; }
  .trailer-signal-1 { top: 25%; left: 5%; }
  .trailer-signal-2 { top: 38%; right: 4%; }
  .trailer-signal-3 { top: 51%; left: 8%; }
  .trailer-signal-4 { top: 64%; right: 7%; }
  .trailer-signal-5, .trailer-signal-6 { display: none; }
  .trailer-signal strong { font-size: 12px; }
  .trailer-signal small { font-size: 9px; }
  .trailer-connections { display: none; }
  .trailer-organize-preview { top: 28%; left: 5%; width: 90%; border-width: 5px; border-radius: var(--radius-md); }
  .trailer-hub { top: 55%; width: 158px; min-height: 124px; }
  .trailer-scene-workflow {
    display: block;
    padding: 7% 5% 12%;
  }
  .trailer-workflow-copy h2 { max-width: 13ch; font-size: clamp(29px, 8.6vw, 39px); }
  .trailer-workflow-list { position: absolute; right: 5%; bottom: 12%; left: 5%; margin: 0; }
  .trailer-workflow-step { display: none; min-height: 90px; padding: 12px; border: 1px solid rgba(0, 31, 61, .1); border-left: 3px solid var(--amber-500); border-radius: var(--radius-sm); background: var(--white); }
  .trailer-workflow-step.is-active { display: grid; }
  .trailer-workflow-step strong { font-size: 13px; }
  .trailer-workflow-step small { margin-top: 4px; font-size: 10px; }
  .trailer-screen-stack { position: absolute; top: 30%; right: 5%; left: 5%; border-width: 5px; border-radius: var(--radius-md); }
  .trailer-screen-focus { border-radius: 8px; }
  .trailer-scene-overview { display: block; padding: 7% 5% 12%; }
  .trailer-overview-screen { position: absolute; top: 24%; right: -13%; width: 82%; border-width: 5px; opacity: .3; transform: rotate(1.2deg); }
  .trailer-overview-panel { position: relative; z-index: 2; }
  .trailer-overview-panel h2 { max-width: 11ch; font-size: clamp(31px, 9vw, 42px); }
  .trailer-overview-panel ul { width: 92%; margin-top: 25px; grid-template-columns: 1fr 1fr; gap: 7px; }
  .trailer-overview-panel li { min-height: 58px; padding: 9px; border: 1px solid rgba(0, 31, 61, .1); border-radius: var(--radius-sm); background: rgba(255, 255, 255, .92); font-size: 10px; line-height: 1.25; }
  .trailer-overview-panel li:last-child { grid-column: 1 / -1; }
  .trailer-scene-final { display: block; padding: 7% 5% 13%; }
  .trailer-final-brand { margin-bottom: 15px; }
  .trailer-final-copy > p { font-size: 9px; }
  .trailer-final-copy h1 { max-width: 11ch; font-size: clamp(41px, 12vw, 54px); }
  .trailer-final-subtitle { max-width: 38ch; margin-top: 14px; font-size: 12px; }
  .trailer-final-actions { margin-top: 18px; flex-direction: column; align-items: stretch; }
  .trailer-final-actions .button { width: 100%; }
  .trailer-final-product { position: absolute; right: 5%; bottom: 18%; left: 5%; height: 25%; border-width: 5px; border-radius: var(--radius-md); transform: none; }
  .trailer-final-product > img { aspect-ratio: auto; object-position: top center; }
  .trailer-chrome { right: 5%; bottom: 8%; left: 5%; align-items: center; }
  .trailer-progress-wrap { width: 42%; }
  .trailer-progress-wrap > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .trailer-controls button { width: 40px; height: 40px; min-height: 40px; justify-content: center; padding: 0; }
  .trailer-controls button > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
}

@media (max-width: 390px) {
  .trailer-final-copy h1 { font-size: 43px; }
  .trailer-final-product { height: 22%; }
  .trailer-overview-panel ul { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .trailer-stage { height: auto; min-height: 0; aspect-ratio: 16 / 9; }
  .trailer-scene-final { position: relative; min-height: 100%; }
  .trailer-controls button { transition: none; }
}

@media (max-width: 700px) and (prefers-reduced-motion: reduce) {
  .trailer-stage { height: 680px; aspect-ratio: auto; }
}
