/* Chat marketing scroll sequence — public /community/chat */

:root {
  --chat-seq-sticky-top: 110px;
}

@media (max-width: 860px) {
  :root {
    --chat-seq-sticky-top: 146px;
  }
}

/* Public: marketing on; product off. Embed: reverse. */
#chatProduct {
  display: none;
}

body.embed-app #chatMarketing {
  display: none !important;
}

body.embed-app #chatProduct {
  display: block;
}

.chat-story {
  position: relative;
}

/* Example switcher — simple prev / label / next */
.ex-switcher {
  width: min(960px, calc(100vw - 32px));
  margin: 0 auto 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.ex-nav {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: #fff;
  color: #111827;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ex-nav:hover {
  background: #f3f4f6;
  border-color: rgba(17, 24, 39, 0.22);
}

.ex-nav:focus-visible {
  outline: 2px solid #111827;
  outline-offset: 2px;
}

.ex-nav svg {
  width: 16px;
  height: 16px;
}

.ex-switcher-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  /* Wide enough for longest label ("Beverage competitor analysis") so arrows stay fixed */
  width: 260px;
  flex: 0 0 260px;
}

.ex-label {
  font-family: Inter, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #111827;
  letter-spacing: -0.01em;
  text-align: center;
  white-space: nowrap;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ex-dots {
  display: flex;
  align-items: center;
  gap: 7px;
}

.ex-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.16);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.ex-dot.is-on {
  background: #111827;
  transform: scale(1.15);
}

.ex-dot:focus-visible {
  outline: 2px solid #111827;
  outline-offset: 2px;
}

/* Three static sections — all visible at once */
.chat-static-flow {
  width: min(960px, calc(100vw - 32px));
  margin: 0 auto 64px;
  display: flex;
  flex-direction: column;
  gap: 72px;
}

.chat-static-section {
  display: grid;
  grid-template-columns: minmax(140px, 168px) minmax(0, 1fr);
  gap: 28px 36px;
  align-items: start;
}

.ex-slide-viewport {
  overflow: hidden;
}

.ex-slide-panel {
  will-change: transform, opacity;
}

.ex-slide-panel.is-leave {
  animation: ex-slide-leave 0.32s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.ex-slide-panel.is-enter {
  animation: ex-slide-enter 0.32s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

#exOp.is-switching {
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

#exOp.is-switched {
  animation: ex-slide-enter 0.32s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes ex-slide-leave {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-18px);
  }
}

@keyframes ex-slide-enter {
  from {
    opacity: 0;
    transform: translateX(22px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ex-slide-panel.is-leave,
  .ex-slide-panel.is-enter {
    animation: none;
  }
}

/* Match landing .feature-cards-section padding + hero rhythm */
.chat-marketing-hero {
  text-align: center;
  width: min(920px, calc(100vw - 32px));
  margin: 100px auto 0;
  position: relative;
  z-index: 1;
}

/* Override community .chat-head bottom spacing on the marketing hero */
.chat-marketing-hero.chat-head {
  margin-bottom: 0;
}

.chat-marketing-hero .chat-hero-icon,
.chat-marketing-hero .qava-hero-icon {
  width: 124px;
  height: 124px;
  border-radius: 28px;
  object-fit: cover;
  display: block;
  margin: 0 auto 26px auto;
  box-shadow: 0 16px 50px rgba(20, 10, 22, 0.18);
  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform;
  animation: qavaSideToSideFlip 2.4s linear infinite;
}

@keyframes qavaSideToSideFlip {
  0% {
    transform: perspective(900px) rotateY(-22deg) rotateZ(-1deg);
  }
  25% {
    transform: perspective(900px) rotateY(0deg) rotateZ(0deg);
  }
  50% {
    transform: perspective(900px) rotateY(22deg) rotateZ(1deg);
  }
  75% {
    transform: perspective(900px) rotateY(0deg) rotateZ(0deg);
  }
  100% {
    transform: perspective(900px) rotateY(-22deg) rotateZ(-1deg);
  }
}

.chat-marketing-hero h1.feature-cards-header,
.chat-marketing-hero .qava-hero-heading {
  font-family: "Libre Caslon Display", "Canela", "Canela Deck", "Iowan Old Style", "Baskerville", "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.012em;
  font-size: clamp(34px, 3.6vw, 54px);
  line-height: 1.08;
  /* Beat landing .feature-cards-header { white-space: nowrap; br { display: none } } */
  white-space: normal !important;
  max-width: none;
  margin: 0 auto 10px auto;
  text-align: center;
  color: #111827;
}

.chat-marketing-hero .qava-hero-heading .qava-hero-line {
  display: block !important;
}

.chat-marketing-hero p.feature-cards-subheader,
.chat-marketing-hero .qava-hero-subheader {
  font-family: Inter, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: #6b6b6b;
  text-align: center;
  margin: 0 auto 72px !important;
  line-height: 1.45;
  white-space: nowrap;
  max-width: none;
}

@media (max-width: 720px) {
  /* Match landing mobile feature-cards-section top padding */
  .chat-marketing-hero {
    margin-top: 60px;
  }

  .chat-marketing-hero p.feature-cards-subheader,
  .chat-marketing-hero .qava-hero-subheader {
    white-space: normal;
    padding: 0 8px;
  }

  .chat-marketing-hero h1.feature-cards-header,
  .chat-marketing-hero .qava-hero-heading {
    white-space: normal;
  }

  .chat-marketing-hero .chat-hero-icon,
  .chat-marketing-hero .qava-hero-icon {
    width: 96px;
    height: 96px;
    border-radius: 22px;
    margin-bottom: 20px;
  }

  .chat-static-section {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .seq-rail-label {
    font-size: 11px;
  }

  .seq-rail .seq-stage-count {
    margin-top: 10px;
  }

  .chat-static-flow {
    gap: 48px;
  }

  .ex-switcher {
    gap: 14px;
    margin-bottom: 28px;
  }

  .ex-switcher-mid {
    width: min(260px, calc(100vw - 120px));
    flex-basis: min(260px, calc(100vw - 120px));
  }

  .ex-label {
    font-size: 13px;
  }
}

.chat-story .seq-rail,
.chat-story .seq-main {
  width: 100%;
  min-width: 0;
}

.seq-rail {
  padding-top: 4px;
}

.seq-rail-item {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
}

.seq-rail-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #111827;
  line-height: 1.25;
  /* Same underline weight on every section — avoid separate bar elements */
  border-bottom: 2px solid #111827;
  padding-bottom: 8px;
  box-sizing: border-box;
}

.seq-rail .seq-stage-count {
  margin-top: 22px;
  font-size: 11px;
  font-weight: 300;
  color: #9ca3af;
}

.seq-thread-flow {
  position: relative;
}

.seq-reply-column {
  margin: 0 0 0 12px;
  padding: 0 0 0 12px;
  border-left: 1px solid #d1d5db;
}

.seq-reply-column:not(:has(.seq-reply.is-in)):has(.seq-compact-grid.is-empty),
.seq-thread-flow:has(.seq-post.is-out) .seq-reply-column {
  margin: 0;
  padding: 0;
  border: 0;
}

/* Compact prior-phase replies (2-col chip grid) */
.seq-compact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 6px;
  margin-top: 8px;
}

.seq-compact-grid.is-empty {
  display: none;
  margin: 0;
}

.seq-chip {
  opacity: 0;
  transform: scale(0.97);
  padding: 6px 8px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 300;
  color: #6b7280;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  border: 1px solid rgba(17, 24, 39, 0.08);
  background: #fff;
  box-shadow:
    0 1px 2px rgba(17, 24, 39, 0.04),
    0 4px 12px rgba(17, 24, 39, 0.05);
  border-radius: 8px;
  transition:
    opacity 0.2s ease,
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.seq-chip.is-in {
  opacity: 1;
  transform: scale(1);
}

.seq-chip b {
  font-weight: 500;
  color: #374151;
  flex-shrink: 0;
}

.seq-chip-dot {
  color: #d1d5db;
  flex-shrink: 0;
}

.seq-chip-snip {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* Dot loader before first perspectives auto-start */
.seq-loader {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 22px 4px 16px;
}

.seq-loader.is-on {
  display: flex;
}

.seq-loader-ring {
  position: relative;
  width: 32px;
  height: 32px;
}

.seq-loader-ring i {
  position: absolute;
  top: 0;
  left: 50%;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: #9ca3af;
  transform-origin: 50% 16px;
  animation: seq-loader-dot 0.9s linear infinite;
}

.seq-loader-ring i:nth-child(1) { transform: rotate(0deg); animation-delay: 0s; }
.seq-loader-ring i:nth-child(2) { transform: rotate(45deg); animation-delay: -0.1125s; }
.seq-loader-ring i:nth-child(3) { transform: rotate(90deg); animation-delay: -0.225s; }
.seq-loader-ring i:nth-child(4) { transform: rotate(135deg); animation-delay: -0.3375s; }
.seq-loader-ring i:nth-child(5) { transform: rotate(180deg); animation-delay: -0.45s; }
.seq-loader-ring i:nth-child(6) { transform: rotate(225deg); animation-delay: -0.5625s; }
.seq-loader-ring i:nth-child(7) { transform: rotate(270deg); animation-delay: -0.675s; }
.seq-loader-ring i:nth-child(8) { transform: rotate(315deg); animation-delay: -0.7875s; }

@keyframes seq-loader-dot {
  0%, 100% { opacity: 0.15; }
  40% { opacity: 1; }
}

.seq-loader-label {
  font-size: 13px;
  font-weight: 300;
  color: #9a9a9a;
}

.seq-replies {
  position: relative;
  margin: 0;
  padding: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Static cards — always visible, no enter/exit animation */
.thread-detail .seq-replies .seq-reply,
.thread-detail .seq-replies .seq-reply.is-in {
  display: flex;
  gap: 10px;
  opacity: 1;
  max-height: none;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 8px;
  transform: none;
  filter: none;
  box-shadow:
    0 1px 2px rgba(17, 24, 39, 0.04),
    0 4px 12px rgba(17, 24, 39, 0.05);
  transition: none;
  pointer-events: auto;
  position: relative;
  background: #fff;
  box-sizing: border-box;
}

.thread-detail .seq-replies .seq-reply > div:not(.avatar) {
  flex: 1;
  min-width: 0;
}

.thread-detail .seq-replies .seq-reply .reply-body {
  font-size: 13px;
  line-height: 1.35;
}

.thread-detail .seq-replies .seq-reply .attach-chips {
  margin-top: 6px;
  gap: 4px;
}

.thread-detail .seq-replies .seq-reply .attach-chip {
  font-size: 11px;
  padding: 4px 8px;
}

.thread-detail .seq-replies .seq-reply .seq-reply-stats {
  margin-top: 6px;
}

.seq-reply-stats,
.seq-op-stats {
  margin-top: 8px;
  width: 100%;
}

.thread-detail.seq-stage-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  overflow: visible;
  flex: 0 1 auto;
  min-height: 0;
}

.thread-detail.seq-stage-card .thread-post.is-op.seq-post {
  margin: 0;
  padding: 12px 14px;
  /* Solid site gray — opaque so the dotted page bg never shows through */
  background: #f3f4f6;
  color: #111827;
  border-radius: 8px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  box-shadow:
    0 1px 2px rgba(17, 24, 39, 0.04),
    0 4px 12px rgba(17, 24, 39, 0.05);
}

.thread-detail.seq-stage-card .thread-post.is-op.seq-post .thread-title {
  font-size: clamp(17px, 2vw, 20px);
  margin-bottom: 4px;
}

.thread-detail.seq-stage-card .thread-post.is-op.seq-post .thread-body {
  font-size: 13.5px;
  line-height: 1.4;
}

.thread-detail.seq-stage-card .thread-post.is-op.seq-post .thread-body p:last-child {
  margin-bottom: 0;
}

.seq-stat {
  display: inline;
  font-weight: 500;
  color: #111827;
}

.seq-mark {
  color: inherit;
  font: inherit;
  background: linear-gradient(
    transparent 62%,
    rgba(250, 204, 21, 0.42) 62%
  );
  border-radius: 1px;
  padding: 0 1px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.seq-mark.seq-stat {
  background: linear-gradient(
    transparent 55%,
    rgba(250, 204, 21, 0.5) 55%
  );
}

.seq-stage-card .thread-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-start;
  justify-content: flex-end;
}

/* Match community .tag-pill (composer / agenda) exactly */
.seq-stage-card .thread-tags .tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(17, 24, 39, 0.1);
  background: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  font: inherit;
  font-size: 11px;
  font-weight: 400;
  color: #6b7280;
  cursor: default;
  line-height: 1.2;
  white-space: nowrap;
}

.seq-stage-card .thread-tags .tag-pill-emoji {
  font-size: 12px;
  line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
  .seq-post,
  .seq-reply,
  .seq-chip,
  .seq-loader-ring i {
    transition: none !important;
    filter: none !important;
    animation: none !important;
  }

  .seq-reply.is-in,
  .seq-chip.is-in {
    opacity: 1 !important;
    transform: none !important;
  }

  .seq-reply.is-out {
    opacity: 0 !important;
    transform: none !important;
    max-height: 0 !important;
  }
}

.room-thesis {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: center;
  padding: 96px 16px 40px;
  background: transparent;
}

.room-thesis-inner {
  width: min(920px, calc(100vw - 32px));
  text-align: center;
  padding: 36px 40px 40px;
  border-radius: 12px;
  background: #111827;
}

.room-thesis h2 {
  margin: 0 0 14px;
  font-family: "Libre Caslon Display", Georgia, serif;
  font-size: clamp(17px, 3.35vw, 36px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #fff;
  white-space: normal;
}

.room-thesis p {
  margin: 0 auto;
  max-width: none;
  font-family: Inter, system-ui, sans-serif;
  font-size: clamp(13px, 1.65vw, 16px);
  font-weight: 300;
  line-height: 1.55;
  color: #9ca3af;
  white-space: nowrap;
}

.premium-pitch {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: center;
  padding: 56px 16px 100px;
}

.premium-pitch-inner {
  width: min(560px, calc(100vw - 32px));
  text-align: center;
}

.premium-pitch-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 18px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-family: Inter, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.premium-pitch-badge svg {
  display: block;
  width: 13px;
  height: 13px;
}

.premium-pitch h3 {
  margin: 0 0 8px;
  font-family: "Libre Caslon Display", Georgia, serif;
  font-size: clamp(26px, 3.6vw, 34px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #111827;
}

.premium-pitch-lead {
  margin: 0 0 28px;
  font-family: Inter, system-ui, sans-serif;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.5;
  color: #6b7280;
}

.premium-pitch-card {
  text-align: left;
  margin: 0 0 28px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 8px 24px rgba(17, 24, 39, 0.06);
  overflow: hidden;
}

.premium-pitch-feats {
  padding: 8px 20px 4px;
}

.premium-pitch-feat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  font-family: Inter, system-ui, sans-serif;
  font-size: 15px;
  font-weight: 300;
  color: #111827;
}

.premium-pitch-feat:last-child {
  border-bottom: 0;
}

.premium-pitch-icon {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #f3f4f6;
  color: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
}

.premium-pitch-icon svg {
  display: block;
  width: 16px;
  height: 16px;
}

.premium-pitch-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  padding: 12px 22px;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font-family: Inter, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease;
}

.premium-pitch-cta:hover {
  background: #000;
  color: #fff;
}

@media (max-width: 640px) {
  .room-thesis h2,
  .room-thesis p {
    white-space: normal;
  }

  .room-thesis-inner {
    padding: 28px 20px 32px;
  }
}
