/* ==========================================================================
   Wapify — Design tokens
   ========================================================================== */

:root {
  /* Brand */
  --brand: #17a45e;
  --brand-strong: #0f8a4c;
  --brand-tint: #e9faf1;
  --brand-tint-2: #d3f5e2;
  --brand-ring: rgba(23, 164, 94, 0.22);

  /* AI accent (indigo) */
  --ai: #5e6ad2;
  --ai-strong: #4d58c4;
  --ai-tint: #f1f1ff;
  --ai-tint-2: #e4e4ff;
  --ai-ring: rgba(94, 106, 210, 0.22);

  /* Trust accent (blue, from the verified badge) */
  --info: #2f7de1;
  --info-tint: #eaf3ff;

  /* Status */
  --warn: #b9740a;
  --warn-tint: #fff6e6;
  --crit: #d13c3c;
  --crit-tint: #fdecec;

  /* Badge accent (eyebrows) */
  --orange: #e8632c;
  --orange-strong: #c74f1f;
  --orange-tint: #fdece2;

  /* Avatar palette (solid, for initials contrast) */
  --av-1: #17a45e;
  --av-2: #5e6ad2;
  --av-3: #2f7de1;
  --av-4: #c8790f;
  --av-5: #5b6472;

  /* Surfaces (light) */
  --bg-0: #ffffff;
  --bg-1: #fbfafa;
  --bg-2: #f5f4f5;
  --bg-3: #efeef0;
  --bg-panel: #ffffff;
  --bg-inverse: #0a0b0d;

  /* Borders */
  --border-1: #ebeaec;
  --border-2: #e2e0e3;
  --border-3: #d3d1d5;

  /* Text */
  --text-1: #0c0d10;
  --text-2: rgba(12, 13, 16, 0.68);
  --text-3: rgba(12, 13, 16, 0.48);
  --text-4: rgba(12, 13, 16, 0.32);
  --text-on-brand: #ffffff;

  /* Type */
  --font-sans: "Inter Variable", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Instrument Serif", ui-serif, Georgia, serif;
  --font-arabic: "IBM Plex Sans Arabic", "Inter Variable", "Inter", -apple-system, sans-serif;
  --font-mono: "Berkeley Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Radius */
  --r-4: 4px;
  --r-6: 6px;
  --r-8: 8px;
  --r-12: 12px;
  --r-16: 16px;
  --r-20: 20px;
  --r-24: 24px;
  --r-full: 9999px;

  /* Shadow */
  --shadow-low: 0 1px 2px rgba(12, 13, 16, 0.05), 0 1px 1px rgba(12, 13, 16, 0.04);
  --shadow-med: 0 4px 16px rgba(12, 13, 16, 0.07), 0 1px 3px rgba(12, 13, 16, 0.05);
  --shadow-high: 0 16px 48px rgba(12, 13, 16, 0.12), 0 4px 12px rgba(12, 13, 16, 0.06);
  --shadow-brand: 0 8px 24px rgba(23, 164, 94, 0.22);
  --shadow-ai: 0 8px 24px rgba(94, 106, 210, 0.2);

  /* Easing (Linear-style curves) */
  --ease-out-quart: cubic-bezier(0.165, 0.84, 0.44, 1);
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-in-out-quad: cubic-bezier(0.455, 0.03, 0.515, 0.955);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --speed-fast: 120ms;
  --speed-regular: 220ms;
  --speed-slow: 420ms;

  /* Layout */
  --page-max: 1180px;
  --page-pad: 24px;
  --header-h: 64px;
  --header-top: 20px;
  --header-side: 20px;
  --header-bottom: calc(var(--header-top) + var(--header-h));
}

@media (max-width: 640px) {
  :root { --page-pad: 18px; --header-top: 12px; --header-side: 12px; --header-h: 58px; }
}

/* ==========================================================================
   Reset
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font-sans);
  font-feature-settings: "cv01", "ss03";
  background: var(--bg-0);
  color: var(--text-1);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[dir="rtl"] body { font-family: var(--font-arabic); font-feature-settings: normal; }
[dir="rtl"] .accent-serif, [dir="rtl"] .ai-serif { font-family: var(--font-arabic); font-style: normal; font-weight: 600; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
ul, ol { list-style: none; }

h1, h2, h3, h4 { font-weight: 590; letter-spacing: -0.02em; line-height: 1.08; }

::selection { background: var(--brand-tint-2); color: var(--brand-strong); }

/* ==========================================================================
   Layout utilities
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--page-pad);
}

.container-wide { max-width: 1320px; }
.container-narrow { max-width: 760px; }

section { position: relative; }

.section-pad { padding-block: 128px; }
@media (max-width: 900px) { .section-pad { padding-block: 88px; } }
@media (max-width: 640px) { .section-pad { padding-block: 64px; } }

.section-pad-sm { padding-block: 72px; }
@media (max-width: 640px) { .section-pad-sm { padding-block: 48px; } }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Grain texture overlay */
.grain {
  pointer-events: none;
  position: absolute;
  inset: 0;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Dot-grid background */
.grid-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, #d8d7da 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 65% 60% at 50% 15%, #000 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 65% 60% at 50% 15%, #000 40%, transparent 100%);
}

.line-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, var(--border-1) 1px, transparent 1px),
    linear-gradient(var(--border-1) 1px, transparent 1px);
  background-size: 120px 96px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 15%, #000 85%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 15%, #000 85%, transparent);
}

.gradient-text {
  background: linear-gradient(100deg, var(--text-1) 30%, var(--text-3) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.accent-serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--brand-strong);
}

.ai-serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--ai);
}

/* ==========================================================================
   Reveal-on-scroll
   ========================================================================== */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--speed-slow) var(--ease-out-quart), transform var(--speed-slow) var(--ease-out-quart);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
[data-reveal="scale"] { transform: scale(0.96); }
[data-reveal="scale"].is-visible { transform: scale(1); }

[data-reveal-group] > * { transition-delay: calc(var(--i, 0) * 70ms); }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--r-full);
  font-size: 14.5px;
  font-weight: 540;
  white-space: nowrap;
  transition: background var(--speed-regular) var(--ease-out-quad, ease), color var(--speed-regular), transform var(--speed-fast), box-shadow var(--speed-regular), border-color var(--speed-regular);
  border: 1px solid transparent;
}
.btn:active { transform: scale(0.97); }

.btn-sm { height: 38px; padding: 0 16px; font-size: 13.5px; }
.btn-lg { height: 50px; padding: 0 26px; font-size: 15.5px; }

.btn-brand {
  background: var(--brand);
  color: var(--text-on-brand);
  box-shadow: var(--shadow-brand);
}
.btn-brand:hover { background: var(--brand-strong); box-shadow: 0 10px 28px rgba(23,164,94,0.3); }

.btn-dark {
  background: var(--bg-inverse);
  color: #fff;
}
.btn-dark:hover { background: #17181b; }

.btn-ghost {
  background: var(--bg-0);
  color: var(--text-1);
  border-color: var(--border-2);
}
.btn-ghost:hover { background: var(--bg-2); border-color: var(--border-3); }

.btn-ghost-dark { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.16); color: #fff; }
.btn-ghost-dark:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.28); }

.btn-plain {
  background: transparent;
  color: var(--text-2);
  height: auto;
  padding: 0;
  border-radius: 0;
}
.btn-plain:hover { color: var(--text-1); }

.btn-icon-trail svg { transition: transform var(--speed-regular) var(--ease-out-quart); }
.btn:hover .btn-icon-trail svg { transform: translateX(3px); }

/* ==========================================================================
   Badges / pills
   ========================================================================== */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px 0 6px;
  border-radius: var(--r-full);
  background: var(--bg-0);
  border: 1px solid var(--border-2);
  font-size: 13px;
  font-weight: 510;
  color: var(--text-2);
  box-shadow: var(--shadow-low);
}
.pill .pill-dot {
  width: 20px; height: 20px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-tint); color: var(--brand-strong);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--r-6);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.tag-ai { background: var(--ai-tint); color: var(--ai); }
.tag-brand { background: var(--brand-tint); color: var(--brand-strong); }
.tag-new { background: var(--info-tint); color: var(--info); }
.tag-plan { background: var(--bg-3); color: var(--text-2); text-transform: none; font-weight: 590; }
.tag-plan.tag-pro { background: var(--ai-tint); color: var(--ai); }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: fixed;
  top: var(--header-top);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - var(--header-side) * 2);
  max-width: var(--page-max);
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 20px;
  padding-inline: var(--page-pad);
  border-radius: 20px;
  border: 1px solid var(--border-1);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: var(--shadow-med);
  transition: background var(--speed-regular) var(--ease-out-quad,ease), border-color var(--speed-regular), box-shadow var(--speed-regular);
}
.site-header.is-scrolled {
  background: rgba(255,255,255,0.97);
  border-color: var(--border-2);
  box-shadow: var(--shadow-high);
}

.brand-mark { display: flex; align-items: center; gap: 9px; font-weight: 590; font-size: 15.5px; letter-spacing: -0.01em; margin-inline-end: auto; flex-shrink: 0; }
.brand-mark img { width: 26px; height: 26px; border-radius: 7px; }

.nav-main { display: flex; align-items: center; gap: 2px; }
.nav-main > a {
  height: 34px; padding: 0 13px; display: flex; align-items: center;
  border-radius: var(--r-full); font-size: 13.6px; font-weight: 500; color: var(--text-2);
  transition: color var(--speed-fast), background var(--speed-fast);
}
.nav-main > a:hover { color: var(--text-1); background: var(--bg-2); }

.header-actions { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }

.mobile-menu-trigger {
  display: none;
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  border-radius: var(--r-8);
}
.mobile-menu-trigger:hover { background: var(--bg-2); }
.mobile-menu-trigger span, .mobile-menu-trigger::before, .mobile-menu-trigger::after {
  content: ""; position: absolute; width: 16px; height: 1.5px; background: var(--text-1);
  transition: transform var(--speed-regular) var(--ease-out-quart), opacity var(--speed-regular);
}
.mobile-menu-trigger { position: relative; }
.mobile-menu-trigger::before { transform: translateY(-4px); }
.mobile-menu-trigger::after { transform: translateY(4px); }
.mobile-menu-trigger[data-open="true"]::before { transform: rotate(45deg); }
.mobile-menu-trigger[data-open="true"]::after { transform: rotate(-45deg); }
.mobile-menu-trigger[data-open="true"] span { opacity: 0; }

.mobile-menu {
  position: fixed;
  top: calc(var(--header-top) + var(--header-h) + 10px);
  left: var(--header-side); right: var(--header-side); bottom: 12px;
  z-index: 90;
  border-radius: 20px;
  border: 1px solid var(--border-1);
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-high);
  display: none;
  flex-direction: column;
  padding: 22px 22px;
  gap: 4px;
  overflow-y: auto;
  height: fit-content;
  max-height: calc(100dvh - var(--header-top) - var(--header-h) - 22px);
}
.mobile-menu[data-open="true"] { display: flex; animation: menuIn 220ms var(--ease-out-quart) both; }
@keyframes menuIn { from { opacity: 0; transform: translateY(-8px);} to { opacity: 1; transform: translateY(0);} }
.mobile-menu a { padding: 14px 4px; font-size: 19px; font-weight: 540; border-bottom: 1px solid var(--border-1); }
.mobile-menu .header-actions { margin-top: 20px; margin-inline-start: 0; flex-direction: column; align-items: stretch; }
.mobile-menu .btn { width: 100%; }

@media (max-width: 860px) {
  .nav-main { display: none; }
  .site-header > .header-actions .btn-ghost { display: none; }
  .mobile-menu-trigger { display: flex; }
}

/* Nav dropdown (mega-menu) */
.nav-item-dd { position: relative; }
.nav-dd-trigger {
  height: 34px; padding: 0 8px 0 13px; display: flex; align-items: center; gap: 5px;
  border-radius: var(--r-full); font-size: 13.6px; font-weight: 500; color: var(--text-2);
  transition: color var(--speed-fast), background var(--speed-fast);
}
.nav-dd-trigger svg { transition: transform var(--speed-regular) var(--ease-out-quart); color: var(--text-4); }
.nav-item-dd:hover .nav-dd-trigger, .nav-item-dd.is-open .nav-dd-trigger { color: var(--text-1); background: var(--bg-2); }
.nav-item-dd:hover .nav-dd-trigger svg, .nav-item-dd.is-open .nav-dd-trigger svg { transform: rotate(180deg); }

.nav-dd-panel {
  position: absolute; top: calc(100% + 12px); left: 50%;
  transform: translateX(-50%) translateY(-6px) scale(0.98);
  opacity: 0; pointer-events: none;
  display: grid; grid-template-columns: repeat(3, 216px); gap: 6px;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-1); border-radius: var(--r-16);
  padding: 10px; box-shadow: var(--shadow-high);
  transition: opacity 170ms var(--ease-out-quart), transform 170ms var(--ease-out-quart);
  z-index: 120;
}
.nav-item-dd:hover .nav-dd-panel,
.nav-item-dd.is-open .nav-dd-panel,
.nav-dd-trigger:focus-visible + .nav-dd-panel {
  opacity: 1; transform: translateX(-50%) translateY(0) scale(1); pointer-events: auto;
}
.nav-dd-panel::before { content: ""; position: absolute; top: -12px; left: 0; right: 0; height: 12px; }

.nav-dd-card { display: block; border-radius: var(--r-12); padding: 8px; transition: background var(--speed-fast); }
.nav-dd-card:hover { background: var(--bg-2); }
.nav-dd-visual {
  height: 96px; border-radius: var(--r-8); background: var(--bg-1); border: 1px solid var(--border-1);
  overflow: hidden; position: relative; padding: 10px; display: flex; flex-direction: column; justify-content: center; gap: 6px;
}
.nav-dd-body { display: flex; gap: 10px; padding: 10px 4px 4px; align-items: flex-start; }
.nav-dd-icon {
  width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  background: var(--brand-tint); color: var(--brand-strong); flex-shrink: 0;
}
.nav-dd-icon.ai { background: var(--ai-tint); color: var(--ai); }
.nav-dd-icon.info { background: var(--info-tint); color: var(--info); }
.nav-dd-body h4 { font-size: 13.5px; font-weight: 580; letter-spacing: -0.005em; }
.nav-dd-body p { font-size: 12px; color: var(--text-3); margin-top: 3px; line-height: 1.42; }

/* mini visuals inside dropdown cards */
.nd-chat { display: flex; flex-direction: column; gap: 5px; }
.nd-chat .nd-bubble { align-self: flex-start; font-size: 10.5px; background: var(--bg-0); border: 1px solid var(--border-1); border-radius: 8px 8px 8px 3px; padding: 5px 8px; color: var(--text-2); }
.nd-chat .nd-bubble.out { align-self: flex-end; background: var(--brand-tint); color: var(--brand-strong); border-color: transparent; border-radius: 8px 8px 3px 8px; }
.nd-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.nd-chip { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: var(--bg-0); border: 1px solid var(--border-1); color: var(--text-3); }
.nd-chip.a { background: var(--brand-tint); color: var(--brand-strong); border-color: transparent; }
.nd-chip.b { background: var(--ai-tint); color: var(--ai); border-color: transparent; }
.nd-line { height: 5px; border-radius: 3px; background: var(--border-2); }
.nd-count { font-size: 17px; font-weight: 630; letter-spacing: -0.02em; color: var(--text-1); }
.nd-count small { font-size: 10.5px; font-weight: 500; color: var(--text-3); margin-inline-start: 4px; }
.nd-bar-row { display: flex; align-items: flex-end; gap: 3px; height: 34px; }
.nd-bar-row i { flex: 1; border-radius: 2px 2px 0 0; background: var(--brand-tint-2); display: block; }
.nd-bar-row i.hi { background: var(--brand); }

@media (max-width: 860px) { .nav-item-dd { display: none; } }

/* Language switcher */
.lang-switch { position: relative; }
.lang-trigger {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px;
  border-radius: var(--r-full); border: 1px solid var(--border-2); background: var(--bg-0);
  font-size: 12.5px; font-weight: 590; color: var(--text-2); transition: background var(--speed-fast), border-color var(--speed-fast);
}
.lang-trigger:hover { background: var(--bg-2); border-color: var(--border-3); }
.lang-trigger svg { color: var(--text-3); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; min-width: 140px;
  background: rgba(255,255,255,0.98); backdrop-filter: blur(20px);
  border: 1px solid var(--border-1); border-radius: var(--r-12); padding: 6px;
  box-shadow: var(--shadow-high); z-index: 120;
  opacity: 0; pointer-events: none; transform: translateY(-6px) scale(0.98);
  transition: opacity 160ms var(--ease-out-quart), transform 160ms var(--ease-out-quart);
}
.lang-switch.is-open .lang-menu { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
.lang-menu button {
  display: flex; align-items: center; width: 100%; padding: 9px 10px; border-radius: var(--r-8);
  font-size: 13.5px; font-weight: 540; color: var(--text-2); text-align: start;
}
.lang-menu button:hover { background: var(--bg-2); }
.lang-menu button.is-active { color: var(--brand-strong); font-weight: 610; background: var(--brand-tint); }

.mobile-lang-switch { display: flex; gap: 8px; margin-top: 18px; }
.mobile-lang-switch button {
  flex: 1; height: 42px; border-radius: var(--r-full); border: 1px solid var(--border-2);
  font-size: 14px; font-weight: 560; color: var(--text-2);
}
.mobile-lang-switch button.is-active { background: var(--text-1); color: #fff; border-color: var(--text-1); }

/* RTL — mirror directional icons */
[dir="rtl"] .btn-icon-trail svg,
[dir="rtl"] .trigger-flag svg:has(use[href="#i-arrow"]),
[dir="rtl"] .note-tag svg:has(use[href="#i-arrow"]) {
  transform: scaleX(-1);
}
[dir="rtl"] .btn:hover .btn-icon-trail svg { transform: scaleX(-1) translateX(3px); }
[dir="rtl"] .nav-dd-panel { text-align: start; }

/* ==========================================================================
   Subpage hero + supporting bits
   ========================================================================== */

.subhero { padding-top: calc(var(--header-bottom) + 56px); padding-bottom: 20px; position: relative; overflow: hidden; }
.subhero-inner { max-width: 740px; margin-inline: auto; text-align: center; }
.subhero-inner .eyebrow { margin-inline: auto; }
.subhero h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); letter-spacing: -0.03em; }
.subhero p.lede { margin-top: 18px; font-size: clamp(1rem, 1.4vw, 1.12rem); color: var(--text-2); line-height: 1.6; max-width: 560px; margin-inline: auto; }
.subhero .hero-cta { justify-content: center; margin-top: 30px; }

.detail-row { display: flex; gap: 14px; padding: 20px 0; border-top: 1px solid var(--border-1); }
.detail-row:last-child { border-bottom: 1px solid var(--border-1); }
.detail-row .card-icon { width: 36px; height: 36px; }
.detail-row h4 { font-size: 15px; font-weight: 580; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.detail-row p { font-size: 14px; color: var(--text-2); margin-top: 5px; line-height: 1.6; max-width: 620px; }

.stat-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 700px) { .stat-strip { grid-template-columns: 1fr; } }
.stat-box { border: 1px solid var(--border-1); border-radius: var(--r-16); padding: 22px; }
.stat-box .stat-icon {
  width: 26px; height: 26px; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center;
}
.stat-box .stat-num { font-size: 26px; font-weight: 630; letter-spacing: -0.02em; }
.stat-box .stat-label { font-size: 13px; color: var(--text-3); margin-top: 4px; }

.mini-cta {
  border: 1px solid var(--border-1); border-radius: var(--r-20); padding: 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  background: var(--bg-1);
}
.mini-cta h3 { font-size: 1.4rem; letter-spacing: -0.02em; }
.mini-cta p { font-size: 14px; color: var(--text-2); margin-top: 6px; }

/* Campaign status pills */
.status-row { display: flex; gap: 8px; flex-wrap: wrap; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 560; padding: 6px 11px; border-radius: var(--r-full); border: 1px solid var(--border-2); background: var(--bg-0); }
.status-pill i { width: 6px; height: 6px; border-radius: 50%; display: inline-block; background: var(--text-4); }
.status-pill.sent i { background: var(--brand); } .status-pill.sent { color: var(--brand-strong); border-color: rgba(23,164,94,0.25); background: var(--brand-tint); }
.status-pill.sending i { background: var(--ai); animation: nodePulse 1.8s ease-in-out infinite; } .status-pill.sending { color: var(--ai); border-color: rgba(94,106,210,0.3); background: var(--ai-tint); }
.status-pill.scheduled i { background: var(--info); } .status-pill.scheduled { color: var(--info); border-color: rgba(47,125,225,0.25); background: var(--info-tint); }
.status-pill.failed i { background: var(--crit); } .status-pill.failed { color: var(--crit); border-color: rgba(209,60,60,0.22); background: var(--crit-tint); }
.status-pill.draft { color: var(--text-3); }

.campaign-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border: 1px solid var(--border-1); border-radius: var(--r-12); background: var(--bg-0); }
.campaign-row + .campaign-row { margin-top: 8px; }
.campaign-row .cr-name { font-size: 13.5px; font-weight: 570; }
.campaign-row .cr-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.campaign-row .cr-nums { display: flex; gap: 18px; text-align: right; }
.campaign-row .cr-nums div span { display: block; font-size: 14px; font-weight: 610; }
.campaign-row .cr-nums div small { font-size: 10.5px; color: var(--text-3); }
@media (max-width: 640px) { .campaign-row { flex-wrap: wrap; } .campaign-row .cr-nums { width: 100%; justify-content: space-between; } }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding-top: calc(var(--header-bottom) + 64px);
  padding-bottom: 0;
  overflow: hidden;
  position: relative;
}

.hero-glow {
  position: absolute;
  top: -220px; left: 50%;
  width: 1100px; height: 620px;
  transform: translateX(-50%);
  background:
    radial-gradient(38% 55% at 30% 40%, rgba(23,164,94,0.16), transparent 70%),
    radial-gradient(32% 50% at 72% 35%, rgba(94,106,210,0.14), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}

.hero-inner { position: relative; text-align: center; max-width: 860px; margin-inline: auto; }
.hero-inner .pill { margin-bottom: 24px; }

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.1rem);
  letter-spacing: -0.035em;
  color: var(--text-1);
}

.hero p.lede {
  margin-top: 22px;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--text-2);
  line-height: 1.55;
  max-width: 620px;
  margin-inline: auto;
}

.hero-cta { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 34px; flex-wrap: wrap; }

.hero-meta { margin-top: 18px; font-size: 13px; color: var(--text-3); }

/* Mesh-gradient card behind the hero product visual */
.hero-visual-wrap {
  margin-top: 64px;
  border-radius: 32px 32px 0 0;
  padding: 26px;
  position: relative;
  overflow: hidden;
  background: url("assets/hero-bg.jpg") center 35% / cover no-repeat;
}
.hero-visual-wrap .grain { opacity: 0.2; }
.hero-visual-wrap .mockup-frame { position: relative; z-index: 1; border-radius: var(--r-20) var(--r-20) 0 0; }

/* Product mockup frame */
.mockup-frame {
  position: relative;
  border-radius: var(--r-20);
  border: 1px solid var(--border-2);
  background: var(--bg-panel);
  box-shadow: var(--shadow-high);
  overflow: hidden;
}
.mockup-chrome {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  background: var(--bg-1);
  border-bottom: 1px solid var(--border-1);
}
.mockup-chrome .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border-3); }
.mockup-chrome .path {
  margin-inline-start: 14px;
  font-size: 12px; color: var(--text-3); font-family: var(--font-mono);
  background: var(--bg-2); border-radius: var(--r-6); padding: 4px 10px;
}

/* ==========================================================================
   Hero inbox mock — rail + live chat + order profile
   ========================================================================== */

.hero-visual-wrap { padding-bottom: 0; }
.hero-mock-body { display: grid; grid-template-columns: 190px 1fr 250px; min-height: 580px; }

.hero-mock-rail { background: var(--bg-1); border-inline-end: 1px solid var(--border-1); padding: 14px 10px; display: flex; flex-direction: column; gap: 3px; }
.hero-mock-rail .im-conv { padding: 8px; }

.wa-wallpaper {
  background-image: url("assets/wa-wallpaper.jpg");
  background-size: 260px auto;
  background-repeat: repeat;
  background-color: #f7f2ec;
}

.hero-mock-chat { display: flex; flex-direction: column; padding: 18px 22px 20px; gap: 9px; min-width: 0; overflow-y: auto; scrollbar-width: none; scroll-behavior: smooth; }
.hero-mock-chat::-webkit-scrollbar { display: none; }
.hero-mock-chat .im-bubble { max-width: 68%; }
.hero-mock-chat .im-bubble.out { max-width: 54%; }

.trigger-flag {
  display: inline-flex; align-items: center; gap: 5px; align-self: flex-end;
  font-size: 10px; font-weight: 640; color: var(--text-3); margin-bottom: 2px;
  max-width: 100%; flex-wrap: wrap; row-gap: 2px;
}
.trigger-flag .tf-auto {
  background: var(--brand-tint); color: var(--brand-strong); padding: 2px 6px;
  border-radius: 4px; font-size: 9px; font-weight: 700; letter-spacing: 0.03em;
}
.trigger-flag svg { width: 9px; height: 9px; color: var(--text-4); flex-shrink: 0; }

.showcase-phone .trigger-flag { margin-bottom: 4px; }
.chat-head { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; margin-bottom: 4px; border-bottom: 1px solid var(--border-1); }
.chat-head .im-avatar { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; font-size: 12.5px; }
.chat-head strong { font-size: 13.5px; font-weight: 590; display: block; }
.chat-head span { font-size: 11.5px; color: var(--text-3); display: block; margin-top: 1px; }

.chat-msg { transition: opacity 0.45s var(--ease-out-quart), transform 0.45s var(--ease-out-quart); }
.chat-msg.is-pending { opacity: 0; transform: translateY(10px); }
.msg-group { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }

.chat-typing { max-height: 0; opacity: 0; overflow: hidden; transition: max-height 0.3s var(--ease-out-quart), opacity 0.25s; align-self: flex-end; }
.chat-typing.is-active { max-height: 60px; opacity: 1; }

.typing-dots { display: inline-flex; align-items: center; gap: 3px; padding: 4px 2px; }
.typing-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--text-4); animation: typingBounce 1.1s 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 typingBounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }

.im-tpl-actions { display: flex; margin: 8px -12px -9px; border-top: 1px solid rgba(0,0,0,0.08); }
.im-tpl-actions .tpl-btn { flex: 1; text-align: center; padding: 9px 4px; font-size: 12px; font-weight: 650; color: var(--brand-strong); }
.im-tpl-actions .tpl-btn + .tpl-btn { border-inline-start: 1px solid rgba(0,0,0,0.08); }
.im-bubble.in .im-tpl-actions .tpl-btn { color: var(--text-2); }

.hero-mock-profile { background: var(--bg-1); border-inline-start: 1px solid var(--border-1); padding: 18px 16px; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 760px) {
  .hero-mock-body { grid-template-columns: 1fr; min-height: 0; }
  .hero-mock-rail, .hero-mock-profile { display: none; }
}
.op-head { display: flex; align-items: center; justify-content: space-between; }
.op-id { font-size: 12.5px; font-weight: 640; }
.op-badge { font-size: 10.5px; font-weight: 650; padding: 3px 8px; border-radius: var(--r-full); background: var(--bg-3); color: var(--text-2); }
.op-badge.confirmed { background: var(--brand-tint); color: var(--brand-strong); }
.op-customer { font-size: 11.5px; color: var(--text-3); }
.op-items { display: flex; flex-direction: column; gap: 10px; }
.op-item { display: flex; align-items: center; gap: 9px; }
.op-item .op-thumb { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.op-item .meta { display: flex; flex-direction: column; gap: 1px; }
.op-item .meta strong { display: block; font-size: 11.5px; font-weight: 570; line-height: 1.2; }
.op-item .meta span { font-size: 10.5px; color: var(--text-3); line-height: 1.2; }
.op-total { display: flex; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--border-2); font-size: 12.5px; font-weight: 640; }
.op-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 640; padding: 5px 9px; border-radius: var(--r-full); background: var(--brand-tint); color: var(--brand-strong); width: fit-content; }

/* ==========================================================================
   Section background rhythm
   ========================================================================== */

.bg-tint { background: var(--bg-1); }
.bg-dark-fade { background: linear-gradient(180deg, var(--bg-1), var(--bg-0)); }

/* ==========================================================================
   Marquee / trust strip
   ========================================================================== */

.trust-strip { padding-block: 30px; border-block: 1px solid var(--border-1); background: var(--bg-1); }
.trust-strip-inner { display: flex; align-items: center; gap: 14px; }
.trust-strip .trust-label { font-size: 12.5px; color: var(--text-3); white-space: nowrap; font-weight: 540; }
.trust-marquee { overflow: hidden; flex: 1; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.trust-track { display: flex; gap: 40px; width: max-content; animation: marquee 34s linear infinite; }
.trust-track span { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-2); font-weight: 520; white-space: nowrap; }
.trust-track span svg { color: var(--text-4); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ==========================================================================
   Section header pattern
   ========================================================================== */

.section-head { max-width: 620px; }
.section-head.wide { max-width: 100%; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 660; letter-spacing: 0.02em; text-transform: uppercase;
  color: var(--orange-strong);
  background: var(--orange-tint);
  padding: 6px 13px 6px 10px;
  border-radius: var(--r-full);
  margin-bottom: 16px;
}
.eyebrow svg { flex-shrink: 0; }

.section-head h2 { font-size: clamp(1.9rem, 3.2vw, 2.7rem); letter-spacing: -0.03em; }
.section-head p { margin-top: 16px; font-size: 1.06rem; color: var(--text-2); line-height: 1.6; }

/* ==========================================================================
   Bento grid — Automations
   ========================================================================== */

.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-top: 56px;
}
.bento-card {
  grid-column: span 2;
  background: var(--bg-panel);
  border: 1px solid var(--border-1);
  border-radius: var(--r-16);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform var(--speed-regular) var(--ease-out-quart), box-shadow var(--speed-regular), border-color var(--speed-regular);
}
.bento-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-med); border-color: var(--border-2); }
.bento-card.span-3 { grid-column: span 3; }
.bento-card.span-4 { grid-column: span 4; }
.bento-card.featured { background: linear-gradient(180deg, var(--bg-0), var(--bg-1)); }

.card-icon {
  width: 40px; height: 40px; border-radius: var(--r-12);
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-tint); color: var(--brand-strong);
  flex-shrink: 0;
}
.card-icon.ai { background: var(--ai-tint); color: var(--ai); }
.card-icon.info { background: var(--info-tint); color: var(--info); }
.card-icon-pair { display: flex; gap: 6px; }
.card-icon-pair svg { width: 28px; height: 28px; flex-shrink: 0; }

.bento-card h3 { font-size: 1.06rem; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; }
.bento-card p { font-size: 14.5px; color: var(--text-2); line-height: 1.55; }
.bento-card .card-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr; }
  .bento-card, .bento-card.span-3, .bento-card.span-4 { grid-column: span 1; }
}
@media (min-width: 901px) and (max-width: 1080px) {
  .bento { grid-template-columns: repeat(4, 1fr); }
  .bento-card.span-3 { grid-column: span 4; }
  .bento-card.span-4 { grid-column: span 4; }
}

/* trigger-note chip used inside automation cards */
.trigger-chip {
  display: inline-flex; align-items: center; gap: 6px; vertical-align: middle;
  font-size: 12px; font-weight: 500; letter-spacing: -0.01em; color: var(--text-3); font-family: var(--font-mono);
  background: var(--bg-2); border-radius: var(--r-6); padding: 5px 9px; margin-inline-start: 4px;
}
h3 .trigger-chip { font-size: 11px; }

/* ==========================================================================
   AI section
   ========================================================================== */

.ai-section {
  background: var(--bg-inverse);
  color: #fff;
  overflow: hidden;
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.section-head-row .section-head { max-width: 620px; }
.ai-section .ai-glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(50% 60% at 18% 0%, rgba(94,106,210,0.5), transparent 70%),
    radial-gradient(40% 50% at 90% 10%, rgba(23,164,94,0.28), transparent 70%);
  pointer-events: none;
}
.ai-section .grid-dots { background-image: radial-gradient(circle, rgba(255,255,255,0.14) 1px, transparent 1px); mask-image: radial-gradient(ellipse 70% 70% at 50% 10%, #000 40%, transparent 100%); -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 10%, #000 40%, transparent 100%); }

.ai-section .section-head h2 { color: #fff; }
.ai-section .section-head p { color: rgba(255,255,255,0.62); }

.ai-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; margin-top: 60px; }
@media (max-width: 940px) { .ai-grid { grid-template-columns: 1fr; gap: 40px; } }

.ai-col { display: flex; flex-direction: column; align-items: flex-start; gap: 32px; }
.ai-feature-list { display: flex; flex-direction: column; gap: 24px; }
.ai-feature-list li { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.ai-feature-list .feat-visual { flex-shrink: 0; }
.ai-feature-list h4 { font-size: 14.5px; font-weight: 560; margin-bottom: 3px; }
.ai-feature-list p { font-size: 12.5px; color: rgba(255,255,255,0.55); line-height: 1.55; }

/* Flow diagram */
.ai-flow {
  position: relative;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--r-16);
  padding: 30px 22px;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}
.flow-node {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--r-12);
  padding: 13px 15px;
  position: relative;
  z-index: 2;
}
.flow-node .flow-icon {
  width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.08);
}
.flow-node strong { display: block; font-size: 13.5px; font-weight: 560; }
.flow-node span { display: block; font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 1px; }
.flow-node.active { border-color: rgba(94,106,210,0.55); animation: nodePulse 2.6s ease-in-out infinite; }
.flow-node.active .flow-icon { background: linear-gradient(135deg, var(--ai), #8a90f0); }
@keyframes nodePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(94,106,210,0.35); }
  50% { box-shadow: 0 0 0 7px rgba(94,106,210,0); }
}

.flow-line { flex: 1; width: 1px; margin-inline-start: 30px; background: linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0.05)); position: relative; min-height: 22px; }
.flow-line::after {
  content: ""; position: absolute; left: -2px; top: 0; width: 5px; height: 5px; border-radius: 50%;
  background: var(--ai); box-shadow: 0 0 8px 2px rgba(94,106,210,0.7);
  animation: flowDot 2.6s ease-in-out infinite;
}
@keyframes flowDot { 0% { top: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { top: 100%; opacity: 0; } }

.ai-chat-bubble {
  margin-top: 4px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--r-12);
  padding: 12px 14px;
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  line-height: 1.5;
}
.ai-suggest-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.ai-suggest-chip {
  font-size: 12px; padding: 7px 11px; border-radius: var(--r-full);
  background: rgba(94,106,210,0.16); border: 1px solid rgba(94,106,210,0.4); color: #dfe1ff;
}
.ai-suggest-chip.ghost { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.12); color: rgba(255,255,255,0.55); }

/* ==========================================================================
   Feature row (alternating image/text) — Inbox / Campaigns
   ========================================================================== */

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.feature-row + .feature-row { margin-top: 0; }
.feature-row.reverse .feature-row-visual { order: -1; }
@media (max-width: 900px) {
  .feature-row, .feature-row.reverse { grid-template-columns: 1fr; gap: 32px; }
  .feature-row .feature-row-visual { order: -1; }
}

.feature-row-copy h3 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); letter-spacing: -0.025em; }
.feature-row-copy > .eyebrow { margin-bottom: 12px; }
.feature-row-copy p.desc { margin-top: 14px; font-size: 15.5px; color: var(--text-2); line-height: 1.65; max-width: 460px; }
.feature-row-copy ul.checklist { margin-top: 20px; display: flex; flex-direction: column; gap: 11px; }
.feature-row-copy ul.checklist li { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; color: var(--text-1); }
.feature-row-copy ul.checklist svg { flex-shrink: 0; margin-top: 2px; color: var(--brand); }

.bg-tint .feature-row-visual, .bg-tint .visual-frame, .bg-tint .showcase-canvas {
  background: var(--bg-0);
  border-color: var(--border-2);
}

.visual-bare { display: flex; align-items: center; justify-content: center; padding: 12px; }

.feature-row-visual, .visual-frame {
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: var(--r-20);
  padding: 22px;
  box-shadow: var(--shadow-med);
  position: relative;
}

/* Inbox mockup */
.inbox-mock { display: grid; grid-template-columns: 108px 1fr; gap: 0; border-radius: var(--r-12); overflow: hidden; border: 1px solid var(--border-1); background: var(--bg-0); }
.im-list { background: var(--bg-1); border-inline-end: 1px solid var(--border-1); padding: 10px 8px; display: flex; flex-direction: column; gap: 4px; }
.im-conv { display: flex; align-items: center; gap: 8px; padding: 7px; border-radius: var(--r-8); }
.im-conv.active { background: var(--bg-0); box-shadow: var(--shadow-low); }
.im-avatar {
  position: relative;
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: #fff; letter-spacing: -0.02em;
  overflow: visible; background: var(--bg-3);
}
.im-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.im-avatar .ch-badge {
  position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--bg-0); box-shadow: 0 0 0 1.5px var(--bg-0);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.im-avatar.c1 { background: var(--av-1); }
.im-avatar.c2 { background: var(--av-2); }
.im-avatar.c3 { background: var(--av-3); }
.im-avatar.c4 { background: var(--av-4); }
.im-avatar.c5 { background: var(--av-5); }
.im-conv-meta { min-width: 0; flex: 1; }
.im-conv-meta strong { display: block; font-size: 11.5px; font-weight: 600; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.im-conv-meta span { display: block; font-size: 10.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.im-line { height: 6px; border-radius: 3px; background: var(--border-2); flex: 1; }
.inbox-mock .im-main { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.im-bubble { max-width: 78%; padding: 9px 12px; border-radius: 9px; font-size: 12.5px; line-height: 1.45; position: relative; box-shadow: 0 1px 1px rgba(0,0,0,0.05); }
.im-bubble.in { background: #fff; align-self: flex-start; border-top-left-radius: 2px; }
.im-bubble.out { max-width: 64%; background: var(--brand-tint); color: var(--brand-strong); align-self: flex-end; border-top-right-radius: 2px; }
.im-bubble.ai { background: var(--ai-tint); color: var(--ai); align-self: flex-end; border: 1px dashed var(--ai-ring); border-top-right-radius: 2px; }
.im-bubble.in::before {
  content: ""; position: absolute; top: 0; left: -7px; width: 9px; height: 12px;
  background: inherit; clip-path: polygon(100% 0, 100% 100%, 0 0);
}
.im-bubble.out::before, .im-bubble.ai::before {
  content: ""; position: absolute; top: 0; right: -7px; width: 9px; height: 12px;
  background: inherit; clip-path: polygon(0 0, 0 100%, 100% 0);
}
.im-channel-row { display: flex; gap: 6px; margin-top: 4px; }
.im-channel { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--bg-2); }

/* Campaign wizard mock */
.wizard-mock .wiz-steps { display: flex; gap: 6px; margin-bottom: 16px; }
.wizard-mock .wiz-step { flex: 1; height: 4px; border-radius: 2px; background: var(--border-2); }
.wizard-mock .wiz-step.done { background: var(--brand); }
.wizard-mock .wiz-body { background: var(--bg-0); border: 1px solid var(--border-1); border-radius: var(--r-12); padding: 18px; }
.wiz-audience-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; background: var(--bg-2); border-radius: var(--r-full); padding: 5px 10px; margin: 3px 4px 0 0; }
.wiz-count { font-size: 28px; font-weight: 620; letter-spacing: -0.02em; margin-top: 10px; }
.wiz-count small { font-size: 13px; font-weight: 500; color: var(--text-3); }

/* Analytics dashboard mock */
.dash-mock { display: flex; flex-direction: column; gap: 14px; }
.dash-stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dash-stat { background: var(--bg-0); border: 1px solid var(--border-1); border-radius: var(--r-10, 10px); padding: 13px; }
.dash-stat .dash-stat-label { font-size: 11.5px; color: var(--text-3); font-weight: 550; }
.dash-stat .dash-stat-val { font-size: 19px; font-weight: 610; letter-spacing: -0.015em; margin-top: 4px; }
.dash-stat .dash-stat-delta { font-size: 11.5px; color: var(--brand-strong); font-weight: 560; margin-top: 3px; }
.dash-chart { background: var(--bg-0); border: 1px solid var(--border-1); border-radius: var(--r-10, 10px); padding: 16px; }
.dash-chart-bars { display: flex; align-items: flex-end; gap: 6px; height: 108px; margin-top: 14px; }
.dash-chart-bars .bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 3px; }
.dash-chart-bars .bar { width: 100%; border-radius: 3px 3px 0 0; background: var(--border-2); position: relative; }
.dash-chart-bars .bar.sent { background: var(--bg-3); }
.dash-chart-bars .bar.delivered { background: var(--brand); }
.dash-legend { display: flex; gap: 16px; margin-top: 12px; }
.dash-legend span { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }
.dash-legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }

/* ==========================================================================
   Network / acceptance strip
   ========================================================================== */

.tag-chip-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.tag-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 650; padding: 4px 8px; border-radius: var(--r-6); border: none; }
.tag-chip svg { flex-shrink: 0; }
.tag-chip.new { background: #d5ebff; color: #003a5a; }
.tag-chip.high { background: #affebf; color: #014b40; }
.tag-chip.medium { background: #ffd6a4; color: #5e4200; }
.tag-chip.low { background: #fed1d7; color: #8e0b21; }

/* ==========================================================================
   RTL demo widget
   ========================================================================== */

.rtl-demo {
  border: 1px solid var(--border-1);
  border-radius: var(--r-16);
  background: var(--bg-1);
  padding: 22px;
}
.rtl-demo-toggle { display: inline-flex; border: 1px solid var(--border-2); border-radius: var(--r-full); padding: 3px; background: var(--bg-0); }
.rtl-demo-toggle button {
  height: 32px; padding: 0 16px; border-radius: var(--r-full); font-size: 13px; font-weight: 560; color: var(--text-3);
  transition: background var(--speed-regular), color var(--speed-regular);
}
.rtl-demo-toggle button.is-active { background: var(--brand); color: #fff; }
.rtl-demo-phone {
  margin-top: 20px; border: 1px solid var(--border-1); border-radius: var(--r-12);
  padding: 16px; min-height: 118px; display: flex; flex-direction: column; gap: 8px;
  transition: direction 0s;
}
.rtl-demo-phone .im-bubble { transition: all var(--speed-regular) var(--ease-out-quart); }

/* ==========================================================================
   Setup steps
   ========================================================================== */

.steps-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 56px; counter-reset: step; }
@media (max-width: 860px) { .steps-row { grid-template-columns: 1fr; } }
.step-card { position: relative; padding: 26px 22px 22px; border: 1px solid var(--border-1); border-radius: var(--r-16); background: var(--bg-0); }
.step-card .step-num { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-3); }
.step-card h4 { margin-top: 12px; font-size: 16.5px; letter-spacing: -0.01em; }
.step-card p { margin-top: 8px; font-size: 14px; color: var(--text-2); line-height: 1.55; }
.step-connector { position: absolute; top: 34px; right: -22px; width: 22px; height: 1px; background: var(--border-2); }
@media (max-width: 860px) { .step-connector { display: none; } }

/* ==========================================================================
   Extensions strip
   ========================================================================== */

.ext-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 44px; }
@media (max-width: 900px) { .ext-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .ext-grid { grid-template-columns: 1fr; } }
.ext-card { border: 1px solid var(--border-1); border-radius: var(--r-12); padding: 18px 16px; background: var(--bg-0); transition: border-color var(--speed-regular), transform var(--speed-regular); }
.ext-card:hover { border-color: var(--border-3); transform: translateY(-2px); }
.ext-card svg { color: var(--text-3); margin-bottom: 12px; }
.ext-card h5 { font-size: 13.5px; font-weight: 570; }
.ext-card p { font-size: 12.5px; color: var(--text-3); margin-top: 5px; line-height: 1.5; }

/* ==========================================================================
   Pricing
   ========================================================================== */

.billing-toggle {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--border-2); border-radius: var(--r-full);
  padding: 4px; background: var(--bg-0); margin-inline: auto; margin-top: 28px;
}
.billing-toggle button {
  height: 36px; padding: 0 18px; border-radius: var(--r-full);
  font-size: 13.5px; font-weight: 560; color: var(--text-3);
  transition: background var(--speed-regular), color var(--speed-regular);
  display: flex; align-items: center; gap: 7px;
}
.billing-toggle button.is-active { background: var(--text-1); color: #fff; }
.billing-toggle .save-badge { font-size: 11px; background: var(--brand-tint); color: var(--brand-strong); padding: 2px 6px; border-radius: var(--r-full); font-weight: 650; }

.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 48px; align-items: stretch; }
@media (max-width: 1000px) { .pricing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .pricing-grid { grid-template-columns: 1fr; } }

.price-card { border: 1px solid var(--border-1); border-radius: var(--r-16); padding: 26px 22px; background: var(--bg-0); display: flex; flex-direction: column; }
.price-card.is-highlight { border-color: var(--ai); box-shadow: 0 0 0 1px var(--ai), var(--shadow-med); position: relative; }
.price-card.is-highlight::before {
  content: "Most popular"; position: absolute; top: -12px; left: 22px;
  background: var(--ai); color: #fff; font-size: 11px; font-weight: 650; padding: 4px 10px; border-radius: var(--r-full);
}
.price-card h3 { font-size: 16px; font-weight: 610; }
.price-card .price-desc { font-size: 12.5px; color: var(--text-3); margin-top: 4px; min-height: 32px; }
.price-card .price-amount { margin-top: 18px; display: flex; align-items: baseline; gap: 4px; }
.price-card .price-amount .num { font-size: 32px; font-weight: 620; letter-spacing: -0.02em; }
.price-card .price-amount .per { font-size: 13px; color: var(--text-3); }
.price-card .btn { margin-top: 20px; width: 100%; }
.price-card .price-feats { margin-top: 22px; display: flex; flex-direction: column; gap: 11px; border-top: 1px solid var(--border-1); padding-top: 18px; }
.price-card .price-feats li { display: flex; align-items: flex-start; gap: 9px; font-size: 13.3px; color: var(--text-2); line-height: 1.5; }
.price-card .price-feats li svg { flex-shrink: 0; margin-top: 3px; color: var(--brand); }
.price-card .price-feats li.muted { color: var(--text-4); }
.price-card .price-feats li.muted svg { color: var(--text-4); }

/* ==========================================================================
   Final CTA
   ========================================================================== */

.final-cta {
  border-radius: var(--r-24);
  background: linear-gradient(160deg, #0d1210 0%, #0a0b0d 55%, #0c0f1c 100%);
  color: #fff;
  padding: 96px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.final-cta .glow { position: absolute; inset: 0; background: radial-gradient(45% 70% at 50% 0%, rgba(23,164,94,0.3), transparent 70%); }
.final-cta h2 { position: relative; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.03em; max-width: 600px; margin-inline: auto; }
.final-cta p { position: relative; margin-top: 16px; color: rgba(255,255,255,0.62); font-size: 1.05rem; }
.final-cta .hero-cta { position: relative; margin-top: 32px; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer { padding-block: 72px 36px; }
.footer-top { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; }
@media (max-width: 860px) { .footer-top { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .footer-top { grid-template-columns: 1fr; } }
.footer-brand .brand-mark { margin-bottom: 12px; }
.footer-brand p { font-size: 13.5px; color: var(--text-3); max-width: 240px; line-height: 1.6; }
.foot-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.cred { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--border-1); border-radius: var(--r-12); padding: 8px 14px 8px 9px; background: var(--bg-0); }
[dir="rtl"] .cred { padding: 8px 9px 8px 14px; }
.cred .ci { width: 30px; height: 30px; border-radius: var(--r-8); display: grid; place-items: center; flex: none; background: #fff; border: 1px solid var(--border-1); }
.cred small { display: block; font-size: 9.5px; font-weight: 620; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); line-height: 1.3; text-align: start; }
[dir="rtl"] .cred small { letter-spacing: 0; }
.cred b { display: block; font-size: 13px; font-weight: 650; line-height: 1.25; color: var(--text-1); text-align: start; }
.footer-col h5 { font-size: 12.5px; font-weight: 620; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 14px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 13.8px; color: var(--text-2); transition: color var(--speed-fast); }
.footer-col a:hover { color: var(--text-1); }
.footer-col a.btn, .footer-col a.btn:hover { color: var(--text-on-brand); }
.footer-bottom { margin-top: 56px; padding-top: 26px; border-top: 1px solid var(--border-1); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-bottom p { font-size: 12.5px; color: var(--text-4); }
.footer-langs { display: flex; gap: 8px; font-size: 12.5px; color: var(--text-3); }

/* ==========================================================================
   Misc
   ========================================================================== */

.divider-fade { height: 1px; background: linear-gradient(90deg, transparent, var(--border-2), transparent); }

@media (max-width: 640px) {
  .final-cta { padding: 64px 22px; border-radius: var(--r-16); }
}

/* ==========================================================================
   Automation showcase — tabbed visual demo
   ========================================================================== */

.showcase { margin-top: 44px; }

.showcase-tabs { display: flex; gap: 4px; overflow-x: auto; overflow-y: hidden; padding: 0 4px; margin: 0 -4px; border-bottom: 1px solid var(--border-1); scrollbar-width: none; }
.showcase-tabs::-webkit-scrollbar { display: none; }
@media (max-width: 760px) {
  .showcase-tabs { -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
}
.showcase-tab {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
  padding: 13px 16px; border-radius: 0; border: none; border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: transparent; font-size: 13.5px; font-weight: 560; color: var(--text-3);
  white-space: nowrap; transition: color var(--speed-regular), border-color var(--speed-regular);
}
.showcase-tab svg { color: var(--text-4); transition: color var(--speed-regular); flex-shrink: 0; }
.showcase-tab:hover { color: var(--text-1); }
.showcase-tab.is-active { color: var(--text-1); border-bottom-color: var(--brand); font-weight: 610; }
.showcase-tab.is-active svg { color: var(--brand); }

.showcase-canvas {
  margin-top: 0; position: relative; border-radius: 0 0 28px 28px; overflow: hidden;
  border: 1px solid var(--border-1); border-top: none;
  background: linear-gradient(175deg, var(--bg-2) 0%, var(--bg-1) 100%);
}
.showcase-panel {
  display: none; position: relative; padding: 64px 40px;
  align-items: center; justify-content: center; gap: 40px;
  min-height: 500px;
}
.showcase-panel.is-active { display: flex; animation: panelIn 0.4s var(--ease-out-quart) both; }
@keyframes panelIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.showcase-note { max-width: 188px; font-size: 12.8px; color: var(--text-2); line-height: 1.55; flex-shrink: 0; }
.showcase-note .note-tag { display: flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 680; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-4); margin-bottom: 6px; }
.showcase-note .note-tag svg { color: var(--brand); flex-shrink: 0; }
.showcase-note.right { text-align: right; }
.showcase-note.right .note-tag { justify-content: flex-end; }

.showcase-phone { width: 296px; flex-shrink: 0; background: #fff; border-radius: 26px; border: 1px solid var(--border-2); box-shadow: var(--shadow-high); overflow: hidden; }
.showcase-phone .chat-head { padding: 14px 16px; margin-bottom: 0; }
.showcase-phone .phone-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; min-height: 220px; }
.showcase-phone .phone-body .im-bubble { max-width: 92%; }

.star-row { display: flex; gap: 4px; }
.star-row svg { color: var(--border-3); }
.star-row svg.filled { color: #f5a623; }

.reason-chip-list { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.reason-chip-list span { font-size: 12px; padding: 8px 12px; border-radius: var(--r-10, 10px); background: var(--bg-2); color: var(--text-2); }
.reason-chip-list span.picked { background: var(--brand-tint); color: var(--brand-strong); font-weight: 590; }

.bis-widget { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 590; padding: 10px 14px; border-radius: var(--r-full); border: 1px solid var(--border-2); background: var(--bg-0); width: fit-content; box-shadow: var(--shadow-low); color: var(--text-1); }
.bis-widget svg { color: var(--brand-strong); }

@media (max-width: 760px) {
  .showcase-panel { flex-direction: column; padding: 32px 22px; gap: 18px; min-height: 0; }
  .showcase-note { max-width: 340px; text-align: left !important; }
  .showcase-note .note-tag { justify-content: flex-start !important; }
  .showcase-phone { width: 100%; max-width: 320px; }
}

/* Mini visual wrapper used inside bento cards */
.card-visual {
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: var(--r-12);
  padding: 12px;
  margin-top: 2px;
}
