/* Photographic storytelling and the layered product hero. */
.product-hero {
  --hero-ivory: #f8f6f1;
  --hero-mint: #d9eeeb;
  background: radial-gradient(ellipse at 77% 36%, #dfeeea 0%, transparent 60%),
    linear-gradient(125deg, var(--hero-ivory) 5%, #f8fafb 80%);
}
.product-hero::before {
  inset: 0 0 0 42%;
  background-image: repeating-linear-gradient(120deg, #345d6114 0 1px, transparent 1px 14px);
  mask-image: linear-gradient(90deg, transparent 2%, #000 58%, transparent 100%);
}
:root[data-theme=dark] .product-hero {
  background: radial-gradient(ellipse at 80% 35%, #173f44, transparent 64%), linear-gradient(115deg, #0b1c2b, #142a3f);
}
:root[data-theme=dark] .product-hero::before {
  background-image: repeating-linear-gradient(120deg, #b2e4d922 0 1px, transparent 1px 14px);
}
.product-hero .hero-grid {
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
  padding-block: clamp(2.45rem, 4.1vw, 4.6rem) clamp(2.4rem, 4vw, 4.5rem);
  gap: clamp(1.8rem, 4vw, 4rem);
}
.product-hero-copy { align-self: start; padding-top: clamp(2.75rem, 7.3vw, 6.75rem); }
.product-hero h1 { text-wrap: balance; }
.product-hero h1 em { text-wrap: balance; }
.product-hero-copy .eyebrow { padding-left: .62rem; border-left: 2px solid var(--teal); }
.product-hero-copy .eyebrow span { display: none; }
.product-hero .actions .primary { box-shadow: 0 8px 18px #005c5124; }
.product-hero-media {
  min-width: 0;
  display: grid;
  align-items: end;
  position: relative;
  isolation: isolate;
  padding-bottom: .85rem;
}
.product-hero-media > :is(.product-hero-photo,.product-preview) { grid-area: 1/1; }
.product-hero-photo {
  position: relative;
  align-self: stretch;
  z-index: -1;
  margin: 0 0 2.25rem 4.5rem;
  overflow: hidden;
  border: 1px solid #00474b33;
  border-radius: 22px;
  background: var(--hero-mint);
  box-shadow: 0 18px 45px #173b4b26;
}
.product-hero-photo img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% 46%;
}
.product-hero-media .product-preview {
  width: auto;
  min-width: 0;
  max-width: none;
  margin: clamp(6.2rem, 10vw, 9.3rem) clamp(3.4rem, 6.5vw, 6.5rem) 0 0;
  align-self: end;
  box-shadow: 0 23px 47px #0a304b2f, 0 4px 14px #113b4b16;
  border-color: #b3cdd3;
}
:root[data-theme=dark] .product-hero-media .product-preview { border-color: #4e6a7c; }
.product-hero-media .product-preview-main { padding: clamp(.7rem, 1.6vw, 1.2rem); }
.product-hero-media .product-preview-bar { min-height: 42px; }
.product-hero-media .product-metrics dd { line-height: 1; }
.product-hero-media .product-metrics div { padding-block: .58rem; }
.product-hero-media .product-preview-inner { grid-template-columns: 43px minmax(0,1fr); }
.product-hero-media .product-rail img { width: 28px; height: 28px; }
.product-hero-media .product-rail span { width: 29px; height: 29px; }
.hero-label-card {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  position: absolute;
  right: .8rem;
  top: clamp(1.6rem, 4vw, 3.8rem);
  max-width: calc(100% - 1.6rem);
  padding: .44rem .61rem .44rem .44rem;
  border: 1px solid #b8d3d7;
  border-radius: 12px;
  color: #15344b;
  background: #fff;
  text-decoration: none;
  box-shadow: 0 12px 27px #112b434a;
}
.hero-label-card:hover { border-color: #00786e; box-shadow: 0 12px 27px #112b4370; }
.hero-label-card img { display: block; width: 47px; height: 47px; flex: none; }
.hero-label-card span { display: grid; min-width: 0; gap: .17rem; }
.hero-label-card small { color: #486581; font-size: .69rem; }
.hero-label-card strong { font-size: .80rem; white-space: nowrap; }
.hero-label-card svg { width: 16px; height: 16px; color: #006b62; }

.product-feature--crm { background: linear-gradient(150deg, var(--paper) 50%, var(--surface-tint)); }
.product-feature--qr { background: linear-gradient(155deg, var(--paper) 38%, var(--soft)); }
.product-feature--qr .mini-label { border-style: dashed; border-color: var(--control-line); }
.product-feature--qr .mini-label img { width: 53px; height: 53px; }

.product-process {
  background: linear-gradient(152deg, var(--surface-tint) 20%, var(--bg) 70%);
}
.product-stage-panel {
  grid-template-columns: 1.18fr 1fr;
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.product-stage-visual {
  min-width: 0;
  min-height: 15rem;
  margin: 0;
  position: relative;
  background: var(--soft);
}
.product-stage-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 48%;
}
.product-stage-panel[data-product-stage-panel="label"] .product-stage-visual img { object-position: center 44%; }
.product-stage-panel[data-product-stage-panel="deliver"] .product-stage-visual img { object-position: center 58%; }
.product-stage-info {
  align-self: center;
  min-width: 0;
  padding: clamp(1.05rem, 3vw, 2.5rem);
  display: grid;
  gap: 1rem;
}
.product-stage-info .product-text-link { justify-self: start; }
.product-stage-info .product-stage-example { background: var(--surface-tint); }

@media (min-width: 1050px) {
  .product-hero-media .product-preview { transform: translateY(5px); }
  .product-hero-media .product-orders :is(td,th) { padding-inline: .61rem; }
}
@media (max-width: 980px) {
  .product-hero .hero-grid { gap: 1.55rem; }
  .product-hero-media .product-preview { margin-right: 1.6rem; }
  .product-hero-photo { margin-left: 2.65rem; }
}
@media (max-width: 800px) {
  .product-hero .hero-grid { grid-template-columns: 1fr; padding-block: 2.05rem 2.45rem; }
  .product-hero-copy { padding-top: 0; }
  .product-hero-media { width: min(100%, 670px); }
  .product-hero-media .product-preview { margin-right: clamp(1.1rem, 7vw, 5rem); }
}
@media (max-width: 560px) {
  .product-hero .hero-grid { gap: .6rem; padding-block: 1.4rem 1.55rem; }
  .product-hero .eyebrow { margin-bottom: .55rem; }
  .product-hero .actions { margin-top: .88rem; }
  .product-hero h1 { margin-bottom: .6rem; }
  .product-hero .lead { line-height: 1.43; }
  .product-hero h1 { text-wrap: initial; font-size: clamp(2.28rem, 10.35vw, 3rem); }
  .product-hero h1 em { text-wrap: initial; }
  .product-hero-photo { margin: 0 0 1.5rem 1.5rem; border-radius: 17px; }
  .product-hero-media { padding-bottom: 0; }
  .product-hero-media .product-preview {
    margin: 3.85rem .65rem 0 0;
    width: auto;
    border-radius: 14px;
  }
  .product-hero-media .product-preview-inner { grid-template-columns: 1fr; }
  .product-hero-media .product-preview-main { padding: .68rem; }
  .product-hero-media .product-preview-bar { display: none; }
  .product-hero-media .product-metrics { display: none; }
  .product-hero-media .product-orders tbody tr:not(.product-selected-order) { display: none; }
  .product-hero-media .product-orders-title { padding-block: .4rem; }
  .product-hero-media .product-orders-title > span,
  .product-hero-media .product-orders table,
  .product-hero-media .product-orders .sample-pill { font-size: .8125rem; }
  .product-hero-media .product-orders :is(td,th) { padding-block: .34rem; }
  .hero-label-card { top: .38rem; right: .45rem; padding: .3rem .43rem .3rem .3rem; }
  .hero-label-card img { width: 38px; height: 38px; }
  .hero-label-card svg { width: 13px; height: 13px; }
  .hero-label-card small { font-size: .62rem; }
  .hero-label-card strong { font-size: .72rem; }
  .product-stage-panel { grid-template-columns: 1fr; }
  .product-stage-visual { min-height: 0; aspect-ratio: 1.75; }
  .product-stage-info { padding: 1rem; gap: .7rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-label-card { transition: border-color .18s ease, box-shadow .18s ease; }
}

/* Product controls mirror the same example order as the full workflow. */
.product-preview-title .preview-example-label {
  padding: .25rem .48rem;
  border: 1px solid var(--preview-line);
  border-radius: 6px;
  background: var(--preview-paper);
  color: var(--preview-muted);
  font-weight: 800;
}

.preview-example-label .icon { color: var(--teal); }

.preview-flow {
  margin-top: .65rem;
  padding: .52rem .55rem .4rem;
  border: 1px solid var(--preview-line);
  border-radius: 11px;
  background: color-mix(in srgb, var(--preview-paper) 82%, var(--soft));
}

.preview-flow-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .3rem;
  margin-bottom: .35rem;
  color: var(--preview-text);
  font-size: .76rem;
}

.preview-flow-header > span {
  color: var(--preview-muted);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.preview-flow-line {
  height: 3px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--preview-line);
}

.preview-flow-line > span {
  display: block;
  height: 100%;
  transform: scaleX(.25);
  transform-origin: left center;
  background: var(--teal);
  border-radius: inherit;
}

.preview-flow-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .25rem;
  margin: .4rem 0 0;
  padding: 0;
  list-style: none;
}

.preview-flow-actions button {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: .17rem;
  width: 100%;
  min-height: 44px;
  padding: .15rem .12rem;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--preview-muted);
  font: inherit;
  font-size: .73rem;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
}

.preview-flow-actions .icon { width: 15px; height: 15px; }
.preview-flow-actions button:hover { background: var(--preview-bg); color: var(--preview-text); }

.preview-flow-actions button[aria-pressed=true] {
  border-color: var(--preview-line);
  background: var(--soft);
  color: var(--teal);
  font-weight: 850;
}

.product-workflow .product-stage-steps .icon-tile {
  border: 1px solid color-mix(in srgb, var(--teal) 24%, var(--line));
  background: linear-gradient(155deg, var(--paper), var(--soft));
  color: var(--teal);
  box-shadow: 0 2px 6px #12324913;
}

.product-workflow .product-stage-steps button[aria-pressed=true] .icon-tile {
  border-color: var(--teal);
  background: var(--soft);
}

.product-features-grid .product-feature .icon-tile {
  border: 1px solid color-mix(in srgb, var(--teal) 22%, var(--line));
  background: radial-gradient(ellipse at 18% 0%, var(--paper), var(--icon-bg) 74%);
  color: var(--icon-fg);
  box-shadow: 0 4px 9px #12324915, inset 0 1px 0 #ffffff40;
}

.product-process {
  background: radial-gradient(ellipse at 80% 38%, color-mix(in srgb, var(--soft) 48%, transparent), transparent 64%),
    linear-gradient(150deg, var(--surface-tint) 12%, var(--bg) 74%);
}

.product-stage-info .product-stage-example {
  background: linear-gradient(145deg, var(--surface-tint) 10%, var(--paper) 135%);
}

@media (max-width: 560px) {
  .product-preview .home-demo-link { min-height: 44px; }
  .preview-flow { padding-inline: .36rem; }
  .preview-flow-actions { gap: .14rem; }
  .preview-flow-actions button { font-size: .8125rem; }
  .product-preview-title .preview-example-label { font-size: .8125rem; }
  .product-preview small.preview-step { font-size: .8125rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .preview-flow-line > span { transition: transform .22s ease-out; }
  .preview-flow-actions button { transition: background-color .16s ease, border-color .16s ease; }
  .product-stage-panel[data-stage-arrival] .product-stage-info {
    animation: product-stage-arrive .21s ease-out both;
  }
}

@keyframes product-stage-arrive {
  from { opacity: .72; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
