/* =============================================================
   FlowAI — Stylesheet
   Design tokens: dark indigo/navy + light backgrounds,
   Sora for display type, Inter for body/UI text.
   ============================================================= */

:root {
  /* Color */
  --navy-900: #0b0e27;
  --navy-800: #12163a;
  --navy-700: #1a2050;
  --indigo-600: #4b4fd6;
  --indigo-500: #5b5fef;
  --indigo-400: #7b7ff5;
  --indigo-100: #eeeefd;
  --bg: #fafafc;
  --white: #ffffff;
  --ink-900: #14162b;
  --ink-700: #33354f;
  --ink-600: #565a78;
  --ink-400: #8a8da8;
  --border: #e7e7f1;
  --border-dark: #262c5c;
  --success: #1a9c6c;
  --danger: #d64550;

  /* Type */
  --font-display: 'Sora', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;

  /* Layout */
  --container: 1160px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(20, 22, 43, 0.06);
  --shadow-md: 0 8px 24px rgba(20, 22, 43, 0.08);
  --shadow-lg: 0 20px 48px rgba(20, 22, 43, 0.14);
  --nav-h: 76px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink-900);
  line-height: 1.15;
  margin: 0;
}

p { margin: 0; color: var(--ink-600); line-height: 1.65; }

a { color: inherit; text-decoration: none; }

img, svg { display: block; max-width: 100%; }

button { font-family: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--indigo-500);
  outline-offset: 3px;
  border-radius: 4px;
}

/* =============== Buttons =============== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn--sm { padding: 9px 18px; font-size: 14px; }
.btn--lg { padding: 15px 30px; font-size: 15.5px; }

.btn--primary {
  background: var(--indigo-500);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(91, 95, 239, 0.28);
}
.btn--primary:hover {
  background: var(--indigo-600);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(91, 95, 239, 0.34);
}

.btn--ghost {
  background: transparent;
  color: var(--ink-900);
  border-color: var(--border);
}
.btn--ghost:hover {
  border-color: var(--indigo-400);
  color: var(--indigo-600);
  transform: translateY(-1px);
}

/* =============== Navbar =============== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(250, 250, 252, 0.86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  color: var(--ink-900);
}
.brand__mark {
  color: var(--indigo-500);
  display: inline-flex;
}
.footer .brand__mark { color: var(--indigo-400); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
}

.nav-link {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-700);
  position: relative;
  padding: 6px 0;
  transition: color 0.15s ease;
}
.nav-link:hover { color: var(--indigo-600); }
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--indigo-500);
  transition: width 0.2s ease;
  border-radius: 2px;
}
.nav-link:hover::after { width: 100%; }

.navbar__actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0;
}
.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--ink-900);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  bottom: 0;
  background: var(--white);
  z-index: 190;
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  gap: 4px;
  transform: translateX(100%);
  transition: transform 0.28s ease;
  overflow-y: auto;
}
.mobile-menu.is-open { transform: translateX(0); }

.mobile-link {
  padding: 16px 4px;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink-900);
  border-bottom: 1px solid var(--border);
}
.mobile-menu__cta { margin-top: 22px; width: 100%; }

/* =============== Hero =============== */
.hero {
  padding: 88px 0 96px;
  background: var(--bg);
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 56px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--indigo-100);
  color: var(--indigo-600);
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.badge__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--indigo-500);
}

.hero__title {
  font-size: clamp(2.4rem, 4.2vw, 3.55rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  max-width: 15ch;
}

.hero__desc {
  margin-top: 22px;
  font-size: 17.5px;
  max-width: 46ch;
  color: var(--ink-600);
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 34px;
  flex-wrap: wrap;
}

/* Hero visual: workflow card */
.hero__visual {
  display: flex;
  justify-content: center;
  animation: rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

.flow-card {
  width: 100%;
  max-width: 420px;
  background: var(--navy-900);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--border-dark);
}

.flow-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-dark);
}
.flow-card__dots { display: flex; gap: 6px; }
.flow-card__dots span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #3a4080;
}
.flow-card__title {
  font-size: 13px;
  color: #a8acd8;
  font-weight: 500;
}

.flow-card__body { padding: 20px; display: flex; flex-direction: column; }

.flow-node {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  opacity: 0.62;
}
.flow-node--active { opacity: 1; border-color: rgba(91,95,239,0.45); }

.flow-node__icon {
  color: var(--indigo-400);
  font-size: 12px;
}
.flow-node__title { color: #f1f1fb; font-size: 14px; font-weight: 600; margin: 0 0 2px; }
.flow-node__sub { color: #82869e; font-size: 12.5px; margin: 0; }
.flow-node > div { flex: 1; }

.flow-node__status {
  font-size: 11.5px;
  font-weight: 600;
  color: #82869e;
  border: 1px solid #3a4080;
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.flow-node__status--done { color: #6fd6a8; border-color: rgba(111, 214, 168, 0.35); }
.flow-node__status--live {
  color: var(--indigo-400);
  border-color: rgba(123, 127, 245, 0.4);
  animation: livepulse 1.8s ease-in-out infinite;
}
@keyframes livepulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.flow-connector {
  width: 1px;
  height: 16px;
  background: var(--border-dark);
  margin-left: 26px;
}

.flow-card__footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--border-dark);
}
.pulse-bars { display: flex; align-items: flex-end; gap: 3px; height: 16px; }
.pulse-bars span {
  width: 3px;
  background: var(--indigo-400);
  border-radius: 2px;
  animation: bar 1.2s ease-in-out infinite;
}
.pulse-bars span:nth-child(1){ height: 40%; animation-delay: 0s; }
.pulse-bars span:nth-child(2){ height: 90%; animation-delay: 0.12s; }
.pulse-bars span:nth-child(3){ height: 60%; animation-delay: 0.24s; }
.pulse-bars span:nth-child(4){ height: 100%; animation-delay: 0.36s; }
.pulse-bars span:nth-child(5){ height: 50%; animation-delay: 0.48s; }
@keyframes bar {
  0%, 100% { transform: scaleY(0.5); }
  50% { transform: scaleY(1); }
}
.flow-card__footer-text { font-size: 12px; color: #82869e; }

/* =============== Section shared =============== */
.section-head {
  max-width: 620px;
  margin: 0 auto 48px;
  text-align: center;
}
.section-head--left { margin: 0 0 32px; text-align: left; }

.section-title {
  font-size: clamp(1.7rem, 2.6vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.section-desc {
  margin-top: 12px;
  font-size: 16px;
}

.features, .how-it-works, .ai-assistant, .contact {
  padding: 96px 0;
}
.how-it-works { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* =============== Feature cards =============== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(91, 95, 239, 0.25);
}
.feature-card:hover .feature-card__more { color: var(--indigo-600); }
.feature-card:hover .feature-card__more svg { transform: translateX(3px); }
.feature-card:active { transform: translateY(-1px); }

.feature-card__more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--indigo-500);
}
.feature-card__more svg { transition: transform 0.15s ease; }

.feature-card__icon {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--indigo-100);
  color: var(--indigo-500);
  margin-bottom: 18px;
}

.feature-card__title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}
.feature-card__desc { font-size: 14.5px; }

/* =============== How it works =============== */
.steps {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 6px;
}

.step {
  flex: 1;
  max-width: 280px;
  text-align: left;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px 24px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(91, 95, 239, 0.25);
}
.step:hover .step__icon {
  background: var(--indigo-500);
  color: #fff;
}

.step__icon {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--indigo-100);
  color: var(--indigo-500);
  margin-bottom: 18px;
  transition: background 0.2s ease, color 0.2s ease;
}

.step__number {
  display: block;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--indigo-500);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.step__title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-400);
  margin-bottom: 12px;
}
.step__headline {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: 8px;
  line-height: 1.35;
}
.step__desc { font-size: 14.5px; }

.step-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  color: var(--border);
  align-self: center;
}
.step-connector__arrow { color: var(--indigo-400); }

/* Mini workflow visual under the steps */
.hiw-flow-wrap { margin-top: 52px; }

.hiw-flow {
  max-width: 780px;
  margin: 0 auto;
  background: var(--navy-900);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 22px 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hiw-flow__node {
  flex: 1;
  min-width: 128px;
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  padding: 13px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.hiw-flow__node--accent {
  border-color: rgba(91, 95, 239, 0.45);
  background: rgba(91, 95, 239, 0.1);
}
.hiw-flow__node span {
  font-size: 13px;
  font-weight: 600;
  color: #f1f1fb;
}
.hiw-flow__node small {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #f0b429;
  border: 1px solid rgba(240, 180, 41, 0.4);
  padding: 2px 8px;
  border-radius: 999px;
}
.hiw-flow__arrow {
  color: #4a4f8c;
  flex-shrink: 0;
  display: flex;
}

.hiw-flow__note {
  max-width: 640px;
  margin: 16px auto 0;
  text-align: center;
  font-size: 13px;
  color: var(--ink-400);
}

/* =============== Scroll-triggered entrance animation =============== */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.steps .step.reveal:nth-child(1) { transition-delay: 0s; }
.steps .step.reveal:nth-child(3) { transition-delay: 0.1s; }
.steps .step.reveal:nth-child(5) { transition-delay: 0.2s; }
.hiw-flow-wrap.reveal { transition-delay: 0.15s; }

/* =============== AI Assistant chat =============== */
.chat-window {
  max-width: 620px;
  margin: 0 auto;
  background: var(--navy-900);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-dark);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.chat-window__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-dark);
}

.chat-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(155deg, var(--indigo-500), var(--indigo-600));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.chat-window__title { color: #f1f1fb; font-size: 14.5px; font-weight: 700; margin: 0; }
.chat-window__status {
  font-size: 12px;
  color: #82869e;
  margin: 2px 0 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #f0b429;
  display: inline-block;
}

.chat-window__body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 260px;
  max-height: 420px;
  overflow-y: auto;
}

.chat-msg { display: flex; gap: 10px; max-width: 88%; }
.chat-msg--ai { align-self: flex-start; }
.chat-msg--user { align-self: flex-end; flex-direction: row-reverse; }

.chat-msg__avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--border-dark);
  color: #c6c9ee;
  font-size: 11px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.chat-msg--user .chat-msg__avatar { background: var(--indigo-500); color: #fff; }

.chat-msg__bubble {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-dark);
  color: #e7e8f7;
  padding: 12px 15px;
  border-radius: 14px;
  font-size: 14.5px;
  line-height: 1.55;
}
.chat-msg--ai .chat-msg__bubble { border-bottom-left-radius: 4px; }
.chat-msg--user .chat-msg__bubble {
  background: var(--indigo-500);
  border-color: var(--indigo-500);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-window__typing {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 22px 16px;
}
.typing-dots {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-dark);
  padding: 12px 15px;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
}
.typing-dots span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #82869e;
  animation: typing 1.1s ease-in-out infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.chat-window__input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-top: 1px solid var(--border-dark);
}
.chat-window__input input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-dark);
  color: #f1f1fb;
  font-size: 14.5px;
  padding: 12px 16px;
  border-radius: 999px;
  font-family: inherit;
}
.chat-window__input input::placeholder { color: #6d7196; }
.chat-window__input input:focus { border-color: var(--indigo-400); }

.chat-send {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--indigo-500);
  color: #fff;
  border: none;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s ease, transform 0.15s ease;
}
.chat-send:hover { background: var(--indigo-600); transform: translateY(-1px); }
.chat-send:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* =============== CTA =============== */
.cta {
  background: var(--navy-900);
  padding: 90px 0;
}
.cta__inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}
.cta__title {
  color: #fff;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 700;
}
.cta__desc {
  color: #a8acd8;
  margin-top: 14px;
  font-size: 16px;
}
.cta .btn--primary { margin-top: 30px; }

/* =============== Contact =============== */
.contact__inner {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: start;
}

.contact-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.form-field {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}
.form-field label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-700);
  margin-bottom: 7px;
}
.form-field input,
.form-field textarea {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink-900);
  background: var(--bg);
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--indigo-400);
  box-shadow: 0 0 0 3px rgba(91, 95, 239, 0.12);
}
.form-field.has-error input,
.form-field.has-error textarea {
  border-color: var(--danger);
}
.form-error {
  min-height: 16px;
  font-size: 12.5px;
  color: var(--danger);
  margin-top: 5px;
}

.form-submit { width: 100%; margin-top: 4px; }

.form-success {
  margin-top: 18px;
  background: rgba(26, 156, 108, 0.08);
  color: var(--success);
  border: 1px solid rgba(26, 156, 108, 0.25);
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
}

/* =============== Footer =============== */
.footer {
  background: var(--navy-900);
  padding: 56px 0 26px;
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--border-dark);
}
.footer .brand__name { color: #fff; }
.footer__tagline {
  color: #82869e;
  font-size: 14px;
  margin-top: 10px;
  max-width: 30ch;
}
.footer__links {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
}
.footer__links a {
  color: #a8acd8;
  font-size: 14px;
  transition: color 0.15s ease;
}
.footer__links a:hover { color: #fff; }

.footer__copy {
  color: #6d7196;
  font-size: 13px;
  padding-top: 22px;
}

/* =============================================================
   Feature detail modal
   ============================================================= */
.feature-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
  background: rgba(11, 14, 39, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.feature-modal-overlay[hidden] { display: none; }
.feature-modal-overlay.is-visible { opacity: 1; }

.feature-modal {
  width: 100%;
  max-width: 640px;
  max-height: min(88vh, 780px);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  position: relative;
  transform: translateY(18px) scale(0.98);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.feature-modal-overlay.is-visible .feature-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.feature-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--ink-600);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.feature-modal__close:hover {
  background: var(--indigo-100);
  color: var(--indigo-600);
  border-color: rgba(91, 95, 239, 0.3);
}

.feature-modal__scroll {
  overflow-y: auto;
  padding: 34px 34px 30px;
}

.feature-modal__header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding-right: 30px;
}

.feature-modal__icon {
  width: 50px; height: 50px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px;
  background: var(--indigo-100);
  color: var(--indigo-500);
}
.feature-modal__icon svg { width: 26px; height: 26px; }

.feature-modal__badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--indigo-600);
  background: var(--indigo-100);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.feature-modal__badge--muted {
  color: var(--ink-600);
  background: var(--border);
}

.feature-modal__title {
  font-size: 22px;
  font-weight: 700;
}

.feature-modal__intro {
  margin-top: 18px;
  font-size: 15.5px;
  color: var(--ink-700);
}

.feature-modal__visual {
  margin-top: 22px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.feature-modal__section { margin-top: 26px; }
.feature-modal__section h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-400);
  margin-bottom: 10px;
}
.feature-modal__section p { font-size: 14.5px; color: var(--ink-700); }

.feature-modal__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.feature-modal__list li {
  font-size: 14.5px;
  color: var(--ink-700);
  padding-left: 20px;
  position: relative;
}
.feature-modal__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--indigo-400);
}
.feature-modal__list--check li::before {
  width: 14px;
  height: 14px;
  top: 1px;
  border-radius: 4px;
  background: var(--success);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center / 10px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center / 10px no-repeat;
}

.feature-modal__note {
  margin-top: 22px;
  font-size: 13px;
  color: var(--ink-600);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.feature-modal__footer {
  margin-top: 28px;
}
.feature-modal__footer .btn { width: 100%; }

/* --- Visuals rendered inside the modal (built to match the site's
       existing navy card / chat aesthetic) --- */
.mv-card {
  background: var(--navy-900);
  border: 1px solid var(--border-dark);
  padding: 20px;
}

/* AI Assistant visual: mini chat preview */
.mv-chat { display: flex; flex-direction: column; gap: 12px; }
.mv-chat__row { display: flex; gap: 9px; max-width: 86%; }
.mv-chat__row--user { align-self: flex-end; flex-direction: row-reverse; }
.mv-chat__avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--border-dark); color: #c6c9ee;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.mv-chat__row--user .mv-chat__avatar { background: var(--indigo-500); color: #fff; }
.mv-chat__bubble {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-dark);
  color: #e7e8f7;
  padding: 10px 13px;
  border-radius: 12px;
  border-bottom-left-radius: 4px;
  font-size: 13px;
  line-height: 1.5;
}
.mv-chat__row--user .mv-chat__bubble {
  background: var(--indigo-500);
  border-color: var(--indigo-500);
  color: #fff;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 4px;
}

/* Workflow Automation visual: User Request -> FlowAI -> Automation -> Result */
.mv-flow {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.mv-flow__node {
  flex: 1;
  min-width: 108px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  text-align: center;
}
.mv-flow__node--accent { border-color: rgba(91, 95, 239, 0.45); background: rgba(91, 95, 239, 0.08); }
.mv-flow__node span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #f1f1fb;
}
.mv-flow__node small { color: #82869e; font-size: 10.5px; }
.mv-flow__arrow { color: #4a4f8c; flex-shrink: 0; }

/* Smart Productivity visual: task/planning checklist */
.mv-tasks { display: flex; flex-direction: column; gap: 10px; }
.mv-task {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.mv-task__check {
  width: 16px; height: 16px;
  border-radius: 5px;
  border: 1.5px solid #4a4f8c;
  flex-shrink: 0;
}
.mv-task--done .mv-task__check {
  background: var(--indigo-500);
  border-color: var(--indigo-500);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center / 11px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.mv-task--done span { color: #82869e; text-decoration: line-through; }
.mv-task span { font-size: 13px; color: #e7e8f7; }

/* Easy Integration visual: FlowAI hub with connector nodes */
.mv-integrations {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.mv-hub {
  width: 68px; height: 68px;
  border-radius: 50%;
  background: var(--indigo-500);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  text-align: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 6px rgba(91, 95, 239, 0.15);
}
.mv-integrations__nodes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  flex: 1;
  min-width: 180px;
}
.mv-node {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-dark);
  border-radius: 10px;
  padding: 8px 10px;
}
.mv-node span { font-size: 12px; color: #e7e8f7; font-weight: 500; }
.mv-node small {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #f0b429;
  border: 1px solid rgba(240, 180, 41, 0.4);
  padding: 2px 6px;
  border-radius: 999px;
  white-space: nowrap;
}

/* =============================================================
   Responsive
   ============================================================= */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }

  .hero__inner { grid-template-columns: 1fr; gap: 48px; }
  .hero__content { text-align: left; }
  .hero__title { max-width: none; }
  .hero__visual { order: -1; }

  .feature-grid { grid-template-columns: repeat(2, 1fr); }

  .contact__inner { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 720px) {
  .steps { flex-direction: column; align-items: stretch; gap: 18px; }
  .step { max-width: 100%; }
  .step-connector {
    width: auto;
    height: 30px;
  }
  .step-connector__arrow { transform: rotate(90deg); }
}

@media (max-width: 560px) {
  .container { padding: 0 18px; }
  .navbar__actions .btn--sm { display: none; }

  .hero { padding: 56px 0 64px; }
  .hero__title { font-size: 2.1rem; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; }

  .features, .how-it-works, .ai-assistant, .contact { padding: 64px 0; }

  .feature-grid { grid-template-columns: 1fr; }

  .flow-card { max-width: 100%; }

  .chat-window__body { max-height: 340px; }

  .cta { padding: 64px 0; }

  .contact-form { padding: 24px; }

  .feature-modal-overlay { padding: 0; align-items: flex-end; }
  .feature-modal {
    max-width: 100%;
    max-height: 92vh;
    width: 100%;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
  }
  .feature-modal-overlay.is-visible .feature-modal { transform: translateY(0); }
  .feature-modal__scroll { padding: 28px 22px 24px; }
  .mv-integrations { justify-content: flex-start; }

  .hiw-flow { flex-direction: column; padding: 20px; }
  .hiw-flow__node { width: 100%; }
  .hiw-flow__arrow { transform: rotate(90deg); }
}
/* =============== Use Cases =============== */
.use-cases {
  padding: 96px 0;
}

.usecase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.usecase-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.usecase-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(91, 95, 239, 0.25);
}
.usecase-card:hover .usecase-card__icon {
  background: var(--indigo-500);
  color: #fff;
}

.usecase-card__icon {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--indigo-100);
  color: var(--indigo-500);
  margin-bottom: 18px;
  transition: background 0.2s ease, color 0.2s ease;
}

.usecase-card__title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}
.usecase-card__desc { font-size: 14.5px; }

@media (max-width: 980px) {
  .usecase-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .use-cases { padding: 64px 0; }
  .usecase-grid { grid-template-columns: 1fr; }
}
/* =============== AI Assistant Demo =============== */
.ai-assistant { padding: 96px 0; }

.ai-chat-card {
  max-width: 620px;
  margin: 0 auto;
  background: var(--navy-900);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-dark);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ai-chat-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-dark);
}

.ai-chat-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(155deg, var(--indigo-500), var(--indigo-600));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.ai-chat-title { color: #f1f1fb; font-size: 14.5px; font-weight: 700; margin: 0; }
.ai-chat-status {
  font-size: 12px;
  color: #82869e;
  margin: 2px 0 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ai-status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #3ecf8e;
  display: inline-block;
  animation: aiStatusPulse 2s ease-in-out infinite;
}
@keyframes aiStatusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.ai-chat-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 220px;
  max-height: 420px;
  overflow-y: auto;
}

.ai-chat-msg { display: flex; gap: 10px; max-width: 88%; }
.ai-chat-msg--ai { align-self: flex-start; }
.ai-chat-msg--user { align-self: flex-end; flex-direction: row-reverse; }

.ai-chat-msg__avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--border-dark);
  color: #c6c9ee;
  font-size: 11px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ai-chat-msg--user .ai-chat-msg__avatar { background: var(--indigo-500); color: #fff; }

.ai-chat-msg__bubble {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-dark);
  color: #e7e8f7;
  padding: 12px 15px;
  border-radius: 14px;
  font-size: 14.5px;
  line-height: 1.55;
  animation: aiMsgIn 0.25s ease both;
}
.ai-chat-msg--ai .ai-chat-msg__bubble { border-bottom-left-radius: 4px; }
.ai-chat-msg--user .ai-chat-msg__bubble {
  background: var(--indigo-500);
  border-color: var(--indigo-500);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.ai-chat-msg--error { align-self: flex-start; }
.ai-chat-msg--error .ai-chat-msg__avatar {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}
.ai-chat-msg--error .ai-chat-msg__bubble {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
  font-size: 13.5px;
  border-bottom-left-radius: 4px;
}
@keyframes aiMsgIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.ai-chat-typing {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 22px 16px;
}
.ai-chat-typing__label { font-size: 12.5px; color: #82869e; }
.ai-typing-dots {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-dark);
  padding: 12px 15px;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
}
.ai-typing-dots span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #82869e;
  animation: aiTypingDot 1.1s ease-in-out infinite;
}
.ai-typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.ai-typing-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes aiTypingDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.ai-chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 22px 18px;
}
.ai-chat-suggestion {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-dark);
  color: #c6c9ee;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.ai-chat-suggestion:hover {
  background: rgba(91, 95, 239, 0.15);
  border-color: rgba(91, 95, 239, 0.45);
  color: #fff;
  transform: translateY(-1px);
}

.ai-chat-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-top: 1px solid var(--border-dark);
}
.ai-chat-input-row input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-dark);
  color: #f1f1fb;
  font-size: 14.5px;
  padding: 12px 16px;
  border-radius: 999px;
  font-family: inherit;
}
.ai-chat-input-row input::placeholder { color: #6d7196; }
.ai-chat-input-row input:focus { border-color: var(--indigo-400); }

.ai-chat-send {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--indigo-500);
  color: #fff;
  border: none;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s ease, transform 0.15s ease;
}
.ai-chat-send:hover { background: var(--indigo-600); transform: translateY(-1px); }
.ai-chat-send:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

@media (max-width: 560px) {
  .ai-assistant { padding: 64px 0; }
  .ai-chat-body { max-height: 320px; }
  .ai-chat-suggestions { padding: 0 16px 16px; }
  .ai-chat-input-row { padding: 14px 16px; }
}
/* =============== Contact Section Enhancements =============== */
.contact__info {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact-info-card {
  background: var(--navy-900);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-info-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.contact-info-icon {
  width: 40px; height: 40px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: rgba(91, 95, 239, 0.15);
  color: var(--indigo-400);
}

.contact-info-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #82869e;
  margin-bottom: 3px;
}
.contact-info-value {
  font-size: 14.5px;
  font-weight: 600;
  color: #f1f1fb;
}

.contact-info-note {
  font-size: 13.5px;
  color: #a8acd8;
  line-height: 1.6;
  padding-top: 16px;
  border-top: 1px solid var(--border-dark);
}

/* Slightly refined form polish */
.contact-form {
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.contact-form:hover {
  box-shadow: var(--shadow-md);
}

@media (max-width: 560px) {
  .contact-info-card { padding: 22px 20px; }
  .contact__info { gap: 22px; }
}
