/* Connect360 marketing site — shared styles
   Layout: light reading sections on `page`, dark bands (.c3-band) only for results.
   Tokens follow the Connect360 design system; dark values mirror its dark theme. */

:root {
  --page: #FAFAF9;
  --surface: #FFFFFF;
  --surface-sunk: #F4F4F2;
  --surface-active: #ECEDE8;
  --line: #E7E7E4;
  --ink: #18191B;
  --ink-muted: #6B6E68;
  --green: #3F6B0B;
  --on-green: #FFFFFF;
  --green-mark: #6B931B;
  --green-tint: #EEF5E0;
  --orange: #B4440E;
  --orange-mark: #E8662A;
  --orange-tint: #FFF4EC;
  --orange-border: #F8D9C6;
  --orange-tag: #FDE7D8;
  --amber: #8A5A00;
  --amber-tint: #FBF1DC;
  --focus: #3F6B0B;
  --logo-plate: transparent;

  --band-surface: #0F110D;
  --band-line: #272B23;
  --band-ink: #EEF0EA;
  --band-muted: #9A9F93;
  --band-green: #A9CF5B;
  --band-orange: #FF8A4C;
  --band-raise: #181B15;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Figtree", system-ui, "Segoe UI", Roboto, sans-serif;

  --space-4: 4px; --space-8: 8px; --space-12: 12px; --space-16: 16px; --space-20: 20px;
  --space-24: 24px; --space-32: 32px; --space-40: 40px; --space-64: 64px;
  --radius-tag: 6px; --radius-control: 8px; --radius-card: 12px; --radius-band: 16px;
  --layout-max: 1360px;
  --layout-header: 64px;
  --shadow-selected: 0 1px 2px rgba(15,17,13,.12), 0 0 0 1px rgba(15,17,13,.04);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #0B0C0A; --surface: #131511; --surface-sunk: #1A1D17; --surface-active: #23271F;
    --line: #2A2E26; --ink: #EEF0EA; --ink-muted: #9EA397;
    --green: #A9CF5B; --on-green: #0F110D; --green-mark: #8DB83A; --green-tint: #1E2914;
    --orange: #FF9A63; --orange-mark: #FF8A4C; --orange-tint: #2A1A10; --orange-border: #5A2E16; --orange-tag: #3A2114;
    --amber: #E8B04A; --amber-tint: #2E2410; --focus: #A9CF5B; --logo-plate: #FFFFFF;
    --band-surface: #161913; --band-line: #2C3127; --band-raise: #1E221A;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #0B0C0A; --surface: #131511; --surface-sunk: #1A1D17; --surface-active: #23271F;
  --line: #2A2E26; --ink: #EEF0EA; --ink-muted: #9EA397;
  --green: #A9CF5B; --on-green: #0F110D; --green-mark: #8DB83A; --green-tint: #1E2914;
  --orange: #FF9A63; --orange-mark: #FF8A4C; --orange-tint: #2A1A10; --orange-border: #5A2E16; --orange-tag: #3A2114;
  --amber: #E8B04A; --amber-tint: #2E2410; --focus: #A9CF5B; --logo-plate: #FFFFFF;
  --band-surface: #161913; --band-line: #2C3127; --band-raise: #1E221A;
  color-scheme: dark;
}

/* Dark band: re-points the working tokens so components render on band-surface */
.c3-band {
  --surface: var(--band-raise);
  --surface-sunk: #20241C;
  --line: var(--band-line);
  --ink: var(--band-ink);
  --ink-muted: var(--band-muted);
  --green: var(--band-green);
  --on-green: #0F110D;
  --green-mark: var(--band-green);
  --green-tint: #1E2914;
  --orange: var(--band-orange);
  --orange-mark: var(--band-orange);
  --orange-tint: #2A1A10;
  --orange-border: #5A2E16;
  --focus: var(--band-green);
  background: var(--band-surface);
  color: var(--ink);
  border-radius: var(--radius-band);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--layout-header) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font-family: var(--font-sans); font-size: 15px; line-height: 22px;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--surface); }
img { max-width: 100%; display: block; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.num, table, .metric, .metric-xl, .metric-s { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } html { scroll-behavior: auto; } }

/* Type scale */
.display-xl { font-size: 46px; line-height: 48px; font-weight: 700; letter-spacing: -0.035em; margin: 0; text-wrap: balance; }
.display { font-size: 38px; line-height: 42px; font-weight: 700; letter-spacing: -0.03em; margin: 0; text-wrap: balance; }
.heading { font-size: 20px; line-height: 26px; font-weight: 700; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
.card-title { font-size: 16px; line-height: 22px; font-weight: 600; margin: 0; }
.metric-xl { font-size: 56px; line-height: 58px; font-weight: 700; letter-spacing: -0.04em; }
.metric { font-size: 28px; line-height: 32px; font-weight: 700; letter-spacing: -0.025em; }
.metric-s { font-size: 20px; line-height: 26px; font-weight: 700; letter-spacing: -0.01em; }
.body-strong { font-weight: 600; }
.small { font-size: 13.5px; line-height: 20px; }
.label { font-size: 12.5px; line-height: 16px; font-weight: 500; color: var(--ink-muted); }
.muted { color: var(--ink-muted); }
.lede { font-size: 18px; line-height: 27px; color: var(--ink-muted); max-width: 60ch; margin: 0; text-wrap: pretty; }
p { margin: 0; max-width: 65ch; text-wrap: pretty; }
@media (max-width: 720px) {
  .display-xl { font-size: 36px; line-height: 40px; }
  .display { font-size: 30px; line-height: 34px; }
  .metric-xl { font-size: 44px; line-height: 46px; }
  .lede { font-size: 16.5px; line-height: 25px; }
}

/* Shell */
.wrap {
  max-width: var(--layout-max); margin: 0 auto;
  padding-left: max(32px, env(safe-area-inset-left, 0px));
  padding-right: max(32px, env(safe-area-inset-right, 0px));
}
@media (max-width: 720px) {
  .wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
}
.section { padding-block: 96px; border-top: 1px solid var(--line); }
.section-head { display: grid; gap: var(--space-16); margin-bottom: 48px; max-width: 760px; }
.eyebrow { font-size: 12.5px; line-height: 16px; font-weight: 600; color: var(--green); }
@media (max-width: 720px) { .section { padding-block: 64px; } .section-head { margin-bottom: 32px; } }

/* Header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { height: var(--layout-header); display: flex; align-items: center; gap: var(--space-24); }
.logo-link { display: inline-flex; align-items: center; flex: none; border-radius: var(--radius-card); background: var(--logo-plate); padding: 0; }
:root[data-theme="dark"] .logo-link { padding: 6px 10px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-link { padding: 6px 10px; } }
.logo-link img { width: 132px; height: auto; }
.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a { white-space: nowrap; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; padding: 8px 12px; border-radius: var(--radius-control); transition: background .15s ease-out; }
.nav a:hover { background: var(--surface-active); }
.header-cta { flex: none; }
.site-header .menu-btn { display: none; margin-left: auto; }
@media (max-width: 1060px) {
  .nav { display: none; position: absolute; top: var(--layout-header); left: 0; right: 0; flex-direction: column; gap: 0;
         background: var(--surface); border-bottom: 1px solid var(--line);
         padding: 8px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px)); }
  .nav.open { display: flex; }
  .nav a { padding: 12px; font-size: 16px; min-height: 44px; }
  .site-header .menu-btn { display: inline-flex; }
  .site-header .header-cta { display: none; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: var(--radius-control);
  font: 600 14.5px/1 var(--font-sans); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background .15s ease-out, border-color .15s ease-out, color .15s ease-out;
  white-space: nowrap;
}
.btn-lg { min-height: 48px; padding: 0 20px; font-size: 15.5px; }
.btn-primary { background: var(--green); color: var(--on-green); }
.btn-primary:hover { background: color-mix(in srgb, var(--green) 88%, var(--ink)); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { background: var(--surface-active); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn svg { width: 18px; height: 18px; flex: none; }
@media (max-width: 720px) { .btn { min-height: 44px; } }

/* Tags, pills */
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; line-height: 16px; font-weight: 600; padding: 3px 8px; border-radius: var(--radius-tag); background: var(--surface-sunk); color: var(--ink-muted); border: 1px solid var(--line); white-space: nowrap; }
.tag-green { background: var(--green-tint); color: var(--green); border-color: transparent; }
.tag-orange { background: var(--orange-tag); color: var(--orange); border-color: transparent; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; line-height: 16px; font-weight: 600; padding: 3px 8px; border-radius: var(--radius-tag); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-on { background: var(--green-tint); color: var(--green); }
.pill-watch { background: var(--orange-tag); color: var(--orange); }
.pill-amber { background: var(--amber-tint); color: var(--amber); }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: var(--space-20); }

/* Segmented control */
.segmented { display: inline-flex; padding: 3px; background: var(--surface-sunk); border: 1px solid var(--line); border-radius: 10px; gap: 2px; }
.segmented button {
  font: 600 13.5px/1 var(--font-sans); color: var(--ink-muted); background: transparent; border: 0;
  padding: 0 14px; min-height: 34px; border-radius: var(--radius-control); cursor: pointer; transition: background .15s ease-out, color .15s ease-out;
}
.segmented button[aria-pressed="true"], .segmented button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-selected); }
@media (max-width: 720px) { .segmented button { min-height: 40px; } }

/* Icon squares */
.icon-sq { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--green-tint); color: var(--green); flex: none; }
.icon-sq svg { width: 24px; height: 24px; }
.ic { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Metric band */
.metric-band { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); border-top: 1px solid var(--line); }
.metric-band > div { padding: var(--space-20) var(--space-24); display: grid; gap: 6px; align-content: start; }
.metric-band > div + div { border-left: 1px solid var(--line); }
.metric-band .cmp { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.metric-band .cmp b { color: var(--green); font-weight: 600; }
@media (max-width: 900px) {
  .metric-band { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .metric-band > div:nth-child(3) { border-left: 0; }
  .metric-band > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* FAQ */
.faq { display: grid; border-top: 1px solid var(--line); max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; font-size: 16.5px; font-weight: 600; line-height: 24px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 2px solid var(--ink-muted); border-bottom: 2px solid var(--ink-muted); transform: rotate(45deg) translate(-3px,-3px); transition: transform .15s ease-out; }
.faq details[open] summary::after { transform: rotate(225deg) translate(-2px,-2px); }
.faq .answer { padding: 0 0 22px; color: var(--ink-muted); display: grid; gap: 10px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding-block: 56px 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer-grid h3 { font-size: 12.5px; line-height: 16px; font-weight: 600; color: var(--ink-muted); margin: 0 0 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-grid a { color: var(--ink); text-decoration: none; font-size: 14px; }
.footer-grid a:hover { color: var(--green); text-decoration: underline; }
.footer-base { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--ink-muted); font-size: 13px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* Consent banner */
.consent {
  position: fixed; z-index: 70; left: 16px; right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  margin-left: env(safe-area-inset-left, 0px); margin-right: env(safe-area-inset-right, 0px);
  max-width: 560px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 16px 20px; display: grid; gap: 12px; font-size: 14px; line-height: 20px;
}
.consent .row { display: flex; gap: 8px; flex-wrap: wrap; }

/* Sample-figure caption */
.sample { font-size: 12.5px; line-height: 16px; color: var(--ink-muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- Chat assistant (chat-widget.js) ---------- */
.c3c-launch {
  position: fixed; z-index: 80;
  right: calc(20px + env(safe-area-inset-right, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px) + var(--c3c-lift, 0px));
  height: 52px; padding: 0 18px 0 14px; border-radius: 26px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); display: inline-flex; align-items: center; gap: 10px;
  font: 600 14.5px/1 var(--font-sans); cursor: pointer;
  box-shadow: 0 6px 24px rgba(15,17,13,.14), 0 1px 3px rgba(15,17,13,.08);
  transition: transform .15s ease-out, background .15s ease-out;
}
.c3c-launch:hover { background: var(--surface-active); }
.c3c-launch img { width: 26px; height: 26px; border-radius: 50%; background: #fff; }
.c3c-launch[aria-expanded="true"] { display: none; }
.c3c-greet {
  position: fixed; z-index: 80; right: calc(20px + env(safe-area-inset-right, 0px));
  bottom: calc(84px + env(safe-area-inset-bottom, 0px) + var(--c3c-lift, 0px));
  max-width: min(300px, calc(100vw - 40px)); background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 40px 14px 16px; font-size: 14px; line-height: 20px; cursor: pointer;
  box-shadow: 0 6px 24px rgba(15,17,13,.14);
}
.c3c-greet button { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border: 0; background: transparent; color: var(--ink-muted); border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.c3c-panel {
  position: fixed; z-index: 90;
  right: calc(20px + env(safe-area-inset-right, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  width: 384px; height: min(620px, calc(100vh - 100px - env(safe-area-inset-top, 0px)));
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 16px;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden;
  box-shadow: 0 16px 48px rgba(15,17,13,.18), 0 2px 6px rgba(15,17,13,.08);
}
.c3c-head { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--line); }
.c3c-head img { width: 32px; height: 32px; border-radius: 50%; background: #fff; border: 1px solid var(--line); }
.c3c-head .who { display: grid; gap: 1px; min-width: 0; flex: 1; }
.c3c-head .who b { font-size: 14.5px; line-height: 20px; }
.c3c-head .who span { font-size: 12.5px; line-height: 16px; color: var(--ink-muted); }
.c3c-x { width: 36px; height: 36px; border: 0; background: transparent; color: var(--ink-muted); border-radius: 8px; cursor: pointer; display: grid; place-items: center; flex: none; }
.c3c-x:hover { background: var(--surface-active); color: var(--ink); }
.c3c-x svg, .c3c-greet svg { width: 18px; height: 18px; }
.c3c-log { overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; }
.c3c-msg { max-width: 88%; padding: 10px 14px; border-radius: 14px; font-size: 14.5px; line-height: 21px; overflow-wrap: anywhere; }
.c3c-msg p { margin: 0; max-width: none; }
.c3c-msg p + p, .c3c-msg ul + p, .c3c-msg p + ul { margin-top: 8px; }
.c3c-msg ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.c3c-msg a { color: var(--green); font-weight: 600; }
.c3c-bot { align-self: flex-start; background: var(--surface-sunk); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.c3c-me { align-self: flex-end; background: var(--green); color: var(--on-green); border-bottom-right-radius: 4px; }
.c3c-me a { color: inherit; }
.c3c-typing { color: var(--ink-muted); }
.c3c-typing i { display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; background: currentColor; animation: c3c-dot 1.2s infinite ease-in-out; }
.c3c-typing i:nth-child(2) { animation-delay: .15s; } .c3c-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes c3c-dot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.c3c-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.c3c-chips button { font: 500 13px/1 var(--font-sans); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; min-height: 34px; cursor: pointer; }
.c3c-chips button:hover { border-color: var(--green-mark); color: var(--green); }
.c3c-foot { border-top: 1px solid var(--line); padding: 10px 12px 12px; display: grid; gap: 8px; }
.c3c-form { display: flex; gap: 8px; align-items: flex-end; }
.c3c-form textarea { flex: 1; min-width: 0; resize: none; font: 400 15px/21px var(--font-sans); color: var(--ink); background: var(--surface-sunk); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; max-height: 120px; min-height: 44px; }
.c3c-form textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.c3c-send { width: 44px; height: 44px; flex: none; border: 0; border-radius: 10px; background: var(--green); color: var(--on-green); display: grid; place-items: center; cursor: pointer; }
.c3c-send:disabled { opacity: .45; cursor: default; }
.c3c-send svg { width: 20px; height: 20px; }
.c3c-note { font-size: 11.5px; line-height: 16px; color: var(--ink-muted); }
@media (max-width: 640px) {
  .c3c-panel { right: 0; left: 0; bottom: 0; width: auto; height: calc(100% - env(safe-area-inset-top, 0px) - 24px); border-radius: 16px 16px 0 0; border-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
  .c3c-launch { right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px) + var(--c3c-lift, 0px)); }
  .c3c-greet { right: calc(16px + env(safe-area-inset-right, 0px)); }
}

/* Exit banner */
.c3x-wrap { position: fixed; z-index: 100; left: 0; right: 0; top: calc(16px + env(safe-area-inset-top, 0px)); display: flex; justify-content: center;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); pointer-events: none; }
.c3x { pointer-events: auto; width: 100%; max-width: 560px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 20px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; box-shadow: 0 16px 48px rgba(15,17,13,.2); }
.c3x h2 { flex: 1 1 260px; margin: 0; font-size: 17px; line-height: 24px; font-weight: 700; letter-spacing: -0.01em; }
.c3x .row { display: flex; gap: 8px; }
.c3x .btn { min-width: 76px; }
.c3x-scrim { position: fixed; inset: 0; z-index: 99; background: rgba(10,12,9,.35); }
