/* ==========================================================================
   Compatible Scanning Hardware: interactive scanner showroom
   Uses the site's design tokens from style.css. All classes are prefixed
   "hw-" so nothing here collides with existing styles.
   ========================================================================== */

.hw-section {
  padding: 100px 0;
  background: var(--color-bg-section);
  border-top: 1px solid rgba(22, 47, 81, 0.07);
  border-bottom: 1px solid rgba(22, 47, 81, 0.07);
}

.hw-header {
  text-align: center;
  margin-bottom: 56px;
}

/* ---------------------------------------------------------------- Showcase */
.hw-showcase {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  min-height: 560px;
  background: #ffffff;
  border: 1px solid rgba(22, 47, 81, 0.07);
  border-radius: 28px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.hw-stage {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1100px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 25% 15%, #ffe2c7, transparent 62%),
    radial-gradient(ellipse at 100% 100%, #ffedd5, transparent 65%),
    var(--color-brand-mint-light);
}

.hw-stage::after {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: 62px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(22, 47, 81, 0.16), transparent 68%);
  pointer-events: none;
}

.hw-stage-label,
.hw-stage-count {
  position: absolute;
  top: 26px;
  font-size: 0.8rem;
  z-index: 2;
}

.hw-stage-label {
  left: 30px;
  font-family: var(--font-family-heading);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-brand-primary);
}

.hw-stage-count {
  right: 30px;
  font-weight: 600;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.hw-stage-image {
  position: relative;
  z-index: 1;
  width: 80%;
  height: 380px;
  object-fit: contain;
  mix-blend-mode: multiply;
  transform-style: preserve-3d;
  will-change: transform;
}

.hw-stage-caption {
  position: absolute;
  left: 30px;
  bottom: 28px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--color-text-body);
}

.hw-stage-caption svg {
  color: var(--color-brand-accent);
}

.hw-stage-controls {
  position: absolute;
  right: 26px;
  bottom: 22px;
  z-index: 3;
  display: flex;
  gap: 8px;
}

.hw-arrow {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid rgba(22, 47, 81, 0.18);
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-brand-primary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.hw-arrow:hover {
  background: var(--color-brand-primary);
  border-color: var(--color-brand-primary);
  color: #ffffff;
  transform: translateY(-2px);
}

.hw-arrow:active {
  transform: scale(0.94);
}

/* Details column */
.hw-details {
  align-self: center;
  min-width: 0;
  padding: clamp(28px, 4vw, 64px);
}

.hw-brand {
  display: block;
  margin-bottom: 12px;
  font-family: var(--font-family-heading);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-brand-accent);
}

.hw-title {
  margin: 0 0 14px;
  max-width: 16ch;
  font-size: clamp(1.8rem, 2.8vw, 2.7rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--color-brand-dark);
}

.hw-desc {
  max-width: 46ch;
  margin: 0;
  font-size: 0.97rem;
  line-height: 1.7;
  color: var(--color-text-muted);
}

.hw-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 22px;
  margin: 26px 0;
}

.hw-specs div {
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

.hw-specs div:first-child {
  grid-column: 1 / -1;
}

.hw-specs dt {
  margin-bottom: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-light);
}

.hw-specs dd {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-brand-primary);
}

.hw-price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-bottom: 8px;
}

.hw-price {
  font-family: var(--font-family-heading);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--color-brand-dark);
}

.hw-price-row small {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.hw-offer {
  max-width: 40ch;
  min-height: 3em;
  margin: 0 0 22px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--color-brand-accent-dark);
}

/* Model rail */
.hw-rail {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.hw-choice {
  min-width: 0;
  padding: 14px 12px 12px;
  text-align: start;
  font: inherit;
  background: #ffffff;
  border: 1.5px solid var(--color-border);
  border-radius: 16px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.hw-choice:hover {
  border-color: rgba(247, 143, 31, 0.55);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.hw-choice:active {
  transform: scale(0.98);
}

.hw-choice[aria-pressed="true"] {
  background: var(--color-brand-mint-light);
  border-color: var(--color-brand-accent);
  box-shadow: inset 0 -3px 0 var(--color-brand-accent);
}

.hw-choice img {
  display: block;
  width: 100%;
  height: 72px;
  margin-bottom: 10px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.hw-choice strong {
  display: block;
  font-family: var(--font-family-heading);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-brand-dark);
}

.hw-choice small {
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

.hw-live {
  min-height: 20px;
  margin: 10px 0 0;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

/* ---------------------------------------------------------------- Compare list */
.hw-library {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--color-border);
}

.hw-library summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  list-style: none;
  cursor: pointer;
  font-family: var(--font-family-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-brand-primary);
}

.hw-library summary::-webkit-details-marker {
  display: none;
}

/* The +/− is drawn with two gradient bars (not a text glyph), so it is
   mathematically centred regardless of font metrics. */
.hw-library summary::after {
  content: "";
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--color-brand-mint-bg);
  background-image:
    linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 2px, 2px 12px;
  color: var(--color-brand-accent-dark);
  transition: var(--transition-fast);
}

/* Open state: collapse the vertical bar to leave a minus */
.hw-library[open] summary::after {
  background-size: 12px 2px, 2px 0;
}

.hw-library summary:hover {
  color: var(--color-brand-accent-dark);
}

.hw-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-top: 26px;
}

.hw-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid rgba(22, 47, 81, 0.07);
  border-radius: 22px;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.hw-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.hw-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 18px 0;
}

.hw-tag {
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  font-family: var(--font-family-heading);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-brand-primary);
}

.hw-tag--free {
  background: var(--color-brand-mint-bg);
  border-color: rgba(247, 143, 31, 0.3);
  color: var(--color-brand-accent-dark);
}

/* Fixed-height frame; the photo is sized to the frame (not to its own
   1600px intrinsic size) so every scanner sits fully inside the box. */
.hw-card-img {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 190px;
  margin: 12px 18px 0;
  padding: 18px 24px;
  border-radius: 16px;
  background: var(--color-brand-mint-light);
  overflow: hidden;
}

.hw-card-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  mix-blend-mode: multiply;
}

.hw-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px 20px 22px;
}

.hw-card-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  margin-bottom: 8px;
}

.hw-card-title h3 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--color-brand-dark);
}

.hw-card-price {
  white-space: nowrap;
  font-family: var(--font-family-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-brand-accent-dark);
  font-variant-numeric: tabular-nums;
}

.hw-card-price span {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.hw-card-body > p {
  margin: 0 0 14px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.hw-card-specs {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  font-size: 0.84rem;
  color: var(--color-text-body);
}

.hw-card-specs li {
  padding: 7px 0;
  border-top: 1px solid var(--color-border-subtle);
}

.hw-card-body .btn {
  margin-top: auto;
  width: 100%;
  padding: 11px 20px;
  font-size: 0.88rem;
}

/* ---------------------------------------------------------------- Banner */
.hw-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 28px;
  padding: 24px 28px;
  background: #ffffff;
  border: 1px solid rgba(247, 143, 31, 0.25);
  border-radius: 22px;
}

.hw-banner-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-brand-mint-bg);
  color: var(--color-brand-accent-dark);
}

.hw-banner h3 {
  margin: 0 0 4px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-brand-dark);
}

.hw-banner p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--color-text-muted);
}

/* ---------------------------------------------------------------- Responsive */
@media (max-width: 1024px) {
  .hw-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .hw-section {
    padding: 72px 0;
  }

  .hw-header {
    margin-bottom: 40px;
  }

  .hw-showcase {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hw-stage {
    min-height: 400px;
  }

  .hw-stage-image {
    height: 280px;
  }

  .hw-title {
    max-width: none;
  }

  .hw-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .hw-grid {
    grid-template-columns: 1fr;
  }

  .hw-stage {
    min-height: 340px;
  }

  .hw-stage-image {
    width: 88%;
    height: 230px;
  }

  .hw-stage-caption {
    display: none;
  }

  .hw-price {
    font-size: 2.4rem;
  }

  .hw-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 22px;
  }
}

@media (max-width: 420px) {
  .hw-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .hw-stage-image {
    transform: none !important;
  }

  .hw-choice,
  .hw-card,
  .hw-arrow {
    transition: none;
  }
}
