/* Home page hero: live model card (assets/js/hero-models.js). Uses the hft-theme tokens. */
.hm-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 560px;
  margin-left: auto;
  overflow: hidden;
  color: var(--hft-ink, #15201b);
  background: var(--hft-surface, #fff);
  border: 1px solid var(--hft-rule, #dde2dc);
  border-radius: var(--hft-radius-lg, 16px);
  box-shadow: var(--hft-shadow-2, 0 12px 32px -8px #15201b24);
}
.hm-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  align-items: center;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--hft-rule, #dde2dc);
}
.hm-kicker {
  grid-column: 1;
  color: var(--hft-up, #0e7c55);
  font: 700 11px/1.3 "Geist Mono", ui-monospace, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.hm-title {
  grid-column: 1;
  font: 650 17px/1.3 var(--font-ui, "Geist", system-ui, sans-serif);
  letter-spacing: -.01em;
}
.hm-live {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--hft-accent, #2443b5);
  font: 700 11px/1 "Geist Mono", ui-monospace, monospace;
  letter-spacing: .08em;
  white-space: nowrap;
}
.hm-live::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hft-accent, #2443b5);
  box-shadow: 0 0 0 3px var(--hft-accent-soft, #e6eafb);
}
.hm-slide { display: flex; flex-direction: column; }
.hm-slide[hidden] { display: none !important; }
.hm-card:not(.is-ready) .hm-slide:not(:first-child) { display: none; }
.hm-stage {
  position: relative;
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(var(--hft-grid, #15201b0e) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, var(--hft-grid, #15201b0e) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--hft-paper, #f6f7f4);
}
.hm-stage canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; }
.hm-slide[data-model="surface"] canvas { cursor: grab; touch-action: none; }
.hm-slide[data-model="surface"] canvas:active { cursor: grabbing; }
.hm-stage .hm-tag { display: none; }
.hm-live-tag {
  margin-left: 6px;
  padding: 2px 7px;
  color: var(--hft-muted, #5e6b64);
  border: 1px solid var(--hft-rule-strong, #c8cfc7);
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: .06em;
}
.hm-live-tag[hidden] { display: none; }
.hm-tag {
  position: absolute;
  right: 10px;
  top: 8px;
  padding: 2px 7px;
  color: var(--hft-muted, #5e6b64);
  background: var(--hft-surface, #fff);
  border: 1px solid var(--hft-rule, #dde2dc);
  border-radius: 999px;
  font: 700 10px/1.4 "Geist Mono", ui-monospace, monospace;
  letter-spacing: .06em;
  pointer-events: none;
}
.hm-readout {
  margin: 0;
  padding: 10px 18px 0;
  font: 500 14px/1.4 var(--font-ui, "Geist", system-ui, sans-serif);
  color: var(--hft-ink-2, #3a4741);
  min-height: 30px;
}
.hm-readout b {
  color: var(--hft-ink, #15201b);
  font: 700 17px/1 "Geist Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}
.hm-readout span { color: var(--hft-muted, #5e6b64); font-size: 12px; }
.hm-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 10px 18px 0;
}
.hm-controls:empty { display: none; }
.hm-range {
  display: grid;
  grid-template-columns: auto minmax(90px, 1fr) 3.6em;
  align-items: center;
  gap: 8px;
  flex: 1 1 200px;
  font: 600 12px/1 var(--font-ui, "Geist", system-ui, sans-serif);
  color: var(--hft-ink-2, #3a4741);
}
.hm-range output {
  text-align: right;
  color: var(--hft-ink, #15201b);
  font: 700 12px/1 "Geist Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}
.hm-range input[type="range"] {
  width: 100%;
  height: 24px;
  margin: 0;
  background: transparent;
  accent-color: var(--hft-accent, #2443b5);
  cursor: pointer;
}
.hm-btn {
  min-height: 34px;
  padding: 6px 14px;
  color: var(--hft-ink, #15201b);
  background: var(--hft-surface, #fff);
  border: 1px solid var(--hft-rule-strong, #c8cfc7);
  border-radius: 999px;
  font: 600 13px/1 var(--font-ui, "Geist", system-ui, sans-serif);
  cursor: pointer;
}
.hm-btn.is-primary {
  color: var(--hft-accent-ink, #fff);
  background: var(--hft-accent, #2443b5);
  border-color: var(--hft-accent, #2443b5);
}
.hm-btn:hover { filter: brightness(1.06); }
.hm-cap {
  margin: 0;
  padding: 10px 18px 14px;
  color: var(--hft-muted, #5e6b64);
  font: 400 13.5px/1.5 var(--font-ui, "Geist", system-ui, sans-serif);
}
.hm-cap a { color: var(--hft-up, #0e7c55); font-weight: 650; text-decoration: none; white-space: nowrap; }
.hm-cap a:hover { text-decoration: underline; }
.hm-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 12px 18px;
  border-top: 1px solid var(--hft-rule, #dde2dc);
}
.hm-prev {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--hft-ink, #15201b);
  background: var(--hft-surface, #fff);
  border: 1px solid var(--hft-rule-strong, #c8cfc7);
  border-radius: 50%;
  cursor: pointer;
}
.hm-next {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px 0 16px;
  color: var(--hft-paper, #f6f7f4);
  background: var(--hft-ink, #15201b);
  border: 0;
  border-radius: 999px;
  font: 600 14px/1 var(--font-ui, "Geist", system-ui, sans-serif);
  cursor: pointer;
}
.hm-next small { opacity: .7; font-size: 13px; font-weight: 500; }
.hm-dots { display: flex; gap: 6px; margin-left: auto; }
.hm-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  background: var(--hft-rule-strong, #c8cfc7);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: width .2s var(--hft-ease, ease);
}
.hm-dot.is-active { width: 24px; background: var(--hft-accent, #2443b5); }
.hm-count {
  color: var(--hft-muted, #5e6b64);
  font: 700 12px/1 "Geist Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.hm-card :is(button, input, a):focus-visible { outline: 2px solid var(--hft-accent, #2443b5); outline-offset: 2px; }

/* The real-notes video slide keeps its own frame styles; drop the outer card chrome around it. */
.hm-slide[data-model="video"] .story-video-frame {
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.hm-slide[data-model="video"] video { display: block; width: 100%; height: auto; }

@media (max-width: 620px) {
  .hm-card { max-width: none; }
  .hm-head { padding: 14px 14px 10px; }
  .hm-readout, .hm-controls, .hm-cap { padding-left: 14px; padding-right: 14px; }
  .hm-foot { padding: 10px 14px; gap: 8px; }
  .hm-next small { display: none; }
  .hm-count { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hm-dot { transition: none; }
}

/* Named chips: jump straight to any model. Scrolls sideways when they don't fit. */
.hm-chips {
  display: flex;
  gap: 6px;
  padding: 10px 18px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--hft-rule, #dde2dc);
  -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent);
          mask-image: linear-gradient(90deg, #000 92%, transparent);
}
.hm-chips::-webkit-scrollbar { display: none; }
.hm-chip {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 5px 11px;
  color: var(--hft-ink-2, #3a4741);
  background: var(--hft-surface, #fff);
  border: 1px solid var(--hft-rule-strong, #c8cfc7);
  border-radius: 999px;
  font: 600 12.5px/1 var(--font-ui, "Geist", system-ui, sans-serif);
  white-space: nowrap;
  cursor: pointer;
}
.hm-chip:hover { border-color: var(--hft-accent, #2443b5); color: var(--hft-ink, #15201b); }
.hm-chip.is-active {
  color: var(--hft-accent-ink, #fff);
  background: var(--hft-accent, #2443b5);
  border-color: var(--hft-accent, #2443b5);
}
.hm-readout sup { font-size: .75em; }
@media (max-width: 620px) {
  .hm-chips { padding: 8px 14px; }
  .hm-dots { display: none; }
  .hm-live { flex-direction: column; align-items: flex-end; gap: 4px; }
  .hm-live-tag { margin-left: 0; }
}

/* Tablet and large-phone widths (820–1060 px): keep the model beside the headline, as on desktop,
   instead of dropping it below and leaving the left half empty. Narrower: full width, centred. */
@media (min-width: 820px) and (max-width: 1060px) {
  body.d2q-launchzone .hero-container .hero-split-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
  }
  body.d2q-launchzone .hero-container .hero-split-grid .hm-card { max-width: none; margin-left: 0; }
}
@media (max-width: 819px) {
  body.d2q-launchzone .hero-container .hm-card { max-width: none; margin-left: auto; margin-right: auto; }
}

/* Side-by-side hero (820 px and up): both columns are the same height. The headline column spreads its
   blocks evenly so the stats bar ends level with the model card, and the 3D view grows to fill the card. */
@media (min-width: 820px) {
  body.d2q-launchzone .hero-container .hero-split-grid { align-items: stretch; }
  body.d2q-launchzone .hero-container .hero-content { display: flex; flex-direction: column; justify-content: space-between; }
  body.d2q-launchzone .hero-container .hero-content > * { margin-bottom: 0; }
  body.d2q-launchzone .hero-container .hero-content > .hero-badge { align-self: flex-start; }
  body.d2q-launchzone .hero-container .hero-models-side { display: flex; align-items: stretch; height: auto; }
  body.d2q-launchzone .hero-container .hero-models-side .hm-card { height: 100%; }
  .hero-models-side .hm-slides { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
  .hero-models-side .hm-slide.is-active { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
  .hero-models-side .hm-slide.is-active .hm-stage { aspect-ratio: 4 / 3; flex: 1 0 auto; min-height: 0; }
  .hero-models-side .hm-slide.is-active .hm-stage canvas { position: absolute; inset: 0; }
}
