/* CONSOLE DEMO HERO */
:root {
  --console-h: calc(var(--hero-reel-w) * 0.625);
  --hero-floor: max(100svh, calc(var(--hero-copy-floor) + var(--console-h) / 2));
}

.hero-console {
  aspect-ratio: auto;
  height: var(--console-h);
  display: flex;
  flex-direction: column;
  background: #17171f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

/* LABEL */
.hc-label {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  background: #17171f;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.78);
  font: 600 12px/1 var(--font-heading);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hc-viewport {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background: #17171f;
}

.hc-viewport iframe {
  position: absolute;
  top: 0;
  left: 0;
  border: 0;
  transform-origin: 0 0;
  background: #17171f;
}

/* START A CALL */
.hc-start {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: #22c55e;
  color: #06210f;
  font: 700 14px/1 var(--font-heading);
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35), 0 0 0 0 rgba(34, 197, 94, 0.55);
  animation: hc-pulse 2.2s infinite;
  transition: transform 0.15s ease, filter 0.15s ease, opacity 0.25s ease;
}

.hc-start:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.hc-start:disabled {
  animation: none;
  opacity: 0.55;
  cursor: default;
}

.hc-start.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.hc-start svg {
  width: 17px;
  height: 17px;
}

.hc-start-short {
  display: none;
}

/* BELOW THE CONSOLE */
.hc-note {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
  text-align: center;
  color: var(--color-text-secondary, #555);
  font: 400 14px/1.6 var(--font-family);
}

.hc-note strong {
  color: var(--color-text, #111);
}

@keyframes hc-pulse {
  0% { box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35), 0 0 0 0 rgba(34, 197, 94, 0.55); }
  70% { box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35), 0 0 0 12px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35), 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* The band under the hero is padded by the console's overhang, not the old reel's. */
:root {
  --lux-reel-overhang: calc(var(--console-h) / 2);
}

.lux-band {
  padding-top: calc(var(--console-h) / 2 + clamp(28px, 3vw, 44px) + var(--lux-fall));
}

@media (max-width: 900px) {
  :root {
    --console-h: min(600px, 150vw);
    /* The phone hero copy runs to about 620px; the console's top half sits under it. */
    --hero-floor: max(100svh, calc(640px + var(--console-h) / 2));
  }

  .hero {
    min-height: var(--hero-floor);
  }

  /* Clear of the console's own tab bar at the bottom on a phone. */
  .hc-start {
    right: 12px;
    bottom: 76px;
    height: 40px;
    padding: 0 16px;
  }
}

@media (max-width: 480px) {
  .hc-start .hc-start-long {
    display: none;
  }

  .hc-start .hc-start-short {
    display: inline;
  }
}

/* LABEL CLOSE + MOBILE PREVIEW */
.hc-label {
  position: relative;
}

.hc-close,
.hc-preview {
  display: none;
}

.hc-close {
  position: absolute;
  top: 50%;
  right: 6px;
  width: 30px;
  height: 30px;
  margin-top: -15px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
}

.hc-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

@media (max-width: 700px) {
  :root {
    /* The preview image is the dashboard at its desktop shape (1200 x 780). */
    --console-h: calc((100vw - 32px) * 0.65 + 36px);
  }

  .hc-viewport iframe {
    display: none;
  }

  .hc-preview {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: block;
    padding: 0;
    border: 0;
    background: #17171f;
    cursor: pointer;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
  }

  .hc-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
    filter: blur(2px) brightness(0.72);
    transform: scale(1.02);
  }

  .hc-expand {
    position: absolute;
    left: 50%;
    top: 50%;
    margin: -28px 0 0 -28px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.65));
  }

  .hero-console:not(.is-full) .hc-start {
    display: none;
  }

  /* Full screen: the console in its phone layout, closed with the X in the banner. */
  .hero-console.is-full {
    position: fixed;
    inset: 0;
    z-index: 100000;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    transform: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .hero-console.is-full .hc-viewport iframe {
    display: block;
  }

  .hero-console.is-full .hc-preview {
    display: none;
  }

  .hero-console.is-full .hc-close {
    display: grid;
  }

  .hero-console.is-full .hc-label {
    padding-right: 40px;
  }

  html.hc-lock,
  html.hc-lock body {
    overflow: hidden;
  }

  /* Lift the hero's stacking contexts above the site header while open. */
  html.hc-lock .lux-stage,
  html.hc-lock .hero {
    z-index: 100000;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hc-start {
    animation: none;
  }
}
