/* =====================================================
   PRODUCT PAGE STYLES — Command Layer & Action Layer
   Shared layout for both product pages
   ===================================================== */

/* HERO */
.product-hero {
  position: relative;
  padding: 80px 0 100px;
  background: linear-gradient(180deg, #0B0420 0%, #160933 40%, #1E0D3C 100%);
  color: #fff;
  overflow: hidden;
}
.product-hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 700px 400px at 20% 20%, rgba(91,33,182,.28) 0%, transparent 60%),
    radial-gradient(ellipse 600px 400px at 90% 90%, rgba(245,158,11,.12) 0%, transparent 60%);
}
.product-hero::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(124,58,237,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,58,237,.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 100% 80% at 50% 50%, #000 30%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 100% 80% at 50% 50%, #000 30%, transparent 90%);
}
.product-hero-inner {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}
.ph-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 14px 5px 6px;
  background: rgba(124,58,237,.18);
  border: 1px solid rgba(124,58,237,.32);
  border-radius: 100px;
  font-size: 12px; font-weight: 700; color: #C4B5FD;
  letter-spacing: .06em; text-transform: uppercase;
  margin-bottom: 24px;
}
.ph-pill .dot { width:16px; height:16px; border-radius:50%; background:linear-gradient(135deg, var(--purple), var(--amber)); }
.product-hero h1 {
  color: #fff;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.05; letter-spacing: -.025em;
  margin-bottom: 20px;
}
.product-hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #C4B5FD 0%, #F59E0B 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.product-hero .lead {
  font-size: 18px; color: rgba(255,255,255,.7); line-height: 1.6;
  margin-bottom: 32px; max-width: 540px;
}
.product-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.product-hero-actions .btn-secondary {
  background: rgba(255,255,255,.06); color: #fff; border-color: rgba(255,255,255,.25);
}
.product-hero-actions .btn-secondary:hover {
  background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.4);
}

/* Stats strip on hero */
.ph-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 40px; padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,.1);
}
.ph-stat-v { font-size: 28px; font-weight: 800; color: #fff; letter-spacing: -.02em; }
.ph-stat-v em { font-style: normal; color: var(--amber); }
.ph-stat-l { font-size: 12px; color: rgba(255,255,255,.55); margin-top: 4px; }

/* Hero visual card (right side) */
.ph-visual {
  position: relative;
}
.ph-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(124,58,237,.25);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0,0,0,.4);
  backdrop-filter: blur(10px);
}
.ph-card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  background: rgba(0,0,0,.3);
  border-bottom: 1px solid rgba(124,58,237,.2);
}
.ph-card-orb {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, var(--purple), var(--amber));
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.ph-card-title { font-size: 13px; font-weight: 700; color: #fff; }
.ph-card-sub { font-size: 11px; color: rgba(255,255,255,.5); margin-top: 1px; }
.ph-card-body { padding: 22px; }
.ph-msg {
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.55;
}
.ph-msg.ai {
  background: rgba(124,58,237,.12);
  border: 1px solid rgba(124,58,237,.2);
  color: rgba(255,255,255,.85);
}
.ph-msg.user {
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.7);
  margin-left: 36px;
}
.ph-msg.good {
  background: rgba(34,197,94,.12);
  border: 1px solid rgba(34,197,94,.25);
  color: #BBF7D0;
}
.ph-msg strong { color: #F5D08C; font-weight: 700; }
.ph-msg.good strong { color: #86EFAC; }
.ph-card-foot {
  padding: 12px 18px;
  background: rgba(0,0,0,.25);
  border-top: 1px solid rgba(124,58,237,.15);
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: rgba(255,255,255,.5);
}
.ph-card-foot .live {
  width: 7px; height: 7px; border-radius: 50%; background: #4ADE80;
  box-shadow: 0 0 0 3px rgba(74,222,128,.2);
}

/* ===== SECTION GENERICS ===== */
.product-section { padding: 96px 0; }
.product-section.dark {
  background: linear-gradient(180deg, #160933 0%, #1E0D3C 100%);
  color: #fff;
}
.product-section.dark h1, .product-section.dark h2, .product-section.dark h3 { color: #fff; }
.product-section.dark p { color: rgba(255,255,255,.65); }
.product-section.soft { background: var(--bg-soft); }

.ps-head { text-align: center; max-width: 760px; margin: 0 auto 40px; }
.ps-head p { font-size: 16px; line-height: 1.6; }
.ps-head h2 { font-size: clamp(26px, 3.4vw, 38px); margin-bottom: 10px; }

/* Combined agents+demo section needs less vertical padding so it fits in one scroll */
#agents.product-section { padding: 44px 0 48px; }
#agents .ps-head { margin-bottom: 20px; }
#agents .ps-head h2 { font-size: clamp(22px, 2.8vw, 30px); margin-bottom: 6px; }
#agents .ps-head p { font-size: 14px; max-width: 600px; margin: 0 auto; }
#agents .ps-head .label { margin-bottom: 12px; }
#agents .agent-card { padding: 12px 14px; }
#agents .agent-card p {
  font-size: 12px; line-height: 1.4; margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
#agents .agent-card h3 { font-size: 14px; }
#agents .agent-icon-lg { width: 30px; height: 30px; font-size: 15px; margin-bottom: 8px; border-radius: 8px; }
#agents .agent-tag { font-size: 9px; padding: 2px 6px; margin-bottom: 6px; }
#agents .agent-proof { font-size: 10px; padding: 3px 7px; }
#agents .demo-panel-body { min-height: 280px; }
#agents .demo-chat { min-height: 280px; padding: 14px 16px; }
#agents .demo-meta { padding: 14px 16px; }
#agents .demo-stage { margin-top: 14px; }
#agents .demo-tip-wrap { margin-top: 10px; }

/* ===== PROBLEM/SOLUTION STAT BAND ===== */
.stat-band {
  background: var(--dark);
  padding: 48px 0;
}
.stat-band-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
}
.sb-item { text-align: center; padding: 0 20px; border-right: 1px solid rgba(255,255,255,.1); }
.sb-item:last-child { border-right: 0; }
.sb-v { font-size: 32px; font-weight: 800; color: #fff; letter-spacing: -.03em; }
.sb-v em { font-style: normal; color: var(--amber); }
.sb-l { font-size: 12px; color: rgba(255,255,255,.55); margin-top: 4px; line-height: 1.4; }

/* ===== AGENT CARDS GRID ===== */
.agents-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
/* Command layer uses 6-in-a-row for compactness — higher specificity to win over #agents rules */
#agents .agents-grid.agents-grid-6 {
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
#agents .agents-grid.agents-grid-6 .agent-card {
  padding: 12px 12px 10px;
  min-width: 0;        /* allow narrow flex items to shrink */
}
#agents .agents-grid.agents-grid-6 .agent-icon-lg {
  width: 28px; height: 28px; font-size: 14px;
  border-radius: 8px; margin-bottom: 6px;
}
#agents .agents-grid.agents-grid-6 .agent-tag {
  font-size: 8.5px; padding: 2px 5px; margin-bottom: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%; display: inline-block;
}
#agents .agents-grid.agents-grid-6 .agent-card h3 {
  font-size: 13px; line-height: 1.2;
  margin-bottom: 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.4em;
}
#agents .agents-grid.agents-grid-6 .agent-card p {
  font-size: 11px; line-height: 1.35;
  margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  min-height: calc(11px * 1.35 * 3);
}
#agents .agents-grid.agents-grid-6 .agent-proof {
  font-size: 9.5px;
  padding: 3px 6px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: block;       /* full-width pill so cards align */
  text-align: center;
}
#agents .agents-grid.agents-grid-6 .agent-card-accent {
  left: 14px; right: 14px;
}

/* Mobile: keep responsive — fall back to fewer columns */
@media (max-width: 1100px) {
  #agents .agents-grid.agents-grid-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  #agents .agents-grid.agents-grid-6 { grid-template-columns: repeat(2, 1fr); }
}
.agent-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  position: relative;
  transition: all .25s;
  cursor: pointer;
  display: flex; flex-direction: column;
}
.agent-card.is-tab.active {
  border-color: var(--purple);
  box-shadow: 0 10px 26px rgba(91,33,182,.18);
  transform: translateY(-3px);
}
.agent-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
  border-color: rgba(124,58,237,.3);
}
.agent-card-accent {
  position: absolute; top: 0; left: 24px; right: 24px;
  height: 3px; border-radius: 0 0 3px 3px;
}
.accent-purple { background: var(--purple); }
.accent-amber  { background: var(--amber); }
.accent-pink   { background: #EC4899; }
.accent-teal   { background: #0D9488; }
.accent-blue   { background: #2563EB; }

.agent-icon-lg {
  width: 36px; height: 36px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; margin-bottom: 10px;
  background: linear-gradient(135deg, rgba(91,33,182,.1), rgba(245,158,11,.1));
}
.agent-card h3 { font-size: 15px; margin-bottom: 2px; line-height: 1.2; }
.agent-tag {
  display: inline-block;
  font-size: 9.5px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--purple); background: var(--purple-light);
  border-radius: 4px; padding: 2px 7px;
  margin-bottom: 8px;
}
.agent-tag.amber { color: var(--amber-dark); background: var(--amber-light); }
.agent-card p {
  font-size: 12px; line-height: 1.45;
  margin-bottom: 10px; flex: 1; color: var(--mid);
}
.agent-proof {
  font-size: 10.5px; font-weight: 600;
  color: var(--green); background: var(--green-light);
  border-radius: 5px; padding: 4px 8px;
  display: inline-flex; align-items: center; gap: 5px;
  width: max-content; max-width: 100%;
}
.agent-proof::before { content: '✓'; font-weight: 800; }
.agent-features {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.agent-features li {
  font-size: 13px; color: var(--mid);
  display: flex; gap: 8px; line-height: 1.5;
}
.agent-features li::before {
  content: '→'; color: var(--purple); font-weight: 700; flex-shrink: 0;
}

/* ===== DEMO SCREENS — embedded in agents section ===== */
.demo-stage {
  margin-top: 20px;
}
.demo-panel {
  display: none;
  max-width: 1180px; margin: 0 auto;
  background: linear-gradient(180deg, #0B0420 0%, #1E0D3C 100%);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(30,13,60,.3);
  border: 1px solid rgba(124,58,237,.15);
}
.demo-panel.active { display: block; }
.demo-tip {
  text-align: center; font-size: 12px; color: var(--purple);
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 100px;
  background: var(--purple-light);
  font-weight: 600;
}
.demo-tip-wrap { text-align: center; margin: 16px 0 0; }
.demo-panel-head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px;
  background: rgba(0,0,0,.35);
  border-bottom: 1px solid rgba(124,58,237,.2);
}
.demo-orb {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--purple), var(--amber));
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  box-shadow: 0 0 14px rgba(124,58,237,.5);
}
.demo-panel-title { font-size: 13.5px; font-weight: 700; color: #fff; }
.demo-panel-sub { font-size: 11px; color: rgba(255,255,255,.5); margin-top: 1px; }
.demo-panel-body {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  min-height: 320px;
}
.demo-chat {
  padding: 16px 20px 18px;
  border-right: 1px solid rgba(124,58,237,.15);
  display: flex; flex-direction: column; gap: 7px;
  min-height: 320px;
  position: relative;
}
.demo-chat .ph-msg {
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.45;
  border-radius: 8px;
}
.demo-chat .ph-msg.user { margin-left: 28px; }
.typing-bubble { padding: 7px 12px; border-radius: 8px; }
.demo-chat .ph-msg {
  margin-bottom: 0;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .35s ease, transform .35s ease;
}
.demo-chat .ph-msg.appeared {
  opacity: 1;
  transform: translateY(0);
}
.typing-bubble {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(124,58,237,.12);
  border: 1px solid rgba(124,58,237,.2);
  width: max-content;
  opacity: 0;
  transition: opacity .25s;
}
.typing-bubble.show { opacity: 1; }
.typing-bubble span {
  width: 6px; height: 6px; border-radius: 50%;
  background: #C4B5FD;
  animation: typingDot 1.2s infinite ease-in-out;
}
.typing-bubble span:nth-child(2) { animation-delay: .2s; }
.typing-bubble span:nth-child(3) { animation-delay: .4s; }
@keyframes typingDot {
  0%, 80%, 100% { opacity: .25; transform: scale(.8); }
  40%           { opacity: 1;   transform: scale(1); }
}
.demo-replay {
  position: absolute; top: 14px; right: 16px;
  font-size: 11px; font-weight: 700;
  color: rgba(196,181,253,.7);
  background: rgba(124,58,237,.15);
  border: 1px solid rgba(124,58,237,.3);
  padding: 5px 12px; border-radius: 100px;
  cursor: pointer;
  transition: all .15s;
  letter-spacing: .04em;
}
.demo-replay:hover { background: rgba(124,58,237,.3); color: #fff; }
.demo-meta {
  padding: 16px 20px 18px;
  background: rgba(255,255,255,.02);
}
.demo-domain {
  font-size: 10px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: #C4B5FD; margin-bottom: 10px;
}
.demo-metric {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(124,58,237,.2);
  border-radius: 8px;
  padding: 9px 12px;
  margin-bottom: 7px;
}
.demo-metric-l { font-size: 10px; color: rgba(255,255,255,.55); margin-bottom: 2px; }
.demo-metric-v {
  font-size: 17px; font-weight: 800; color: #fff;
  letter-spacing: -.02em;
}
.demo-metric-c { font-size: 10px; color: rgba(255,255,255,.5); margin-top: 2px; }
.demo-metric-bar {
  height: 3px; background: rgba(255,255,255,.08); border-radius: 3px;
  margin-top: 6px; overflow: hidden;
}
.demo-metric-bar div { height: 100%; border-radius: 3px; }
.demo-context {
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(245,158,11,.08);
  border: 1px solid rgba(245,158,11,.2);
  border-radius: 8px;
  font-size: 11px; line-height: 1.5;
  color: rgba(255,255,255,.7);
}

/* ===== INTEGRATION/ARCHITECTURE SECTION ===== */
.arch-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.arch-card {
  padding: 28px; border-radius: 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(124,58,237,.2);
  transition: all .25s;
}
.arch-card:hover { border-color: rgba(245,158,11,.4); background: rgba(124,58,237,.08); }
.arch-card-num {
  font-size: 12px; font-weight: 700; color: var(--amber);
  letter-spacing: .14em; margin-bottom: 8px;
}
.arch-card h4 { color: #fff; font-size: 18px; margin-bottom: 10px; }
.arch-card p { font-size: 14px; color: rgba(255,255,255,.6); line-height: 1.65; }

/* ===== CTA BOOK BANNER ===== */
.book-banner {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 60%, var(--amber-dark) 130%);
  position: relative; overflow: hidden;
}
.book-banner::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 80% 0%, rgba(245,158,11,.25) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 0% 100%, rgba(196,181,253,.2) 0%, transparent 60%);
}
.book-banner-inner {
  position: relative; z-index: 1;
  text-align: center;
  color: #fff;
  max-width: 720px; margin: 0 auto;
}
.book-banner h2 {
  color: #fff;
  font-size: clamp(28px, 4vw, 42px);
  margin-bottom: 16px;
}
.book-banner p {
  color: rgba(255,255,255,.85);
  font-size: 17px; margin-bottom: 32px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
  .product-hero-inner { grid-template-columns: 1fr; }
  .agents-grid { grid-template-columns: 1fr; }
  .arch-grid   { grid-template-columns: 1fr; }
  .demo-panel-body { grid-template-columns: 1fr; }
  .demo-chat { border-right: 0; border-bottom: 1px solid rgba(124,58,237,.15); }
  .stat-band-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .sb-item:nth-child(2) { border-right: 0; }
  .sb-item { padding: 8px 0; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .ph-stats { grid-template-columns: 1fr 1fr; }
}
