/* ===================== VALUE-PROP VIEWS ===================== */
/* Three scroll views, each pairing a value prop with a sample product
   screen so the benefit is shown rather than told. */
.value-views {
  background: var(--bg);
  padding: 72px 20px 80px;
}

/* Hero slider reuses the same framed screens as the views below, sized
   to fit the hero. The admin browser is scaled to the column by JS. */
.hero-devices { min-height: 520px; }
.hero-devices .vv-phone { width: 204px; }
.hero-devices .vv-phone-screen { height: 368px; }
.hero-devices .vv-scale { margin: 0 auto; }
.vv-wrap {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 72px;
}

/* Section intro: centered heading above the three value views. */
.vv-head {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.vv-head h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink);
  margin: 0 0 8px;
}
.vv-head h2 .serif {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-weight: 400;
}
.vv-head p {
  font-size: 15px;
  color: var(--ink-3);
  margin: 0;
}

/* A single view: text on one side, sample screen on the other. */
.vview {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
}
.vview-text {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.vview-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rust);
}
.vview-pain {
  font-size: 13px;
  color: var(--ink-3);
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--border) 60%, transparent);
  text-decoration-thickness: 0.5px;
}
.vview-text h3 {
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--ink);
  margin: 0;
}
.vview-text h3 .serif {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-weight: 400;
}
.vview-text p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0;
  max-width: 440px;
}
.vview-screen {
  display: flex;
  justify-content: center;
  min-width: 0;
}

/* On wide screens, alternate which side the screen sits on. */
@media (min-width: 900px) {
  .vview {
    grid-template-columns: 1fr 1fr;
    gap: 56px;
  }
  .vview.reverse .vview-text { order: 2; }
  .vview.reverse .vview-screen { order: 1; }
}

/* ----- Device frames shared by the sample screens ----- */
.vv-phone {
  position: relative;
  width: 264px;
  max-width: 100%;
  background: #0a0a0a;
  border-radius: 34px;
  padding: 20px 8px 15px;
  box-shadow: 0 20px 50px -18px rgba(24, 19, 13, 0.34);
}
/* Top bezel: speaker slit + camera dot. */
.vv-phone::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 46px;
  height: 5px;
  border-radius: 999px;
  background: #2c2c2e;
  box-shadow: 30px 0 0 -1.5px #2c2c2e;
}
/* Bottom bezel: home indicator. */
.vv-phone::after {
  content: "";
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 4px;
  border-radius: 999px;
  background: #3a3a3c;
}
.vv-phone-screen {
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  height: 480px;
  display: flex;
  flex-direction: column;
}
.vv-browser {
  width: 100%;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 50px -18px rgba(24, 19, 13, 0.24);
}
.vv-browser-bar {
  background: #f0efed;
  border-bottom: 1px solid var(--border);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.vv-browser-dots { display: flex; gap: 5px; }
.vv-browser-dots span { width: 9px; height: 9px; border-radius: 50%; }
.vv-browser-dots span:nth-child(1) { background: #ff5f57; }
.vv-browser-dots span:nth-child(2) { background: #febc2e; }
.vv-browser-dots span:nth-child(3) { background: #28c840; }
.vv-browser-url {
  flex: 1;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 10px;
  color: var(--ink-3);
  padding: 3px 10px;
}

/* ----- WhatsApp chat mockup ----- */
.wa {
  background: #e7ded3;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.wa-top {
  background: #075e54;
  color: #fff;
  padding: 11px 13px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.wa-av {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--rust);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.wa-top-name { font-size: 13px; font-weight: 600; line-height: 1.15; }
.wa-top-status { font-size: 10px; opacity: 0.8; }
.wa-body {
  flex: 1;
  padding: 14px 11px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}
.wa-msg {
  max-width: 88%;
  padding: 7px 9px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.42;
  color: var(--ink);
  box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.08);
}
.wa-msg.out { align-self: flex-end; background: #d9fdd3; border-bottom-right-radius: 3px; }
.wa-msg.in { align-self: flex-start; background: #fff; border-bottom-left-radius: 3px; }
.wa-time { font-size: 9px; color: var(--ink-3); text-align: right; margin-top: 3px; }

.wa-voice {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 156px;
}
.wa-voice-play {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #075e54;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.wa-wave {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 18px;
}
.wa-wave span { width: 2px; border-radius: 2px; background: #8aa399; }
.wa-voice-dur { font-size: 10px; color: var(--ink-3); flex-shrink: 0; }

.wa-record-title {
  font-weight: 700;
  margin-bottom: 4px;
}
.wa-record-row {
  display: flex;
  gap: 6px;
  font-size: 11.5px;
  padding: 1px 0;
}
.wa-record-row .k { color: var(--ink-2); }
.wa-record-row .k::after { content: ":"; }
.wa-record-row .v { font-weight: 600; color: var(--ink); }
.wa-openapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  width: 100%;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 8px;
}
.wa-openapp svg { width: 12px; height: 12px; }

/* Native WhatsApp interactive-message buttons: full-width rows,
   divider lines, blue link text + icon, bled to the bubble edges. */
.wa-msg-cta { padding-bottom: 0; }
.wa-cta { margin: 7px -9px 0; }
.wa-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px;
  font-size: 12.5px;
  font-weight: 500;
  color: #00a5f4;
  border-top: 1px solid #e9edef;
}
.wa-cta-btn svg { width: 15px; height: 15px; }
.wa-stuck {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 10.5px;
  padding: 3px 0;
  border-top: 1px solid #eee;
}
.wa-stuck .name { color: var(--ink); font-weight: 600; }
.wa-stuck .meta { color: var(--ink-3); }

/* ----- Mobile app mockup ----- */
.app {
  background: var(--app-bg);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.app-top {
  background: var(--app-surface);
  border-bottom: 1px solid var(--app-border);
  padding: 12px 14px;
}
.app-top h5 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--app-text);
  letter-spacing: -0.02em;
}
.app-top span { font-size: 10px; color: var(--app-text-3); }
.app-body {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}
.app-ask {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 11px;
  color: var(--app-text-2);
  display: flex;
  align-items: center;
  gap: 7px;
}
.app-ask .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--app-blue); flex-shrink: 0; }
.app-panel {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 12px;
  padding: 11px;
}
.app-panel-title {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--app-text-3);
  margin-bottom: 9px;
}

/* Bar chart shared by app + admin mockups */
.vv-bars {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  height: 104px;
}
.vv-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  height: 100%;
  justify-content: flex-end;
}
.vv-bar {
  width: 100%;
  border-radius: 3px 3px 0 0;
  background: var(--border-strong);
}
.vv-bar.hi { background: linear-gradient(180deg, var(--gold), var(--rust)); }
.vv-bar-lbl { font-size: 8px; color: var(--app-text-3); }

/* Funnel rendered as a vertical bar chart (desktop): count above each bar. */
.vv-bar-n { font-size: 8px; font-weight: 700; color: var(--app-text-2); }
/* Secondary text in a list row (e.g. stage · idle for stuck deals). */
.app-list-row .sub { color: var(--app-text-3); font-size: 10px; font-weight: 500; }

.app-list { display: flex; flex-direction: column; }
.app-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  padding: 6px 0;
  border-top: 1px solid var(--app-border);
}
.app-list-row:first-child { border-top: none; }
.app-list-row .name { color: var(--app-text); font-weight: 600; }
.app-list-row .amt { color: var(--app-ok); font-weight: 700; }

/* ----- Admin panel (web) mockup ----- */
.admin-body { padding: 14px; background: var(--app-bg); }
.admin-q {
  background: #fff;
  border: 1px solid var(--app-border);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 12px;
  color: var(--app-text);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.admin-q .you {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--ink);
  padding: 2px 7px;
  border-radius: 5px;
  flex-shrink: 0;
}
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.admin-card {
  background: #fff;
  border: 1px solid var(--app-border);
  border-radius: 10px;
  padding: 11px;
}
.admin-card.wide { grid-column: 1 / -1; }
.admin-card-title {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--app-text-3);
  margin-bottom: 10px;
}
.admin-kpis { display: flex; gap: 8px; }
.admin-kpi {
  flex: 1;
  background: var(--app-bg);
  border-radius: 8px;
  padding: 8px;
  text-align: center;
}
.admin-kpi-val { font-size: 15px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.admin-kpi-lbl { font-size: 8.5px; color: var(--app-text-3); margin-top: 1px; }

.admin-rank { display: flex; flex-direction: column; gap: 7px; }
.admin-rank-row { display: flex; align-items: center; gap: 8px; font-size: 10.5px; }
.admin-rank-row .nm { width: 52px; color: var(--app-text); font-weight: 600; flex-shrink: 0; }
.admin-rank-track { flex: 1; height: 7px; border-radius: 4px; background: var(--app-bg); overflow: hidden; }
.admin-rank-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--gold), var(--rust)); }
.admin-rank-row .pct { width: 30px; text-align: right; color: var(--app-text-2); font-weight: 600; flex-shrink: 0; }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td {
  text-align: left;
  font-size: 10px;
  padding: 5px 6px;
  border-bottom: 1px solid var(--app-border);
}
.admin-table th { color: var(--app-text-3); font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.admin-table td { color: var(--app-text); }
.admin-table td .stage {
  font-size: 8.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--tint-cream);
  color: var(--tint-cream-tx);
}
.admin-table td .risk { background: var(--tint-blush); color: var(--tint-blush-tx); }

/* ----- View 2: one query, three surfaces (auto-playing slider) ----- */
.vview.vview-trio { display: block; text-align: center; }
.vview-trio .vview-text { align-items: center; }
.vview-trio .vview-text p { margin-left: auto; margin-right: auto; }

.vv-slider { position: relative; margin-top: 36px; }
.vv-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
.vv-track::-webkit-scrollbar { display: none; }
.vv-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 52px 14px;
}
.vv-surface {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.vv-surface-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.vv-surface.admin { width: 100%; max-width: 820px; }
.vv-surface.admin .vview-screen { width: 100%; }

.vv-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 6px 16px -6px rgba(24, 19, 13, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  z-index: 5;
  transition: border-color 160ms, transform 160ms;
}
.vv-arrow:hover { border-color: var(--border-strong); }
.vv-arrow:active { transform: translateY(-50%) scale(0.94); }
.vv-arrow.prev { left: 0; }
.vv-arrow.next { right: 0; }
.vv-arrow svg { width: 18px; height: 18px; }

.vv-slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.vv-slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--border-strong);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: width 200ms, background 200ms;
}
.vv-slider-dot.active { width: 22px; background: var(--rust); }

@media (max-width: 640px) {
  .vv-slide { padding: 6px 34px 12px; }
  .vv-arrow { width: 34px; height: 34px; }
  .vv-arrow svg { width: 16px; height: 16px; }
}

/* ----- Desktop mockups: keep landscape layout, scale down to fit width.
   Phones get a shrunken landscape screenshot instead of a reflowed portrait. */
.vv-scale { width: 100%; min-width: 0; display: flex; justify-content: center; overflow: hidden; }
.vv-scale-inner { flex: 0 0 auto; align-self: flex-start; transform-origin: top center; text-align: left; }
.vv-scale-inner.builder-w { width: 900px; }
.vv-scale-inner.admin-w { width: 780px; }
.vv-scale-inner .vv-browser { width: 100%; }

/* ----- View 3: full-width desktop two-panel builder ----- */
.vview.vview-desktop { display: block; text-align: center; }
.vview-desktop .vview-text { align-items: center; }
.vview-desktop .vview-text p { margin-left: auto; margin-right: auto; }
.vview-desktop .vview-screen { margin-top: 36px; }

/* Always two landscape panels — never reflow to portrait, even on phones. */
.builder {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  min-height: 460px;
}
.builder-input {
  margin-top: auto;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 12px;
  color: var(--ink-3);
  background: #fff;
}
.builder-chat {
  background: var(--bg);
  border-right: 1px solid var(--border);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.builder-chat-head {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-3);
}
.builder-msg {
  max-width: 92%;
  padding: 8px 11px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.45;
}
.builder-msg.user { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 4px; }
.builder-msg.ai {
  align-self: flex-start;
  background: linear-gradient(180deg, var(--ai-grad-a), var(--ai-grad-b));
  border: 1px solid var(--ai-border);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}
.builder-msg .ok { color: var(--app-ok); font-weight: 700; }
.builder-preview { padding: 16px; position: relative; }
.builder-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.builder-preview-head h5 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.builder-preview-head .tag {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--app-text-3);
}
.builder-field {
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 9px 11px;
  margin-bottom: 8px;
  background: #fff;
}
.builder-field-label { font-size: 9.5px; font-weight: 600; color: var(--ink-3); margin-bottom: 3px; }
.builder-field-value { font-size: 12px; color: var(--ink); }
/* GST field starts collapsed/invisible; slides in on the "done" state. */
.builder-field.added {
  position: relative;
  max-height: 0;
  opacity: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-color: transparent;
  box-shadow: none;
  transform: translateY(-4px);
  overflow: hidden;
  transition: max-height 400ms ease, opacity 320ms ease, margin 320ms ease,
              padding 320ms ease, transform 400ms ease,
              border-color 320ms ease, box-shadow 320ms ease;
}
.builder.state-done .builder-field.added {
  max-height: 80px;
  opacity: 1;
  margin-bottom: 8px;
  padding-top: 9px;
  padding-bottom: 9px;
  transform: translateY(0);
  border-color: var(--app-ok);
  box-shadow: 0 0 0 3px rgba(22, 160, 107, 0.1);
}
.builder-field.added .builder-field-label { color: var(--app-ok); }
.builder-field-new {
  position: absolute;
  top: 8px;
  right: 9px;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--app-ok);
  padding: 2px 6px;
  border-radius: 999px;
}

/* Translucent overlay covering the whole preview while the field is added. */
.builder-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(1.5px);
  backdrop-filter: blur(1.5px);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  opacity: 0;
  visibility: hidden;
  transition: opacity 250ms ease, visibility 250ms ease;
  z-index: 4;
}
.builder.state-loading .builder-overlay { opacity: 1; visibility: visible; }
.builder-overlay .builder-spinner { width: 22px; height: 22px; border-width: 2.5px; }
.builder-spinner {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  border-top-color: var(--rust);
  animation: vv-spin 700ms linear infinite;
  flex-shrink: 0;
}
@keyframes vv-spin { to { transform: rotate(360deg); } }

/* Chat: AI agent says "Updating…" during loading, "Done" once added. */
.builder-updating { display: none; animation: vv-pulse 1.2s ease-in-out infinite; }
.builder.state-loading .builder-updating { display: block; }
@keyframes vv-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}
.builder-done { display: none; }
.builder.state-done .builder-done { display: block; }
