/* Hero — live desktop + phone Talk visual (crisp at any DPI) */

.home-hero-visual {
  position: relative;
  width: 100%;
  margin: 0 auto;
  contain: layout style paint;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.home-hero-visual.is-interactive {
  cursor: pointer;
  border-radius: 12px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.home-hero-visual.is-interactive:hover {
  box-shadow: 0 0 0 1px var(--border-strong);
}

.home-hero-visual.is-interactive:focus-visible {
  outline: 2px solid var(--cuper-blue);
  outline-offset: 3px;
}

.home-hero-interactive {
  width: 100%;
}

.hh-provider-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 10px;
}

.hh-provider-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: inherit;
  font-size: 0.64rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s, box-shadow 0.2s;
}

.hh-provider-chip img {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  object-fit: contain;
}

.hh-provider-chip:hover {
  color: var(--text-sec);
  border-color: var(--border-strong);
}

.hh-provider-chip.is-active {
  color: var(--text);
  border-color: rgba(10, 132, 255, 0.45);
  background: var(--surface-2);
  box-shadow: none;
}

.hh-provider-chip:focus-visible {
  outline: 2px solid var(--cuper-blue);
  outline-offset: 2px;
}

.hh-provider-hint {
  margin: 7px 0 0;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}

.hh-scene {
  position: relative;
  padding: 0 10px 14px 0;
  overflow: hidden;
  min-height: 280px;
  max-height: 280px;
}

.hh-desktop {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #111216;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
  text-align: left;
  transform: translateZ(0);
  height: 100%;
  max-height: 268px;
}

.hh-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(0, 0, 0, 0.35);
}

.hh-dots {
  display: flex;
  gap: 5px;
}

.hh-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.hh-dots span:nth-child(1) { background: #ff5f57; }
.hh-dots span:nth-child(2) { background: #febc2e; }
.hh-dots span:nth-child(3) { background: #28c840; }

.hh-titlebar-label {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-sec);
  margin-left: 2px;
  letter-spacing: 0.02em;
}

.hh-body {
  display: grid;
  grid-template-columns: 72px 1fr;
  min-height: 248px;
  max-height: 248px;
  overflow: hidden;
}

.hh-sidebar {
  border-right: 1px solid rgba(148, 163, 184, 0.1);
  padding: 8px 5px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(0, 0, 0, 0.2);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.hh-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hh-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 5px 3px;
  border-radius: 7px;
  font-size: 0.5rem;
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
  color: var(--muted);
}

.hh-nav-item svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  opacity: 0.75;
}

.hh-nav-item.is-active {
  background: rgba(59, 130, 246, 0.16);
  color: var(--text);
}

.hh-user {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 100%;
  padding: 6px 2px 4px;
  border-top: 1px solid rgba(148, 163, 184, 0.08);
  box-sizing: border-box;
  flex-shrink: 0;
  overflow: hidden;
}

.hh-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-sec);
  font-size: 0.48rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hh-user-meta {
  min-width: 0;
  width: 100%;
  text-align: center;
  overflow: hidden;
}

.hh-user-meta strong {
  display: block;
  font-size: 0.5rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hh-user-meta span {
  display: block;
  font-size: 0.44rem;
  color: var(--muted);
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hh-main {
  padding: 12px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.hh-main-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.hh-main-head h3 {
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0;
}

.hh-provider {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.52rem;
  font-weight: 700;
  color: var(--text-sec);
}

.hh-provider img {
  width: 11px;
  height: 11px;
  border-radius: 2px;
}

.hh-chat {
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}

.hh-msg {
  max-width: 94%;
  padding: 7px 9px;
  border-radius: 9px;
  font-size: 0.6rem;
  line-height: 1.42;
  color: var(--text-sec);
  min-height: 2em;
}

.hh-msg-user {
  align-self: flex-end;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
}

.hh-msg-agent {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.hh-task {
  padding: 9px 10px;
  border-radius: 9px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  background: rgba(59, 130, 246, 0.09);
  flex-shrink: 0;
  min-height: 4.5rem;
}

.hh-task[hidden] {
  display: block !important;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  border-color: transparent;
  background: transparent;
}

.hh-task strong {
  display: block;
  font-size: 0.58rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 7px;
}

.hh-progress-track {
  height: 3px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  overflow: hidden;
}

.hh-progress-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--cuper-blue);
  transition: width 0.08s linear;
}

.hh-task-status {
  margin-top: 5px;
  font-size: 0.5rem;
  font-weight: 600;
  color: var(--muted);
}

.hh-input {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(0, 0, 0, 0.28);
  margin-top: auto;
}

.hh-input span {
  flex: 1;
  font-size: 0.54rem;
  color: var(--muted);
}

.hh-send {
  width: 22px;
  height: 18px;
  border-radius: 5px;
  background: var(--cuper-blue);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hh-send svg {
  width: 9px;
  height: 9px;
  color: #fff;
}

/* iPhone device mockup */
.hh-phone {
  position: absolute;
  right: -2px;
  bottom: 2px;
  width: 40%;
  max-width: 158px;
  z-index: 3;
  transform: translateZ(0);
  will-change: transform;
  animation: hh-phone-float 5s ease-in-out infinite;
}

.hh-phone-shell {
  position: relative;
  border-radius: 28px;
  padding: 3px;
  background: linear-gradient(145deg, #3a3d45 0%, #1a1c22 45%, #2e3138 100%);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.hh-phone-shell::before,
.hh-phone-shell::after {
  content: "";
  position: absolute;
  left: -2px;
  width: 2px;
  border-radius: 2px;
  background: #4b4f58;
  z-index: 2;
}

.hh-phone-shell::before {
  top: 22%;
  height: 14px;
}

.hh-phone-shell::after {
  top: 34%;
  height: 22px;
}

.hh-phone-bezel {
  border-radius: 25px;
  overflow: hidden;
  background: #000;
}

.hh-phone-screen {
  display: flex;
  flex-direction: column;
  aspect-ratio: 9 / 19.5;
  min-height: 210px;
  background: linear-gradient(180deg, #101116 0%, #0a0b0f 100%);
}

.hh-phone-status {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 26px;
  padding: 8px 10px 4px;
  color: var(--text);
}

.hh-phone-time {
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  justify-self: start;
}

.hh-phone-island {
  justify-self: center;
  width: 34%;
  min-width: 36px;
  max-width: 52px;
  height: 11px;
  border-radius: 999px;
  background: #000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.hh-phone-status-icons {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  justify-self: end;
  color: var(--text);
  opacity: 0.92;
}

@keyframes hh-phone-float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -3px, 0); }
}

.hh-phone-main {
  flex: 1;
  padding: 2px 9px 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}

.hh-phone-home-indicator {
  width: 32%;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  margin: 2px auto 7px;
  flex-shrink: 0;
}

.hh-phone-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.hh-phone-title {
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.hh-phone-provider {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 5px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.46rem;
  font-weight: 700;
  color: var(--text-sec);
}

.hh-phone-provider img {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}

.hh-phone-chat {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.hh-phone-msg {
  max-width: 96%;
  padding: 5px 7px;
  border-radius: 8px;
  font-size: 0.48rem;
  line-height: 1.38;
  min-height: 1.6em;
}

.hh-phone-msg-user {
  align-self: flex-end;
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(96, 165, 250, 0.2);
  color: var(--text);
}

.hh-phone-msg-agent {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.1);
  color: var(--text-sec);
}

.hh-phone-input {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 7px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(0, 0, 0, 0.28);
  margin-top: auto;
}

.hh-phone-input > span:first-child {
  flex: 1;
  font-size: 0.44rem;
  color: var(--muted);
}

.hh-phone-send {
  width: 18px;
  height: 14px;
  border-radius: 4px;
  background: var(--cuper-blue);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hh-phone-send svg {
  width: 7px;
  height: 7px;
  color: #fff;
}

/* Connection beam */
.hh-beam {
  position: absolute;
  left: 52%;
  top: 58%;
  width: 20%;
  height: 1.5px;
  transform: rotate(-14deg);
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
  border-radius: 999px;
  z-index: 2;
  opacity: 0.85;
  animation: hh-beam-pulse 2.4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes hh-beam-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.75; }
}

.hh-stream-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--cuper-blue);
  margin-left: 1px;
  vertical-align: text-bottom;
  animation: hh-blink 1s step-end infinite;
}

@keyframes hh-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hh-phone,
  .hh-beam,
  .hh-stream-cursor {
    animation: none !important;
  }
}

@media (max-width: 420px) {
  .hh-provider-chip span {
    display: none;
  }

  .hh-provider-chip {
    padding: 7px 9px;
  }

  .hh-body {
    grid-template-columns: 58px 1fr;
    min-height: 228px;
  }

  .hh-nav-item span {
    font-size: 0.44rem;
  }

  .hh-user-meta span {
    display: none;
  }

  .hh-main-head h3 {
    font-size: 0.78rem;
  }

  .hh-phone {
    width: 42%;
    max-width: 148px;
  }

  .hh-phone-screen {
    min-height: 198px;
  }
}

@media (min-width: 900px) {
  .home-hook-stage {
    max-width: 440px;
  }

  .hh-body {
    min-height: 268px;
  }

  .hh-msg {
    font-size: 0.62rem;
  }

  .hh-phone-msg {
    font-size: 0.5rem;
  }
}
