/* Hero IDE demo — fills frame edge-to-edge, 16:9 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

.hero-demo,
.hero-demo-video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 0.35rem;
  overflow: hidden;
  background: #09090b;
}

.hero-demo--live {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-demo-video.is-hidden {
  display: none;
}

.hero-demo-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  background: #09090b;
}

.hero-demo-record {
  margin: 0;
  width: 1120px;
  height: 640px;
  overflow: hidden;
  background: #000;
}

.hero-demo-record .hero-demo {
  width: 1120px;
  height: 640px;
  aspect-ratio: auto;
  border-radius: 0;
}

.hero-demo {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

.hero-demo__chrome {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: inherit;
  background: #09090b;
}

.hero-demo__titlebar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  height: 2rem;
  padding: 0 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #71717a;
}

.hero-demo__dots {
  display: flex;
  gap: 0.3rem;
}

.hero-demo__dots i {
  display: block;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: #3f3f46;
}

.hero-demo__title {
  flex: 1;
  text-align: center;
  padding-right: 2rem;
}

.hero-demo__body {
  display: grid;
  grid-template-columns: 11rem 1fr 14.5rem;
  flex: 1;
  min-height: 0;
}

.hero-demo__sidebar {
  padding: 0.55rem 0.65rem;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: #101012;
  font-size: 0.68rem;
}

.hero-demo__sidebar-label {
  margin: 0 0 0.45rem;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #52525b;
}

.hero-demo__tree {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hero-demo__tree li {
  padding: 0.2rem 0.35rem;
  border-radius: 0.25rem;
  color: #a1a1aa;
}

.hero-demo__tree li.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.hero-demo__editor {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #121214;
}

.hero-demo__tabs {
  display: flex;
  gap: 0.35rem;
  padding: 0.35rem 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.65rem;
}

.hero-demo__tabs span {
  padding: 0.35rem 0.55rem;
  color: #71717a;
  border-top: 2px solid transparent;
}

.hero-demo__tabs span.is-active {
  color: #fafafa;
  border-top-color: #f97316;
  background: rgba(255, 255, 255, 0.03);
}

.hero-demo__code {
  margin: 0;
  padding: 0.55rem 0.65rem;
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(0.58rem, 1.15vw, 0.76rem);
  font-weight: 400;
  line-height: 1.55;
  color: #e4e4e7;
  overflow: hidden;
  font-variant-ligatures: none;
}

.hero-demo__code .ln {
  display: inline-block;
  width: 1.6rem;
  margin-right: 0.5rem;
  color: #52525b;
  text-align: right;
  user-select: none;
}

.hero-demo__code .src {
  color: #d4d4d8;
}

.hero-demo__ghost {
  position: absolute;
  left: 2.5rem;
  bottom: 28%;
  right: 0.75rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(249, 115, 22, 0.35);
  border-radius: 0.35rem;
  background: rgba(249, 115, 22, 0.08);
  font-size: clamp(0.5rem, 1vw, 0.68rem);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.hero-demo__ghost.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-demo__ghost-label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f97316;
}

.hero-demo__ghost code {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  font-size: inherit;
  color: #fdba74;
}

.hero-demo__agent {
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  background: #0c0c0e;
  min-height: 0;
}

.hero-demo__agent header {
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.62rem;
  font-weight: 600;
  color: #fafafa;
}

.hero-demo__model {
  margin-left: 0.35rem;
  padding: 0.12rem 0.35rem;
  border-radius: 999px;
  border: 1px solid rgba(249, 115, 22, 0.35);
  font-size: 0.52rem;
  font-weight: 700;
  color: #f97316;
}

.hero-demo__messages {
  flex: 1;
  padding: 0.45rem 0.5rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.hero-demo__msg {
  padding: 0.4rem 0.45rem;
  border-radius: 0.35rem;
  font-size: clamp(0.52rem, 1vw, 0.65rem);
  line-height: 1.45;
  max-width: 100%;
}

.hero-demo__msg--user {
  align-self: flex-end;
  background: rgba(255, 255, 255, 0.08);
  color: #e4e4e7;
  min-height: 1.2rem;
}

.hero-demo__msg--agent {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #a1a1aa;
  min-height: 1.2rem;
}

.hero-demo__thinking {
  font-size: 0.58rem;
  color: #f97316;
  animation: hero-demo-pulse 1s ease-in-out infinite;
}

@keyframes hero-demo-pulse {
  50% { opacity: 0.45; }
}

.hero-demo__composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem;
  padding: 0.45rem 0.5rem 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.hero-demo__input {
  min-height: 1.65rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.35rem;
  background: rgba(0, 0, 0, 0.35);
  font-size: clamp(0.52rem, 1vw, 0.65rem);
  color: #fafafa;
  white-space: nowrap;
  overflow: hidden;
}

.hero-demo__input.is-focus {
  border-color: rgba(249, 115, 22, 0.45);
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.15);
}

.hero-demo__send {
  padding: 0.35rem 0.55rem;
  border: 0;
  border-radius: 0.35rem;
  background: #f97316;
  color: #000;
  font-family: inherit;
  font-size: 0.62rem;
  font-weight: 600;
}

.hero-demo__send.is-active {
  filter: brightness(1.1);
  transform: scale(0.96);
}

.hero-demo__cursor {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 20;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.65));
  will-change: transform;
  transform: translate3d(var(--cx, 0px), var(--cy, 0px), 0);
  transform-origin: 5px 5px;
}

.hero-demo__cursor.is-click {
  transform: translate3d(var(--cx, 0px), var(--cy, 0px), 0) scale(0.88);
}

.hero-demo__click {
  position: absolute;
  z-index: 19;
  width: 1.25rem;
  height: 1.25rem;
  margin: -0.62rem 0 0 -0.62rem;
  border-radius: 50%;
  border: 2px solid rgba(249, 115, 22, 0.65);
  animation: hero-demo-ripple 0.45s ease-out forwards;
  pointer-events: none;
}

@keyframes hero-demo-ripple {
  from {
    opacity: 0.9;
    transform: scale(0.35);
  }
  to {
    opacity: 0;
    transform: scale(1.4);
  }
}

.product-window--demo {
  width: min(100%, 52rem);
  padding: 0.35rem;
  background: #0a0a0a;
}

.product-window--demo .window-bar {
  display: none;
}

@media (max-width: 900px) {
  .hero-demo__body {
    grid-template-columns: 8.5rem 1fr 12rem;
  }
}
