/* =============================================================
   VizAI public site: base, layout, nav, footer, buttons, sections.
   Used by index, agency, compare, the four industry pages, 404,
   privacy and terms. Visual pieces (the example report, plan
   cards, chat) live in visual.css; behaviour in site.js.

   ConnexionAI identity (brand file section 8): Ground, Signal,
   Air, Cloud, Carbon; BrandNew headlines, Host Grotesk body (both
   self-hosted from /fonts); bar corners (top-left and bottom-right
   rounded). Contrast is checked: muted text #5A7065 is 5.1:1 on
   Cloud, Signal text #B04618 is 5.4:1, white on the Signal button
   #B04618 is 5.6:1, Ground on Air is 7.4:1.
   ============================================================= */

:root {
  --ground: #22362D; --ground-deep: #1A2A23; --ground-raised: #2B4238; --ground-line: #3A5447;
  --signal: #D65B25; --signal-deep: #B04618; --signal-soft: #FBEDE6; --signal-on-dark: #EE8A5B;
  --air: #A8CCB9; --air-soft: #E6F1EB; --cloud: #FEF9FB; --carbon: #282828;
  --stone: #B0A99F; --current: #5A7065;
  --page: #FEF9FB; --card: #FFFFFF; --sunken: #F5EFEA; --line: #E8E1DC; --line-strong: #D9D1CA;
  --ink: #282828; --ink-2: #3E4A44; --muted: #5A7065;
  --on-dark: #FEF9FB; --on-dark-2: #C9C2B9;
  --good: #15803D; --good-soft: #ECFDF3; --bad: #B42318; --bad-soft: #FEF3F2;
  --r-bar: 18px 4px 18px 4px; --r-bar-sm: 10px 3px 10px 3px; --r-card: 16px; --r-pill: 999px;
  --sh-1: 0 1px 2px rgba(34, 54, 45, 0.06), 0 0 0 1px rgba(34, 54, 45, 0.04);
  --sh-2: 0 1px 2px rgba(34, 54, 45, 0.06), 0 12px 28px -12px rgba(34, 54, 45, 0.18);
  --sh-3: 0 2px 4px rgba(0, 0, 0, 0.08), 0 40px 80px -24px rgba(0, 0, 0, 0.45);
  --font-head: 'BrandNew', Georgia, serif;
  --font-body: 'Host Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 16px/1.6 var(--font-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-head); font-weight: 700; letter-spacing: -0.01em; line-height: 1.12; color: var(--ink); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--signal-deep); outline-offset: 3px; border-radius: 4px; }
.dark :focus-visible { outline-color: var(--air); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--air); color: var(--ground); padding: 10px 16px; border-radius: var(--r-bar-sm); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
@media (min-width: 640px) { .wrap, .narrow { padding: 0 24px; } }

/* ---------- Buttons: bar corners, as on connexionai.tech ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border: 1px solid transparent; border-radius: var(--r-bar-sm); font: 600 15px/1.2 var(--font-body); text-decoration: none; text-align: center; cursor: pointer; transition: transform 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease; }
.btn:active { transform: translateY(1px); }
.btn-signal { background: linear-gradient(180deg, #BD4E1C, var(--signal-deep)); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 8px 20px -8px rgba(176, 70, 24, 0.7); }
.btn-signal:hover { background: #9C3D14; transform: translateY(-1px); }
.btn-air { background: var(--air); color: var(--ground); }
.btn-air:hover { background: var(--cloud); }
.btn-ground { background: var(--ground); color: var(--on-dark); }
.btn-ground:hover { background: var(--ground-raised); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); }
.dark .btn-ghost { color: var(--on-dark); border-color: rgba(254, 249, 251, 0.35); }
.dark .btn-ghost:hover { border-color: var(--on-dark); }
.btn-sm { min-height: 40px; padding: 8px 14px; font-size: 14px; }
.btn-block { width: 100%; }
.link { color: var(--signal-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.link:hover { text-decoration-thickness: 2px; }
.dark .link { color: var(--signal-on-dark); }
.arrow-link { display: inline-flex; align-items: center; gap: 6px; color: var(--signal-deep); font-weight: 600; text-decoration: none; }
.arrow-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.dark .arrow-link { color: var(--signal-on-dark); }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(26, 42, 35, 0.86); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid rgba(254, 249, 251, 0.08); color: var(--on-dark); transition: box-shadow 0.2s ease; }
.nav.scrolled { box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.6); }
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--on-dark); flex-shrink: 0; }
.brand svg { width: 32px; height: 32px; }
.brand-name { font: 700 19px/1 var(--font-head); letter-spacing: -0.01em; }
.brand-by { font-size: 12px; color: var(--on-dark-2); display: none; }
.nav-links { display: none; align-items: center; gap: 4px; }
.nav-links a { padding: 8px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--on-dark-2); text-decoration: none; transition: color 0.15s, background-color 0.15s; }
.nav-links a:hover { color: var(--on-dark); background: rgba(254, 249, 251, 0.06); }
.nav-cta { display: flex; align-items: center; gap: 8px; }
.nav-cta .nav-demo { display: none; }
.nav-cta .nav-start { display: none; }
.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid rgba(254, 249, 251, 0.18); border-radius: 10px; background: transparent; color: var(--on-dark); cursor: pointer; }
/* The nav is always dark, so its outline button uses the light outline. */
.nav .btn-ghost { color: var(--on-dark); border-color: rgba(254, 249, 251, 0.3); }
.nav .btn-ghost:hover { border-color: var(--on-dark); }
.mobile-menu { border-top: 1px solid rgba(254, 249, 251, 0.08); padding: 8px 16px 20px; }
.mobile-menu a:not(.btn) { display: block; padding: 12px 4px; color: var(--on-dark); text-decoration: none; font-weight: 500; border-bottom: 1px solid rgba(254, 249, 251, 0.06); }
.mobile-menu .btn { margin-top: 12px; width: 100%; }
@media (min-width: 480px) { .nav-cta .nav-start { display: inline-flex; } }
@media (min-width: 640px) { .brand-by { display: inline; } }
@media (min-width: 1120px) {
  .nav-links { display: flex; }
  .nav-cta .nav-demo { display: inline-flex; }
  .nav-toggle, .mobile-menu { display: none !important; }
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-tight { padding: 56px 0; }
.section-alt { background: var(--sunken); }
.dark { background: var(--ground); color: var(--on-dark); }
.dark h1, .dark h2, .dark h3, .dark h4 { color: var(--on-dark); }
.section-head { max-width: 680px; margin: 0 auto 40px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
.eyebrow { display: inline-block; margin-bottom: 12px; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--signal-deep); }
.dark .eyebrow { color: var(--signal-on-dark); }
.h2 { font-size: clamp(28px, 4.2vw, 42px); margin-bottom: 14px; }
.h3 { font-size: 20px; margin-bottom: 8px; }
.lead { font-size: 17px; color: var(--ink-2); line-height: 1.65; }
.dark .lead { color: var(--on-dark-2); }
.muted { color: var(--muted); }
.dark .muted { color: var(--on-dark-2); }
.small { font-size: 14px; }
.tiny { font-size: 13px; }
.center { text-align: center; }
.stack > * + * { margin-top: 16px; }
.prose p + p { margin-top: 18px; }
.prose p { color: var(--ink-2); line-height: 1.7; }
.prose .strong { color: var(--ink); font-weight: 600; }
.prose .aside { font-size: 14px; color: var(--muted); }
@media (min-width: 768px) { .section { padding: 104px 0; } .section-tight { padding: 72px 0; } }

/* ---------- Hero (dark, with the drifting Connexion Glow) ---------- */
.hero, .hero.dark { position: relative; overflow: hidden; background: var(--ground-deep); color: var(--on-dark); padding: 56px 0 72px; isolation: isolate; }
.hero-mesh { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.hero-mesh span { position: absolute; border-radius: 50%; filter: blur(90px); will-change: transform; }
.hero-mesh .m1 { width: 60vw; height: 60vw; left: -18vw; top: -32vw; background: var(--signal); opacity: 0.45; animation: drift-a 14s ease-in-out infinite alternate; }
.hero-mesh .m2 { width: 34vw; height: 34vw; right: -8vw; top: -14vw; background: var(--air); opacity: 0.32; animation: drift-b 16s ease-in-out infinite alternate; }
.hero-mesh .m3 { width: 46vw; height: 30vw; left: 30vw; bottom: -22vw; background: #E48A5F; opacity: 0.22; animation: drift-c 18s ease-in-out infinite alternate; }
.hero-grid { position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(254, 249, 251, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(254, 249, 251, 0.045) 1px, transparent 1px); background-size: 56px 56px; -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%); }
@keyframes drift-a { to { transform: translate(22vw, 10vw) scale(1.12); } }
@keyframes drift-b { to { transform: translate(-18vw, 16vw) scale(1.25); } }
@keyframes drift-c { to { transform: translate(-24vw, -8vw) scale(0.9); } }
.hero-cols { display: grid; gap: 48px; align-items: center; }
.hero-cols > * { min-width: 0; }
.hero h1 { font-size: clamp(36px, 6.2vw, 62px); line-height: 1.04; letter-spacing: -0.02em; margin-bottom: 20px; color: var(--on-dark); }
.hero .lead { font-size: 18px; max-width: 560px; margin-bottom: 26px; }
.glow-text { background: linear-gradient(120deg, #F4A57F, var(--signal) 55%, #F4A57F); -webkit-background-clip: text; background-clip: text; color: transparent; }
.badge { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px; padding: 6px 12px; border: 1px solid rgba(238, 138, 91, 0.35); border-radius: var(--r-pill); background: rgba(214, 91, 37, 0.1); color: var(--signal-on-dark); font-size: 13px; font-weight: 600; line-height: 1.4; }
.badge .dot { width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: var(--signal-on-dark); box-shadow: 0 0 0 4px rgba(238, 138, 91, 0.18); }
.ticks li { position: relative; padding-left: 30px; margin-bottom: 10px; color: var(--ink-2); line-height: 1.5; }
.dark .ticks li { color: var(--on-dark-2); }
.ticks li::before { content: ''; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--signal-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.5 2.5L14 7.5' fill='none' stroke='%23B04618' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }
.dark .ticks li::before { background-color: rgba(214, 91, 37, 0.18); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.5 2.5L14 7.5' fill='none' stroke='%23EE8A5B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }
.hero-note { margin-top: 14px; font-size: 13px; color: var(--on-dark-2); }
.page-hero { padding: 64px 0 72px; }
.page-hero .lead { max-width: 680px; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.jump a { padding: 8px 14px; border: 1px solid rgba(254, 249, 251, 0.18); border-radius: var(--r-pill); color: var(--on-dark); font-size: 14px; text-decoration: none; background: rgba(254, 249, 251, 0.04); }
.jump a:hover { border-color: var(--signal-on-dark); }
@media (min-width: 1000px) { .hero { padding: 88px 0 104px; } .hero-cols { grid-template-columns: 1.02fr 0.98fr; gap: 56px; } .page-hero { padding: 96px 0 104px; } }

/* ---------- Stat strip ---------- */
.stats { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.stat { background: var(--card); padding: 28px 24px; text-align: center; }
.stat-num { font: 700 40px/1 var(--font-head); color: var(--signal-deep); margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.stat p { font-size: 14px; color: var(--ink-2); }
.stat a { display: inline-block; margin-top: 6px; font-size: 13px; color: var(--muted); }
.stat a:hover { color: var(--signal-deep); }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(3, 1fr); } .stats.one { grid-template-columns: 1fr; } }
.stats.one .stat { padding: 36px 24px; }
.stats.one .stat-num { font-size: 48px; }
.stats.one p { font-size: 17px; }

/* ---------- Cards and grids ---------- */
.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 640px) and (max-width: 899px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
.card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-bar); padding: 24px; box-shadow: var(--sh-1); }
.card p { color: var(--ink-2); font-size: 15px; line-height: 1.6; }
.card .h3 { font-size: 19px; }
.card-label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--signal-deep); }
.card-link { display: block; text-decoration: none; transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.card-link:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--line-strong); }
.card-link .arrow-link { margin-top: 16px; }
.dark .card { background: var(--ground-raised); border-color: var(--ground-line); box-shadow: none; }
.dark .card p { color: var(--on-dark-2); }
.icon-tile { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-bottom: 16px; border-radius: 12px 3px 12px 3px; background: var(--signal-soft); color: var(--signal-deep); }
.icon-tile svg { width: 22px; height: 22px; }
.callout { border-left: 3px solid var(--signal); background: var(--card); border-radius: 0 var(--r-card) var(--r-card) 0; padding: 22px 24px; box-shadow: var(--sh-1); color: var(--ink-2); line-height: 1.7; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--card); font-size: 13px; color: var(--ink-2); }
.feature { display: flex; gap: 16px; align-items: flex-start; }
.feature .icon-tile { flex-shrink: 0; margin-bottom: 0; }
.feature h3 { font: 650 16px/1.35 var(--font-body); margin-bottom: 4px; letter-spacing: 0; }
.feature p { font-size: 15px; color: var(--ink-2); }

/* ---------- Steps ("how it works") ---------- */
.steps { display: grid; gap: 16px; counter-reset: step; }
.step { position: relative; padding: 28px 24px 24px; }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: 18px; border-radius: 12px 3px 12px 3px; background: var(--ground); color: var(--air); font: 700 16px/1 var(--font-head); }
.step-kicker { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; color: var(--signal-deep); }
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .step:not(:last-child)::after { content: ''; position: absolute; top: 47px; left: calc(24px + 40px + 12px); right: -20px; height: 2px; background: linear-gradient(90deg, var(--line-strong), transparent); }
}
