/* ============================================================
   JaenX — custom styles beyond Tailwind
   THEME: Emerald Green + Gold — matching/exceeding live jaenx.com brand
   Palette tokens live in css/input.css (@theme block) and are
   compiled to css/tailwind.css. Rebuild when adding new classes:
     npx @tailwindcss/cli -i css/input.css -o css/tailwind.css --minify
   ============================================================ */

/* ---- AOS failsafe: content is ALWAYS visible if AOS hasn't loaded yet. ---- */
html:not(.aos-ready) [data-aos] {
  opacity: 1 !important;
  transform: none !important;
}

:root {
  /* Emerald palette — mirrored from Tailwind @theme for use in raw CSS */
  --base:       #004d2c;
  --surface:    #08361f;
  --raised:     #0d6b3f;
  --border:     #1c6b48;
  --primary:    #c8a84b;     /* Gold */
  --bright:     #e5c76b;     /* Gold bright */
  --gold-deep:  #b08a3c;
  --gold-pale:  #f5e9c4;
  --aurora1:    #006b3f;
  --aurora2:    #004d2c;
  --text:       #fbf8f0;     /* Cream white */
  --muted:      #d6d3c4;     /* Muted cream on dark */
  --whatsapp:   #25d366;
  --cream:      #f6f1e7;
  --ink:        #0d1f14;
  --ink-muted:  #4a5568;
}

html {
  scroll-behavior: smooth;
  background-color: var(--base);
  overflow-x: hidden;
}

body {
  background-color: var(--base);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ---- Accessible focus ring everywhere ---- */
:focus-visible {
  outline: 2px solid var(--bright);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---- Glassmorphism utility — emerald tinted ---- */
.glass {
  background: rgba(0, 77, 44, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(200, 168, 75, 0.18);
}

.glass-strong {
  background: rgba(8, 54, 31, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(200, 168, 75, 0.22);
}

/* ---- Sticky nav scroll state ---- */
[data-nav] {
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav-scrolled {
  background: rgba(0, 77, 44, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(200, 168, 75, 0.22);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

/* ============================================================
   Emerald Aurora / gradient-mesh background blobs
   ============================================================ */
.aurora-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.aurora-blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(90px);
  opacity: 0.45;
  will-change: transform;
}
/* Emerald-deep center blob */
.aurora-blob.b1 {
  width: 46rem;
  height: 46rem;
  top: -16rem;
  left: -10rem;
  background: radial-gradient(circle at center, #006b3f, transparent 65%);
  animation: drift1 22s ease-in-out infinite alternate;
}
/* Gold-tinted mid blob — very soft */
.aurora-blob.b2 {
  width: 40rem;
  height: 40rem;
  top: -8rem;
  right: -12rem;
  background: radial-gradient(circle at center, rgba(200,168,75,0.25), transparent 65%);
  animation: drift2 26s ease-in-out infinite alternate;
}
/* Dark emerald lower blob */
.aurora-blob.b3 {
  width: 34rem;
  height: 34rem;
  bottom: -18rem;
  left: 30%;
  background: radial-gradient(circle at center, #004d2c, transparent 65%);
  opacity: 0.35;
  animation: drift3 30s ease-in-out infinite alternate;
}

@keyframes drift1 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(6rem, 4rem) scale(1.12); }
}
@keyframes drift2 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-5rem, 5rem) scale(1.08); }
}
@keyframes drift3 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-4rem, -4rem) scale(1.15); }
}

@media (prefers-reduced-motion: reduce) {
  .aurora-blob { animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ---- Subtle grid texture overlay (emerald-tinted lines) ---- */
.grid-overlay {
  background-image:
    linear-gradient(rgba(200, 168, 75, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200, 168, 75, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}

/* ============================================================
   Buttons
   ============================================================ */
/* PRIMARY — Gold fill, dark-green text (main CTA) */
.btn-wa {
  background: linear-gradient(135deg, var(--primary), var(--bright));
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(200, 168, 75, 0.35);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
  font-weight: 700;
}
.btn-wa:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(200, 168, 75, 0.5);
}

/* SECONDARY — outline (for "See How It Works") */
.btn-outline-bright {
  border: 2px solid rgba(229, 199, 107, 0.5);
  color: var(--bright);
  background: transparent;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.btn-outline-bright:hover {
  border-color: var(--bright);
  background: rgba(229, 199, 107, 0.1);
  color: var(--text);
}

/* Legacy btn-primary (kept for any page that references it) */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--gold-deep));
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(200, 168, 75, 0.3);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 36px rgba(200, 168, 75, 0.45);
}

/* ---- Gradient text (gold shimmer) ---- */
.text-gradient {
  background: linear-gradient(120deg, #fbf8f0 0%, var(--bright) 55%, var(--primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---- Card glow on hover — gold tint ---- */
.card-hover {
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card-hover:hover {
  transform: translateY(-4px);
  border-color: rgba(200, 168, 75, 0.45);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

/* ============================================================
   Logo mark — gold rounded-square "JX" monogram
   ============================================================ */
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--bright));
  border-radius: 8px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(200, 168, 75, 0.4);
}
.logo-mark-text {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}
.logo-wordmark {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* ============================================================
   iPhone + WhatsApp mockup (pure CSS, no images)
   ============================================================ */
.phone-float {
  animation: phoneFloat 6s ease-in-out infinite;
  will-change: transform;
}
@keyframes phoneFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

/* iPhone body: slim modern frame with metallic titanium edge */
.iphone {
  position: relative;
  width: 300px;
  max-width: 78vw;
  aspect-ratio: 300 / 620;
  background:
    linear-gradient(155deg, #2b3037 0%, #15181d 46%, #090a0c 100%);
  border-radius: 3rem;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    0 0 0 1.5px rgba(200, 168, 75, 0.22),            /* slim brand-gold rim */
    0 36px 80px rgba(0, 0, 0, 0.58),                 /* deep ambient drop */
    0 10px 28px rgba(0, 0, 0, 0.45),
    inset 0 1.5px 1px rgba(255, 255, 255, 0.22),     /* top metallic highlight */
    inset 0 -1.5px 1px rgba(255, 255, 255, 0.06),    /* bottom edge light */
    inset 1.5px 0 1px rgba(255, 255, 255, 0.05),
    inset -1.5px 0 1px rgba(255, 255, 255, 0.05);
}
.iphone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: #ece5dd;
  border-radius: 2.55rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.28);   /* seats the screen in the bezel */
}
/* Subtle glass glare across the screen (decorative, never blocks taps) */
.iphone-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  border-radius: inherit;
  background: linear-gradient(133deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(255, 255, 255, 0.05) 16%,
    rgba(255, 255, 255, 0) 34%);
}

/* Dynamic Island with a subtle front-camera lens */
.dynamic-island {
  position: absolute;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 82px;
  height: 23px;
  background: #000;
  border-radius: 999px;
  z-index: 20;
  box-shadow: inset 0 0 2px rgba(255, 255, 255, 0.08);
}
.dynamic-island::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 9px;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #3a4d63 0%, #0a0e14 72%);
  box-shadow: 0 0 2px rgba(90, 140, 210, 0.45);
}

/* side buttons */
.phone-btn {
  position: absolute;
  background: #2a2e34;
  border-radius: 3px;
  box-shadow: inset 0 0 1px rgba(255,255,255,0.2);
  z-index: 1;
}
.phone-btn-mute    { left: -3px; top: 96px;  width: 3px; height: 26px; }
.phone-btn-vol-up  { left: -3px; top: 138px; width: 3px; height: 44px; }
.phone-btn-vol-down{ left: -3px; top: 192px; width: 3px; height: 44px; }
.phone-btn-power   { right: -3px; top: 150px; width: 3px; height: 64px; }

/* status bar */
.wa-statusbar {
  height: 38px;
  padding: 0 1.4rem 0 1.5rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 4px;
  background: #075e54;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
}
.wa-time { letter-spacing: .02em; }
.wa-status-icons { display: inline-flex; align-items: center; gap: 4px; }

/* WhatsApp header */
.wa-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #075e54;
}
.wa-avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(135deg, #c8a84b, #e5c76b);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* chat area */
.wa-chat {
  flex: 1;
  overflow: hidden;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background-color: #ece5dd;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(0,0,0,0.025) 0 2px, transparent 2px),
    radial-gradient(circle at 70% 60%, rgba(0,0,0,0.025) 0 2px, transparent 2px);
  background-size: 36px 36px;
}
.wa-day { align-self: center; margin-bottom: 2px; }
.wa-day span {
  background: #d6e7f0;
  color: #54656f;
  font-size: 0.62rem;
  padding: 2px 9px;
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}
.wa-bubble {
  position: relative;
  max-width: 82%;
  padding: 5px 9px 4px;
  border-radius: 8px;
  font-size: 0.72rem;
  line-height: 1.3;
  color: #111b21;
  box-shadow: 0 1px 0.5px rgba(0,0,0,0.13);
  animation: waBubbleIn 0.45s ease both;
}
.wa-in  { align-self: flex-start; background: #fff; border-top-left-radius: 2px; }
.wa-out { align-self: flex-end; background: #dcf8c6; border-top-right-radius: 2px; }
.wa-meta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  float: right;
  margin: 4px 0 -2px 8px;
  font-size: 0.55rem;
  color: #667781;
}
.wa-tick { color: #34b7f1; }

/* interactive reply buttons */
.wa-buttons {
  align-self: flex-start;
  width: 82%;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.wa-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 7px;
  background: #fff;
  color: #027eb5;
  font-size: 0.72rem;
  font-weight: 500;
  border-radius: 8px;
  box-shadow: 0 1px 0.5px rgba(0,0,0,0.13);
  cursor: pointer;
}
.wa-btn:hover { background: #f3fbff; }

/* staggered reveal */
.wa-chat > *:nth-child(2) { animation-delay: 0.2s; }
.wa-buttons { animation: waBubbleIn 0.45s ease both; animation-delay: 0.5s; }
.wa-chat > *:nth-child(4) { animation-delay: 0.9s; }
.wa-chat > *:nth-child(5) { animation-delay: 1.2s; }
.wa-chat > *:nth-child(6) { animation-delay: 1.5s; }
.wa-chat > *:nth-child(7) { animation-delay: 1.8s; }

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

/* input bar */
.wa-inputbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 8px 10px;
  background: #ece5dd;
}
.wa-input {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  border-radius: 999px;
  padding: 7px 11px;
}
.wa-input-text { flex: 1; font-size: 0.72rem; color: #8696a0; }
.wa-send {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #00a884;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  .phone-float { animation: none; }
  .wa-bubble, .wa-buttons { animation: none; opacity: 1; transform: none; }
}

/* ============================================================
   FAQ accordion
   ============================================================ */
[data-faq-panel] {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.3s ease;
}
[data-faq-icon] { transition: transform 0.3s ease; }

/* ============================================================
   Industry tabs — gold active state
   ============================================================ */
.tab-active {
  background: linear-gradient(135deg, var(--primary), var(--bright));
  color: var(--ink) !important;
  border-color: transparent !important;
  font-weight: 700;
}

/* ============================================================
   Code snippet block
   ============================================================ */
.code-block {
  background: #071a0e;
  border: 1px solid var(--border);
  font-family: "SFMono-Regular", ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.6;
}
.code-block .tok-key { color: #c792ea; }
.code-block .tok-str { color: #c3e88d; }
.code-block .tok-num { color: #f78c6c; }
.code-block .tok-com { color: #6a8a6d; }
.code-block .tok-fn  { color: #e5c76b; }

/* ---- Swiper tweaks ---- */
.testimonials-pagination .swiper-pagination-bullet {
  background: var(--muted);
  opacity: 0.5;
}
.testimonials-pagination .swiper-pagination-bullet-active {
  background: var(--primary);
  opacity: 1;
}
.logos-swiper .swiper-wrapper { transition-timing-function: linear !important; }

/* ---- Legacy bento-grid helper (kept for other uses) ---- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1rem;
}
@media (min-width: 640px) {
  .bento-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .bento-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .bento-grid .span-2 { grid-column: span 2 / span 2; }
}

/* ============================================================
   PREMIUM BENTO GRID — features section (index.html §3)
   Rows 1–4 each use a named grid layout that collapses cleanly
   to 1 column on mobile and 2 columns on tablet.
   ============================================================ */

/* ---- Shared card shell ---- */
.bento-card {
  position: relative;
  border-radius: 1.25rem;
  border: 1px solid rgba(0, 107, 63, 0.18);
  background: rgba(0, 77, 44, 0.07);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* Ensure no horizontal overflow from inner content */
  min-width: 0;
}

/* Shared card label (icon + text + optional badge) */
.bento-card-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem 1.25rem;
  margin-top: auto;
}
.bento-card-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.bento-pill-free {
  margin-left: auto;
  flex-shrink: 0;
  align-self: center;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(37, 211, 102, 0.15);
  color: #008069;
  border: 1px solid rgba(37, 211, 102, 0.3);
}

/* ---- Mockup container ---- */
.bento-mockup-wrap {
  flex: 1;
  overflow: hidden;
  padding: 1rem 1.25rem 0;
  min-height: 0;
}
/* Dark-surface variant */
.bento-dark-mockup {
  background: rgba(4, 18, 9, 0.55);
  border-radius: 0.75rem 0.75rem 0 0;
  padding: 1rem;
  margin: 0.75rem 0.75rem 0;
}

/* ── ROW 1: Admin (2-col hero) | Team Inbox | Users (1+1) ── */
.bento-row-1 {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .bento-row-1 {
    grid-template-columns: 1fr 1fr;
  }
  .bento-admin { grid-column: 1 / 3; }
}
@media (min-width: 1024px) {
  .bento-row-1 {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto;
  }
  .bento-admin    { grid-column: 1 / 3; grid-row: 1; }
  .bento-inbox    { grid-column: 3 / 4; grid-row: 1; }
  .bento-users    { grid-column: 4 / 5; grid-row: 1; }
}

/* ── ROW 2: Analytics (2-col) | Broadcasts | Flow Mgmt (1+1) ── */
.bento-row-2 {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .bento-row-2 { grid-template-columns: 1fr 1fr; }
  .bento-analytics { grid-column: 1 / 3; }
}
@media (min-width: 1024px) {
  .bento-row-2 { grid-template-columns: repeat(4, 1fr); }
  .bento-analytics  { grid-column: 1 / 3; }
  .bento-broadcast  { grid-column: 3 / 4; }
  .bento-flowmgmt   { grid-column: 4 / 5; }
}

/* ── ROW 3: Flow Builder (2-col) | Chatbot (2-col) ── */
.bento-row-3 {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .bento-row-3 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .bento-row-3 { grid-template-columns: repeat(4, 1fr); }
  .bento-flowbuilder { grid-column: 1 / 3; }
  .bento-chatbot     { grid-column: 3 / 5; }
}

/* ── ROW 4: 6 icon-only cards ── */
.bento-row-4 {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr 1fr;
}
@media (min-width: 640px) {
  .bento-row-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .bento-row-4 { grid-template-columns: repeat(6, 1fr); }
}

/* ============================================================
   MINI-UI MOCKUP — Admin Dashboard
   ============================================================ */
.bento-dash {
  background: #fff;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.12);
  min-height: 180px;
}
.bento-dash-topbar {
  background: #004d2c;
  height: 26px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
}
.bento-dash-logo {
  width: 16px; height: 16px;
  border-radius: 4px;
  background: linear-gradient(135deg, #c8a84b, #e5c76b);
  flex-shrink: 0;
}
.bento-dash-search {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.15);
}
.bento-dash-avatar {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: rgba(200,168,75,0.5);
  flex-shrink: 0;
}
.bento-dash-body {
  display: flex;
  height: calc(100% - 26px);
  min-height: 154px;
}
.bento-dash-sidebar {
  width: 30px;
  background: #f6f1e7;
  border-right: 1px solid #e8e3d8;
  padding: 8px 5px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}
.bento-nav-item {
  height: 8px;
  border-radius: 3px;
  background: rgba(0, 77, 44, 0.12);
}
.bento-nav-active {
  background: #004d2c;
}
.bento-dash-main {
  flex: 1;
  padding: 8px;
  overflow: hidden;
}

/* Stat tiles */
.bento-stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-bottom: 8px;
}
.bento-stat {
  border-radius: 5px;
  padding: 5px 4px 4px;
  min-width: 0;
}
.bento-stat-1 { background: rgba(0,77,44,0.07); }
.bento-stat-2 { background: rgba(200,168,75,0.08); }
.bento-stat-3 { background: rgba(37,211,102,0.07); }
.bento-stat-4 { background: rgba(0,77,44,0.06); }
.bento-stat-label {
  font-size: 0.44rem;
  color: #64748b;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bento-stat-value {
  font-size: 0.6rem;
  font-weight: 700;
  color: #0d1f14;
  line-height: 1.2;
  white-space: nowrap;
}
.bento-stat-delta {
  font-size: 0.42rem;
  font-weight: 600;
  line-height: 1;
}
.bento-delta-up { color: #16a34a; }

/* Mini bar chart */
.bento-chart-area {
  background: rgba(0,77,44,0.04);
  border-radius: 5px;
  padding: 5px 6px 4px;
}
.bento-chart-title {
  font-size: 0.44rem;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 4px;
}
.bento-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 48px;
}
.bento-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 2px;
}
.bento-bar {
  width: 100%;
  border-radius: 2px 2px 0 0;
  background: rgba(0, 77, 44, 0.25);
  transition: height 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.bento-bar-hi { background: #004d2c; }
.bento-bar-lo { background: rgba(0, 77, 44, 0.12); }
.bento-bar-lbl {
  font-size: 0.42rem;
  color: #94a3b8;
  text-align: center;
  line-height: 1;
}

/* ============================================================
   MINI-UI MOCKUP — Team Inbox / Chat Handover
   ============================================================ */
.bento-chat-shell {
  background: #f0f4f8;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}
.bento-chat-hdr {
  background: #075e54;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.bento-chat-avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
}
.bento-chat-name {
  font-size: 0.6rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}
.bento-chat-status {
  font-size: 0.5rem;
  color: rgba(255,255,255,0.75);
}
.bento-status-bot { color: #a8f0c6; }
.bento-chat-msgs {
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #ece5dd;
}
.bento-msg {
  padding: 4px 7px;
  border-radius: 6px;
  font-size: 0.58rem;
  line-height: 1.35;
  color: #111b21;
  box-shadow: 0 1px 1px rgba(0,0,0,0.08);
  max-width: 90%;
}
.bento-msg-in  { background: #fff; align-self: flex-start; border-top-left-radius: 2px; }
.bento-msg-bot { background: #dcf8c6; align-self: flex-end; border-top-right-radius: 2px; }
.bento-msg-agent { background: #fff; align-self: flex-start; border-top-left-radius: 2px; padding-top: 2px; }
.bento-handover {
  align-self: center;
  font-size: 0.5rem;
  color: #008069;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(0, 128, 105, 0.08);
  padding: 2px 6px;
  border-radius: 999px;
}
.bento-agent-badge {
  font-size: 0.44rem;
  font-weight: 700;
  color: #004d2c;
  background: rgba(200,168,75,0.2);
  padding: 1px 4px;
  border-radius: 3px;
  margin-bottom: 2px;
  display: inline-block;
}

/* ============================================================
   MINI-UI MOCKUP — User Management (team list)
   ============================================================ */
.bento-user-list {
  background: #fff;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.bento-user-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-bottom: 1px solid #f5f5f5;
}
.bento-user-row:last-child { border-bottom: none; }
.bento-user-avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  font-size: 0.58rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.bento-user-info { flex: 1; min-width: 0; }
.bento-user-name {
  font-size: 0.58rem;
  font-weight: 700;
  color: #0d1f14;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bento-user-email {
  font-size: 0.48rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bento-role-badge {
  font-size: 0.48rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 999px;
  flex-shrink: 0;
}
.bento-role-admin  { background: rgba(0,77,44,0.12);  color: #004d2c; }
.bento-role-agent  { background: rgba(200,168,75,0.18); color: #7a6020; }
.bento-role-viewer { background: rgba(100,116,139,0.12); color: #475569; }

/* ============================================================
   MINI-UI MOCKUP — AI Analytics (dark)
   ============================================================ */
.bento-analytics-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bento-kpi-row {
  display: flex;
  gap: 10px;
}
.bento-kpi {
  flex: 1;
  min-width: 0;
}
.bento-kpi-val {
  font-size: 0.75rem;
  font-weight: 800;
  color: #fbf8f0;
  line-height: 1.1;
}
.bento-kpi-gold { color: #e5c76b; }
.bento-kpi-lbl {
  font-size: 0.44rem;
  color: #d6d3c4;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bento-line-wrap {
  position: relative;
}
.bento-line-svg {
  width: 100%;
  height: 72px;
  display: block;
  border-radius: 4px;
  overflow: visible;
}
/* Animate the chart line on reduced-motion-safe screens */
.bento-chart-line {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: bentoLineIn 1.8s ease forwards 0.4s;
}
.bento-chart-area-fill {
  opacity: 0;
  animation: bentoFadeIn 1.8s ease forwards 0.4s;
}
@keyframes bentoLineIn {
  to { stroke-dashoffset: 0; }
}
@keyframes bentoFadeIn {
  to { opacity: 1; }
}
.bento-trend-label {
  position: absolute;
  bottom: 4px;
  right: 0;
  font-size: 0.5rem;
  font-weight: 600;
  color: #25d366;
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(37,211,102,0.1);
  padding: 2px 5px;
  border-radius: 999px;
}

/* ============================================================
   MINI-UI MOCKUP — Broadcasts & Campaigns
   ============================================================ */
.bento-campaign {
  background: #fff;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.bento-campaign-hdr {
  background: #f6f1e7;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  border-bottom: 1px solid #e8e3d8;
}
.bento-campaign-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #c8a84b;
  flex-shrink: 0;
}
.bento-campaign-name {
  font-size: 0.6rem;
  font-weight: 700;
  color: #0d1f14;
  flex: 1;
}
.bento-campaign-status {
  font-size: 0.48rem;
  font-weight: 600;
  color: #b08a3c;
  background: rgba(200,168,75,0.15);
  padding: 1px 5px;
  border-radius: 999px;
}
.bento-campaign-meta {
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid #f0f0f0;
}
.bento-campaign-audience {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.52rem;
  color: #4a5568;
  flex: 1;
}
.bento-send-btn {
  font-size: 0.5rem;
  font-weight: 700;
  color: #fff;
  background: #004d2c;
  padding: 3px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}
.bento-campaign-stats {
  display: flex;
  align-items: center;
  padding: 6px 8px;
  gap: 4px;
}
.bento-cstat {
  flex: 1;
  text-align: center;
  min-width: 0;
}
.bento-cstat-val {
  font-size: 0.62rem;
  font-weight: 700;
  color: #0d1f14;
  line-height: 1.1;
}
.bento-cstat-read  { color: #008069; }
.bento-cstat-click { color: #c8a84b; }
.bento-cstat-lbl {
  font-size: 0.44rem;
  color: #64748b;
  white-space: nowrap;
}
.bento-cstat-divider {
  width: 1px;
  height: 18px;
  background: #e8e3d8;
  flex-shrink: 0;
}

/* ============================================================
   MINI-UI MOCKUP — Flow Management (dark nodes)
   ============================================================ */
.bento-flow-mini {
  position: relative;
  min-height: 90px;
}
.bento-flow-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.bento-fnode {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.48rem;
  font-weight: 700;
  color: #d6d3c4;
  background: #071a0e;
  border: 1px solid #1c6b48;
  border-radius: 5px;
  padding: 3px 5px;
  white-space: nowrap;
  z-index: 1;
}
.bento-fnode-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}
.bento-fnode-start { border-color: #25d366; }
.bento-fnode-action { border-color: #c8a84b; color: #fbf8f0; }
.bento-fnode-end { border-color: #4a5568; }
.bento-flow-version {
  position: absolute;
  bottom: 0;
  right: 0;
  font-size: 0.44rem;
  font-weight: 600;
  color: #25d366;
  background: rgba(37,211,102,0.12);
  padding: 2px 5px;
  border-radius: 4px;
  border: 1px solid rgba(37,211,102,0.25);
}

/* ============================================================
   MINI-UI MOCKUP — Visual Flow Builder (canvas hint)
   ============================================================ */
.bento-flow-canvas-hint {
  position: relative;
  min-height: 90px;
  border-radius: 0.5rem;
  overflow: hidden;
}
.bento-dot-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(200,168,75,0.2) 1px, transparent 1px);
  background-size: 16px 16px;
}
.bento-inline-flow {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 16px 8px;
  flex-wrap: nowrap;
  overflow: hidden;
}
.bento-fn {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.5rem;
  font-weight: 700;
  padding: 4px 7px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.bento-fn-green  { background: #004d2c; color: #fbf8f0; border: 1px solid #25d366; }
.bento-fn-gold   { background: rgba(200,168,75,0.2); color: #004d2c; border: 1px solid #c8a84b; }
.bento-fn-teal   { background: #041209; color: #d6d3c4; border: 1px solid #1c6b48; }
.bento-fn-arrow  { display: flex; align-items: center; flex-shrink: 0; }
.bento-canvas-badge {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 0.44rem;
  font-weight: 700;
  color: #e5c76b;
  background: rgba(200,168,75,0.15);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(200,168,75,0.3);
}

/* ============================================================
   MINI-UI MOCKUP — Chatbot Automation
   ============================================================ */
.bento-chatbot-mini {
  background: #ece5dd;
  border-radius: 0.5rem;
  padding: 7px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 90px;
}
.bento-mini-btns {
  display: flex;
  gap: 4px;
  align-self: flex-start;
  flex-wrap: wrap;
}
.bento-mini-btn {
  font-size: 0.52rem;
  font-weight: 600;
  color: #027eb5;
  background: #fff;
  padding: 3px 6px;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  white-space: nowrap;
}
.bento-bot-badge {
  align-self: center;
  font-size: 0.48rem;
  font-weight: 600;
  color: #008069;
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(0,128,105,0.08);
  padding: 2px 6px;
  border-radius: 999px;
  margin-top: 2px;
  text-align: center;
}

/* ============================================================
   ICON-ONLY CARDS (Row 4)
   ============================================================ */
.bento-icon-card { padding: 0; }
.bento-icon-card-inner {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: 1.1rem 1.1rem 1.25rem;
  height: 100%;
}
.bento-icon-spot {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ============================================================
   BENTO ANIMATIONS — prefers-reduced-motion safe
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .bento-chart-line {
    stroke-dashoffset: 0 !important;
    animation: none !important;
  }
  .bento-chart-area-fill {
    opacity: 1 !important;
    animation: none !important;
  }
}

/* ============================================================
   BENTO MOBILE POLISH (≤639px)
   All rows collapse to 1 column; mockups shrink gracefully.
   ============================================================ */
@media (max-width: 639px) {
  .bento-dash { min-height: 150px; }
  .bento-dash-body { min-height: 124px; }
  .bento-stat-row { grid-template-columns: repeat(2, 1fr); gap: 4px; }
  .bento-bar-chart { height: 36px; gap: 2px; }
  .bento-bar-lbl { font-size: 0.38rem; }

  /* Chat handover: compact height */
  .bento-chat-msgs { padding: 5px 6px; gap: 3px; }

  /* User list: slightly tighter */
  .bento-user-row { padding: 5px 7px; }

  /* Analytics KPI row: wrap on very narrow */
  .bento-kpi-row { gap: 6px; }
  .bento-kpi-val { font-size: 0.65rem; }
  .bento-line-svg { height: 56px; }

  /* Flow mockups: reduce height */
  .bento-flow-mini,
  .bento-flow-canvas-hint { min-height: 72px; }

  /* Icon cards: horizontal layout on very small helps readability */
  .bento-icon-card-inner { flex-direction: row; align-items: flex-start; padding: 0.875rem; }
  .bento-icon-spot { flex-shrink: 0; }
}

/* ============================================================
   BENTO TABLET (640px – 1023px)
   ============================================================ */
@media (min-width: 640px) and (max-width: 1023px) {
  /* Admin hero: make it span both tablet columns with good height */
  .bento-admin .bento-mockup-wrap { padding: 0.875rem 1rem 0; }
  .bento-dash { min-height: 160px; }
}

/* ============================================================
   BENTO DESKTOP
   ============================================================ */
@media (min-width: 1024px) {
  /* Admin hero card gets enough height to breathe */
  .bento-admin { min-height: 280px; }
  .bento-inbox, .bento-users { min-height: 280px; }
  .bento-analytics { min-height: 200px; }
  .bento-broadcast, .bento-flowmgmt { min-height: 200px; }
  .bento-flowbuilder, .bento-chatbot { min-height: 170px; }
  .bento-icon-card { min-height: 130px; }

  /* Bigger bar chart for Admin hero */
  .bento-bar-chart { height: 60px; }
  .bento-stat-label { font-size: 0.46rem; }
  .bento-stat-value { font-size: 0.65rem; }
}

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  background: var(--primary);
  color: var(--ink);
  padding: 0.5rem 1rem;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ============================================================
   Cream section (alternate section styling — light bg)
   Used for rhythm, matching live-site alternating sections
   ============================================================ */
.section-cream {
  background: var(--cream);
  color: var(--ink);
}
.section-cream .text-muted,
.section-cream [class*="text-muted"] {
  color: var(--ink-muted);
}
.section-cream .glass {
  background: rgba(0, 77, 44, 0.07);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid rgba(0, 77, 44, 0.18);
}
.section-cream .card-hover:hover {
  border-color: rgba(0, 107, 63, 0.4);
  box-shadow: 0 16px 40px rgba(0, 107, 63, 0.12);
}
.section-cream .glass.card-hover:hover {
  border-color: rgba(0, 107, 63, 0.35);
}

/* ============================================================
   Auto-playing demo engine
   ============================================================ */
.wa-icon-svg { display: inline-block; vertical-align: middle; }

/* ---- Chat bubbles (dynamically created by demos.js) ---- */
.wa-bubble-demo {
  position: relative;
  max-width: 82%;
  padding: 5px 9px 4px;
  border-radius: 8px;
  font-size: 0.72rem;
  line-height: 1.4;
  color: #111b21;
  box-shadow: 0 1px 0.5px rgba(0,0,0,0.13);
  word-break: break-word;
  animation: demoBubbleIn 0.35s ease both;
  transform-origin: left center;
}
.wa-bubble-demo.wa-in  { align-self: flex-start; background: #fff; border-top-left-radius: 2px; }
.wa-bubble-demo.wa-out { align-self: flex-end; background: #dcf8c6; border-top-right-radius: 2px; transform-origin: right center; }
.wa-bubble-demo .wa-meta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  float: right;
  margin: 4px 0 -2px 8px;
  font-size: 0.55rem;
  color: #667781;
}
.wa-tick-icon { display: inline-block; vertical-align: middle; }

/* typing indicator */
.wa-typing-demo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  min-width: 44px;
}
.wa-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8696a0;
  animation: typingDot 1.2s ease-in-out infinite;
}
.wa-dot:nth-child(1) { animation-delay: 0s; }
.wa-dot:nth-child(2) { animation-delay: 0.22s; }
.wa-dot:nth-child(3) { animation-delay: 0.44s; }
@keyframes typingDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30%            { transform: translateY(-4px); opacity: 1; }
}

/* ---- Interactive reply buttons ---- */
.wa-btns-demo {
  align-self: flex-start;
  width: 86%;
  display: flex;
  flex-direction: column;
  gap: 3px;
  animation: demoBubbleIn 0.35s ease both;
}
.wa-btn-demo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 7px 10px;
  background: #fff;
  color: #027eb5;
  font-size: 0.7rem;
  font-weight: 500;
  border-radius: 8px;
  box-shadow: 0 1px 0.5px rgba(0,0,0,0.13);
  cursor: default;
  border: 1px solid transparent;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.1s ease;
  text-align: center;
}
.wa-btn-demo.wa-tapped {
  background: #e6f4fd;
  border-color: #34b7f1;
  transform: scale(0.97);
}

/* ---- WhatsApp list message bubble ---- */
.wa-list-msg-demo {
  align-self: flex-start;
  width: 88%;
  background: #fff;
  border-radius: 8px;
  border-top-left-radius: 2px;
  box-shadow: 0 1px 0.5px rgba(0,0,0,0.13);
  overflow: hidden;
  animation: demoBubbleIn 0.35s ease both;
}
.wa-list-msg-body {
  padding: 6px 9px 5px;
  font-size: 0.72rem;
  line-height: 1.4;
  color: #111b21;
  word-break: break-word;
}
.wa-list-msg-body .wa-meta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  float: right;
  margin: 4px 0 -2px 8px;
  font-size: 0.55rem;
  color: #667781;
}
.wa-list-msg-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 7px 10px;
  border-top: 1px solid #e9e9e9;
  background: transparent;
  color: #008069;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: default;
  transition: background 0.12s ease;
  text-align: center;
}
.wa-list-msg-btn .wa-list-icon { flex-shrink: 0; stroke: #008069; }
.wa-list-msg-btn.wa-list-msg-btn-tapped { background: #e6f7f0; }

/* ---- Bottom-sheet overlay (inside phone screen) ---- */
.wa-sheet-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  z-index: 30;
  pointer-events: none;
  transition: background 0.3s ease;
}
.wa-sheet-overlay.wa-sheet-overlay-visible {
  background: rgba(0, 0, 0, 0.45);
  pointer-events: auto;
}

/* ---- Bottom sheet panel ---- */
.wa-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 31;
  background: #fff;
  border-radius: 14px 14px 0 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.18);
  transform: translateY(100%);
  transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 72%;
  display: flex;
  flex-direction: column;
}
.wa-sheet.wa-sheet-open     { transform: translateY(0); }
.wa-sheet.wa-sheet-closing  { transform: translateY(100%); transition: transform 0.42s cubic-bezier(0.4, 0, 0.6, 1); }

.wa-sheet-handle {
  width: 36px;
  height: 4px;
  background: #d1d5db;
  border-radius: 999px;
  margin: 8px auto 4px;
  flex-shrink: 0;
}
.wa-sheet-header {
  display: flex;
  align-items: center;
  padding: 4px 10px 8px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}
.wa-sheet-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #f0f2f5;
  color: #54656f;
  flex-shrink: 0;
  cursor: default;
  transition: background 0.15s ease;
}
.wa-sheet-close:hover { background: #e2e5e9; }
.wa-sheet-title {
  flex: 1;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #111b21;
  margin-right: 22px;
}
.wa-sheet-rows {
  overflow-y: auto;
  flex: 1;
  padding-bottom: 4px;
}
.wa-sheet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-bottom: 1px solid #f5f5f5;
  gap: 8px;
  cursor: default;
  transition: background 0.12s ease;
}
.wa-sheet-row:last-child { border-bottom: none; }
.wa-sheet-row.wa-sheet-row-selected { background: #f0fdf4; }
.wa-sheet-row-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}
.wa-sheet-row-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #111b21;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wa-sheet-row-subtitle {
  font-size: 0.62rem;
  color: #8696a0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wa-sheet-radio {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #c8d0d5;
  flex-shrink: 0;
  transition: border-color 0.2s ease, background 0.2s ease;
  position: relative;
}
.wa-sheet-radio.wa-sheet-radio-filled {
  border-color: #008069;
  background: #008069;
}
.wa-sheet-radio.wa-sheet-radio-filled::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
}

/* ---- Image + caption bubble ---- */
.wa-img-demo {
  align-self: flex-start;
  max-width: 90%;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border-top-left-radius: 2px;
  animation: demoBubbleIn 0.35s ease both;
}
.wa-img-svg-wrap { width: 100%; line-height: 0; }
.wa-img-svg-wrap svg { width: 100%; height: auto; display: block; }
.wa-img-caption {
  padding: 5px 9px 4px;
  font-size: 0.7rem;
  color: #111b21;
  line-height: 1.35;
}
.wa-img-caption .wa-meta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  float: right;
  margin: 2px 0 -2px 8px;
  font-size: 0.55rem;
  color: #667781;
}

/* ---- Bubble entrance animation ---- */
@keyframes demoBubbleIn {
  from { opacity: 0; transform: translateY(6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .wa-bubble-demo, .wa-btns-demo, .wa-list-msg-demo, .wa-img-demo, .wa-typing-demo {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .wa-dot { animation: none !important; }
  .wa-sheet, .wa-sheet-overlay { display: none !important; }
}

/* ============================================================
   Rotating caption (hero) — KEPT for revert; no longer used by initCaptionRotator
   ============================================================ */
#demo-caption {
  transition: opacity 0.35s ease, transform 0.35s ease;
}
#demo-caption.caption-fade-out {
  opacity: 0;
  transform: translateY(-6px);
}
#demo-caption.caption-fade-in {
  animation: captionIn 0.35s ease both;
}
@keyframes captionIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Demo tab switcher (segmented control above the phone)
   ============================================================ */

/* Eyebrow label above tabs */
.demo-tabs-eyebrow {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-align: center;
  margin-bottom: 0.5rem;
}

/* Tab group wrapper */
.demo-tablist {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 53, 30, 0.65);
  border: 1px solid rgba(200, 168, 75, 0.22);
  border-radius: 14px;
  padding: 4px;
  /* Prevent any inner overflow on narrow screens */
  width: 100%;
  max-width: 300px;  /* same as .iphone max width */
  box-sizing: border-box;
}

/* Individual tab pill */
.demo-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 6px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  /* Minimum 44px touch target */
  min-height: 36px;
  user-select: none;
}

.demo-tab:focus-visible {
  outline: 2px solid var(--bright);
  outline-offset: 2px;
}

/* Active/selected state — gold pill on the surface */
.demo-tab[aria-selected="true"] {
  background: linear-gradient(135deg, var(--primary), var(--bright));
  color: var(--ink);
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(200, 168, 75, 0.35);
}

.demo-tab[aria-selected="false"]:hover {
  background: rgba(200, 168, 75, 0.12);
  color: var(--text);
}

/* Emoji icon in tab — no extra sizing needed, inherits font-size */
.demo-tab-icon {
  font-style: normal;
  line-height: 1;
  flex-shrink: 0;
}

/* Mobile: tighten emoji + label spacing so all 3 pills fit at 375px */
@media (max-width: 480px) {
  .demo-tablist {
    max-width: min(290px, 86vw);
  }
  .demo-tab {
    font-size: 0.66rem;
    padding: 6px 4px;
    gap: 3px;
  }
}

/* Desktop: match phone width (285px at ≥1024px) */
@media (min-width: 1024px) {
  .demo-tablist {
    max-width: 285px;
  }
}

/* Reduced-motion: no transition on tab switch */
@media (prefers-reduced-motion: reduce) {
  .demo-tab {
    transition: none !important;
  }
}

/* ============================================================
   Hero phone column + floating cards
   ============================================================ */
@media (min-width: 1024px) {
  .hero-phone-col .iphone { width: 285px; }
  .hero-phone-col { gap: 0.6rem; }
}
@media (max-width: 1023px) {
  .hero-phone-col { gap: 0.75rem; }
}

/* Phone tilt removed — phone is straight (no perspective/rotateY/rotateX at any width) */
/* The vertical float is provided by the .phone-float / phoneFloat keyframe on the element itself */

/* ---- Floating glass cards around the phone ---- */
.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 14px;
  background: rgba(0, 77, 44, 0.75);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(200, 168, 75, 0.38);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(200,168,75,0.1);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  z-index: 10;
  pointer-events: none;
}
.float-card-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.float-card-icon.fc-green  { background: rgba(37, 211, 102, 0.2); color: #25d366; }
.float-card-icon.fc-gold   { background: rgba(200, 168, 75, 0.25); color: #e5c76b; }
.float-card-icon.fc-cream  { background: rgba(251, 248, 240, 0.15); color: #fbf8f0; }

/* Floating animations — staggered */
.float-card.fc-1 {
  top: 14px;
  left: -54px;
  animation: floatA 5s ease-in-out infinite;
}
.float-card.fc-2 {
  top: 30%;
  right: -80px;
  animation: floatB 6.5s ease-in-out infinite;
}
.float-card.fc-3 {
  bottom: 25%;
  right: -72px;
  animation: floatC 7s ease-in-out infinite;
}
.float-card.fc-4 {
  bottom: -14px;
  left: -50px;
  animation: floatD 5.5s ease-in-out infinite;
}

@keyframes floatA {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}
@keyframes floatB {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(10px); }
}
@keyframes floatC {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-6px); }
}
@keyframes floatD {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(8px); }
}

@media (prefers-reduced-motion: reduce) {
  .float-card { animation: none !important; }
}

/* Hide floating cards on small screens where they'd clutter */
@media (max-width: 767px) {
  .float-card { display: none; }
}

/* ============================================================
   How-it-works page — demo section layout
   ============================================================ */
.demo-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 1024px) {
  .demo-section {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
  .demo-section.demo-reversed .demo-copy { order: -1; }
}

/* ============================================================
   MOBILE POLISH — applied across all 9 pages
   Targets: 320px–767px with spot-checks at 414 and 600px
   ============================================================ */

/* ---- 1. Fluid hero headline — prevents runaway sizes on 375px ---- */
@media (max-width: 767px) {
  /* Main page H1 headings */
  h1.font-heading {
    font-size: clamp(1.75rem, 8.5vw, 2.25rem);
    line-height: 1.15;
  }

  /* H2 section headings */
  h2.font-heading {
    font-size: clamp(1.5rem, 7vw, 2rem);
    line-height: 1.2;
  }

  /* Hero sub-headings (text-4xl → fluid) — already handled above, but override sm:text-5xl */
  .font-heading.text-4xl,
  .font-heading.sm\:text-5xl {
    font-size: clamp(1.75rem, 8.5vw, 2.25rem) !important;
  }
}

/* ---- 2. Hero section vertical rhythm — reduce excessive top padding ---- */
@media (max-width: 767px) {
  /* index.html hero: pt-32 (128px) → pt-24 (96px) to give breathing room below nav */
  section.relative.pt-32 {
    padding-top: 5.5rem; /* 88px */
  }
}

/* ---- 3. Hero phone mockup — scale and center on mobile ---- */
@media (max-width: 1023px) {
  /* Stack phone below copy, center it, cap width */
  .hero-phone-col {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 0.5rem;
  }

  /* Phone is straight everywhere — no tilt rules needed here */

  /* Keep phone float animation but reduce the translateY */
  .phone-float {
    animation-duration: 8s;
  }
}

/* Phone sizing — cap on all screens below desktop to prevent overflow */
@media (max-width: 767px) {
  .iphone {
    max-width: min(290px, 86vw) !important;
    width: min(290px, 86vw) !important;
  }
}

/* ---- Mobile phone frame + content compaction (≤767px) ----
   Problem: at 260px wide the default 300/620 aspect-ratio gives only
   515px screen height but the hospital flow needs more.
   Fix: taller aspect-ratio + compact inner spacing so the full
   flow is visible with nothing clipped.                        ---- */
@media (max-width: 767px) {
  /* Taller aspect ratio gives more screen real-estate at the same width.
     260px × (650/300) ≈ 563px phone height → 553px screen height.       */
  .iphone {
    aspect-ratio: 300 / 650 !important;
  }

  /* Slim status bar — saves 6px */
  .wa-statusbar {
    height: 32px;
    font-size: 0.65rem;
  }

  /* Tighter header — saves ~4px */
  .wa-header {
    padding: 6px 8px;
    gap: 6px;
  }

  /* Compact chat gaps and padding — saves ~16px */
  .wa-chat {
    padding: 8px 8px;
    gap: 5px;
  }

  /* Compact bubble padding — saves 2px per bubble */
  .wa-bubble-demo,
  .wa-bubble {
    padding: 4px 8px 3px;
    font-size: 0.68rem;
  }

  /* Compact list-message bubble */
  .wa-list-msg-body {
    padding: 5px 8px 4px;
    font-size: 0.68rem;
  }
  .wa-list-msg-btn {
    padding: 5px 8px;
    font-size: 0.68rem;
  }

  /* Compact reply buttons — saves 4px per set */
  .wa-btn-demo,
  .wa-btn {
    padding: 5px 8px;
    font-size: 0.66rem;
  }

  /* Compact input bar — saves ~6px */
  .wa-inputbar {
    padding: 5px 7px 8px;
    gap: 5px;
  }
  .wa-input {
    padding: 5px 9px;
    gap: 5px;
  }
  .wa-send {
    width: 30px;
    height: 30px;
  }

  /* Dynamic island — proportionally smaller at 260px */
  .dynamic-island {
    width: 68px !important;
    height: 19px !important;
    top: 4px !important;
  }
}

/* ---- 4. How-it-works demo phone sizing ---- */
@media (max-width: 767px) {
  .demo-section .iphone {
    max-width: min(260px, 72vw) !important;
    width: min(260px, 72vw) !important;
  }
}

/* ---- 5. Prevent horizontal overflow globally ---- */
/* Note: overflow-x:hidden already set on body in the core styles above.
   Here we also clip the html element on mobile to catch any remaining overflow. */
@media (max-width: 1023px) {
  html {
    overflow-x: hidden;
  }
  body {
    max-width: 100%;
  }
}

/* Contain aurora blobs that extend beyond viewport — safe on all breakpoints */
.aurora-wrap {
  overflow: hidden;
}

/* ---- 6. Section vertical padding — comfortable rhythm on mobile ---- */
@media (max-width: 767px) {
  /* Sections with py-16/py-24 → reduce to ~py-12/py-14 on mobile */
  section.py-16 { padding-top: 3rem; padding-bottom: 3rem; }
  section.py-20 { padding-top: 3.5rem; padding-bottom: 3.5rem; }
  section.lg\:py-24 { /* Tailwind already handles lg: prefix */ }

  /* index.html final CTA section */
  section.relative.py-20 { padding-top: 3.5rem; padding-bottom: 3.5rem; }
}

/* ---- 7. Mobile nav links — minimum 44px touch targets ---- */
[data-mobile-nav] a {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding-top: 0.625rem;  /* 10px */
  padding-bottom: 0.625rem;
}

/* The WA CTA button inside mobile nav */
[data-mobile-nav] a.btn-wa {
  min-height: 48px;
}

/* ---- 8. FAQ accordion buttons — 44px touch target ---- */
[data-faq-trigger] {
  min-height: 44px;
}

/* ---- 9. Cookie banner — prevent it from covering action areas ---- */
@media (max-width: 767px) {
  /* Ensure cookie banner fits without overflow */
  [role="dialog"][aria-label="Cookie consent"] {
    bottom: 0.75rem;
    left: 0.75rem;
    right: 0.75rem;
    border-radius: 1rem;
  }

  /* Cookie banner buttons — 44px tall */
  [data-cookie] {
    min-height: 44px;
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
  }
}

/* ---- 10. Pricing comparison table — horizontal scroll wrapper ---- */
@media (max-width: 767px) {
  .overflow-x-auto {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
}

/* ---- 11. Industry tab buttons — 44px touch targets ---- */
[data-tab-btn] {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* ---- 12. Industry panel list on mobile — single column by default ---- */
@media (max-width: 639px) {
  [data-tab-panel] ul.grid {
    grid-template-columns: 1fr !important;
  }
}

/* ---- 13. Proof bar — wrapping pills comfortable on mobile ---- */
@media (max-width: 767px) {
  .flex.flex-wrap.gap-3 > span,
  .flex.flex-wrap.gap-4 > span {
    font-size: 0.8rem;
  }
}

/* ---- 14. book-demo.html: two-col content stacks, demo-info box not too wide ---- */
@media (max-width: 1023px) {
  /* The glass info panel on book-demo.html */
  .glass.rounded-2xl.p-7 {
    margin-top: 0;
  }
}

/* ---- 15. Footer columns — ensure 2-col grid has enough breathing room ---- */
@media (max-width: 767px) {
  footer .grid.grid-cols-2 {
    column-gap: 1rem;
    row-gap: 1.5rem;
  }

  footer .col-span-2 {
    margin-bottom: 0.5rem;
  }
}

/* ---- 16. Code block on index.html — no horizontal bleed ---- */
@media (max-width: 1023px) {
  .code-block {
    font-size: 0.72rem;
  }
}

/* ---- 17. Market stats grid — reduce huge numbers on mobile ---- */
@media (max-width: 639px) {
  .grid.grid-cols-2 .font-heading.font-black.text-4xl,
  .grid.grid-cols-2 p.font-heading.font-black {
    font-size: 1.75rem;
  }
}

/* ---- 18. Pricing tiers — single column stacks cleanly ---- */
@media (max-width: 767px) {
  /* Growth tier "Most Popular" badge — ensure it doesn't get clipped */
  .absolute.-top-3 {
    top: -0.625rem;
  }
}

/* ---- 19. How-it-works section padding — reduce on mobile ---- */
@media (max-width: 767px) {
  .demo-section {
    gap: 2rem;
  }
}

/* ---- 20. Legal pages (privacy, terms, data-deletion, cookies) — comfortable reading ---- */
@media (max-width: 767px) {
  .legal h2 {
    font-size: 1.15rem;
    margin-top: 1.75rem;
  }
  .legal h3 {
    font-size: 0.95rem;
  }
  .legal p, .legal li {
    font-size: 0.9rem;
  }

  /* cookies.html: table horizontal scroll on mobile */
  .legal table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    max-width: 100%;
  }
}

/* ---- 21. Stat bar on index.html hero — don't cram 3 cols too tight ---- */
@media (max-width: 479px) {
  .grid.grid-cols-3 .font-heading.font-black.text-3xl {
    font-size: 1.5rem;
  }
  .grid.grid-cols-3 .text-xs {
    font-size: 0.65rem;
  }
}

/* ---- 22. About page belief grid — single column on mobile ---- */
@media (max-width: 639px) {
  .grid.sm\:grid-cols-2.gap-4 {
    grid-template-columns: 1fr;
  }
}

/* ---- 23. How-it-works steps grid (md:grid-cols-3) — single column below md ---- */
/* Tailwind's md:grid-cols-3 already handles this, but we ensure gap is comfortable */
@media (max-width: 767px) {
  .grid.md\:grid-cols-3 {
    gap: 1rem;
  }
}

/* ---- 24. Pricing page hero text ---- */
@media (max-width: 767px) {
  .max-w-3xl.mx-auto .font-heading.font-extrabold.text-4xl {
    font-size: clamp(1.75rem, 8.5vw, 2.25rem);
  }
}

/* ---- 25. General: buttons wider/centered on small screens for thumb friendliness ---- */
@media (max-width: 479px) {
  /* Primary CTA buttons in hero and CTA sections */
  .btn-wa,
  .btn-outline-bright {
    width: 100%;
    justify-content: center;
  }

  /* But NOT inline/small usage — only when used in flex-col containers */
  .flex.flex-col .btn-wa,
  .flex.flex-col .btn-outline-bright {
    width: 100%;
  }
}

/* ---- 26. Features page: flow builder node diagram — no overflow ---- */
@media (max-width: 767px) {
  /* The glass node boxes in the flow builder illustration */
  .rounded-xl.border.border-border.bg-base\/60 {
    overflow-x: auto;
  }
}

/* ---- 27. Integrations grid (grid-cols-2 sm:grid-cols-3 lg:grid-cols-6) ---- */
/* On mobile, 2 cols is fine. But padding/icon size can be compressed */
@media (max-width: 479px) {
  .grid.grid-cols-2.sm\:grid-cols-3.lg\:grid-cols-6 > div {
    padding: 0.875rem 0.5rem;
  }
}

/* ---- 28. index.html: keep `flex-col sm:flex-row` buttons stacked on mobile ---- */
/* Already handled in HTML with flex-col sm:flex-row, this is belt-and-suspenders */
@media (max-width: 479px) {
  .mt-8.flex.flex-col.sm\:flex-row.gap-3 a,
  .mt-7.flex.flex-col.sm\:flex-row.gap-3 a {
    display: flex;
    width: 100%;
    justify-content: center;
  }
}

/* ============================================================
   Flow Builder animated canvas demo (Task C)
   These styles power the mock flow-builder in #flow-builder-demo.
   When a real screen recording replaces the mock, this block can
   be removed along with the JS in js/flow-builder-demo.js.
   ============================================================ */

/* Port dots on nodes */
.fb-port {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c8a84b;
  border: 1.5px solid #071a0e;
  box-shadow: 0 0 4px rgba(200,168,75,0.5);
}

/* Node entrance animation */
@keyframes fbNodeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* SVG line draw animation (stroke-dashoffset trick) */
@keyframes fbLineDraw {
  from { opacity: 0; stroke-dashoffset: 100; }
  to   { opacity: 0.8; stroke-dashoffset: 0; }
}

/* "Node added" badge pulse */
@keyframes fbBadgePop {
  0%   { opacity: 0; transform: scale(0.7); }
  15%  { opacity: 1; transform: scale(1.05); }
  80%  { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1); }
}

/* Canvas wrap – cap height on mobile and prevent overflow */
.fb-canvas-wrap {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
@media (max-width: 767px) {
  .fb-canvas { height: 280px !important; }
  /* Hide condition node on very small screens to reduce clutter */
  .fb-node-cond { display: none; }
}

/* Reduced-motion: show all nodes in final static state, no animation */
@media (prefers-reduced-motion: reduce) {
  .fb-node { opacity: 1 !important; transform: none !important; animation: none !important; }
  .fb-line  { opacity: 0.6 !important; animation: none !important; }
  .fb-badge { display: none !important; }
}
