/* Asset Manager — Layout D page-scoped styles. Builds on bundle.css tokens (:root vars). */
:root {
  --amd-shadow-float: 17px 88px 60px -100px #4f5e782e, 11px 0 20px -9px #4f5e781a;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.caption.amd-caption-sm { font-size: .75rem; line-height: 1rem; }
.amd-mono { font-variant-numeric: tabular-nums; }

/* ---- hero: floating capture widgets around a centred card ---- */
.amd-hero { overflow: hidden; }
.amd-hero-stage { position: relative; height: 43.75rem; display: flex; align-items: center; justify-content: center; }

.amd-float {
  position: absolute;
  z-index: 1;
  background-color: var(--contrast-primary);
  border-radius: 1.5rem;
  padding: 1rem;
  box-shadow: var(--amd-shadow-float);
}
.amd-w-plate { left: 3rem; top: 4.5rem; width: 18.125rem; }
.amd-w-list { right: 3rem; top: 25rem; width: 18.125rem; }
.amd-w-scan {
  left: 11rem; top: 23.75rem;
  width: 4rem; height: 4rem; padding: 0;
  border-radius: 999em;
  display: flex; align-items: center; justify-content: center;
  color: var(--brand-primary);
}
.amd-float-rows { display: contents; }

.amd-cap {
  display: flex; align-items: center; gap: .5rem;
  margin: 0 .25rem .625rem;
  font-size: .875rem; line-height: 1.25rem;
  color: var(--background-default);
}
.amd-cap .amd-or {
  background-color: var(--brand-primary);
  color: var(--contrast-primary);
  border-radius: 999em;
  padding: .125rem .5rem;
  font-size: .6875rem; line-height: 1rem;
}

.amd-plate, .amd-list {
  height: 10.25rem;
  border-radius: .75rem;
  background-color: var(--background-secondary);
  display: flex; flex-direction: column; justify-content: center; gap: .5rem;
}
.amd-plate { position: relative; padding: 1.125rem 1.375rem; }
.amd-plate .amd-m1 { font-size: 1rem; line-height: 1.375rem; color: var(--background-default); font-variant-numeric: tabular-nums; }
.amd-plate .amd-m2 { font-size: .875rem; line-height: 1.25rem; color: var(--background-opacity-80); font-variant-numeric: tabular-nums; }
.amd-plate .amd-ln { height: .375rem; background-color: var(--background-hover); border-radius: 3px; width: 70%; }
.amd-plate .amd-ln.amd-s { width: 50%; }

.amd-cn { position: absolute; width: 1.125rem; height: 1.125rem; border: 0 solid var(--brand-primary); }
.amd-cn.amd-tl { left: .5rem; top: .5rem; border-left-width: 3px; border-top-width: 3px; border-radius: 4px 0 0 0; }
.amd-cn.amd-tr { right: .5rem; top: .5rem; border-right-width: 3px; border-top-width: 3px; border-radius: 0 4px 0 0; }
.amd-cn.amd-bl { left: .5rem; bottom: .5rem; border-left-width: 3px; border-bottom-width: 3px; border-radius: 0 0 0 4px; }
.amd-cn.amd-br { right: .5rem; bottom: .5rem; border-right-width: 3px; border-bottom-width: 3px; border-radius: 0 0 4px 0; }

.amd-list { padding: .875rem 1.125rem; }
.amd-list-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.amd-fn { display: flex; align-items: center; gap: 6px; font-size: .875rem; line-height: 1.25rem; color: var(--background-default); }
.amd-fn svg { color: var(--brand-primary); }
.amd-row {
  display: flex; justify-content: space-between;
  font-size: .875rem; line-height: 1.25rem;
  padding-top: .4375rem;
  border-top: 1px solid var(--contrast-divider-dark);
  color: var(--background-default);
  font-variant-numeric: tabular-nums;
}
.amd-ok { color: var(--brand-primary); }

.amd-hcard-w { position: relative; z-index: 2; width: 46rem; max-width: 100%; }
.amd-hcard {
  background-color: var(--contrast-primary);
  border-radius: 1.5rem;
  padding: 3rem 4rem;
  display: flex; flex-direction: column; align-items: center; gap: 1.5rem;
  text-align: center;
  box-shadow: var(--amd-shadow-float);
}
.amd-hcard-p { max-width: 35rem; }
.amd-hcta { display: flex; align-items: center; gap: 1.5rem; }

/* ---- what you get: unit diagram ---- */
.amd-diag {
  position: relative;
  width: 100%; max-width: 80rem;
  margin: 4rem auto 0;
  display: grid;
  grid-template-columns: 16.25rem minmax(0, 1fr) 16.25rem;
  grid-template-areas: "l art r";
  align-items: center;
  gap: 1.5rem;
}
.amd-col { display: flex; flex-direction: column; gap: 1.5rem; position: relative; z-index: 1; }
.amd-col.amd-l { grid-area: l; }
.amd-col.amd-r { grid-area: r; }
.amd-art { grid-area: art; display: flex; align-items: center; justify-content: center; }
.amd-art svg { width: 100%; max-width: 37.5rem; height: auto; }

.amd-spec {
  background-color: var(--contrast-primary);
  border-radius: 1rem;
  padding: 1.375rem 1.5rem;
  display: flex; flex-direction: column; gap: 6px;
}
.amd-col.amd-r .amd-spec { text-align: right; }
.amd-spec .amd-s { font-size: .875rem; line-height: 1.25rem; color: var(--background-opacity-80); font-weight: 300; }
.amd-spec h4 .amd-sub { font-size: .77em; white-space: nowrap; }

.amd-wires { display: none; position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; color: var(--brand-primary); }
.amd-wires .amd-halo { fill: var(--brand-primary); fill-opacity: .18; }
.amd-wires .amd-pin { fill: var(--brand-primary); stroke: var(--contrast-primary); stroke-width: 2.5; }

/* the rooftop unit illustration, inked from site tokens */
.amd-rtu .amd-ink { stroke: var(--background-secondary-dark); }
.amd-rtu .amd-ground-shadow { fill: var(--background-default); fill-opacity: .08; }
.amd-rtu .amd-base-a { fill: color-mix(in srgb, var(--background-secondary-dark) 18%, var(--background-secondary)); }
.amd-rtu .amd-base-b { fill: color-mix(in srgb, var(--background-secondary-dark) 28%, var(--background-secondary)); }
.amd-rtu .amd-face { fill: var(--contrast-primary); }
.amd-rtu .amd-side { fill: var(--background-secondary); }
.amd-rtu .amd-top { fill: color-mix(in srgb, var(--contrast-primary) 50%, var(--background-secondary)); }
.amd-rtu .amd-panel { fill: color-mix(in srgb, var(--contrast-primary) 50%, var(--background-secondary)); }
.amd-rtu .amd-fan { fill: var(--background-hover); }
.amd-rtu .amd-brand-accent { fill: var(--brand-primary); }
.amd-rtu .amd-handle { fill: var(--background-secondary-dark); fill-opacity: .5; }
.amd-rtu .amd-label-line { stroke: var(--contrast-primary); }

/* exact-geometry layout with callout wires once the diagram can sit at full width */
@media screen and (min-width: 86rem) {
  .amd-diag { width: 80rem; min-height: 45rem; grid-template-columns: 18.75rem minmax(0, 1fr) 18.75rem; gap: 0; }
  .amd-col { gap: 1.75rem; }
  .amd-spec { height: 9.375rem; }
  .amd-wires { display: block; }
}

/* ---- how it works ---- */
.amd-how-head { max-width: 56.25rem; }
.amd-how-head h2 { margin-top: .25rem; }
.amd-steps { margin-top: 3rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.amd-step { background-color: var(--background-secondary); border-radius: 1.5rem; padding: 2rem; display: flex; flex-direction: column; gap: .75rem; }
.amd-step h4 { margin-top: .25rem; }
.amd-step.is-current { background-color: var(--brand-primary); }
.amd-step.is-current .caption, .amd-step.is-current h4, .amd-step.is-current p { color: var(--contrast-primary); }

/* ---- why this matters ---- */
.amd-why { display: grid; grid-template-columns: 7fr 5fr; gap: 4rem; align-items: end; }
.amd-why-r { display: flex; flex-direction: column; gap: 2rem; }
.amd-why-r .button { align-self: flex-start; }

/* ---- responsive ---- */
/* Below this, the container is too narrow for the floating cards' fixed
   offsets to clear the centred hero card without overlapping — stack instead.
   (89.5rem leaves a safety margin above the true minimum of ~88.25rem, while
   still keeping the floating layout for the common 1440px viewport.) */
@media screen and (max-width: 89.5rem) {
  .amd-hero { padding-top: 4rem; padding-bottom: 4rem; }
  .amd-hero-stage { height: auto; flex-direction: column; gap: 1rem; }
  .amd-hcard-w { order: -1; }
  .amd-float { position: static; }
  .amd-w-scan { display: none; }
  .amd-float-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; width: 100%; max-width: 46rem; }
  .amd-w-plate, .amd-w-list { width: auto; }
}
@media screen and (max-width: 991px) {
  .amd-diag { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "art art" "l r"; gap: 1.5rem; }
  .amd-col { gap: 1rem; }
  .amd-col.amd-r .amd-spec { text-align: left; }
  .amd-steps { grid-template-columns: 1fr; }
  .amd-why { grid-template-columns: 1fr; gap: 2rem; }
}
@media screen and (max-width: 767px) {
  .amd-hero { padding-top: 2rem; padding-bottom: 3rem; }
  .amd-float-rows { grid-template-columns: 1fr; gap: .75rem; }
  .amd-hcard { padding: 2rem 1.25rem; border-radius: 1.5rem; }
  .amd-hcta { flex-direction: column; align-items: stretch; width: 100%; gap: 1rem; }
  .amd-hcta .action { justify-content: center; }
  .amd-diag { grid-template-columns: 1fr; grid-template-areas: "art" "l" "r"; gap: .75rem; }
  .amd-col { gap: .75rem; }
  .amd-spec { padding: 1.125rem 1.25rem; }
  .amd-step { padding: 1.5rem; }
}
@media screen and (max-width: 479px) {
  .amd-why-r .button { align-self: stretch; }
}
