/* =========================================================
   Limovia — Design System (dark default / light toggle)
   ========================================================= */

:root {
  /* -- dark theme (default) -- */
  --bg: #04060d;
  --bg-alt: #070b16;
  --surface: #0b1020;
  --surface-2: #0e1428;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --border-hover: rgba(61, 139, 255, 0.5);
  --shadow-color: rgba(0, 0, 0, 0.5);
  --shadow-color-soft: rgba(0, 0, 0, 0.28);

  --navy: #0d1b4b;
  --blue: #2f6bff;
  --blue-light: #5b8fff;
  --accent: #00c2ff;
  --accent-rgb: 0, 194, 255;

  --white: #ffffff;
  --text: #eef1fa;
  --text-dim: #9aa4c2;
  --text-faint: #6b7590;

  --noise-opacity: 0.03;
  --particle-opacity: 0.75;
  --glow-1: rgba(47, 107, 255, 0.35);
  --glow-2: rgba(0, 194, 255, 0.08);
  --glow-3: rgba(47, 107, 255, 0.25);

  --warn-bg: linear-gradient(135deg, rgba(255, 209, 61, 0.08), rgba(255, 209, 61, 0.02));
  --warn-border: rgba(255, 209, 61, 0.3);
  --warn-icon-bg: rgba(255, 209, 61, 0.14);
  --warn-icon-border: rgba(255, 209, 61, 0.35);
  --warn-icon-color: #ffd93d;
  --warn-box-bg: rgba(255, 209, 61, 0.06);
  --warn-box-border: rgba(255, 209, 61, 0.25);
  --warn-box-accent: #ffd93d;
  --warn-box-text: #e7d5a0;

  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-full: 999px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', var(--font-sans);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);

  --nav-h: 84px;

  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f3f5fb;
  --bg-alt: #eaeffa;
  --surface: #ffffff;
  --surface-2: #f4f6fc;
  --border: rgba(13, 27, 75, 0.09);
  --border-strong: rgba(13, 27, 75, 0.16);
  --border-hover: rgba(47, 107, 255, 0.4);
  --shadow-color: rgba(21, 34, 79, 0.14);
  --shadow-color-soft: rgba(21, 34, 79, 0.08);

  --blue-light: #2f5fd9;
  --accent: #1450c9;
  --accent-rgb: 20, 80, 201;

  --white: #0b1020;
  --text: #0d1330;
  --text-dim: #4c5674;
  --text-faint: #838da8;

  --noise-opacity: 0.02;
  --particle-opacity: 0.68;
  --glow-1: rgba(37, 99, 235, 0.24);
  --glow-2: rgba(10, 130, 255, 0.12);
  --glow-3: rgba(37, 99, 235, 0.16);

  --warn-bg: linear-gradient(135deg, rgba(220, 38, 38, 0.08), rgba(220, 38, 38, 0.02));
  --warn-border: rgba(220, 38, 38, 0.3);
  --warn-icon-bg: rgba(220, 38, 38, 0.14);
  --warn-icon-border: rgba(220, 38, 38, 0.35);
  --warn-icon-color: #dc2626;
  --warn-box-bg: rgba(13, 27, 75, 0.04);
  --warn-box-border: rgba(13, 27, 75, 0.14);
  --warn-box-accent: var(--accent);
  --warn-box-text: var(--text-dim);

  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
  transition: background-color 0.5s ease, color 0.5s ease;
}

/* ---- content protection ---- */
html, body {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
input, textarea {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}

::selection { background: var(--blue); color: #fff; }

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; background: none; border: none; }
svg { display: block; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--blue); }

.icon { width: 22px; height: 22px; flex-shrink: 0; stroke: currentColor; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 28px; height: 28px; }

/* =========== SCROLL PROGRESS =========== */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1001;
  background: var(--border);
  transform-origin: left;
}
.scroll-progress::after {
  content: '';
  display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--blue), var(--accent));
  transform: scaleX(var(--progress, 0));
  transform-origin: left;
  transition: transform 0.1s linear;
}

/* =========== BACKGROUND LAYERS =========== */
#particles-canvas {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
  opacity: var(--particle-opacity);
  transition: opacity 0.6s ease;
}
.noise {
  position: fixed; inset: 0; z-index: 1;
  pointer-events: none;
  opacity: var(--noise-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, nav, footer { position: relative; z-index: 2; }

/* =========== LAYOUT HELPERS =========== */
.container { max-width: 1120px; margin: 0 auto; padding: 0 40px; }
.section { padding: clamp(64px, 9vw, 116px) 0; position: relative; }
.section-alt::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 0%, var(--bg-alt) 50%, transparent 100%);
  z-index: -1;
}
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(47, 107, 255, 0.1);
  border: 1px solid rgba(47, 107, 255, 0.3);
  color: var(--accent);
  font-size: 12px; font-weight: 700;
  padding: 7px 16px; border-radius: var(--radius-full);
  margin-bottom: 22px;
  text-transform: uppercase; letter-spacing: 1.2px;
  transition: border-color 0.4s, background-color 0.4s, color 0.4s;
}
.tag::before {
  content: ''; width: 6px; height: 6px;
  background: var(--accent); border-radius: 50%;
  box-shadow: 0 0 8px var(--accent);
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.4vw, 46px);
  font-weight: 700; line-height: 1.16;
  margin-bottom: 18px; letter-spacing: -0.5px;
  color: var(--white);
}
h3 { font-family: var(--font-display); }

.subtitle { font-size: 17px; color: var(--text-dim); line-height: 1.75; max-width: 600px; }

/* =========== BUTTONS =========== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 32px; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 700; border: none; cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.4s;
  white-space: nowrap;
}
.btn .icon { width: 17px; height: 17px; transition: transform 0.3s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn-primary {
  background: linear-gradient(135deg, var(--blue) 0%, var(--accent) 100%);
  color: #fff;
  box-shadow: 0 4px 24px rgba(47, 107, 255, 0.35);
}
.btn-primary:hover { box-shadow: 0 10px 34px rgba(47, 107, 255, 0.5); }
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover { border-color: var(--border-hover); background: rgba(47, 107, 255, 0.08); }
.btn-sm { padding: 11px 20px; font-size: 13px; }

/* =========== THEME TOGGLE (JS-injected) =========== */
.theme-toggle {
  position: fixed; bottom: 28px; left: 28px; z-index: 9999;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 26px var(--shadow-color-soft);
  transition: background-color 0.4s, border-color 0.4s, transform 0.25s var(--ease);
}
.theme-toggle:hover { transform: translateY(-3px); border-color: var(--border-hover); }
.theme-toggle svg {
  position: absolute; width: 22px; height: 22px; color: var(--accent);
  transition: opacity 0.4s ease, transform 0.5s var(--ease);
}
.theme-toggle .icon-sun { opacity: 1; transform: rotate(0) scale(1); }
.theme-toggle .icon-moon { opacity: 0; transform: rotate(-70deg) scale(0.4); }
:root[data-theme="light"] .theme-toggle .icon-sun { opacity: 0; transform: rotate(70deg) scale(0.4); }
:root[data-theme="light"] .theme-toggle .icon-moon { opacity: 1; transform: rotate(0) scale(1); }

/* =========== NAV =========== */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: height 0.35s var(--ease), background-color 0.35s var(--ease), border-color 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}
#nav.scrolled {
  height: 68px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.logo {
  font-family: var(--font-display);
  font-size: 21px; font-weight: 700; letter-spacing: -0.3px;
  color: var(--white);
  display: flex; align-items: center; gap: 9px;
}
.logo::before {
  content: '';
  width: 10px; height: 10px; border-radius: 3px;
  background: linear-gradient(135deg, var(--blue), var(--accent));
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.7);
}
.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--text-dim);
  transition: color 0.2s; position: relative; padding: 4px 0;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: right;
  transition: transform 0.3s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); transform-origin: left; }
.nav-cta { flex-shrink: 0; }

.hamburger {
  display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px; cursor: pointer;
  width: 44px; height: 44px; padding: 0; z-index: 1201; position: relative;
}
.hamburger span { display: block; width: 22px; height: 2px; background: var(--white); border-radius: 2px; transition: all 0.3s var(--ease); }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-dropdown {
  position: fixed; inset: 0; z-index: 1200;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s, background-color 0.4s;
}
.nav-dropdown.open { opacity: 1; visibility: visible; }
.nav-dropdown a {
  font-family: var(--font-display);
  font-size: clamp(26px, 7vw, 38px); font-weight: 600; color: var(--text);
  padding: 14px 0;
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), color 0.2s;
}
.nav-dropdown.open a { opacity: 1; transform: translateY(0); }
.nav-dropdown.open a:nth-child(1) { transition-delay: 0.08s; }
.nav-dropdown.open a:nth-child(2) { transition-delay: 0.14s; }
.nav-dropdown.open a:nth-child(3) { transition-delay: 0.2s; }
.nav-dropdown.open a:nth-child(4) { transition-delay: 0.26s; }
.nav-dropdown.open a:nth-child(5) { transition-delay: 0.32s; }
.nav-dropdown a:hover { color: var(--accent); }
.dropdown-cta {
  margin-top: 22px !important;
  background: linear-gradient(135deg, var(--blue), var(--accent));
  color: #fff !important; font-size: 16px !important; font-weight: 700 !important;
  padding: 15px 34px !important; border-radius: var(--radius-sm);
}

/* =========== HERO =========== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + 48px) 40px 28px;
  overflow: hidden;
}
.hero-glow {
  position: absolute; top: -20%; left: 50%; transform: translateX(-50%);
  width: 900px; height: 700px;
  background: radial-gradient(circle, var(--glow-1) 0%, var(--glow-2) 45%, transparent 70%);
  filter: blur(40px); z-index: 0; pointer-events: none;
  transition: background 0.5s;
}
.hero-content { position: relative; z-index: 2; max-width: 900px; }

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(47, 107, 255, 0.12);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  color: var(--accent);
  padding: 8px 20px; border-radius: var(--radius-full);
  font-size: 13px; font-weight: 600; margin-bottom: 30px;
  letter-spacing: 0.3px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 6.4vw, 72px);
  font-weight: 700; line-height: 1.1;
  letter-spacing: -1.8px;
  margin: 0 auto 26px;
  color: var(--white);
}
.word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.word-inner { display: inline-block; transform: translateY(115%); will-change: transform; }
.hero h1 .typewrap {
  display: inline-block;
  background: linear-gradient(135deg, var(--blue-light) 0%, var(--accent) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-sub {
  font-size: 18px; color: var(--text-dim);
  max-width: 600px; margin: 0 auto 44px; line-height: 1.75;
}
.cta-group { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }

.scroll-cue {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: var(--text-faint); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
  position: relative; z-index: 2;
}
.scroll-cue .line { width: 1px; height: 34px; background: linear-gradient(var(--accent), transparent); position: relative; overflow: hidden; }

/* =========== FLOATING STATS =========== */
.stats-float {
  position: relative; z-index: 5;
  margin-top: -86px;
  padding: 0 40px 0;
}
.stats-inner {
  max-width: 1000px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px 20px;
  box-shadow: 0 30px 70px var(--shadow-color);
  backdrop-filter: blur(20px);
  transition: background-color 0.4s, border-color 0.4s;
}
.stat { text-align: center; position: relative; }
.stat:not(:last-child)::after {
  content: ''; position: absolute; right: -10px; top: 50%; transform: translateY(-50%);
  width: 1px; height: 40px; background: var(--border);
}
.stat-number {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 38px); font-weight: 700;
  background: linear-gradient(135deg, var(--white), var(--accent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.stat-label { font-size: 12.5px; color: var(--text-faint); margin-top: 6px; letter-spacing: 0.2px; }

/* =========== CARDS (spotlight + tilt) =========== */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  overflow: hidden;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background-color 0.4s;
  transform-style: preserve-3d;
}
.card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(47, 107, 255, 0.16), transparent 70%);
  opacity: 0; transition: opacity 0.4s;
  pointer-events: none;
}
.card:hover { border-color: var(--border-hover); box-shadow: 0 20px 50px var(--shadow-color); }
.card:hover::before { opacity: 1; }
.card .icon-wrap {
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  background: rgba(47, 107, 255, 0.1); border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 18px; color: var(--accent);
  transition: border-color 0.3s, background-color 0.4s;
}
.card h3 { font-size: 16px; font-weight: 600; color: var(--white); margin-bottom: 9px; letter-spacing: -0.1px; }
.card p { font-size: 14px; color: var(--text-dim); line-height: 1.65; }

/* -- bento grid (deliverables) -- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(150px, auto);
  grid-auto-flow: dense;
  gap: 18px;
}
.bento-grid .card.feature { grid-column: span 2; grid-row: span 2; padding: 36px 32px; display: flex; flex-direction: column; justify-content: center; }
.bento-grid .card.feature h3 { font-size: 22px; margin-bottom: 12px; }
.bento-grid .card.feature p { font-size: 15px; }
.bento-grid .card.wide { grid-column: span 2; }
.bento-grid .card:not(.feature):not(.wide) { grid-column: span 1; }

.delivery-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, rgba(47, 107, 255, 0.15), rgba(var(--accent-rgb), 0.08));
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  color: var(--white);
  padding: 12px 24px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; margin-top: 40px;
}

/* -- numbered capability cards (legacy, unused) -- */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.cap-card { position: relative; }
.cap-card::after {
  content: attr(data-num);
  position: absolute; top: 20px; right: 24px;
  font-family: var(--font-display);
  font-size: 34px; font-weight: 700;
  color: var(--text);
  opacity: 0.06;
  letter-spacing: -1px;
}

/* -- capacités list (lighter, fewer boxes) -- */
.cap-list { display: flex; flex-direction: column; }
.cap-row {
  display: flex; align-items: flex-start; gap: 22px;
  padding: 24px 4px;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.3s var(--ease);
}
.cap-row:last-child { border-bottom: none; }
.cap-row:hover { border-color: var(--border-strong); }
.cap-row .cap-row-num {
  flex-shrink: 0; width: 30px; padding-top: 14px;
  font-family: var(--font-display); font-size: 13px; font-weight: 700;
  color: var(--text-faint); letter-spacing: 0.5px;
}
.cap-row .icon-wrap { flex-shrink: 0; margin-bottom: 0; }
.cap-row-content { flex: 1; min-width: 0; }
.cap-row-content h3 { font-size: 16px; font-weight: 600; color: var(--white); margin-bottom: 7px; letter-spacing: -0.1px; }
.cap-row-content p { font-size: 14px; color: var(--text-dim); line-height: 1.65; max-width: 620px; }

/* =========== PROMISE QUOTE =========== */
.promise-wrap { display: flex; gap: 44px; align-items: center; flex-wrap: wrap; }
.promise-num {
  font-family: var(--font-display);
  font-size: clamp(90px, 13vw, 170px); font-weight: 700; line-height: 0.8;
  background: linear-gradient(160deg, var(--blue-light), var(--accent) 60%, transparent);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  opacity: 0.9; flex-shrink: 0;
}
.promise-box {
  position: relative; flex: 1; min-width: 280px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 40px 44px;
  transition: background-color 0.4s, border-color 0.4s;
}
.promise-box p {
  font-size: clamp(19px, 2.2vw, 23px); line-height: 1.6; color: var(--white);
  font-weight: 500;
}

/* =========== DEMO CHAT =========== */
.demo-section { display: flex; gap: 52px; align-items: center; flex-wrap: wrap; }
.demo-text { flex: 1; min-width: 280px; }
.demo-visual { flex: 1; min-width: 320px; display: flex; justify-content: center; }
.check-list { margin-top: 28px; display: flex; flex-direction: column; gap: 14px; }
.check-list div { display: flex; align-items: center; gap: 12px; font-size: 14.5px; color: var(--text-dim); }
.check-list .icon-wrap { width: 26px; height: 26px; margin-bottom: 0; border-radius: 8px; }
.check-list .icon-wrap .icon { width: 14px; height: 14px; }

.chat-window {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  max-width: 380px; width: 100%;
  box-shadow: 0 30px 70px var(--shadow-color), 0 0 0 1px rgba(255, 255, 255, 0.02);
  transition: background-color 0.4s, border-color 0.4s;
}
.chat-header { background: linear-gradient(135deg, var(--navy), #142354); padding: 16px 20px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); }
.chat-header .dots { position: absolute; }
.chat-header .av { width: 36px; height: 36px; background: linear-gradient(135deg, var(--blue), var(--accent)); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; }
.chat-header .av .icon { width: 18px; height: 18px; }
.chat-header .name { color: #fff; font-weight: 700; font-size: 14px; }
.chat-header .status { color: #6ee2ff; font-size: 12px; display: flex; align-items: center; gap: 5px; }
.chat-header .status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #37e08c; box-shadow: 0 0 6px #37e08c; }
#chat-messages { padding: 20px; height: 300px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; overflow-x: hidden; }
.chat-input-bar { padding: 13px 16px; border-top: 1px solid var(--border); display: flex; gap: 8px; }
.chat-input-fake { flex: 1; background: var(--surface-2); border-radius: var(--radius-full); padding: 10px 16px; font-size: 13px; color: var(--text-faint); transition: background-color 0.4s; }
.chat-send { width: 36px; height: 36px; background: var(--blue); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.chat-send .icon { width: 15px; height: 15px; }

.msg-client { align-self: flex-end; background: linear-gradient(135deg, var(--blue), #1d54d6); color: #fff; padding: 11px 15px; border-radius: 16px 16px 4px 16px; font-size: 13.5px; max-width: 78%; line-height: 1.55; }
.msg-agent { align-self: flex-start; background: var(--surface-2); color: var(--text); padding: 11px 15px; border-radius: 16px 16px 16px 4px; font-size: 13.5px; max-width: 78%; line-height: 1.55; border: 1px solid var(--border); transition: background-color 0.4s, border-color 0.4s; }
.msg-typing { align-self: flex-start; background: var(--surface-2); padding: 11px 15px; border-radius: 16px; display: flex; gap: 4px; align-items: center; border: 1px solid var(--border); }
.msg-action { align-self: stretch; background: rgba(var(--accent-rgb), 0.06); border: 1px solid rgba(var(--accent-rgb), 0.25); border-radius: 10px; padding: 11px 15px; font-size: 12px; color: var(--text-dim); display: flex; flex-direction: column; gap: 7px; }
.msg-action .action-step { display: flex; align-items: center; gap: 8px; opacity: 0; transition: opacity 0.3s; }
.msg-action .action-step.visible { opacity: 1; }
.msg-action .action-step .icon { width: 13px; height: 13px; color: var(--accent); flex-shrink: 0; }
.dot { width: 7px; height: 7px; background: var(--text-faint); border-radius: 50%; animation: bounce 1.2s infinite; }
.dot:nth-child(2) { animation-delay: 0.2s; } .dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-6px); } }
.msg-hidden { opacity: 0; transform: translateY(8px); transition: opacity 0.3s, transform 0.3s; }
.msg-visible { opacity: 1; transform: translateY(0); }

/* =========== MARQUEE (channels) =========== */
.marquee {
  overflow: hidden; width: 100%;
  margin-top: 36px;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}
.marquee-track {
  display: flex; gap: 18px; width: max-content;
  animation: marquee 32s linear infinite;
  will-change: transform;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.channel-chip {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px 26px;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), background-color 0.4s;
  flex-shrink: 0;
}
.channel-chip:hover { border-color: var(--border-hover); transform: translateY(-4px); }
.channel-chip .icon-wrap { margin-bottom: 0; }
.channel-chip .icon-wrap.logo-tile {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex-shrink: 0; padding: 0; overflow: hidden;
  background: none; border: none;
}
.channel-chip .icon-wrap.logo-tile .icon { width: 40px; height: 40px; }
.channel-chip .name { font-weight: 600; color: var(--white); font-size: 14px; white-space: nowrap; }
.channel-chip .desc { font-size: 12px; color: var(--text-faint); white-space: nowrap; }

/* =========== GUARANTEE =========== */
.guarantee-box {
  position: relative;
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: var(--radius-xl);
  padding: 40px;
  display: flex; gap: 26px; align-items: flex-start;
  transition: background 0.4s, border-color 0.4s;
}
.guarantee-icon {
  flex-shrink: 0; width: 60px; height: 60px; display: flex; align-items: center; justify-content: center;
  background: var(--warn-icon-bg); border-radius: 16px;
  border: 1px solid var(--warn-icon-border); color: var(--warn-icon-color);
  transition: background-color 0.4s, border-color 0.4s, color 0.4s;
}
.guarantee-box h3 { font-size: 22px; font-weight: 700; color: var(--white); margin-bottom: 12px; }
.guarantee-box p { font-size: 15.5px; color: var(--text-dim); line-height: 1.75; }

/* =========== FAQ =========== */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; transition: border-color 0.3s, background-color 0.4s; }
.faq-item:hover { border-color: var(--border-strong); }
.faq-q { display: flex; justify-content: space-between; align-items: center; padding: 22px 26px; cursor: pointer; font-weight: 600; color: var(--white); font-size: 15.5px; gap: 16px; }
.faq-icon { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--accent); transition: transform 0.4s var(--ease), background-color 0.4s; }
.faq-icon .icon { width: 14px; height: 14px; }
.faq-a { max-height: 0; overflow: hidden; padding: 0 26px; font-size: 14.5px; color: var(--text-dim); line-height: 1.75; transition: max-height 0.4s var(--ease), padding 0.4s var(--ease); }
.faq-item.open .faq-a { padding: 0 26px 24px; }
.faq-item.open .faq-icon { transform: rotate(135deg); }

/* =========== FINAL CTA =========== */
.cta-final { text-align: center; padding: clamp(72px, 10vw, 120px) 40px; position: relative; }
.cta-final::before {
  content: '';
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 700px; height: 500px;
  background: radial-gradient(circle, var(--glow-3), transparent 70%);
  filter: blur(30px); z-index: -1;
  transition: background 0.5s;
}
.cta-final h2 { margin: 0 auto 16px; }
.cta-final p { color: var(--text-dim); font-size: 17px; margin: 0 auto 36px; max-width: 500px; }
.cta-final .fine-print { margin-top: 22px; font-size: 13px; color: var(--text-faint); }

/* =========== FOOTER =========== */
footer { border-top: 1px solid var(--border); text-align: center; padding: 34px; font-size: 13px; color: var(--text-faint); }
footer a { color: var(--accent); }
footer a:hover { color: var(--white); }

/* =========== FLOATING WIDGET =========== */
#chat-widget-btn {
  position: fixed; bottom: 28px; right: 28px; z-index: 9999;
  width: 58px; height: 58px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--accent)); color: #fff;
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 8px 30px rgba(47, 107, 255, 0.5);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
#chat-widget-btn .icon { width: 24px; height: 24px; }
#chat-widget-btn:hover { transform: scale(1.08); box-shadow: 0 10px 38px rgba(47, 107, 255, 0.65); }
#chat-widget-btn .notif {
  position: absolute; top: 4px; right: 4px;
  width: 11px; height: 11px; background: #ff4d4d; border-radius: 50%;
  border: 2px solid var(--bg); animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.3); } }

#chat-widget-box {
  position: fixed; bottom: 96px; right: 28px; z-index: 9998;
  width: 350px; background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 30px 70px var(--shadow-color);
  display: none; flex-direction: column; overflow: hidden;
  max-height: 520px;
  transition: background-color 0.4s, border-color 0.4s;
}
#chat-widget-box.open { display: flex; animation: dropIn 0.3s var(--ease); }
@keyframes dropIn { from { opacity: 0; transform: translateY(-8px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

#cwb-header { background: linear-gradient(135deg, var(--navy), #142354); padding: 16px 20px; display: flex; align-items: center; gap: 12px; }
#cwb-header .av { width: 34px; height: 34px; background: linear-gradient(135deg, var(--blue), var(--accent)); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; }
#cwb-header .av .icon { width: 17px; height: 17px; }
#cwb-header .info { flex: 1; }
#cwb-header .name { color: #fff; font-weight: 700; font-size: 14px; }
#cwb-header .status { color: #6ee2ff; font-size: 12px; display: flex; align-items: center; gap: 5px; }
#cwb-header .status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #37e08c; }
#cwb-close { color: rgba(255, 255, 255, 0.5); cursor: pointer; padding: 4px; display: flex; }
#cwb-close .icon { width: 18px; height: 18px; }
#cwb-close:hover { color: #fff; }

#cwb-messages { flex: 1; padding: 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; min-height: 200px; max-height: 310px; }
.cwb-msg-bot { align-self: flex-start; background: var(--surface-2); color: var(--text); padding: 11px 15px; border-radius: 16px 16px 16px 4px; font-size: 13px; max-width: 88%; line-height: 1.55; border: 1px solid var(--border); }
.cwb-msg-user { align-self: flex-end; background: linear-gradient(135deg, var(--blue), #1d54d6); color: #fff; padding: 11px 15px; border-radius: 16px 16px 4px 16px; font-size: 13px; max-width: 88%; line-height: 1.55; }
.cwb-suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.cwb-sug { background: transparent; border: 1px solid rgba(var(--accent-rgb), 0.35); color: var(--accent); padding: 7px 13px; border-radius: var(--radius-full); font-size: 12px; cursor: pointer; transition: all 0.2s; white-space: nowrap; }
.cwb-sug:hover { background: var(--accent); color: #04060d; }

#cwb-input-area { padding: 13px; border-top: 1px solid var(--border); display: flex; gap: 8px; }
#cwb-input { flex: 1; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-full); padding: 10px 15px; font-size: 13px; outline: none; font-family: inherit; color: var(--text); }
#cwb-input::placeholder { color: var(--text-faint); }
#cwb-input:focus { border-color: var(--border-hover); }
#cwb-send { width: 36px; height: 36px; background: var(--blue); border: none; border-radius: 50%; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
#cwb-send .icon { width: 15px; height: 15px; }
#cwb-send:hover { background: var(--blue-light); }

/* =========== REVEAL BASE STATE =========== */
.js-ready [data-reveal] { opacity: 0; }
.js-ready [data-reveal-item] { opacity: 0; }

/* =========================================================
   LEGAL PAGE (kept compatible, untouched markup)
   ========================================================= */
.legal-hero {
  padding: 150px 40px 50px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.legal-hero .container { max-width: 800px; margin: 0; padding: 0 0 0 40px; }
.legal-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.5px;
}
.legal-hero p { color: var(--text-faint); margin-top: 10px; font-size: 14px; }

.legal-content { max-width: 800px; margin: 0 auto; padding: 70px 40px 100px; }
.legal-content h2 {
  font-size: 19px; font-weight: 700; color: var(--white);
  margin: 46px 0 14px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content p { font-size: 14.5px; line-height: 1.85; color: var(--text-dim); margin-bottom: 13px; }
.legal-content ul { padding-left: 20px; margin-bottom: 13px; }
.legal-content li { font-size: 14.5px; line-height: 1.85; color: var(--text-dim); margin-bottom: 7px; }
.legal-content strong { color: var(--text); }
.legal-content a { color: var(--accent); }
.legal-content a:hover { text-decoration: underline; }

.info-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius-sm);
  padding: 22px 26px;
  margin: 18px 0;
}
.info-box p { margin: 0 0 7px; }
.info-box p:last-child { margin: 0; }

.warning-box {
  background: var(--warn-box-bg);
  border: 1px solid var(--warn-box-border);
  border-left: 3px solid var(--warn-box-accent);
  border-radius: var(--radius-sm);
  padding: 20px 26px;
  margin: 18px 0;
  transition: background-color 0.4s, border-color 0.4s;
}
.warning-box p { margin: 0; font-size: 14px; color: var(--warn-box-text); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
  .bento-grid .card.feature { grid-column: span 2; grid-row: span 1; }
  .bento-grid .card.wide { grid-column: span 2; }
}
@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
  .stats-inner { grid-template-columns: 1fr; gap: 22px; }
  .stat:not(:last-child)::after { display: none; }
  .stat:not(:last-child) { padding-bottom: 18px; border-bottom: 1px solid var(--border); }
  .promise-wrap { flex-direction: column; gap: 24px; align-items: flex-start; }
  .promise-num { font-size: 80px; }
}
@media (max-width: 768px) {
  /* lighter blur on mobile GPUs, compensated with a more opaque background */
  #nav.scrolled { backdrop-filter: blur(8px); background: color-mix(in srgb, var(--bg) 92%, transparent); }
  .theme-toggle { backdrop-filter: none; background: var(--surface); }
  .stats-inner { backdrop-filter: none; }
  .hero h1 { letter-spacing: -0.6px; }
  .cap-row { gap: 14px; padding: 22px 0; }
  .cap-row .cap-row-num { width: 22px; padding-top: 2px; }
  .container { padding: 0 22px; }
  .section { padding: clamp(64px, 14vw, 100px) 0; }
  .section-head { margin-bottom: 38px; }
  .hero { padding: calc(var(--nav-h) + 30px) 22px 30px; }
  .stats-float { padding: 0 22px; margin-top: -70px; }
  .stats-inner { padding: 26px 20px; }
  .marquee { margin-top: 34px; }
  .guarantee-box { flex-direction: column; gap: 18px; padding: 26px 22px; }
  .demo-section { gap: 40px; }
  .promise-box { padding: 30px 24px; }
  .cta-final { padding: 70px 22px; }
  .bento-grid { grid-template-columns: 1fr; }
  .bento-grid .card.feature, .bento-grid .card.wide { grid-column: span 1; grid-row: span 1; }
  #chat-widget-box { width: calc(100vw - 40px); right: 20px; }
  .theme-toggle { width: 48px; height: 48px; bottom: 20px; left: 20px; }
  #chat-widget-btn { width: 52px; height: 52px; bottom: 20px; right: 20px; }
  .legal-hero { padding: 120px 22px 40px; }
  .legal-hero .container { padding-left: 0; }
  .legal-content { padding: 50px 22px 70px; }
}
@media (max-width: 480px) {
  .cta-group { flex-direction: column; width: 100%; }
  .cta-group .btn { width: 100%; justify-content: center; }
  .chat-window { max-width: 100%; }
}
@media (hover: none) {
  .card:hover { transform: none !important; }
}
