/* Landing hero demo: v3 composer -> Iskra dock -> short generation strip. */

:root {
  --ch-bg: var(--og-bg, #0a0a0b);
  --ch-surface-1: var(--og-surface-1, #131315);
  --ch-surface-2: var(--og-surface-2, #1a1a1d);
  --ch-surface-3: var(--og-surface-3, #1f1f23);
  --ch-border: var(--og-border, rgba(255, 255, 255, 0.06));
  --ch-border-em: var(--og-border-em, rgba(255, 255, 255, 0.10));
  --ch-text: var(--og-text, #fafafa);
  --ch-text-mid: var(--og-text-mid, #a1a1a6);
  --ch-text-dim: var(--og-text-dim, #5a5a60);
  --ch-accent: var(--og-accent, #d6841d);
  --ch-ok: var(--og-ok, #5fb87a);
  --ch-r-sm: var(--og-r-sm, 4px);
  --ch-r-md: var(--og-r-md, 6px);
  --ch-r-lg: var(--og-r-lg, 10px);
  --ch-r-pill: var(--og-r-pill, 9999px);
  --ch-font: var(--og-font-ui, "Inter", system-ui, sans-serif);
  --ch-mono: var(--ognivo-font-mono, "IBM Plex Mono", ui-monospace, monospace);
  --ch-ease: var(--og-ease, cubic-bezier(0.2, 0.8, 0.2, 1));
}

.ognivo-hero__art--test {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  min-width: 0;
}

.chat-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(100%, 460px);
  color: var(--ch-text);
  font-family: var(--ch-font);
}

.chat-hero__stage {
  position: relative;
  height: 504px;
}

.chat-hero__composer-panel,
.chat-hero__iskra-dock,
.chat-hero__gallery-strip {
  border: 1px solid var(--ch-border);
  border-radius: var(--ch-r-lg);
  background: var(--ch-bg);
  box-shadow: var(--og-shadow-2, 0 1px 0 rgba(255, 255, 255, 0.04) inset);
}

.chat-hero__composer-panel {
  position: absolute;
  inset: 0;
  padding: 18px;
  opacity: 0;
  transform: translateY(10px);
  animation: ch-panel-in 0.42s var(--ch-ease) forwards;
}

.chat-hero__kicker,
.chat-hero__refs-head,
.chat-hero__prompt-label,
.chat-hero__gallery-head {
  color: var(--ch-text-dim);
  font-family: var(--ch-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.chat-hero__model-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: var(--ch-text);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.045em;
}

.chat-hero__chevron,
.chat-hero__reload {
  color: var(--ch-text-dim);
}

.ch-icon {
  flex: 0 0 auto;
  display: inline-block;
  vertical-align: middle;
}
.ch-icon--14 { width: 14px; height: 14px; }
.ch-icon--16 { width: 16px; height: 16px; }
.ch-icon--20 { width: 20px; height: 20px; }
.ch-icon--24 { width: 24px; height: 24px; }

.chat-hero__action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--ch-text-dim);
}

.chat-hero__prompt-box {
  position: relative;
  min-height: 190px;
  margin-top: 24px;
  padding: 16px 14px 48px;
  overflow: hidden;
  border: 1px solid var(--ch-border);
  border-radius: var(--ch-r-md);
  background: var(--ch-bg);
  transition: border-color 180ms var(--ch-ease), background 180ms var(--ch-ease);
}

.chat-hero__prompt-box.is-typing,
.chat-hero__prompt-box.has-text {
  border-color: var(--ch-border-em);
}

.chat-hero__prompt-box p {
  max-width: 270px;
  margin: 0;
  color: var(--ch-text);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.55;
  letter-spacing: -0.02em;
}

.chat-hero__caret,
.chat-hero__prompt-caret {
  display: none;
  width: 1px;
  height: 1em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--ch-text-mid);
  animation: ch-caret 0.9s steps(2, start) infinite;
}

.is-typing .chat-hero__caret,
.chat-hero__prompt-card.is-typing .chat-hero__prompt-caret {
  display: inline-block;
}

.chat-hero__reload {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--ch-text-dim);
}

.chat-hero__prompt-actions {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ch-text-dim);
}

.chat-hero__ask,
.chat-hero__apply {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border: 1px solid var(--ch-border);
  border-radius: var(--ch-r-pill);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: default;
  pointer-events: none;
  transition: transform 140ms var(--ch-ease), background 180ms var(--ch-ease), color 180ms var(--ch-ease), border-color 180ms var(--ch-ease);
}

.chat-hero__ask {
  margin-left: auto;
  gap: 6px;
  padding: 0 14px;
  background: transparent;
  color: var(--ch-text-dim);
}

.chat-hero__ask .ch-icon {
  color: currentColor;
}

.chat-hero__ask.is-ready {
  border-color: var(--ch-accent);
  color: var(--ch-accent);
}

.chat-hero__ask.is-pressed,
.chat-hero__apply.is-pressed {
  transform: scale(0.96);
}

.chat-hero__refs-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.chat-hero__refs {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.chat-hero__ref {
  width: 86px;
  margin: 0;
  color: var(--ch-text-mid);
  text-align: center;
  font-size: 11px;
}

.chat-hero__ref img,
.chat-hero__ref--add {
  width: 86px;
  height: 86px;
  border: 1px solid var(--ch-border);
  border-radius: var(--ch-r-md);
  background: var(--ch-surface-1);
}

.chat-hero__ref img {
  display: block;
  object-fit: cover;
}

.chat-hero__ref figcaption {
  margin-top: 6px;
}

.chat-hero__ref--add {
  display: grid;
  place-items: center;
  border-style: dashed;
  color: var(--ch-text-dim);
  font-size: 24px;
}

.chat-hero__iskra-dock {
  position: absolute;
  top: 16px;
  right: 12px;
  bottom: 16px;
  width: 78%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  pointer-events: none;
  transition: opacity 320ms var(--ch-ease), transform 320ms var(--ch-ease);
}

.chat-hero.is-iskra-open .chat-hero__iskra-dock {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.chat-hero.is-iskra-open .chat-hero__composer-panel {
  opacity: 0.55;
  transform: translateY(0);
  animation: none;
  filter: blur(0.4px);
  transition: opacity 320ms var(--ch-ease), filter 320ms var(--ch-ease);
}

.chat-hero__dock-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--ch-border);
}

.chat-hero__avatar {
  width: 34px;
  height: 34px;
  overflow: hidden;
  border: 1px solid var(--ch-border);
  border-radius: var(--ch-r-pill);
  background: var(--ch-surface-2);
}

.chat-hero__avatar picture,
.chat-hero__avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
}

.chat-hero__dock-title {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.chat-hero__dock-title strong {
  color: var(--ch-text);
  font-size: 13px;
  font-weight: 700;
}

.chat-hero__dock-title span,
.chat-hero__close {
  color: var(--ch-text-dim);
  font-size: 11px;
}

.chat-hero__tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--ch-border);
  border-radius: var(--ch-r-pill);
  background: var(--ch-surface-1);
}

.chat-hero__tabs span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: var(--ch-r-pill);
  color: var(--ch-text-mid);
  font-size: 11px;
  font-weight: 650;
}

.chat-hero__tabs .is-active {
  background: var(--ch-text);
  color: var(--ch-bg);
}

.chat-hero__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--ch-text-dim);
}

.chat-hero__dock-body {
  display: grid;
  gap: 10px;
  padding: 14px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  align-content: start;
}

.chat-hero__dock-ref {
  width: 72px;
  height: 72px;
  border: 1px solid var(--ch-border);
  border-radius: var(--ch-r-md);
  object-fit: cover;
  background: var(--ch-surface-1);
  opacity: 0;
  transform: translateY(8px);
}

.chat-hero__dock-ref.is-shown {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 280ms var(--ch-ease), transform 280ms var(--ch-ease);
}

.chat-hero__messages {
  display: grid;
  gap: 10px;
}

.chat-hero__message,
.chat-hero__prompt-card,
.chat-hero__gallery-strip {
  border: 1px solid var(--ch-border);
  border-radius: var(--ch-r-md);
  background: var(--ch-surface-2);
}

.chat-hero__message {
  padding: 12px 14px;
  color: var(--ch-text);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.55;
  letter-spacing: -0.02em;
  opacity: 0;
  transform: translateY(8px);
  animation: ch-message-in 0.32s var(--ch-ease) forwards;
}

.chat-hero__message--muted {
  color: var(--ch-text-mid);
}

.chat-hero__message.is-collapsing {
  animation: none;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 260ms var(--ch-ease), transform 260ms var(--ch-ease);
}

.chat-hero__thinking {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 0 4px;
  color: var(--ch-text-dim);
  font-size: 12px;
}

.chat-hero__thinking::before {
  content: "";
  width: 11px;
  height: 11px;
  border: 2px solid rgba(214, 132, 29, 0.22);
  border-top-color: var(--ch-accent);
  border-radius: var(--ch-r-pill);
  animation: ch-spin 0.8s linear infinite;
}

.chat-hero__prompt-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  opacity: 0;
  transform: translateY(8px);
}

.chat-hero__prompt-card.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 320ms var(--ch-ease), transform 320ms var(--ch-ease);
}

.chat-hero__prompt-label {
  display: flex;
  justify-content: space-between;
}

.chat-hero__prompt-label span:last-child {
  color: var(--ch-ok);
}

.chat-hero__prompt-card p {
  max-height: 116px;
  margin: 0;
  overflow: hidden;
  padding: 12px;
  border-radius: var(--ch-r-sm);
  background: rgba(0, 0, 0, 0.36);
  color: var(--ch-text);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.55;
}

.chat-hero__prompt-card-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ch-text-dim);
  font-size: 12px;
  font-weight: 650;
}

.chat-hero__apply {
  min-height: 32px;
  padding: 0 14px;
  border-radius: var(--ch-r-sm);
  border-color: transparent;
  background: var(--ch-text);
  color: var(--ch-bg);
}

.chat-hero__gallery-strip {
  position: absolute;
  left: 6%;
  right: 30%;
  bottom: 118px;
  height: 260px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 12px 14px;
  background: var(--ch-bg);
  border: 1px solid var(--ch-border-em);
  border-radius: var(--ch-r-lg);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.42), 0 1px 0 rgba(255, 255, 255, 0.05) inset;
  opacity: 0;
  transform: translate(-12px, 16px) scale(0.96);
  pointer-events: none;
  transition: opacity 320ms var(--ch-ease), transform 360ms var(--ch-ease);
}

.chat-hero.is-gallery-open .chat-hero__gallery-strip {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

.chat-hero.is-gallery-open .chat-hero__iskra-dock {
  filter: blur(0.4px);
  transition: filter 320ms var(--ch-ease);
}


.chat-hero__gallery-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.chat-hero__gallery-head span:last-child {
  color: var(--ch-text-mid);
  text-transform: none;
  letter-spacing: 0.04em;
}

.chat-hero__gallery-result {
  position: relative;
  margin: 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--ch-border);
  border-radius: var(--ch-r-md);
  background: var(--ch-surface-1);
}

.chat-hero__gallery-result.is-generating {
  background: linear-gradient(110deg, var(--ch-surface-1) 20%, rgba(255, 255, 255, 0.05) 42%, var(--ch-surface-1) 64%);
  background-size: 220% 100%;
  animation: ch-shimmer 0.9s linear infinite;
}

.chat-hero__gallery-result img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 420ms var(--ch-ease), transform 420ms var(--ch-ease);
}

.chat-hero__gallery-result.is-ready img {
  opacity: 1;
  transform: scale(1);
}

.chat-hero__gallery-result figcaption {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 4px 9px;
  border-radius: var(--ch-r-pill);
  background: rgba(10, 10, 11, 0.78);
  color: var(--ch-text-mid);
  font-size: 11px;
  letter-spacing: 0.02em;
  opacity: 0;
  transition: opacity 320ms var(--ch-ease) 220ms;
}

.chat-hero__gallery-result.is-ready figcaption {
  opacity: 1;
}

.chat-hero.is-resetting .chat-hero__composer-panel,
.chat-hero.is-resetting .chat-hero__iskra-dock,
.chat-hero.is-resetting .chat-hero__gallery-strip {
  opacity: 0.001;
  transition: opacity 260ms var(--ch-ease);
}

@keyframes ch-panel-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ch-message-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ch-caret {
  50% {
    opacity: 0;
  }
}

@keyframes ch-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes ch-shimmer {
  to {
    background-position: -220% 0;
  }
}

@media (min-width: 900px) {
  .ognivo-hero__art--test {
    height: 100%;
    justify-content: flex-end;
    padding-top: 4px;
  }

  .chat-hero {
    margin-left: auto;
    margin-right: 0;
  }
}

@media (max-width: 1040px) and (min-width: 900px) {
  .chat-hero {
    width: min(100%, 440px);
  }

  .chat-hero__stage {
    height: 488px;
  }
}

@media (max-width: 899px) {
  .ognivo-landing__top {
    min-height: 0 !important;
  }

  .ognivo-hero__art--test {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    margin: 24px 0 0;
    padding: 0;
  }

  .chat-hero {
    width: min(100%, 620px);
  }
}

@media (max-width: 640px) {
  .chat-hero {
    gap: 10px;
  }

  .chat-hero__stage {
    position: relative;
    height: 540px;
  }

  .chat-hero__composer-panel {
    position: absolute;
    inset: 0;
    width: auto;
    transform: translateY(10px);
  }

  .chat-hero__iskra-dock {
    position: absolute;
    top: 12px;
    right: 8px;
    bottom: 12px;
    width: 86%;
    transform: translateY(14px) scale(0.985);
  }

  .chat-hero__gallery-strip {
    left: 4%;
    right: 22%;
    bottom: 140px;
    height: 250px;
  }

  .chat-hero__dock-head {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  .chat-hero__tabs {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .chat-hero__close {
    grid-column: 3;
    grid-row: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat-hero *,
  .chat-hero *::before,
  .chat-hero *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
