/* ================================
   FlowIoT — Landing page styles
   Palette : extraite du logo flowiot
   Cyan #00D4E0, Violet #6E3FE0, Magenta #C840A6, Émeraude #1FE0A3
   ================================ */

/* ===== Local fonts ===== */
@font-face { font-family: 'Poppins'; src: url('../font/Poppins/Poppins-Light.ttf') format('truetype'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('../font/Poppins/Poppins-Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('../font/Poppins/Poppins-Italic.ttf') format('truetype'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('../font/Poppins/Poppins-Medium.ttf') format('truetype'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('../font/Poppins/Poppins-SemiBold.ttf') format('truetype'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('../font/Poppins/Poppins-Bold.ttf') format('truetype'); font-weight: 700; font-style: normal; font-display: swap; }

@font-face { font-family: 'IBM Plex Mono'; src: url('../font/IBM_Plex_Mono/IBMPlexMono-Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('../font/IBM_Plex_Mono/IBMPlexMono-Medium.ttf') format('truetype'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('../font/IBM_Plex_Mono/IBMPlexMono-SemiBold.ttf') format('truetype'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('../font/IBM_Plex_Mono/IBMPlexMono-Bold.ttf') format('truetype'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --bg-deep: #0A0F1F;
  --bg-1: #0E1530;
  --bg-2: #14133D;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.20);
  --text: #F2F4FB;
  --text-soft: #B8C0E0;
  --text-muted: #7A85B5;

  --cyan: #00D4E0;
  --violet: #6E3FE0;
  --magenta: #C840A6;
  --emerald: #1FE0A3;
  --amber: #FFB13C;

  --grad-brand: linear-gradient(120deg, var(--cyan) 0%, var(--violet) 50%, var(--magenta) 100%);
  --grad-soft: linear-gradient(135deg, rgba(0, 212, 224, 0.16), rgba(110, 63, 224, 0.16) 50%, rgba(200, 64, 166, 0.16));
  --grad-text: linear-gradient(120deg, #B8FFFF 0%, #C9B5FF 50%, #FFB5E8 100%);
  --grad-emerald: linear-gradient(135deg, var(--emerald), var(--cyan));

  --radius: 18px;
  --radius-lg: 28px;
  --shadow-glow: 0 0 80px rgba(110, 63, 224, 0.35);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-deep);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(800px 500px at 20% -100px, rgba(0, 212, 224, 0.18), transparent 60%),
    radial-gradient(900px 600px at 90% 10%, rgba(110, 63, 224, 0.20), transparent 60%),
    radial-gradient(700px 400px at 50% 100%, rgba(200, 64, 166, 0.10), transparent 60%);
  pointer-events: none;
  z-index: -1;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.022em;
}
h1 { font-size: clamp(2.6rem, 6vw, 5rem); font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: clamp(2rem, 3.6vw, 3.2rem); }
h3 { font-size: clamp(1.25rem, 1.8vw, 1.5rem); }

p { color: var(--text-soft); }
::selection { background: var(--cyan); color: var(--bg-deep); }

/* ===== Layout ===== */
.wrap { width: min(1280px, 92%); margin: 0 auto; }
.section { padding: clamp(80px, 11vw, 160px) 0; position: relative; }
.section--tight { padding: clamp(50px, 7vw, 100px) 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.eyebrow::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--grad-emerald);
  box-shadow: 0 0 12px var(--emerald);
}

.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: all .3s var(--ease);
}
.header.scrolled {
  background: rgba(10, 15, 31, 0.78);
  backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  padding: 8px 18px;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.30);
  transition: transform .3s var(--ease);
}
.brand:hover { transform: translateY(-1px); }
.brand img { height: 38px; width: auto; }
.header.scrolled .brand img { height: 32px; }

.nav__links {
  display: flex; gap: 4px; list-style: none;
}
.nav__links a {
  display: inline-block;
  padding: 10px 16px;
  font-size: 0.92rem;
  color: var(--text-soft);
  border-radius: 10px;
  transition: all .25s var(--ease);
}
.nav__links a:hover { color: var(--text); background: var(--surface); }

@media (max-width: 760px) { .nav__links { display: none; } }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 12px;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: all .3s var(--ease), border 0s;
}
.btn svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(4px); }

.btn--primary {
  background: var(--grad-brand);
  background-repeat: no-repeat;
  color: white;
  border: none;
  box-shadow: 0 14px 40px rgba(110, 63, 224, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  position: relative;
  overflow: hidden;
}
.btn--primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, var(--violet), var(--magenta), var(--cyan));
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 48px rgba(110, 63, 224, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn--primary:hover::before { opacity: 1; }
.btn--primary span { position: relative; z-index: 1; }
.btn--primary svg { position: relative; z-index: 1; }

.btn--ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover {
  background: var(--surface-strong);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.btn--lg { padding: 18px 32px; font-size: 1rem; }
.btn--sm { padding: 9px 16px; font-size: 0.85rem; }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 140px 0 60px;
  overflow: hidden;
}
.hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: center;
}
.hero__title {
  margin: 24px 0 26px;
}
.hero__lead {
  font-size: 1.2rem;
  color: var(--text-soft);
  max-width: 580px;
  margin-bottom: 38px;
}
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero__trust {
  display: flex; gap: 12px; flex-wrap: nowrap;
  margin-top: 44px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}
.trust-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 99px;
  color: var(--text-soft);
  text-wrap: nowrap;
}
.trust-pill svg { width: 14px; height: 14px; color: var(--emerald); }

@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; gap: 48px; }
  .hero__visual { order: -1; max-width: 460px; margin: 0 auto; }
  .hero__trust { flex-wrap: wrap; }
}

@media (max-width: 600px) {
  h1 { font-size: clamp(1.9rem, 8vw, 2.6rem); }

  /* Header */
  .header .btn { display: none; }

  /* Hero */
  .hero { padding: 100px 0 48px; min-height: 0; }
  .hero__inner { gap: 0; }
  .hero__visual { display: none; }
  .hero__lead { font-size: 1.05rem; }
  .hero__cta { flex-direction: column; }
  .hero__cta .btn { width: 100%; justify-content: center; }
  .hero__trust { flex-direction: column; gap: 8px; margin-top: 32px; }
  .trust-pill { width: 100%; justify-content: flex-start; font-size: 0.82rem; padding: 9px 14px; }
}

/* ===== Hero visual : dashboard mockup with floating cards ===== */
.hero__visual {
  position: relative;
  aspect-ratio: 1;
}
.dash {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(110, 63, 224, 0.10), rgba(0, 212, 224, 0.05));
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  padding: 28px;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.50);
}
.dash::before {
  content: '';
  position: absolute;
  inset: -50%;
  background: conic-gradient(
    from 0deg,
    rgba(0, 212, 224, 0.4),
    rgba(110, 63, 224, 0.4),
    rgba(200, 64, 166, 0.4),
    rgba(31, 224, 163, 0.4),
    rgba(0, 212, 224, 0.4)
  );
  opacity: 0.5;
  animation: rotate-bg 20s linear infinite;
  filter: blur(60px);
  z-index: -1;
}
.dash__bar {
  display: flex; gap: 6px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.dash__bar span {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.20);
}
.dash__bar span:nth-child(1) { background: #ff5f57; }
.dash__bar span:nth-child(2) { background: #ffbd2e; }
.dash__bar span:nth-child(3) { background: #28c941; }
.dash__bar small {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: 1px;
}
.dash__row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.85rem;
}
.dash__row:last-child { border-bottom: none; }
.dash__row .lbl { color: var(--text-soft); display: inline-flex; align-items: center; gap: 8px; }
.dash__row .lbl::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: blink 2.4s infinite;
}
.dash__row:nth-child(odd) .lbl::before { background: var(--emerald); box-shadow: 0 0 8px var(--emerald); }
.dash__row:nth-child(3n) .lbl::before { background: var(--magenta); box-shadow: 0 0 8px var(--magenta); }
.dash__row .val {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  color: var(--text);
}
.dash__row .pill {
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 99px;
  background: rgba(31, 224, 163, 0.15);
  color: var(--emerald);
  border: 1px solid rgba(31, 224, 163, 0.3);
}

.dash__chart {
  margin-top: 18px;
  height: 90px;
  position: relative;
}
.dash__chart svg { width: 100%; height: 100%; }

/* Floating cards */
.float-card {
  position: absolute;
  padding: 14px 18px;
  background: rgba(14, 21, 48, 0.92);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  font-size: 0.85rem;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.40);
  animation: floaty 6s ease-in-out infinite;
}
.float-card__dot {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--grad-emerald);
  display: grid; place-items: center;
  color: var(--bg-deep);
  flex-shrink: 0;
}
.float-card__dot svg { width: 16px; height: 16px; }
.float-card__title {
  font-weight: 600;
  font-size: 0.85rem;
}
.float-card__sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.float-card--1 { top: -20px; right: -20px; animation-delay: 0s; }
.float-card--2 { bottom: 30px; left: -40px; animation-delay: 2s; background: rgba(110, 63, 224, 0.20); border-color: rgba(110, 63, 224, 0.4); }
.float-card--2 .float-card__dot { background: linear-gradient(135deg, var(--violet), var(--magenta)); color: white; }
.float-card--3 { top: 40%; right: -50px; animation-delay: 4s; background: rgba(0, 212, 224, 0.10); border-color: rgba(0, 212, 224, 0.35); }
.float-card--3 .float-card__dot { background: linear-gradient(135deg, var(--cyan), var(--violet)); color: white; }

@keyframes rotate-bg { to { transform: rotate(360deg); } }
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ===== Section head ===== */
.head {
  max-width: 760px;
  margin: 0 auto 70px;
  text-align: center;
}
.head--left { margin-left: 0; text-align: left; }
.head h2 { margin-top: 22px; }
.head p { margin-top: 18px; font-size: 1.08rem; }

/* ===== Stats ===== */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.stat {
  padding: 32px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grad-brand);
}
.stat__num {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 700;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  line-height: 1;
  margin-bottom: 10px;
}
.stat__lbl { color: var(--text-muted); font-size: 0.92rem; }

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

/* ===== Use cases (3 main pillars) ===== */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 980px) { .pillars { grid-template-columns: 1fr; } }

.pillar {
  position: relative;
  padding: 40px 32px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all .35s var(--ease);
}
.pillar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--grad-soft);
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.pillar:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.pillar:hover::before { opacity: 1; }
.pillar > * { position: relative; z-index: 1; }

.pillar__icon {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: var(--grad-brand);
  display: grid; place-items: center;
  color: white;
  margin-bottom: 24px;
  box-shadow: 0 12px 28px rgba(110, 63, 224, 0.40);
}
.pillar__icon svg { width: 32px; height: 32px; }
.pillar h3 { margin-bottom: 14px; }
.pillar ul {
  list-style: none;
  margin-top: 22px;
  display: grid; gap: 10px;
}
.pillar ul li {
  position: relative;
  padding-left: 28px;
  font-size: 0.92rem;
  color: var(--text-soft);
}
.pillar ul li::before {
  content: '';
  position: absolute;
  left: 0; top: 9px;
  width: 16px; height: 4px;
  border-radius: 2px;
  background: var(--grad-emerald);
}

/* ===== Capability features grid ===== */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 980px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

.feat {
  padding: 28px 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all .3s var(--ease);
}
.feat:hover {
  background: var(--surface-strong);
  border-color: var(--border-strong);
  transform: translateY(-4px);
}
.feat__icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(0, 212, 224, 0.10);
  border: 1px solid rgba(0, 212, 224, 0.25);
  display: grid; place-items: center;
  color: var(--cyan);
  margin-bottom: 18px;
}
.feat__icon svg { width: 22px; height: 22px; }
.feat h4 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.08rem;
  margin-bottom: 8px;
}
.feat p { font-size: 0.92rem; }

/* ===== Sensor marquee (LoRaWAN, MQTT, Modbus etc.) ===== */
.sensor-marquee {
  overflow: hidden;
  margin-top: 40px;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
}
.sensor-track {
  display: flex; gap: 24px;
  width: max-content;
  animation: scroll-left 35s linear infinite;
}
.sensor-chip {
  flex: 0 0 auto;
  padding: 16px 28px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  display: inline-flex; align-items: center; gap: 12px;
  transition: all .25s var(--ease);
}
.sensor-chip:hover {
  background: var(--surface-strong);
  border-color: var(--cyan);
  color: var(--cyan);
}
.sensor-chip__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--grad-emerald);
}

@keyframes scroll-left {
  to { transform: translateX(-50%); }
}

/* ===== AI showcase ===== */
.ai-block {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 80px;
  align-items: center;
}
@media (max-width: 980px) { .ai-block { grid-template-columns: 1fr; } }

.ai-list {
  display: grid; gap: 22px;
  margin-top: 32px;
}
.ai-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 18px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.ai-item__num {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--grad-brand);
  display: grid; place-items: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  color: white;
}
.ai-item h4 { font-family: 'Poppins', sans-serif; font-size: 1.05rem; margin-bottom: 4px; }
.ai-item p { font-size: 0.92rem; }

.ai-visual {
  position: relative;
  display: grid; place-items: center;
}

/* ----- AI stage : cycling scenes ----- */
.ai-stage {
  position: relative;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 1 / 1.22;
  padding: 28px 28px 50px;
  background:
    radial-gradient(circle at 80% 0%, rgba(0, 212, 224, 0.10), transparent 50%),
    radial-gradient(circle at 10% 100%, rgba(200, 64, 166, 0.10), transparent 55%),
    linear-gradient(165deg, rgba(110, 63, 224, 0.10), rgba(10, 15, 31, 0.55));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.ai-stage__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.55;
  pointer-events: none;
}
.ai-stage__bg svg { width: 100%; height: 100%; }
.ai-stage__bg .ai-lines line {
  stroke: rgba(110, 63, 224, 0.55);
  stroke-width: 0.6;
  animation: ai-line-pulse 4s ease-in-out infinite;
}
.ai-stage__bg .ai-lines line:nth-child(2) { animation-delay: 0.5s; }
.ai-stage__bg .ai-lines line:nth-child(3) { animation-delay: 1s; }
.ai-stage__bg .ai-lines line:nth-child(4) { animation-delay: 1.5s; }
.ai-stage__bg .ai-lines line:nth-child(5) { animation-delay: 2s; }
.ai-stage__bg .ai-lines line:nth-child(6) { animation-delay: 2.5s; }
.ai-stage__bg .ai-nodes circle {
  fill: var(--cyan);
  filter: drop-shadow(0 0 6px var(--cyan));
  animation: ai-node-pulse 3s ease-in-out infinite;
}
.ai-stage__bg .ai-nodes circle:nth-child(2) { animation-delay: 0.4s; }
.ai-stage__bg .ai-nodes circle:nth-child(3) { animation-delay: 0.8s; }
.ai-stage__bg .ai-nodes circle:nth-child(4) { animation-delay: 1.2s; }
.ai-stage__bg .ai-nodes circle:nth-child(5) { animation-delay: 1.6s; }
.ai-stage__bg .ai-nodes circle:nth-child(6) { animation-delay: 2.0s; }
@keyframes ai-line-pulse {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.7; }
}
@keyframes ai-node-pulse {
  0%, 100% { opacity: 0.4; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.25); }
}

/* ----- Scenes container & cycle ----- */
.ai-scenes {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
}
.ai-scene {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
  opacity: 0;
  transform: translateY(14px);
  animation: ai-scene-cycle 20s ease-in-out infinite;
}
.ai-scene--1 { animation-delay: 0s; }
.ai-scene--2 { animation-delay: 6.67s; }
.ai-scene--3 { animation-delay: 13.33s; }

@keyframes ai-scene-cycle {
  0%   { opacity: 0; transform: translateY(14px); }
  4%   { opacity: 1; transform: translateY(0); }
  28%  { opacity: 1; transform: translateY(0); }
  33%  { opacity: 0; transform: translateY(-14px); }
  100% { opacity: 0; transform: translateY(-14px); }
}

.ai-scene__head {
  display: flex; align-items: center; gap: 14px;
}
.ai-scene__num {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: var(--grad-brand);
  display: grid; place-items: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(110, 63, 224, 0.4);
}
.ai-scene__title {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: white;
}
.ai-scene__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  min-height: 0;
}

/* ----- Chart grid (shared) ----- */
.ai-grid {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 0.8;
  stroke-dasharray: 2 4;
}

/* ===== Compare rows (Scenes 1 & 2) ===== */
.ai-compare {
  display: grid;
  grid-template-columns: 142px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.ai-compare--off {
  background: linear-gradient(120deg, rgba(255, 107, 61, 0.06), rgba(255, 77, 109, 0.05));
  border-color: rgba(255, 107, 61, 0.25);
}
.ai-compare--on {
  background: linear-gradient(120deg, rgba(0, 212, 224, 0.10), rgba(110, 63, 224, 0.10));
  border-color: rgba(0, 212, 224, 0.35);
  box-shadow: 0 8px 24px rgba(110, 63, 224, 0.15);
}
.ai-compare__side {
  display: flex; flex-direction: column; gap: 4px;
  min-width: 0;
}
.ai-compare__cost {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  margin-top: 2px;
}
.ai-compare__cost--bad {
  color: #ff8a5b;
  text-shadow: 0 0 12px rgba(255, 107, 61, 0.5);
}
.ai-compare__cost--good {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ai-compare__tag {
  font-family: 'Poppins', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 3px 9px;
  border-radius: 6px;
  align-self: flex-start;
  text-transform: uppercase;
}
.ai-compare__tag--off {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.ai-compare__tag--on {
  background: rgba(0, 212, 224, 0.18);
  color: var(--cyan);
  border: 1px solid rgba(0, 212, 224, 0.4);
}
.ai-compare__hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.3;
}
.ai-compare__hint b { color: white; font-weight: 600; }
.ai-compare__hint--on b {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ai-compare__chart {
  width: 100%;
  height: 56px;
}

/* ----- Lines & areas ----- */
.ai-line {
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ai-line--off {
  stroke: rgba(255, 255, 255, 0.28);
  stroke-width: 1.6;
}
.ai-line--on {
  stroke: var(--cyan);
  stroke-width: 2.4;
  filter: drop-shadow(0 0 4px rgba(0, 212, 224, 0.5));
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  animation: ai-line-draw-on 20s ease-in-out infinite;
}
.ai-scene--1 .ai-line--on { animation-delay: 0s; }
.ai-scene--2 .ai-line--on { animation-delay: 6.67s; }

@keyframes ai-line-draw-on {
  0%        { stroke-dashoffset: 420; }
  10%, 28%  { stroke-dashoffset: 0; }
  33%, 100% { stroke-dashoffset: 420; }
}

.ai-area--off { fill: rgba(255, 255, 255, 0.06); }
.ai-area--on {
  fill: rgba(0, 212, 224, 0.22);
  opacity: 0;
  animation: ai-area-in 20s ease-in-out infinite;
  animation-delay: 6.67s;
}
@keyframes ai-area-in {
  0%, 10%   { opacity: 0; }
  18%, 28%  { opacity: 1; }
  33%, 100% { opacity: 0; }
}

/* Scene 1 — "Sans FlowIoT" : cost explosion */
.ai-line--bad {
  fill: none;
  stroke: #ff6b3d;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(255, 107, 61, 0.5));
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  animation: ai-line-draw-bad 20s ease-in-out infinite;
}
@keyframes ai-line-draw-bad {
  0%        { stroke-dashoffset: 420; }
  14%, 28%  { stroke-dashoffset: 0; }
  33%, 100% { stroke-dashoffset: 420; }
}
.ai-area--bad {
  fill: rgba(255, 107, 61, 0.18);
  opacity: 0;
  animation: ai-area-in 20s ease-in-out infinite;
}
.ai-explosion {
  fill: #ffb079;
  filter: drop-shadow(0 0 14px #ff6b3d);
  transform-origin: center;
  transform-box: fill-box;
  opacity: 0;
  animation: ai-explosion-pop 20s ease-in-out infinite;
}
@keyframes ai-explosion-pop {
  0%, 22%  { opacity: 0; transform: scale(0.2); }
  26%      { opacity: 1; transform: scale(2.2); }
  30%      { opacity: 0.7; transform: scale(1.2); }
  34%, 100% { opacity: 0; transform: scale(0.2); }
}

/* Scene 1 — "Avec FlowIoT" : controlled cost area */
.ai-area--good {
  fill: rgba(0, 212, 224, 0.18);
  opacity: 0;
  animation: ai-area-in 20s ease-in-out infinite;
}

/* ----- Scene 1 alert pulse ----- */
.ai-pulse {
  fill: #ff4d6d;
  filter: drop-shadow(0 0 8px rgba(255, 77, 109, 0.9));
  transform-origin: center;
  transform-box: fill-box;
  opacity: 0;
  animation: ai-pulse-alert 20s ease-in-out infinite;
}
@keyframes ai-pulse-alert {
  0%, 14%  { opacity: 0; transform: scale(0.2); }
  18%      { opacity: 1; transform: scale(1.6); }
  22%      { opacity: 0.9; transform: scale(1); }
  26%      { opacity: 1; transform: scale(1.5); }
  30%      { opacity: 0.95; transform: scale(1); }
  34%, 100% { opacity: 0; transform: scale(0.2); }
}

.ai-scene__alert {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  background: rgba(255, 77, 109, 0.12);
  border: 1px solid rgba(255, 77, 109, 0.4);
  border-radius: 12px;
  font-size: 0.88rem;
  color: #ffd5dc;
}
.ai-scene__alert b {
  color: white;
  font-weight: 600;
}
.ai-scene__alert--saved {
  background: linear-gradient(120deg, rgba(95, 232, 158, 0.12), rgba(0, 212, 224, 0.12));
  border-color: rgba(95, 232, 158, 0.4);
  color: #d6f5e3;
}
.ai-scene__alert-icon {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(95, 232, 158, 0.25);
  display: grid; place-items: center;
  color: #5fe89e;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(95, 232, 158, 0.4);
}
.ai-scene__alert-icon svg { width: 14px; height: 14px; }
.ai-scene__alert-num {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-weight: 700;
}
.ai-scene__dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #ff4d6d;
  box-shadow: 0 0 12px #ff4d6d;
  animation: blink 1.1s ease-in-out infinite;
  flex-shrink: 0;
}

/* ----- Scene 2 optimization markers + metric ----- */
.ai-opt-mark {
  fill: var(--magenta);
  filter: drop-shadow(0 0 6px var(--magenta));
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: ai-mark-pop 20s ease-in-out infinite;
}
.ai-opt-mark--1 { animation-delay: 7.87s; }
.ai-opt-mark--2 { animation-delay: 8.27s; }
.ai-opt-mark--3 { animation-delay: 8.67s; }
@keyframes ai-mark-pop {
  0%, 4%   { opacity: 0; transform: scale(0); }
  8%       { opacity: 1; transform: scale(1.6); }
  12%, 28% { opacity: 1; transform: scale(1); }
  33%, 100% { opacity: 0; transform: scale(0); }
}

.ai-scene__metric-strip {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  background: linear-gradient(120deg, rgba(0, 212, 224, 0.12), rgba(110, 63, 224, 0.12));
  border: 1px solid rgba(0, 212, 224, 0.3);
  border-radius: 12px;
  font-size: 0.88rem;
  color: var(--text-soft);
}
.ai-scene__metric-strip b {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ai-scene__metric-icon {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: rgba(0, 212, 224, 0.18);
  display: grid; place-items: center;
  color: var(--cyan);
  flex-shrink: 0;
}
.ai-scene__metric-icon svg { width: 16px; height: 16px; }

/* ===== Scene 3 — model pills + lighting demo ===== */
.ai-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.ai-pill {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--text-soft);
  opacity: 0;
  transform: translateY(8px);
  animation: ai-pill-in 20s ease-in-out infinite;
}
.ai-pill:nth-child(1) { animation-delay: 13.43s; }
.ai-pill:nth-child(2) { animation-delay: 13.63s; }
.ai-pill:nth-child(3) { animation-delay: 13.83s; }
.ai-pill svg {
  width: 16px; height: 16px;
  color: var(--cyan);
  flex-shrink: 0;
}
.ai-pill--active {
  background: linear-gradient(120deg, rgba(0, 212, 224, 0.15), rgba(110, 63, 224, 0.15));
  border-color: rgba(0, 212, 224, 0.4);
  color: white;
}
.ai-pill--active svg { color: white; }
.ai-pill__check {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: rgba(95, 232, 158, 0.25);
  display: grid; place-items: center;
  color: #5fe89e;
  flex-shrink: 0;
}
.ai-pill__check svg { width: 9px; height: 9px; color: #5fe89e; }

@keyframes ai-pill-in {
  0%        { opacity: 0; transform: translateY(8px); }
  4%, 28%   { opacity: 1; transform: translateY(0); }
  33%, 100% { opacity: 0; transform: translateY(-6px); }
}

/* ----- Demo: lamppost + calendar ----- */
.ai-demo {
  padding: 14px 16px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex; flex-direction: column; gap: 10px;
  opacity: 0;
  transform: translateY(10px);
  animation: ai-demo-in 20s ease-in-out infinite;
  animation-delay: 13.73s;
}
@keyframes ai-demo-in {
  0%        { opacity: 0; transform: translateY(10px); }
  4%, 28%   { opacity: 1; transform: translateY(0); }
  33%, 100% { opacity: 0; transform: translateY(-6px); }
}
.ai-demo__title {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: white;
  letter-spacing: 0.01em;
}
.ai-demo__inner {
  display: grid;
  grid-template-columns: auto 30px 1fr;
  gap: 14px;
  align-items: center;
}
.ai-demo__arrow {
  width: 30px;
  color: var(--cyan);
  opacity: 0.7;
  animation: ai-arrow-pulse 2.5s ease-in-out infinite;
}
.ai-demo__arrow svg { width: 100%; height: auto; }
@keyframes ai-arrow-pulse {
  0%, 100% { opacity: 0.4; transform: translateX(-2px); }
  50%      { opacity: 1; transform: translateX(2px); }
}
.ai-demo__caption {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Lamppost */
.ai-lamp {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: 70px;
}
.ai-lamp__svg { width: 60px; height: 110px; flex-shrink: 0; overflow: visible; }
.ai-lamp__halo {
  fill: #ffd86b;
  opacity: 0.15;
  transform-origin: 30px 22px;
  transform-box: fill-box;
  filter: blur(2px);
  animation: ai-lamp-halo 5s ease-in-out infinite;
  animation-delay: 13.33s;
}
.ai-lamp__head {
  fill: #fff2b0;
  filter: drop-shadow(0 0 4px rgba(255, 216, 107, 0.6));
  animation: ai-lamp-head 5s ease-in-out infinite;
  animation-delay: 13.33s;
}
.ai-lamp__pole {
  stroke: rgba(255, 255, 255, 0.45);
  stroke-width: 2.5;
  stroke-linecap: round;
}
.ai-lamp__base {
  fill: rgba(255, 255, 255, 0.4);
}
@keyframes ai-lamp-halo {
  0%        { opacity: 0.05; transform: scale(0.55); }
  20%       { opacity: 0.55; transform: scale(1.35); }
  40%       { opacity: 0.30; transform: scale(0.95); }
  60%       { opacity: 0.42; transform: scale(1.15); }
  80%       { opacity: 0.18; transform: scale(0.75); }
  100%      { opacity: 0.05; transform: scale(0.55); }
}
@keyframes ai-lamp-head {
  0%   { opacity: 0.35; }
  20%  { opacity: 1; }
  40%  { opacity: 0.65; }
  60%  { opacity: 0.85; }
  80%  { opacity: 0.45; }
  100% { opacity: 0.35; }
}
.ai-lamp__bar {
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.ai-lamp__fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  width: 0%;
  animation: ai-lamp-bar 5s ease-in-out infinite;
  animation-delay: 13.33s;
}
@keyframes ai-lamp-bar {
  0%   { width: 5%; }
  20%  { width: 92%; }
  40%  { width: 50%; }
  60%  { width: 75%; }
  80%  { width: 30%; }
  100% { width: 5%; }
}

/* Calendar heatmap */
.ai-cal {
  display: flex; flex-direction: column; gap: 5px;
  min-width: 0;
}
.ai-cal__head {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-align: center;
}
.ai-cal__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: 1fr;
  gap: 3px;
}
.ai-cal__grid i {
  aspect-ratio: 1;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.05);
  opacity: 0;
  animation: ai-cal-cell-in 20s ease-in-out infinite;
}
.ai-cal__grid i[data-lvl="0"] { background: rgba(255, 255, 255, 0.05); }
.ai-cal__grid i[data-lvl="1"] { background: rgba(0, 212, 224, 0.20); }
.ai-cal__grid i[data-lvl="2"] { background: rgba(0, 212, 224, 0.55); }
.ai-cal__grid i[data-lvl="3"] {
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  box-shadow: 0 0 6px rgba(0, 212, 224, 0.5);
}
@keyframes ai-cal-cell-in {
  0%, 4%    { opacity: 0; transform: scale(0.6); }
  10%, 28%  { opacity: 1; transform: scale(1); }
  33%, 100% { opacity: 0; transform: scale(0.6); }
}
.ai-cal__grid i:nth-child(7n+1) { animation-delay: 13.43s; }
.ai-cal__grid i:nth-child(7n+2) { animation-delay: 13.48s; }
.ai-cal__grid i:nth-child(7n+3) { animation-delay: 13.53s; }
.ai-cal__grid i:nth-child(7n+4) { animation-delay: 13.58s; }
.ai-cal__grid i:nth-child(7n+5) { animation-delay: 13.63s; }
.ai-cal__grid i:nth-child(7n+6) { animation-delay: 13.68s; }
.ai-cal__grid i:nth-child(7n+7) { animation-delay: 13.73s; }

/* ----- Progress dots ----- */
.ai-stage__dots {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 8px;
  z-index: 2;
}
.ai-stage__dot {
  width: 28px; height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
}
.ai-stage__dot::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-brand);
  transform: scaleX(0);
  transform-origin: left;
  animation: ai-dot-fill 20s linear infinite;
}
/* Delays use CSS var so JS can resync by changing --ai-offset */
.ai-stage__dot:nth-child(1)::after { animation-delay: calc(0s    - var(--ai-offset, 0s)); }
.ai-stage__dot:nth-child(2)::after { animation-delay: calc(6.67s  - var(--ai-offset, 0s)); }
.ai-stage__dot:nth-child(3)::after { animation-delay: calc(13.33s - var(--ai-offset, 0s)); }
@keyframes ai-dot-fill {
  0%      { transform: scaleX(0); }
  33.33%  { transform: scaleX(1); }
  33.34%, 100% { transform: scaleX(0); }
}

/* ----- Clickable dot navigation ----- */
.ai-stage__dot { cursor: pointer; }
.ai-stage--restarting .ai-stage__dot::after { animation-name: none !important; }

@media (max-width: 980px) {
  .ai-stage { max-width: 460px; aspect-ratio: 1 / 1.3; }
}
@media (max-width: 520px) {
  .ai-stage { padding: 22px 18px 46px; aspect-ratio: 1 / 1.4; }
  .ai-scene__title { font-size: 0.95rem; }
  .ai-scene { gap: 14px; }
  .ai-scene__body { gap: 12px; }
  .ai-compare { grid-template-columns: 110px 1fr; gap: 10px; padding: 9px 10px; }
  .ai-compare__chart { height: 48px; }
  .ai-compare__hint { font-size: 0.72rem; }
  .ai-compare__tag { font-size: 0.62rem; padding: 2px 6px; }
  .ai-compare__cost { font-size: 0.88rem; }
  .ai-scene__alert,
  .ai-scene__metric-strip { font-size: 0.8rem; padding: 9px 12px; }
  .ai-pill { font-size: 0.72rem; padding: 6px 8px; gap: 4px; }
  .ai-pill svg { width: 14px; height: 14px; }
  .ai-pill__check { display: none; }
  .ai-demo { padding: 12px 12px 14px; }
  .ai-demo__inner { grid-template-columns: 64px 22px 1fr; gap: 10px; }
  .ai-lamp { width: 64px; }
  .ai-lamp__svg { width: 52px; height: 90px; }
  .ai-demo__caption { font-size: 0.72rem; }
}

/* ===== Steps timeline ===== */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}
.steps::before {
  content: '';
  position: absolute;
  top: 30px; left: 5%; right: 5%;
  height: 2px;
  background: var(--grad-brand);
  opacity: 0.4;
  z-index: 0;
}
@media (max-width: 980px) {
  .steps { grid-template-columns: 1fr;gap: 48px; }
  .steps::before { display: none; }
}
.step {
  position: relative;
}
.step__num {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--bg-deep);
  border: 2px solid var(--cyan);
  display: grid; place-items: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--cyan);
  margin-bottom: 22px;
  box-shadow: 0 0 30px rgba(0, 212, 224, 0.4);
  position: relative;
  z-index: 1;
}
.step h4 { font-family: 'Poppins', sans-serif; font-size: 1.1rem; margin-bottom: 10px; }
.step p { font-size: 0.92rem; }

@media (max-width: 980px) {
  .step { 
    display: flex;
    gap: 20px;
    align-items: center;
    border-radius: 12px; 
  }
  .step__num {
    aspect-ratio: 1 / 1;
  }
}

/* ===== CTA banner ===== */
.cta {
  position: relative;
  padding: clamp(60px, 10vw, 110px) clamp(28px, 6vw, 80px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(800px 400px at 0% 0%, rgba(0, 212, 224, 0.30), transparent 60%),
    radial-gradient(700px 350px at 100% 100%, rgba(200, 64, 166, 0.30), transparent 60%),
    linear-gradient(135deg, rgba(110, 63, 224, 0.20), rgba(31, 224, 163, 0.10));
  border: 1px solid var(--border-strong);
  text-align: center;
  overflow: hidden;
}
.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black, transparent 80%);
  pointer-events: none;
}
.cta > * { position: relative; }
.cta h2 { margin: 18px 0 16px; }
.cta p { max-width: 620px; margin: 0 auto 36px; font-size: 1.1rem; }
.cta__actions { display: inline-flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* ===== Form (inline) ===== */
.demo-form {
  display: grid; gap: 14px;
  max-width: 520px;
  margin: 30px auto 0;
  text-align: left;
}
.demo-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 560px) { .demo-form__row { grid-template-columns: 1fr; } }
.demo-form input,
.demo-form select,
.demo-form textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  background: rgba(10, 15, 31, 0.65);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all .25s var(--ease);
}
.demo-form input:focus,
.demo-form select:focus,
.demo-form textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(0, 212, 224, 0.16);
}
.demo-form textarea { min-height: 100px; resize: vertical; }
.demo-form button { justify-content: center; margin-top: 6px; }
.demo-form__msg {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  display: none;
}
.demo-form__msg.show { display: block; }
.demo-form__msg.success {
  background: rgba(31, 224, 163, 0.10);
  border: 1px solid rgba(31, 224, 163, 0.3);
  color: var(--emerald);
}
.demo-form__msg.error {
  background: rgba(255, 100, 120, 0.10);
  border: 1px solid rgba(255, 100, 120, 0.3);
  color: #ff7a8d;
}

/* ===== Footer ===== */
.footer {
  padding: 60px 0 30px;
  border-top: 1px solid var(--border);
  margin-top: 80px;
}
.footer__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 760px) { .footer__top { grid-template-columns: 1fr; } }

.footer__brand p {
  font-size: 0.92rem;
  max-width: 360px;
  margin-top: 18px;
}
.footer__col h5 {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.footer__col ul { list-style: none; display: grid; gap: 10px; }
.footer__col a {
  font-size: 0.92rem;
  color: var(--text-soft);
  transition: color .25s var(--ease);
}
.footer__col a:hover { color: var(--cyan); }

.footer__bottom {
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.footer__by {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.footer__by strong { color: var(--text-soft); font-weight: 500; }

/* ===== Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all .9s var(--ease);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ============================
   PRICING — 4 plans + tunnel
   ============================ */

.funnel {
  text-align: center;
  margin-bottom: 60px;
}
.funnel__steps {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 28px;
  padding: 12px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 99px;
  backdrop-filter: blur(8px);
  font-size: 0.9rem;
}
.funnel__steps b {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: var(--text);
}
.funnel__steps .arrow {
  width: 18px; height: 2px;
  position: relative;
  background: var(--text-muted);
  opacity: 0.5;
}
.funnel__steps .arrow::after {
  content: '';
  position: absolute;
  right: -1px; top: -3px;
  border: 4px solid transparent;
  border-left-color: var(--text-muted);
  opacity: 0.7;
}
@media (max-width: 1100px) { .funnel__steps { display: none; } }

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

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 36px 28px 30px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all .35s var(--ease);
  overflow: hidden;
}
.plan:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.05);
}

/* — Bronze — */
.plan--bronze .plan__tier {
  background: linear-gradient(135deg, #B07A4A, #E8C29A);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* — Silver — */
.plan--silver .plan__tier {
  background: linear-gradient(135deg, #B0B6C4, #E8ECF2);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* — Gold (Recommended) — */
.plan--gold {
  border-color: rgba(255, 200, 90, 0.5);
  background: linear-gradient(160deg, rgba(255, 200, 90, 0.08), rgba(110, 63, 224, 0.06));
  transform: scale(1.04);
  z-index: 2;
}
.plan--gold:hover { transform: scale(1.04) translateY(-6px); }
.plan--gold .plan__tier {
  background: linear-gradient(135deg, #FFD27A, #FFB13C);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
@media (max-width: 1100px) {
  .plan--gold { transform: none; }
  .plan--gold:hover { transform: translateY(-6px); }
}

/* — Platinum (IA) — */
.plan--platinum {
  border: 1px solid transparent;
  background:
    linear-gradient(rgba(14, 21, 48, 1), rgba(14, 21, 48, 1)) padding-box,
    var(--grad-brand) border-box;
}
.plan--platinum::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-soft);
  opacity: 0.5;
  pointer-events: none;
}
.plan--platinum > * { position: relative; z-index: 1; }
.plan--platinum .plan__tier {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.plan__badge {
  position: absolute;
  top: 18px; right: 18px;
  padding: 5px 12px;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  border-radius: 99px;
}
.plan__badge--popular {
  background: linear-gradient(135deg, #FFD27A, #FFB13C);
  color: #2A1A00;
  box-shadow: 0 8px 20px rgba(255, 177, 60, 0.40);
}
.plan__badge--ai {
  background: var(--grad-brand);
  color: white;
  box-shadow: 0 8px 20px rgba(110, 63, 224, 0.40);
}

.plan__tier {
  font-family: 'Poppins', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.plan__name {
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.plan__price {
  display: flex; align-items: baseline; gap: 6px;
  margin: 16px 0 8px;
}
.plan__price .num {
  font-family: 'Poppins', sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.plan__price .num--free {
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.plan__price .unit {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.plan__sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  min-height: 1.6em;
  margin-bottom: 22px;
}
.plan__cta {
  width: 100%;
  justify-content: center;
  margin-bottom: 24px;
}
.plan__divider {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--border);
}
.plan ul.plan__features {
  list-style: none;
  display: grid;
  gap: 12px;
  margin-bottom: 0;
  flex: 1;
}
.plan ul.plan__features li {
  position: relative;
  padding-left: 28px;
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.45;
}
.plan ul.plan__features li::before {
  content: '';
  position: absolute;
  left: 0; top: 4px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(31, 224, 163, 0.14);
  border: 1px solid rgba(31, 224, 163, 0.4);
}
.plan ul.plan__features li::after {
  content: '';
  position: absolute;
  left: 6px; top: 7px;
  width: 5px; height: 9px;
  border: solid var(--emerald);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
/* "off" features (greyed) */
.plan ul.plan__features li.off {
  color: var(--text-muted);
  opacity: 0.55;
}
.plan ul.plan__features li.off::before {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
}
.plan ul.plan__features li.off::after {
  border: none;
  width: 8px; height: 1.5px;
  background: var(--text-muted);
  transform: none;
  top: 12px; left: 5px;
  border-radius: 2px;
}
.plan ul.plan__features li b {
  color: var(--text);
  font-weight: 600;
}

/* Comparison */
.pricing-foot {
  text-align: center;
  margin-top: 50px;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.pricing-foot a {
  color: var(--cyan);
  font-weight: 500;
  border-bottom: 1px dashed currentColor;
}
.pricing-foot a:hover { color: var(--magenta); }

/* ===== Comparative table ===== */
.compare-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin-top: 60px;
}

.compare {
  min-width: 740px;
}

.compare__row,
.compare__row--head {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1fr 1fr;
  border-bottom: 1px solid var(--border);
}

.compare__row:last-of-type { border-bottom: none; }

/* Header */
.compare__row--head {
  background: rgba(255,255,255,0.025);
  border-bottom: 1px solid var(--border-strong);
}

/* Header columns */
.compare__plan-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: end;
  text-align: center;
  padding: 28px 12px 22px;
  gap: 5px;
  border-right: 1px solid var(--border);
}
.compare__plan-col:last-child { border-right: none; }

/* Tier badges (Bronze / Silver / Gold / Platinum) */
.compare__plan--bronze .plan__tier {
  background: linear-gradient(135deg, #B07A4A, #E8C29A);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.compare__plan--silver .plan__tier {
  background: linear-gradient(135deg, #B0B6C4, #E8ECF2);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.compare__plan--gold .plan__tier {
  background: linear-gradient(135deg, #FFD27A, #FFB13C);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.compare__plan--platinum .plan__tier {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Plan name in header */
.compare__plan-name {
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

/* Price in the header */
.compare__price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 4px 0 10px;
}
.compare__price .num {
  font-family: 'Poppins', sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
}
.compare__price .unit {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.3;
}

/* "Popular" "IA" Badges */
.compare__badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}
.compare__badge--popular {
  background: linear-gradient(135deg, #FFD27A, #FFB13C);
  color: #2A1A00;
}
.compare__badge--ai {
  background: var(--grad-brand);
  color: white;
}

/* Professional column — continuous golden shade */
.compare__plan--professional,
.compare__val--gold {
  background: linear-gradient(180deg, rgba(255,200,90,0.09) 0%, rgba(110,63,224,0.05) 100%);
}

/* Feature label */
.compare__feat {
  padding: 13px 18px;
  font-size: 0.84rem;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  border-right: 1px solid var(--border-strong);
}
.compare__feat:empty { border-right: none; }

/* Value cell */
.compare__val {
  padding: 13px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  border-right: 1px solid var(--border);
}
.compare__val:last-child { border-right: none; }

.compare__val b {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

/* ∞ infinite */
.compare__inf {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--cyan);
  line-height: 1;
}

/* ✓ present */
.compare__val--yes {
  color: var(--emerald);
  font-size: 1.05rem;
  font-weight: 700;
}

/* — missing */
.compare__val--no {
  color: var(--text-muted);
  opacity: 0.35;
}

/* Short text value */
.compare__val--txt {
  font-size: 0.76rem;
  font-family: inherit;
  color: var(--text-muted);
  text-align: center;
  font-weight: 500;
}

/* Section separator */
.compare__section {
  padding: 9px 18px;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(255,255,255,0.025);
  border-bottom: 1px solid var(--border);
}

/* CTA in the header */
.compare__plan-col .plan__cta {
  width: 100%;
  justify-content: center;
}

/* Plan selection select (hidden on desktop, visible on mobile) */
.compare-select-wrap {
  display: none;
  justify-content: center;
  margin-top: 32px;
  margin-bottom: 4px;
}

.compare-select {
  appearance: none;
  -webkit-appearance: none;
  padding: 11px 44px 11px 18px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2300D4E0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 14px center,
    rgba(10, 15, 31, 0.65);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--cyan);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  min-width: 200px;
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}

.compare-select:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(0, 212, 224, 0.16);
}

.compare-select option {
  background: #0E1530;
  color: var(--text);
  font-weight: 500;
}

@media (max-width: 800px) {
  .compare-wrap { border-radius: 12px; }
  .compare__feat { font-size: 0.78rem; padding: 11px 12px; }
  .compare__val { padding: 11px 6px; }
}

/* ===== Responsive : one column at a time ===== */
@media (max-width: 700px) {
  /* Show select */
  .compare-select-wrap { display: flex; }

  /* Disable horizontal scrolling of the table */
  .compare-wrap { overflow-x: hidden; }
  .compare { min-width: 0; }

  /* Grid : column label + 1 column plan */
  .compare__row,
  .compare__row--head {
    grid-template-columns: 1.7fr 1fr;
  }

  /* Hide all plan columns in the header */
  .compare__plan-col { display: none; }

  /* Show only the active column */
  .compare[data-active="discover"]     .compare__plan--discover     { display: flex; }
  .compare[data-active="essential"]    .compare__plan--essential    { display: flex; }
  .compare[data-active="professional"] .compare__plan--professional { display: flex; }
  .compare[data-active="enterprise"]   .compare__plan--enterprise   { display: flex; }

  /* Hide all value cells */
  .compare__val { display: none; }

  /* Show only the values of the active plan */
  .compare[data-active="discover"]     .compare__val[data-plan="discover"]     { display: flex; }
  .compare[data-active="essential"]    .compare__val[data-plan="essential"]    { display: flex; }
  .compare[data-active="professional"] .compare__val[data-plan="professional"] { display: flex; }
  .compare[data-active="enterprise"]   .compare__val[data-plan="enterprise"]   { display: flex; }

  /* Visual adjustments */
  .compare__plan-col { padding: 20px 10px 16px; }
  .compare__feat { padding: 10px 12px; }
  .compare__val { padding: 10px 8px; }
}
