/* ============================================================
   RIDKK — product pages
   Extends landing.css (tokens, nav, hero, chat mockup, footer).
   Adds: stat band, deep-dive rows, plan teasers, explore cards,
   and the animated demo scenes (scene player state classes).
   ============================================================ */

/* ---------- Hero demo caption ---------- */
.demo-caption {
  position: relative;
  z-index: 1;
  text-align: center;
  font-size: .85rem;
  color: var(--muted);
  margin-top: 20px;
  text-wrap: balance;
}

.product-hero .hero-visual { padding-bottom: 30px; }

/* ---------- Stat band ---------- */
.stat-band {
  padding: 26px 0 70px;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.stat {
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 20px 22px;
  box-shadow: var(--shadow-sm);
}
.stat-value {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.1;
}
.stat-label {
  margin-top: 6px;
  font-size: .9rem;
  color: var(--body);
  text-wrap: balance;
}

/* ---------- Deep-dive rows ---------- */
.deep-row {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 64px;
  align-items: center;
  padding: 44px 0;
}
.deep-row + .deep-row { border-top: 1px solid var(--line-soft); }
.deep-rev .deep-copy { order: 2; }
.deep-rev .deep-card { order: 1; }

.deep-copy h2 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.18;
  margin-bottom: 14px;
  text-wrap: balance;
}
.deep-body { font-size: 1.02rem; color: var(--body); text-wrap: pretty; }

.deep-card {
  background: linear-gradient(180deg, #fbfbfe, #f5f7fd);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 30px 28px;
  box-shadow: var(--shadow-sm);
}
.deep-points { display: grid; gap: 16px; }
.deep-points li {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  font-size: .97rem;
  font-weight: 500;
  color: #334155;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.deep-check {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--indigo-soft);
  color: var(--indigo);
  margin-top: 1px;
}
.deep-check svg { width: 13px; height: 13px; }

/* ---------- Industries strip ---------- */
.product-industries { padding: 10px 0 96px; }

/* ---------- Plan teasers ---------- */
.plan-teasers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.plan-teasers:has(> :only-child) { grid-template-columns: minmax(0, 420px); justify-content: center; }
.plan-teaser {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 30px 28px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.plan-teaser .plan-price { justify-content: center; margin: 16px 0 20px; }
.pricing-link { color: var(--indigo); font-weight: 600; }
.pricing-link:hover { color: var(--indigo-deep); }

/* ---------- Explore other products ---------- */
.explore-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.explore-card {
  position: relative;
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px 30px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}
.explore-card:hover {
  transform: translateY(-4px);
  border-color: #cfd6f4;
  box-shadow: var(--shadow-md);
}
.explore-card h3 {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -.01em;
  margin-bottom: 8px;
  color: var(--ink);
}
.explore-card p { font-size: .92rem; color: var(--body); }
.explore-more {
  position: absolute;
  inset-inline-end: 20px;
  top: 22px;
  font-size: 1.1rem;
  color: var(--indigo);
  transition: transform .2s ease;
}
.explore-card:hover .explore-more { transform: translateX(3px); }
[dir="rtl"] .explore-card:hover .explore-more { transform: translateX(-3px); }

/* ============================================================
   Animated demo scenes
   The scene player (products.js) reveals [data-step] elements in
   order by adding .on; [data-hide-on] elements get .off later.
   ============================================================ */
.js [data-scene] [data-step] {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .45s cubic-bezier(.16, 1, .3, 1), transform .45s cubic-bezier(.16, 1, .3, 1);
}
.js [data-scene] [data-step].on {
  opacity: 1;
  transform: none;
}
.js [data-scene] [data-step].off {
  display: none;
}

/* Meter fills + waveform only animate once their step is on. */
.meter {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: var(--line-soft);
  overflow: hidden;
}
.meter-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--indigo), var(--violet));
  transition: width 1s cubic-bezier(.16, 1, .3, 1) .15s;
}
[data-step].on .meter-fill,
html:not(.js) .meter-fill { width: var(--fill, 100%); }
.meter-green { background: linear-gradient(90deg, #22c55e, #16a34a); }
.meter-sm { flex: 1; height: 7px; }

/* ---------- CS scene (chat + floating chips) ---------- */
.cs-scene {
  position: relative;
  z-index: 1;
  max-width: 430px;
  margin-inline: auto;
}

/* ---------- Duo scenes (chat + side panel) ---------- */
.duo-scene {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  gap: 16px;
  align-items: start;
}
.duo-chat { max-width: none; }
.duo-scene .chat-head { padding: 12px 14px; }
.duo-scene .chat-body { padding: 14px 12px 16px; }
.duo-scene .msg { font-size: .84rem; max-width: 92%; }

.side-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 18px 18px 16px;
}
.side-card-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--indigo-deep);
  margin-bottom: 14px;
}
.side-card-title svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--indigo); }

.side-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: .82rem;
  font-weight: 600;
  border-radius: 11px;
  padding: 10px 12px;
  margin-top: 10px;
}
.side-row svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 2px; }
.row-ok { background: #f0fdf4; color: #14532d; border: 1px solid #dcfce7; }
.row-ok svg { color: var(--green); }
.row-soft { background: var(--indigo-soft); color: var(--indigo-deep); border: 1px solid #e0e7ff; }
.row-soft svg { color: var(--indigo); }

/* ---------- Lead card (sales) ---------- */
.lead-fields { display: grid; gap: 8px; }
.lead-field {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 9px 12px;
}
.lead-field dt { font-size: .76rem; font-weight: 600; color: var(--muted); }
.lead-field dd { font-size: .86rem; font-weight: 700; color: var(--ink); }

.lead-score { margin-top: 14px; }
.lead-score-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 7px;
}
.lead-score-value {
  font-size: .95rem;
  font-weight: 800;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.hot-badge {
  font-style: normal;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .08em;
  color: #fff;
  background: linear-gradient(92deg, #f97316, #ef4444);
  border-radius: 999px;
  padding: 3px 8px;
}

/* ---------- Action console (actions) ---------- */
.console-card {
  background: #0f172a;
  border-color: rgba(255, 255, 255, .08);
  color: #cbd5e1;
}
.console-card .side-card-title { color: #a5b4fc; }
.console-card .side-card-title svg { color: #818cf8; }
.console-line {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .78rem;
  line-height: 1.55;
  padding: 4px 0;
  overflow-wrap: anywhere;
}
.console-cmd { color: #e2e8f0; font-weight: 600; }
.console-arrow { color: #818cf8; margin-inline-end: 4px; }
.console-arg { color: #67e8f9; }
.console-wait { color: #94a3b8; display: flex; align-items: center; gap: 8px; }
.console-json { color: #86efac; }
.ok-badge {
  display: inline-block;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .06em;
  color: #052e16;
  background: #4ade80;
  border-radius: 6px;
  padding: 2px 7px;
  margin-inline-end: 7px;
}
.console-card .row-ok { background: rgba(34, 197, 94, .12); color: #86efac; border-color: rgba(34, 197, 94, .25); }
.console-card .row-ok svg { color: #4ade80; }
.console-card .row-soft { background: rgba(99, 102, 241, .14); color: #c7d2fe; border-color: rgba(99, 102, 241, .3); }
.console-card .row-soft svg { color: #a5b4fc; }

.spinner {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid rgba(148, 163, 184, .35);
  border-top-color: #94a3b8;
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Call scene ---------- */
.call-scene {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  max-width: 470px;
  margin-inline: auto;
}
.call-rec-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.call-play {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--indigo), var(--violet));
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(79, 70, 229, .6);
}
.call-play svg { width: 16px; height: 16px; }
.call-rec-meta { min-width: 0; }
.call-title { margin-bottom: 2px; }
.call-meta { font-size: .78rem; color: var(--muted); }

.wave {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-inline-start: auto;
  height: 30px;
}
.wave span {
  width: 4px;
  height: 30%;
  border-radius: 2px;
  background: linear-gradient(180deg, #818cf8, var(--indigo));
}
[data-scene].playing .wave span { animation: wave 1.1s ease-in-out infinite; }
.wave span:nth-child(2n) { animation-delay: .15s; height: 65%; }
.wave span:nth-child(3n) { animation-delay: .3s; height: 90%; }
.wave span:nth-child(4n) { animation-delay: .45s; height: 50%; }
.wave span:nth-child(5n) { animation-delay: .6s; height: 75%; }
@keyframes wave {
  0%, 100% { transform: scaleY(.55); }
  50% { transform: scaleY(1.15); }
}

.transcript {
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
}
.transcript-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 8px;
}
.transcript-line {
  font-size: .86rem;
  color: #334155;
  line-height: 1.6;
  padding: 4px 0;
}
.transcript-line strong { color: var(--ink); }

.analysis-rows { display: grid; gap: 9px; }
.analysis-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 9px 12px;
}
.analysis-key {
  font-size: .76rem;
  font-weight: 600;
  color: var(--muted);
  min-width: 72px;
}
.analysis-val { font-size: .82rem; font-weight: 700; color: var(--ink); }
.outcome-badge {
  font-size: .78rem;
  font-weight: 700;
  color: #14532d;
  background: #dcfce7;
  border-radius: 999px;
  padding: 4px 11px;
}
.stars { display: inline-flex; gap: 3px; }
.stars i {
  width: 14px;
  height: 14px;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  background: var(--line);
}
.stars i.on { background: #f59e0b; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .duo-scene { grid-template-columns: 1fr; max-width: 440px; margin-inline: auto; }
}

@media (max-width: 940px) {
  .deep-row {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 36px 0;
  }
  .deep-rev .deep-copy { order: 1; }
  .deep-rev .deep-card { order: 2; }
  .stat-grid { grid-template-columns: 1fr; max-width: 440px; margin-inline: auto; }
  .explore-grid { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  .plan-teasers { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; }
}

@media (max-width: 640px) {
  .product-hero .hero-visual { padding: 0 0 8px; }
  .demo-caption { margin-top: 16px; }
  .side-card { padding: 16px 14px 14px; }
}

/* ---------- RTL refinements ---------- */
[dir="rtl"] .side-card-title,
[dir="rtl"] .transcript-label { letter-spacing: 0; }
[dir="rtl"] .console-card { text-align: left; }

/* ---------- Reduced motion: show everything, no loops ---------- */
@media (prefers-reduced-motion: reduce) {
  .js [data-scene] [data-step] { opacity: 1; transform: none; }
  .js [data-scene] [data-hide-on] { display: none; }
  [data-scene].playing .wave span { animation: none; }
  .meter-fill { width: var(--fill, 100%) !important; transition: none; }
}
