/* CloudAIPilot marketing site — shared design system.
   Extracted from the majority convention verified across the site
   (features/rbac.html and 27-38 other pages agreed byte-for-byte;
   index.html was the one outlier and was reconciled to match this).
   See SESSION-HANDOFF.md for the v2 -> v3 refactor notes. */

/* ── Design tokens ── */
:root {
  --nav-h: 64px;
  --bg: #06040f;
  --bg-2: #0b091a;
  --bg-3: #110f22;
  --border: rgba(139,92,246,0.12);
  --border-2: rgba(139,92,246,0.22);
  --surface: rgba(255,255,255,0.03);
  --surface-2: rgba(255,255,255,0.06);
  --purple: #7c3aed;
  --purple-lt: #a78bfa;
  --teal: #2dd4bf;
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #ef4444;
  --blue: #60a5fa;
  --emerald: #10b981;
  --text: #f1f0ff;
  --text-2: #9b98c0;
  --text-3: #5a5880;
  --font: 'Inter', system-ui, sans-serif;
  --font-d: 'Space Grotesk', sans-serif;
  --font-m: 'JetBrains Mono', 'Fira Code', monospace;
  --r: 10px;
  --rl: 16px;
  --rxl: 24px;
  --ease: cubic-bezier(0.4,0,0.2,1);
}

/* ── Light mode tokens ── */
[data-theme="light"] {
  --bg: #f5f4ff;
  --bg-2: #eeecff;
  --bg-3: #e7e4ff;
  --border: rgba(124,58,237,0.12);
  --border-2: rgba(124,58,237,0.25);
  --surface: rgba(79,70,229,0.04);
  --surface-2: rgba(79,70,229,0.08);
  --purple-lt: #7c3aed;
  --teal: #0f766e;
  --amber: #b45309;
  --blue: #2563eb;
  --emerald: #059669;
  --text: #0f0a1e;
  --text-2: #4a4770;
  --text-3: #8c89aa;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); font-size: 16px; color: var(--text); background: var(--bg); overflow-x: hidden; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
img, video { display: block; max-width: 100%; }

/* ── Typography ── */
h1 { font-family: var(--font-d); font-size: clamp(2.25rem,5vw,3.5rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.03em; }
h2 { font-family: var(--font-d); font-size: clamp(1.75rem,3.5vw,2.5rem); font-weight: 700; line-height: 1.12; letter-spacing: -0.025em; }
h3 { font-family: var(--font-d); font-size: 1.125rem; font-weight: 700; line-height: 1.3; }
h4 { font-size: 0.9375rem; font-weight: 700; line-height: 1.4; }
.label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); }
.gradient-text { background: linear-gradient(135deg,var(--purple-lt) 0%,var(--teal) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section--alt { background: var(--bg-2); }
.shc { max-width: 640px; margin: 0 auto; text-align: center; }
.shc .label { display: block; margin-bottom: 12px; }
.shc h2 { margin-bottom: 16px; }
.shc p { font-size: 1.0625rem; color: var(--text-2); line-height: 1.7; }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 8px; font-weight: 600; transition: all 0.15s; cursor: pointer; font-family: var(--font); border: 1px solid transparent; padding: 12px 24px; font-size: 0.9375rem; }
.btn-p { background: var(--purple); color: #fff; border-color: var(--purple); }
.btn-p:hover { background: var(--purple-lt); border-color: var(--purple-lt); transform: translateY(-1px); }
.btn-o { background: transparent; color: var(--text-2); border-color: var(--border-2); }
.btn-o:hover { color: var(--text); border-color: rgba(139,92,246,0.4); }

/* ── Theme toggle button ── */
.theme-toggle { width: 32px; height: 32px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg-3); display: flex; align-items: center; justify-content: center; color: var(--text-2); transition: all 0.15s; flex-shrink: 0; }
.theme-toggle:hover { color: var(--text); border-color: var(--border-2); }
.theme-toggle svg { width: 14px; height: 14px; }
.icon-light { display: none; }
[data-theme="light"] .icon-dark { display: none; }
[data-theme="light"] .icon-light { display: block; }

/* ── Layout helpers ── */
.page-body { padding-top: var(--nav-h); }

/* ── Footer ── */
footer { border-top: 1px solid var(--border); padding: 48px 0 32px; }
.footer-inner { display: grid; grid-template-columns: 220px 1fr; gap: 64px; align-items: start; margin-bottom: 40px; }
.footer-logo { display: flex; align-items: center; gap: 10px; font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.footer-brand p { font-size: 0.8125rem; color: var(--text-3); line-height: 1.6; max-width: 200px; }
.footer-links { display: grid; grid-template-columns: repeat(4,1fr); gap: 32px; }
.footer-col h5 { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 14px; }
.footer-col a { display: block; font-size: 0.875rem; color: var(--text-3); margin-bottom: 8px; transition: color 0.15s; }
.footer-col a:hover { color: var(--text-2); }
.footer-bottom { padding-top: 20px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-copy { font-size: 0.8125rem; color: var(--text-3); }
.footer-social { display: flex; gap: 8px; }
.footer-social a { width: 32px; height: 32px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg-2); display: flex; align-items: center; justify-content: center; color: var(--text-3); transition: all 0.15s; }
.footer-social a:hover { color: var(--text); border-color: var(--border-2); }
.footer-social a svg { width: 14px; height: 14px; }

/* ── Scroll reveal ── */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.55s var(--ease), transform 0.55s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── Navigation ── */
/* No backdrop-filter and no border by design: a backdrop-filter on a
   semi-transparent bar renders a faint 1px GPU compositing seam along BOTH
   its top and bottom edges. A near-solid background plus a single soft
   drop-shadow reads as its own floating container with clean edges. */
#nav {
  position: sticky; top: 0; z-index: 90;
  height: var(--nav-h);
  background: rgba(13,11,28,0.98);
  border: none;
  box-shadow:
    inset 0 -1px 0 rgba(124,58,237,0.22),
    0 4px 20px rgba(0,0,0,0.45);
}
[data-theme="light"] #nav { background: rgba(250,249,255,0.98); box-shadow: inset 0 -1px 0 rgba(79,70,229,0.15), 0 4px 20px rgba(0,0,0,0.06); }
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  height: 100%; display: flex; align-items: center; gap: 32px; justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 1rem; font-weight: 700; color: var(--text); flex-shrink: 0;
}
.nav-logo svg { width: 28px; height: 28px; }
.nav-links { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav-link, .nav-links a {
  font-size: 0.875rem; font-weight: 500; color: var(--text-2);
  padding: 6px 12px; border-radius: 6px; transition: all 0.15s;
}
.nav-link:hover, .nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.nav-login { font-size: 0.875rem; font-weight: 500; color: var(--text-2); padding: 6px 12px; transition: color 0.15s; }
.nav-login:hover { color: var(--text); }
.nav-cta { padding: 8px 18px; font-size: 0.875rem; }
.nav-hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; cursor: pointer; }
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--text-2); border-radius: 2px; transition: all 0.2s; }
.nav-dd-btn {
  font-size: 0.875rem; font-weight: 500; color: var(--text-2);
  padding: 6px 12px; border-radius: 6px; transition: all 0.15s;
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; gap: 5px; font-family: inherit;
}
.nav-dd-btn:hover { color: var(--text); background: var(--surface); }
.nav-dd-btn svg { transition: transform 0.2s; flex-shrink: 0; }
.nav-dd-btn[aria-expanded="true"] { color: var(--text); background: var(--surface); }
.nav-dd-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-dropdown { position: relative; }
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-right .nav-login { display: none; }
  .nav-cta { display: none; }
}

/* ── Mobile nav drawer ── */
.mobile-nav {
  display: none;
  position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 148;
  background: var(--bg-2);
  max-height: 0; overflow: hidden;
  transition: max-height 0.32s cubic-bezier(0.4,0,0.2,1);
}
@media (max-width: 768px) { .mobile-nav { display: block; } }
.mobile-nav.open {
  max-height: 100dvh; overflow-y: auto;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 12px 24px rgba(0,0,0,0.18);
}
.mobile-nav-inner { padding: 4px 20px 32px; display: flex; flex-direction: column; }
.mobile-nav-link {
  font-size: 0.9375rem; font-weight: 500; color: var(--text-2);
  padding: 13px 4px; border-bottom: 1px solid var(--border);
  display: block; transition: color 0.12s;
}
.mobile-nav-link:hover { color: var(--text); }
.mobile-nav-details { border-bottom: 1px solid var(--border); }
.mobile-nav-details summary { list-style: none; cursor: pointer; }
.mobile-nav-details summary::-webkit-details-marker { display: none; }
.mobile-nav-details > summary.mobile-nav-link {
  border-bottom: none; display: flex; justify-content: space-between; align-items: center;
}
.mobile-nav-details > summary.mobile-nav-link::after {
  content: '›'; font-size: 1.1rem; color: var(--text-3); transition: transform 0.2s;
}
.mobile-nav-details[open] > summary.mobile-nav-link::after { transform: rotate(90deg); }
.mobile-nav-sub { padding: 4px 0 10px 12px; display: flex; flex-direction: column; gap: 0; }
.mobile-nav-sub a {
  font-size: 0.875rem; color: var(--text-3);
  padding: 9px 4px; border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: color 0.12s; display: block;
}
.mobile-nav-sub a:last-child { border-bottom: none; }
.mobile-nav-sub a:hover { color: var(--purple-lt); }
.mobile-nav-footer { margin-top: 24px; display: flex; flex-direction: column; gap: 10px; }
.btn-ghost {
  background: transparent; color: var(--text-2);
  border: 1px solid var(--border-2); border-radius: 8px;
  font-size: 0.875rem; font-weight: 500; padding: 11px 18px;
  transition: color 0.15s, border-color 0.15s; text-align: center; cursor: pointer;
}
.btn-ghost:hover { color: var(--text); border-color: rgba(139,92,246,0.4); }
[data-theme="light"] .mobile-nav { background: #fff; }
[data-theme="light"] .mobile-nav-link { border-bottom-color: rgba(0,0,0,0.06); }
[data-theme="light"] .mobile-nav-details { border-bottom-color: rgba(0,0,0,0.06); }
[data-theme="light"] .mobile-nav-sub a { border-bottom-color: rgba(0,0,0,0.04); }

/* ── Nav dropdowns & mega menu ── */
.mega-menu {
  position: absolute; top: calc(100% + 6px); left: -12px;
  width: 680px;
  background: var(--bg-2);
  border: 1px solid var(--border); border-top: 2px solid rgba(124,58,237,0.45);
  border-radius: 0 12px 12px 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  max-height: 0; overflow: hidden;
  transition: max-height 0.26s ease, opacity 0.18s;
  opacity: 0; pointer-events: none; z-index: 200;
}
.mega-menu.open { max-height: 560px; opacity: 1; pointer-events: auto; }
.mega-inner { padding: 20px 20px 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.mega-col { display: flex; flex-direction: column; gap: 18px; }
.mega-group { display: flex; flex-direction: column; gap: 2px; }
.mega-group-label {
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.08em;
  color: rgba(167,139,250,0.85); text-transform: uppercase;
  padding-bottom: 8px; margin-bottom: 6px;
  border-bottom: 1px solid rgba(124,58,237,0.18);
  display: flex; align-items: center; gap: 6px;
}
.mega-group-label::before {
  content: ''; display: block; width: 3px; height: 10px;
  background: linear-gradient(180deg, var(--purple-lt) 0%, rgba(124,58,237,0.35) 100%);
  border-radius: 2px; flex-shrink: 0;
}
.mega-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 10px; border-radius: 8px; text-decoration: none;
  border: 1px solid transparent; transition: background 0.12s, border-color 0.12s;
}
.mega-item:hover { background: rgba(124,58,237,0.08); border-color: rgba(124,58,237,0.22); }
.mega-icon {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 6px;
  background: var(--bg-3); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px; transition: background 0.12s, border-color 0.12s;
}
.mega-icon svg { width: 14px; height: 14px; transition: stroke 0.12s; }
.mega-item:hover .mega-icon { background: rgba(124,58,237,0.18); border-color: rgba(124,58,237,0.35); }
.mega-item:hover .mega-icon svg { stroke: var(--purple-lt); }
.mega-item-text { display: flex; flex-direction: column; gap: 2px; }
.mega-item-name { font-size: 0.875rem; font-weight: 600; color: var(--text); transition: color 0.12s; }
.mega-item-desc { font-size: 0.72rem; color: var(--text-3); line-height: 1.35; }
.mega-item:hover .mega-item-name, .mega-item[aria-current="page"] .mega-item-name { color: var(--purple-lt); }
.mega-item[aria-current="page"] { background: rgba(124,58,237,0.08); border-color: rgba(124,58,237,0.22); }
.mega-footer {
  padding: 10px 20px 14px; margin-top: 4px;
  border-top: 1px solid var(--border); display: flex; justify-content: flex-end;
}
.mega-footer a { font-size: 0.8125rem; font-weight: 500; color: var(--purple-lt); display: flex; align-items: center; gap: 5px; transition: gap 0.15s; }
.mega-footer a:hover { gap: 8px; }

.res-menu {
  position: absolute; top: calc(100% + 6px); left: -12px;
  width: 520px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-top: 2px solid rgba(124,58,237,0.45); border-radius: 0 12px 12px 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  padding: 10px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  opacity: 0; pointer-events: none; transform: translateY(-6px);
  transition: opacity 0.15s, transform 0.15s; z-index: 200;
}
.res-menu.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.res-item {
  display: flex; flex-direction: row; align-items: flex-start; gap: 10px;
  padding: 10px 10px; border-radius: 8px; text-decoration: none;
  border: 1px solid transparent; transition: background 0.12s, border-color 0.12s;
}
.res-item:hover { background: rgba(124,58,237,0.08); border-color: rgba(124,58,237,0.22); }
.res-icon {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 6px;
  background: var(--bg-3); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px; transition: background 0.12s, border-color 0.12s;
}
.res-icon svg { width: 13px; height: 13px; stroke: var(--text-3); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.12s; }
.res-item:hover .res-icon { background: rgba(124,58,237,0.18); border-color: rgba(124,58,237,0.35); }
.res-item:hover .res-icon svg { stroke: var(--purple-lt); }
.res-item-text { display: flex; flex-direction: column; gap: 2px; }
.res-item-name { font-size: 0.875rem; font-weight: 600; color: var(--text); transition: color 0.12s; }
.res-item-desc { font-size: 0.72rem; color: var(--text-3); line-height: 1.35; }
.res-item:hover .res-item-name { color: var(--purple-lt); }

[data-theme="light"] .mega-menu { background: #fff; border-color: rgba(0,0,0,0.1); border-top-color: rgba(124,58,237,0.5); box-shadow: 0 8px 40px rgba(0,0,0,0.1); }
[data-theme="light"] .mega-group-label { border-bottom-color: rgba(0,0,0,0.07); }
[data-theme="light"] .mega-icon { background: var(--bg-3); }
[data-theme="light"] .mega-item:hover { background: rgba(124,58,237,0.06); border-color: rgba(124,58,237,0.15); }
[data-theme="light"] .mega-footer { border-top-color: rgba(0,0,0,0.08); }
[data-theme="light"] .res-menu { background: #fff; border-color: rgba(0,0,0,0.1); border-top-color: rgba(124,58,237,0.5); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
[data-theme="light"] .res-item:hover { background: rgba(124,58,237,0.06); border-color: rgba(124,58,237,0.15); }
[data-theme="light"] .res-item-desc { color: var(--text-3); }

/* ── WhatsApp float ── */
.wa-float {
  position: fixed; bottom: 24px; right: 24px; z-index: 999;
  width: 52px; height: 52px; border-radius: 50%;
  background: #25d366; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none; color: #fff;
}
.wa-float:hover { transform: scale(1.08); box-shadow: 0 8px 28px rgba(37,211,102,0.55); }
.wa-float svg { width: 26px; height: 26px; }

/* ── Cookie consent banner ── */
#cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 999;
  background: var(--bg-3);
  border-top: 1px solid var(--border-2);
  padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  box-shadow: 0 -8px 32px rgba(0,0,0,0.25);
  transform: translateY(0); transition: transform 0.3s var(--ease);
}
#cookie-banner.hidden { transform: translateY(110%); pointer-events: none; }
[data-theme="light"] #cookie-banner { box-shadow: 0 -4px 20px rgba(109,40,217,0.08); }
.cookie-text { flex: 1; min-width: 240px; }
.cookie-text p { font-size: 0.8125rem; color: var(--text-2); line-height: 1.6; margin: 0; }
.cookie-text a { color: var(--teal); text-decoration: underline; text-underline-offset: 2px; }
.cookie-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; flex-wrap: wrap; }
.cookie-btn {
  padding: 9px 18px; border-radius: 7px; font-size: 0.8125rem; font-weight: 600;
  cursor: pointer; transition: all 0.15s; border: 1px solid transparent; font-family: var(--font);
}
.cookie-btn-primary { background: var(--purple); color: #fff; border-color: var(--purple); }
.cookie-btn-primary:hover { background: var(--purple-lt); border-color: var(--purple-lt); }
.cookie-btn-secondary { background: transparent; color: var(--text-2); border-color: var(--border-2); }
.cookie-btn-secondary:hover { color: var(--text); border-color: rgba(139,92,246,0.5); }
.cookie-btn-link {
  background: none; border: none; color: var(--text-3);
  font-size: 0.75rem; text-decoration: underline; text-underline-offset: 2px; padding: 6px 4px;
}
.cookie-btn-link:hover { color: var(--text-2); }
#cookie-customize { display: none; width: 100%; padding-top: 16px; border-top: 1px solid var(--border); margin-top: 4px; }
#cookie-customize.open { display: block; }
.cookie-toggles { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 14px; }
.cookie-toggle-item { display: flex; align-items: center; gap: 8px; font-size: 0.8125rem; color: var(--text-2); cursor: pointer; }
.cookie-toggle-item input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--purple); cursor: pointer; }
.cookie-toggle-item .required { font-size: 0.7rem; color: var(--text-3); }

/* ── Feature-page screenshot frame (secondary/non-hero screenshots) ── */
.shot-frame { border: 1px solid var(--border-2); box-shadow: 0 16px 48px rgba(0,0,0,0.35); }
[data-theme="light"] .shot-frame { border-color: rgba(124,58,237,0.15); box-shadow: 0 8px 32px rgba(0,0,0,0.08); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-links { grid-template-columns: repeat(2,1fr); }
}
