@import url("site.css");

/* Messaging hub — layout & interactive demo only (tokens + chrome in site.css) */

.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.25rem 2rem;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: var(--accent-soft);
  border: 1px solid rgba(88, 101, 242, 0.35);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #b4b9ff;
  margin-bottom: 1.25rem;
  animation: fadeUp 0.7s ease both;
}

.hero-badge .pulse {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(59, 165, 93, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(59, 165, 93, 0.5);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(59, 165, 93, 0);
  }
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 0%, #b4b9ff 50%, #99aab5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: fadeUp 0.7s 0.1s ease both;
}

.hero .lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 1.75rem;
  animation: fadeUp 0.7s 0.2s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  animation: fadeUp 0.7s 0.3s ease both;
}

/* Stats strip */
.stats-strip {
  max-width: 900px;
  margin: 0 auto 3rem;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 640px) {
  .stats-strip {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background: linear-gradient(145deg, rgba(35, 39, 42, 0.9), rgba(30, 30, 36, 0.95));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: border-color 0.2s, transform 0.2s;
}

.stat-card:hover {
  border-color: rgba(88, 101, 242, 0.4);
  transform: translateY(-2px);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  text-align: center;
}

.section-sub {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 2rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* Bento features */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}

.bento-card {
  grid-column: span 4;
  background: rgba(35, 39, 42, 0.65);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  transition: border-color 0.25s, background 0.25s;
  position: relative;
  overflow: hidden;
}

.bento-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--green));
  opacity: 0;
  transition: opacity 0.25s;
}

.bento-card:hover::before {
  opacity: 1;
}

.bento-card:hover {
  border-color: rgba(88, 101, 242, 0.35);
  background: rgba(40, 44, 48, 0.85);
}

.bento-card.wide {
  grid-column: span 8;
}

.bento-card.tall {
  grid-column: span 6;
  min-height: 200px;
}

@media (max-width: 900px) {
  .bento-card,
  .bento-card.wide,
  .bento-card.tall {
    grid-column: span 12;
  }
}

.bento-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  margin-bottom: 0.85rem;
  font-size: 1.35rem;
}

.bento-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.bento-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Demo chat */
.demo-wrap {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  min-height: 380px;
  background: var(--surface);
}

@media (max-width: 720px) {
  .demo-wrap {
    grid-template-columns: 1fr;
  }
  .demo-sidebar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem !important;
  }
  .demo-thread {
    width: auto !important;
    flex: 1 1 45%;
  }
}

.demo-sidebar {
  background: #1b1e22;
  padding: 1rem 0.75rem;
  border-right: 1px solid var(--border);
}

.demo-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding: 0 0.5rem 0.5rem;
}

.demo-thread {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.88rem;
  margin-bottom: 4px;
  transition: background 0.15s;
  border: 1px solid transparent;
}

.demo-thread:hover,
.demo-thread.is-active {
  background: rgba(88, 101, 242, 0.15);
  border-color: rgba(88, 101, 242, 0.25);
}

.demo-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #7c89ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.demo-thread small {
  color: var(--muted);
  font-size: 0.75rem;
}

.demo-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.demo-header {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.demo-header .hash {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.85rem;
}

.demo-messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.msg-row {
  display: flex;
  gap: 0.65rem;
  max-width: 92%;
  animation: msgIn 0.45s ease both;
}

.msg-row.other {
  align-self: flex-start;
}

.msg-row.me {
  align-self: flex-end;
  flex-direction: row-reverse;
}

@keyframes msgIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.msg-bubble {
  background: #313338;
  border-radius: 4px 12px 12px 12px;
  padding: 0.55rem 0.85rem;
  font-size: 0.9rem;
  line-height: 1.45;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.msg-row.me .msg-bubble {
  background: linear-gradient(145deg, #4e5af3, var(--accent));
  border-radius: 12px 4px 12px 12px;
  border-color: transparent;
}

.msg-meta {
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
  display: flex;
  gap: 0.4rem;
  align-items: baseline;
}

.msg-meta strong {
  color: #fff;
}

.typing-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
  min-height: 28px;
}

.typing-dots {
  display: inline-flex;
  gap: 4px;
  padding: 0.45rem 0.75rem;
  background: #313338;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.typing-dots span {
  width: 6px;
  height: 6px;
  background: var(--muted);
  border-radius: 50%;
  animation: bounce 1.2s infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.15s;
}
.typing-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes bounce {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  40% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

.demo-input-bar {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.5rem;
  align-items: center;
  background: #202225;
}

.demo-input-bar input {
  flex: 1;
  background: #383a40;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
}

.demo-input-bar input::placeholder {
  color: #72767d;
}

.demo-input-bar button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.55rem 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: filter 0.15s;
}

.demo-input-bar button:hover {
  filter: brightness(1.08);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 1.5rem;
  border-left: 2px solid var(--border);
  margin-left: 0.75rem;
}

.timeline-item {
  position: relative;
  padding-bottom: 1.75rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.5rem;
  top: 0.2rem;
  width: 12px;
  height: 12px;
  margin-left: -5px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--bg-deep);
}

.timeline-item h4 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.timeline-item p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Shortcuts */
.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.kbd {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.8rem;
  font-family: ui-monospace, monospace;
  color: var(--text);
}

.kbd-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: rgba(35, 39, 42, 0.8);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.88rem;
}

.kbd-wrap span:last-child {
  color: var(--muted);
  font-size: 0.82rem;
}

/* FAQ */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  overflow: hidden;
  background: rgba(35, 39, 42, 0.5);
}

.faq-q {
  width: 100%;
  text-align: left;
  padding: 1rem 1.1rem;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: background 0.15s;
}

.faq-q:hover {
  background: rgba(255, 255, 255, 0.04);
}

.faq-q .chev {
  transition: transform 0.25s;
  color: var(--muted);
  font-size: 0.75rem;
}

.faq-item.open .faq-q .chev {
  transform: rotate(180deg);
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.faq-item.open .faq-a {
  max-height: 200px;
}

.faq-a-inner {
  padding: 0 1.1rem 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
}

/* Toast demo */
.toast-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  z-index: 200;
  background: #313338;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 1.25rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
}

.toast-bar.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast-bar .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
}

