/* Floodgate website — 2026 redesign
   One stylesheet, no framework. Brand accent kept from the original site (#ff5959). */

/* Self-hosted font (variable, latin subset, weights 400-800). No third-party requests. */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/plus-jakarta-sans-latin.woff2") format("woff2");
}

:root {
  --brand: #ff5959;
  --brand-dark: #e04444;
  --brand-soft: #fff0f0;
  --ink: #0f1b2d;
  --ink-2: #33415c;
  --muted: #5f6b80;
  --line: #e4e8ef;
  --bg: #ffffff;
  --bg-alt: #f6f8fb;
  --navy: #0f1b2d;
  --navy-2: #172a44;
  --ussd: #6c5ce7;
  --wa: #1fa855;
  --sms: #2f80ed;
  --forms: #f2994a;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(15, 27, 45, .08);
  --shadow-lg: 0 24px 60px rgba(15, 27, 45, .18);
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--brand-dark); }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.3rem, 5.4vw, 3.9rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 24px; } }
.section { padding: 88px 0; }
.section.alt { background: var(--bg-alt); }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--brand-dark); margin-bottom: 12px;
}
.lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .lead { margin-left: auto; margin-right: auto; }
.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: 999px; font-weight: 700; font-size: 1rem;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  font-family: inherit;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(255, 89, 89, .35); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn-ghost:hover { border-color: #fff; }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--ink); }
.btn-sm { padding: 9px 18px; font-size: .92rem; }
.btn-block { width: 100%; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15, 27, 45, .92); backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { font-size: 1.55rem; font-weight: 800; color: #fff; text-decoration: none; letter-spacing: -.03em; }
.logo span { color: var(--brand); }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { color: #d6dde8; text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; }
.nav .btn { color: #fff; }
.nav-toggle {
  display: none; background: none; border: 0; color: #fff; padding: 8px; cursor: pointer;
}
.nav-toggle svg { width: 28px; height: 28px; }
@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--navy); padding: 8px 16px 20px; display: none;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 4px; border-bottom: 1px solid rgba(255,255,255,.06); }
  .nav .btn { margin-top: 14px; border-bottom: 0; }
}

/* Hero */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 500px at 85% 10%, rgba(255, 89, 89, .22), transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(108, 92, 231, .22), transparent 60%),
    var(--navy);
  padding: 80px 0 96px;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 span { color: var(--brand); }
.hero .lead { color: #c3cddc; font-size: 1.2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 28px; }
.channel-pills { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.channel-pills li {
  font-size: .85rem; font-weight: 600; padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,.08); color: #e6ebf2; display: flex; align-items: center; gap: 6px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.ussd { background: var(--ussd); } .dot.wa { background: var(--wa); }
.dot.sms { background: var(--sms); } .dot.forms { background: var(--forms); }
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero { padding: 56px 0 72px; }
}

/* Hero visual: phones + lead feed */
.hero-visual { position: relative; display: flex; justify-content: center; gap: 18px; min-height: 440px; padding-bottom: 84px; }
.phone {
  width: 220px; border-radius: 30px; background: #0b1422; padding: 10px;
  box-shadow: var(--shadow-lg), inset 0 0 0 2px rgba(255,255,255,.08);
  flex-shrink: 0;
}
.phone-screen { border-radius: 22px; overflow: hidden; height: 400px; display: flex; flex-direction: column; font-size: .82rem; }
.phone.feature { width: 190px; margin-top: 40px; }
.phone.feature .phone-screen { background: #c9d6b8; color: #1d2a12; font-family: "Courier New", monospace; padding: 16px 12px; height: 300px; font-size: .74rem; }
.ussd-head { font-weight: 700; border-bottom: 1px dashed #5d6f45; padding-bottom: 6px; margin-bottom: 8px; }
.ussd-menu { margin: 0; padding: 0; list-style: none; line-height: 1.8; }
.ussd-reply { margin-top: auto; border: 1px solid #5d6f45; padding: 4px 6px; }
.wa-top { background: #075e54; color: #fff; padding: 12px 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.wa-top .avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); display: grid; place-items: center; font-size: .75rem; }
.wa-body { background: #ece5dd; flex: 1; padding: 12px 10px; display: flex; flex-direction: column; gap: 8px; color: #1b1b1b; }
.bubble { max-width: 85%; padding: 7px 10px; border-radius: 10px; line-height: 1.35; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.bubble.in { background: #fff; align-self: flex-start; border-top-left-radius: 2px; }
.bubble.out { background: #dcf8c6; align-self: flex-end; border-top-right-radius: 2px; }
.quick { display: flex; flex-wrap: wrap; gap: 4px; }
.quick span { background: #fff; color: #128c7e; font-weight: 700; padding: 4px 8px; border-radius: 8px; font-size: .75rem; }
.lead-toast {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  background: #fff; color: var(--ink); border-radius: 14px; padding: 12px 16px; width: 290px;
  box-shadow: var(--shadow-lg); display: flex; gap: 12px; align-items: center;
  animation: floaty 5s ease-in-out infinite;
}
.lead-toast .ico { width: 38px; height: 38px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex-shrink: 0; }
.lead-toast strong { display: block; font-size: .9rem; }
.lead-toast small { color: var(--muted); font-size: .78rem; }
.illustrative { position: absolute; top: -26px; right: 0; font-size: .72rem; color: #8b98ad; }
@keyframes floaty { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -6px); } }
@media (prefers-reduced-motion: reduce) { .lead-toast { animation: none; } html { scroll-behavior: auto; } }
@media (max-width: 520px) {
  .hero-visual { min-height: 0; padding-bottom: 84px; }
  .phone.feature { display: none; }
  .phone { width: 240px; }
  .lead-toast { width: 270px; }
}

/* Value strip */
.value-strip { border-bottom: 1px solid var(--line); background: #fff; }
.value-strip .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding-top: 36px; padding-bottom: 36px; }
.value-strip .container > div { display: flex; gap: 12px; align-items: flex-start; }
.value-strip strong { display: block; font-size: 1rem; }
.value-strip span { color: var(--muted); font-size: .9rem; }
.value-strip svg { width: 26px; height: 26px; color: var(--brand); flex-shrink: 0; margin-top: 2px; }
@media (max-width: 880px) { .value-strip .container { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .value-strip .container { grid-template-columns: 1fr; } }

/* Channel cards */
.channels { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--c, var(--brand)); }
.card .chip {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px;
  background: var(--bg-alt); background: color-mix(in srgb, var(--c) 14%, white); color: var(--c);
}
.card .chip svg { width: 26px; height: 26px; }
.card .tag { font-size: .8rem; font-weight: 700; color: var(--c); text-transform: uppercase; letter-spacing: .08em; }
.card p { color: var(--ink-2); }
.card ul { margin: 0; padding: 0; list-style: none; }
.card li { padding-left: 26px; position: relative; margin-bottom: 8px; color: var(--ink-2); font-size: .97rem; }
.card li::before {
  content: ""; position: absolute; left: 0; top: .5em; width: 14px; height: 8px;
  border-left: 2.5px solid var(--c); border-bottom: 2.5px solid var(--c); transform: rotate(-45deg);
}
.card.ussd { --c: var(--ussd); } .card.wa { --c: var(--wa); }
.card.sms { --c: var(--sms); } .card.forms { --c: var(--forms); }
@media (max-width: 760px) { .channels { grid-template-columns: 1fr; } .card { padding: 26px 22px; } }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; position: relative; }
.step { position: relative; padding: 28px 22px; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); }
.step::before {
  counter-increment: step; content: counter(step);
  width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800;
  display: grid; place-items: center; margin-bottom: 14px;
}
.step p { color: var(--muted); font-size: .95rem; margin: 0; }
@media (max-width: 960px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* Split / measure */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.checklist { list-style: none; padding: 0; margin: 24px 0 0; }
.checklist li { display: flex; gap: 14px; margin-bottom: 18px; }
.checklist svg { width: 24px; height: 24px; color: var(--brand); flex-shrink: 0; margin-top: 3px; }
.checklist strong { display: block; }
.checklist span { color: var(--muted); }
.report {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 26px; border: 1px solid var(--line);
}
.report-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; gap: 12px; }
.report-head strong { font-size: 1rem; }
.report-head small { color: var(--muted); }
.bar-row { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: center; margin-bottom: 14px; font-size: .9rem; }
.bar-row span { color: var(--ink-2); font-weight: 600; }
.bar { height: 12px; border-radius: 6px; background: var(--bg-alt); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 6px; background: var(--brand); }
.report-note { font-size: .78rem; color: var(--muted); margin: 14px 0 0; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; gap: 40px; } }

/* Use cases */
.uses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.use { padding: 26px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.use h3 { font-size: 1.08rem; }
.use p { color: var(--muted); font-size: .95rem; margin: 0; }
@media (max-width: 880px) { .uses { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .uses { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 24px; }
.faq summary { cursor: pointer; list-style: none; font-weight: 700; padding: 20px 32px 20px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 16px; font-size: 1.4rem; color: var(--brand-dark); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--ink-2); margin: 0 0 20px; }

/* Proof / case study teaser */
.proof {
  background: var(--navy); color: #fff; border-radius: 24px; padding: 56px;
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center;
  background-image: radial-gradient(600px 300px at 100% 0%, rgba(255,89,89,.25), transparent 60%);
}
.proof .eyebrow { color: #ff8a8a; }
.proof p { color: #c3cddc; }
.proof-facts { display: grid; gap: 14px; }
.fact { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 18px 20px; }
.fact strong { display: block; font-size: 1.6rem; color: #fff; letter-spacing: -.02em; }
.fact span { color: #aab6c8; font-size: .9rem; }
@media (max-width: 880px) { .proof { grid-template-columns: 1fr; padding: 36px 22px; gap: 32px; } }

/* Services */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.service { border-top: 3px solid var(--brand); padding-top: 18px; }
.service p { color: var(--muted); font-size: .95rem; }
@media (max-width: 880px) { .services { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .services { grid-template-columns: 1fr; } }

/* Contact */
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.contact-list li { display: flex; gap: 16px; padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.contact-list svg { width: 22px; height: 22px; color: var(--brand); flex-shrink: 0; margin-top: 3px; }
.contact-list strong { display: block; font-size: .85rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.contact-list a { color: var(--ink); font-weight: 700; text-decoration: none; }
.contact-list a:hover { color: var(--brand-dark); }
@media (max-width: 880px) { .contact-list { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { background: var(--navy); color: #aab6c8; padding: 48px 0 32px; font-size: .92rem; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: center; }
.site-footer a { color: #d6dde8; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.social { display: flex; gap: 12px; }
.social a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.08); display: grid; place-items: center; }
.social svg { width: 18px; height: 18px; }
.copyright { border-top: 1px solid rgba(255,255,255,.08); margin-top: 28px; padding-top: 20px; }

/* Article (case study) */
.page-hero { background: var(--navy); color: #fff; padding: 64px 0 56px;
  background-image: radial-gradient(700px 360px at 90% 0%, rgba(255,89,89,.22), transparent 60%); }
.page-hero .lead { color: #c3cddc; }
.page-hero .meta { color: #8b98ad; font-size: .9rem; margin-top: 16px; }
.page-hero h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); max-width: 900px; }
.eyebrow.on-dark { color: #ff8a8a; }
.breadcrumb { font-size: .85rem; color: #8b98ad; margin-bottom: 14px; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; opacity: .6; }
.breadcrumb a { color: #c3cddc; }
.article-grid { display: grid; grid-template-columns: 1fr 320px; gap: 56px; align-items: start; }
.article h2 { font-size: 1.6rem; margin-top: 1.6em; }
.article h2:first-child { margin-top: 0; }
.article p { color: var(--ink-2); }
.article blockquote {
  margin: 28px 0; padding: 20px 24px; border-left: 4px solid var(--brand); background: var(--brand-soft);
  border-radius: 0 12px 12px 0; font-size: 1.1rem; font-weight: 600; color: var(--ink);
}
.aside { position: sticky; top: 92px; background: var(--bg-alt); border-radius: var(--radius); padding: 26px; border: 1px solid var(--line); }
.aside dl { margin: 0; }
.aside dt { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: 16px; }
.aside dt:first-child { margin-top: 0; }
.aside dd { margin: 4px 0 0; font-weight: 600; }
.aside .btn { margin-top: 24px; }
.timeline { list-style: none; padding: 0; margin: 24px 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 22px 24px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); }
.timeline strong { display: block; }
.timeline span { color: var(--muted); font-size: .95rem; }
@media (max-width: 960px) { .article-grid { grid-template-columns: 1fr; } .aside { position: static; } }

/* Login */
.login-wrap { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 48px 16px;
  background: radial-gradient(800px 400px at 80% 0%, rgba(255,89,89,.18), transparent 60%), var(--navy); }
.login-card { width: 100%; max-width: 420px; background: #fff; border-radius: 20px; padding: 36px 32px; box-shadow: var(--shadow-lg); }
.login-card h1 { font-size: 1.8rem; }
.login-card p { color: var(--muted); }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 6px; }
.field input {
  width: 100%; padding: 13px 14px; border-radius: 10px; border: 1.5px solid var(--line); font: inherit; color: var(--ink); background: #fff;
}
.field input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 4px rgba(255,89,89,.15); }
.login-row { display: flex; justify-content: space-between; align-items: center; margin: -4px 0 20px; font-size: .9rem; }
.form-error { display: none; color: #b42318; background: #fef3f2; border: 1px solid #fecdca; padding: 10px 12px; border-radius: 10px; font-size: .9rem; margin-bottom: 16px; }
.form-error.show { display: block; }
.login-foot { margin-top: 22px; font-size: .88rem; color: var(--muted); text-align: center; }
@media (max-width: 420px) { .login-card { padding: 28px 20px; } }

/* How it works: animated flow (customer → Floodgate → sales team) */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.flow {
  --c: var(--ussd);
  position: relative; margin: 0 0 40px; padding: 28px 32px 36px; border-radius: 24px; color: #fff; overflow: hidden;
  background:
    radial-gradient(700px 360px at 100% 0%, rgba(255, 89, 89, .2), transparent 60%),
    radial-gradient(600px 360px at 0% 100%, rgba(108, 92, 231, .2), transparent 60%),
    var(--navy);
  box-shadow: var(--shadow-lg);
}
.flow[data-channel="wa"] { --c: var(--wa); }
.flow[data-channel="sms"] { --c: var(--sms); }
.flow-illustrative { position: absolute; top: 14px; right: 20px; font-size: .72rem; color: #8b98ad; }
.flow-controls { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 14px 0 28px; flex-wrap: wrap; }
.flow-tabs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.flow-tabs button, .flow-pause {
  font: inherit; font-size: .85rem; font-weight: 700; color: #c3cddc; cursor: pointer;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: 999px;
  padding: 8px 14px; display: inline-flex; align-items: center; gap: 8px; transition: background .2s, color .2s;
}
.flow-tabs button:hover, .flow-pause:hover { background: rgba(255,255,255,.12); color: #fff; }
.flow-tabs button[aria-pressed="true"] { background: #fff; color: var(--ink); border-color: #fff; }
.flow-pause { padding: 8px; width: 38px; height: 38px; justify-content: center; }
.flow-pause svg { width: 16px; height: 16px; }
.flow-pause .i-play, .flow-pause[aria-pressed="true"] .i-pause { display: none; }
.flow-pause[aria-pressed="true"] .i-play { display: block; }
.flow:not(.js) .flow-controls { display: none; }

.flow-stage { display: grid; grid-template-columns: 210px minmax(48px, 1fr) 176px minmax(48px, 1fr) minmax(260px, 320px); align-items: start; }
.flow-node { display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0; }
.flow-label { height: 44px; text-align: center; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #ff8a8a; }
.flow-label b { display: block; font-size: .98rem; letter-spacing: 0; text-transform: none; color: #fff; margin-top: 2px; }

/* Phone */
.flow-phone { width: 200px; border-radius: 28px; background: #0b1422; padding: 9px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.1), 0 20px 50px rgba(0,0,0,.35); }
.flow-screen { position: relative; height: 320px; border-radius: 20px; overflow: hidden; font-size: .76rem; background: #fff; }
.scene { position: absolute; inset: 0; display: flex; flex-direction: column; opacity: 0; transition: opacity .4s; }
.scene.active { opacity: 1; }
.msg { transition: opacity .35s ease, transform .35s ease; }
.flow.js .msg { opacity: 0; transform: translateY(8px); }
.flow.js .msg.show { opacity: 1; transform: none; }
.scene-ussd { background: #c9d6b8; color: #1d2a12; font-family: "Courier New", monospace; padding: 16px 12px; gap: 10px; line-height: 1.5; }
.ussd-dial { font-weight: 700; }
.ussd-box { border: 1px dashed #5d6f45; padding: 8px; }
.ussd-reply-in { align-self: flex-end; border: 1px solid #5d6f45; padding: 2px 8px; font-weight: 700; }
.scene-wa .wa-top { padding: 10px 12px; }
.scene-wa .wa-body { gap: 7px; padding: 10px 8px; }
.scene-wa .quick { margin-top: 6px; }
.scene-wa .bubble.msg { transition: opacity .35s ease, transform .35s ease; }
.sms-top { background: #f2f4f7; border-bottom: 1px solid #e1e5ec; padding: 10px 12px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.sms-top .avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--sms); color: #fff; display: grid; place-items: center; font-size: .72rem; }
.sms-top small { margin-left: auto; font-weight: 500; color: var(--muted); font-size: .68rem; }
.sms-body { flex: 1; padding: 12px 10px; display: flex; flex-direction: column; gap: 8px; color: #1b1b1b; }
.sms-b { max-width: 85%; padding: 7px 11px; border-radius: 16px; line-height: 1.35; }
.sms-b.out { align-self: flex-end; background: var(--sms); color: #fff; border-bottom-right-radius: 4px; font-weight: 700; }
.sms-b.in { align-self: flex-start; background: #e9ecf1; border-bottom-left-radius: 4px; }

/* Connectors with a travelling "Lead" packet */
.flow-link {
  position: relative; height: 4px; margin: 222px 10px 0; border-radius: 2px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.22) 0 8px, transparent 8px 14px);
}
.flow-link::after {
  content: ""; position: absolute; right: -6px; top: 50%; width: 8px; height: 8px; margin-top: -4px;
  border-top: 2px solid rgba(255,255,255,.35); border-right: 2px solid rgba(255,255,255,.35); transform: rotate(45deg);
}
.packet {
  position: absolute; top: 50%; left: 0; transform: translate(-50%, -50%); opacity: 0;
  font-size: .68rem; font-weight: 800; letter-spacing: .04em; color: #fff; white-space: nowrap;
  padding: 3px 9px; border-radius: 999px; background: var(--c);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 28%, transparent), 0 0 22px var(--c);
}
.flow-link.go .packet { animation: packet-x .9s ease-in-out forwards; }
.packet.p-alert { background: var(--brand); box-shadow: 0 0 0 5px rgba(255,89,89,.28), 0 0 22px var(--brand); }
.flow-link.go .packet.p-lead { animation-delay: .55s; }
@keyframes packet-x {
  0% { left: 0; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { left: 100%; opacity: 0; }
}

/* Floodgate hub */
.hub {
  width: 176px; margin-top: 40px; padding: 18px 14px 14px; text-align: center; border-radius: 18px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
  transition: border-color .3s, box-shadow .3s;
}
.hub.active { border-color: color-mix(in srgb, var(--c) 70%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 18%, transparent); }
.hub-logo { position: relative; width: 58px; height: 58px; margin: 0 auto 10px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; }
.hub-logo svg { width: 26px; height: 26px; }
.hub.active .hub-logo::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--brand);
  animation: ring 1.1s ease-out infinite;
}
@keyframes ring { from { transform: scale(.9); opacity: .9; } to { transform: scale(1.35); opacity: 0; } }
.hub-name { font-weight: 800; font-size: 1.05rem; margin-bottom: 10px; }
.hub-name span { color: var(--brand); }
.hub ul { list-style: none; margin: 0; padding: 0; text-align: left; }
.hub li { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: .78rem; color: #8b98ad; transition: color .3s; }
.hub li i { width: 16px; height: 16px; flex-shrink: 0; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); position: relative; transition: background .3s, border-color .3s; }
.hub li.done { color: #fff; }
.hub li.done i { background: var(--wa); border-color: var(--wa); }
.hub li.done i::after { content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.hub-src { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Sales team lead list */
.crm-wrap { width: 100%; margin-top: 14px; }
.crm { background: #fff; color: var(--ink); border-radius: 16px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.35); font-size: .8rem; }
.crm-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 800; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: .7rem; font-weight: 700; color: #137a3f; text-transform: uppercase; letter-spacing: .08em; }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--wa); animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .3; } }
.crm-list { list-style: none; margin: 0; padding: 0; min-height: 190px; }
.crm-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); transition: background 1.2s ease; }
.crm-row:last-child { border-bottom: 0; }
.crm-row > div:first-child { min-width: 0; }
.crm-row strong { display: block; font-size: .86rem; }
.crm-row small { display: block; color: var(--muted); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crm-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.ch { font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.ch-ussd { color: var(--ussd); } .ch-wa { color: #13853f; } .ch-sms { color: var(--sms); }
.status { font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #eef1f6; color: var(--muted); }
.status.s-new { background: var(--brand-soft); color: var(--brand-dark); }
.status.s-calling { background: #fff4e5; color: #a45500; animation: blink 1s ease-in-out infinite; }
.status.s-done { background: #e7f7ee; color: #137a3f; }
.crm-row.fresh { background: var(--brand-soft); animation: row-in .5s ease-out; }
@keyframes row-in { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
.agent-toast {
  display: flex; gap: 10px; align-items: center; margin: 0 0 12px; padding: 10px 14px; border-radius: 14px;
  background: #fff; color: var(--ink); box-shadow: 0 14px 40px rgba(0,0,0,.3);
  transition: opacity .4s, transform .4s;
}
.flow.js .agent-toast { opacity: 0; transform: translateY(8px); }
.flow.js .agent-toast.show { opacity: 1; transform: none; }
.agent-toast .ico { width: 34px; height: 34px; border-radius: 10px; background: var(--brand-soft); display: grid; place-items: center; flex-shrink: 0; }
.agent-toast strong { display: block; font-size: .85rem; }
.agent-toast small { color: var(--muted); font-size: .74rem; }

/* Stack vertically on smaller screens */
@media (max-width: 960px) {
  .flow { padding: 28px 16px 32px; }
  .flow-stage { grid-template-columns: 1fr; justify-items: center; }
  .flow-label { height: auto; }
  .flow-link {
    width: 4px; height: 56px; margin: 16px 0;
    background: repeating-linear-gradient(180deg, rgba(255,255,255,.22) 0 8px, transparent 8px 14px);
  }
  .flow-link::after { right: auto; top: auto; bottom: -5px; left: 50%; margin: 0 0 0 -4px; transform: rotate(135deg); }
  .packet { left: 50%; top: 0; }
  .flow-link.go .packet { animation-name: packet-y; }
  .hub, .crm-wrap { margin-top: 0; }
  .hub { width: 220px; }
  .crm-wrap { max-width: 360px; }
}
@keyframes packet-y {
  0% { top: 0; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { top: 100%; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .flow .msg, .scene, .agent-toast, .crm-row { transition: none !important; }
  .flow .packet, .hub.active .hub-logo::after, .live::before, .status.s-calling, .crm-row.fresh { animation: none !important; }
}
