/* =========================================================
   Safeflow — brand tokens (from the logo)
   ink #1A1614 · paper #F8F6F3 · accent #D36B4D
   track light #E6D5C9 · track dark #3D332F
   ========================================================= */
:root {
  --accent: #D36B4D;
  --accent-strong: #B9563A;
  --accent-soft: rgba(211, 107, 77, 0.12);
  --on-accent: #FFFFFF;

  --bg: #F8F6F3;
  --bg-alt: #F1ECE6;
  --surface: #FFFFFF;
  --surface-2: #FBF9F7;
  --ink: #1A1614;
  --ink-2: #4A403B;
  --ink-3: #7A6D66;
  --line: #E9E1D9;
  --track: #E6D5C9;
  --core-hole: #F8F6F3;

  --shadow: 0 1px 2px rgba(26, 22, 20, 0.04), 0 12px 32px -12px rgba(26, 22, 20, 0.14);
  --shadow-lg: 0 2px 4px rgba(26, 22, 20, 0.04), 0 30px 60px -20px rgba(26, 22, 20, 0.22);

  --radius: 18px;
  --radius-sm: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
          "PingFang HK", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent-strong: #E08064;
    --accent-soft: rgba(211, 107, 77, 0.16);
    --bg: #1A1614;
    --bg-alt: #201B19;
    --surface: #25201D;
    --surface-2: #2B2522;
    --ink: #F8F6F3;
    --ink-2: #D6CCC5;
    --ink-3: #A0938B;
    --line: #3D332F;
    --track: #3D332F;
    --core-hole: #1A1614;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -12px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 30px 60px -20px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --accent-strong: #E08064;
  --accent-soft: rgba(211, 107, 77, 0.16);
  --bg: #1A1614;
  --bg-alt: #201B19;
  --surface: #25201D;
  --surface-2: #2B2522;
  --ink: #F8F6F3;
  --ink-2: #D6CCC5;
  --ink-3: #A0938B;
  --line: #3D332F;
  --track: #3D332F;
  --core-hole: #1A1614;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 30px 60px -20px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .3s ease, color .3s ease;
}
h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
.lucide { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
code, kbd { font-family: var(--mono); font-size: .88em; }
code { background: var(--accent-soft); color: var(--accent-strong); padding: .1em .4em; border-radius: 6px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ---------- logo mark ---------- */
.mark-track { stroke: var(--track); }
.mark-arc { stroke: var(--accent); }
.mark-core { fill: var(--accent); }

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-word { font-size: 22px; letter-spacing: -0.03em; line-height: 1; }
.brand-word b { font-weight: 700; }
.brand-word span { font-weight: 400; color: var(--accent); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: 999px;
  font-weight: 600; font-size: 16px; white-space: nowrap;
  border: 1px solid transparent;
  transition: transform .15s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 20px -8px rgba(211, 107, 77, .7); }
.btn-primary:hover { background: #C45F42; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }

.icon-btn {
  width: 38px; height: 38px; border-radius: 999px;
  display: inline-grid; place-items: center;
  background: transparent; border: 1px solid var(--line); color: var(--ink);
  cursor: pointer; font: 600 14px var(--font);
  transition: border-color .2s ease, background-color .2s ease;
}
.icon-btn:hover { border-color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.icon-btn .i-sun circle { fill: currentColor; stroke: none; }
.icon-btn .i-moon { display: none; }
:root[data-theme="dark"] .icon-btn .i-sun { display: none; }
:root[data-theme="dark"] .icon-btn .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-btn .i-sun { display: none; }
  :root:not([data-theme="light"]) .icon-btn .i-moon { display: block; }
}
.lang-zh { display: none; }
:root[lang="zh-Hant"] .lang-en { display: none; }
:root[lang="zh-Hant"] .lang-zh { display: inline; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background-color .3s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.nav-links { display: flex; align-items: center; gap: 24px; margin-left: auto; font-size: 15px; color: var(--ink-2); }
.nav-menu { position: relative; }
.nav-menu summary { display: flex; align-items: center; gap: 7px; cursor: pointer; list-style: none; white-space: nowrap; transition: color .15s ease; }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .15s ease; }
.nav-menu[open] summary::after { transform: rotate(225deg) translate(-2px, -1px); }
.nav-menu summary:hover, .nav-menu[open] summary, .nav-dropdown a:hover { color: var(--accent); }
.nav-dropdown { position: absolute; top: calc(100% + 18px); left: -18px; width: max-content; min-width: 210px; display: grid; gap: 2px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); }
.nav-dropdown a { display: block; padding: 10px 12px; border-radius: 9px; white-space: nowrap; transition: color .15s ease, background-color .15s ease; }
.nav-dropdown a:hover { background: var(--accent-soft); }
.nav-mobile-cta, .menu-toggle { display: none; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
main [id] { scroll-margin-top: 92px; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 72px 0 88px; overflow: hidden; }
.hero-glow {
  position: absolute; right: max(-120px, calc(50% - 700px)); top: -40px; width: 700px; height: 700px;
  pointer-events: none; opacity: .55;
  -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent 100%); mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
}
.hero-glow svg { width: 100%; height: 100%; }
.glow-track { stroke: var(--line); }
.glow-arc { stroke: var(--accent); opacity: .55; transform-origin: center; animation: spin 36s linear infinite; }
@keyframes spin { from { transform: rotate(-65deg); } to { transform: rotate(295deg); } }

.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 14px; color: var(--ink-2); margin-bottom: 26px;
}
.eyebrow .dot { position: relative; width: 8px; height: 8px; flex: none; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 3px rgba(34, 197, 94, .18); }
/* "online" pulse, like a presence indicator */
.eyebrow .dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #22C55E; animation: online-pulse 2.4s ease-out infinite; }
@keyframes online-pulse { 0% { transform: scale(1); opacity: .55; } 70%, 100% { transform: scale(2.6); opacity: 0; } }
.hero h1 { font-size: clamp(38px, 5vw, 62px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.02; }
.hero h1 em { font-style: normal; font-weight: 400; color: var(--accent); }
:root[lang="zh-Hant"] .hero h1 { font-size: clamp(38px, 5.4vw, 68px); letter-spacing: 0; line-height: 1.15; }
:root[lang="zh-Hant"] .hero h1 > * { white-space: nowrap; }
.lead { margin-top: 24px; font-size: 19px; color: var(--ink-2); max-width: 540px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-ctas.center { justify-content: center; }
.hero-proof { list-style: none; padding: 0; margin: 34px 0 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--ink-3); }
.hero-proof li { display: inline-flex; align-items: center; gap: 8px; }
.hero-proof li::before {
  content: ""; width: 16px; height: 16px; flex: none; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4.8 8.2 2.1 2.1 4.3-4.6' fill='none' stroke='%23D36B4D' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
}

/* ---------- chat demo ---------- */
.chat {
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.chat-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.chat-avatar { width: 34px; height: 34px; }
.chat-title { font-weight: 700; font-size: 15px; line-height: 1.2; }
.chat-sub { font-size: 12.5px; color: var(--ink-3); }
.demo-replay { margin-left: auto; padding: 5px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink-2); font: 600 12px var(--font); cursor: pointer; }
.demo-replay:hover { border-color: var(--accent); color: var(--accent); }
.chat-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; background: var(--surface-2); }
.hero-demo .chat-body { height: 480px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; align-content: start; }
.hero-demo .chat-body .msg { animation: demo-appear .35s ease both; }
@keyframes demo-appear { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.msg { max-width: 88%; padding: 12px 15px; border-radius: 16px; font-size: 15px; line-height: 1.5; }
.msg-user { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 5px; }
.msg-bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.msg-bot strong { color: var(--accent-strong); }
.msg.mono { font-family: var(--mono); font-size: 14px; }
.msg-bot.insight-card { width: 100%; max-width: 100%; padding: 17px; border-radius: 15px; }
.insight-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.insight-head strong { display: block; font-size: 15px; color: var(--ink); }
.insight-head small { display: block; color: var(--ink-3); font: 600 10px var(--mono); letter-spacing: .03em; }
.insight-icon { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.insight-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.insight-summary { color: var(--ink-2); font-size: 13.5px; }
.insight-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.insight-stat { padding: 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.insight-stat span { display: block; color: var(--ink-3); font-size: 11px; }
.insight-stat strong { display: block; margin-top: 3px; color: var(--ink); font-size: 13px; letter-spacing: -.02em; }
.sales-chart { margin-top: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.chart-title { font-size: 11px; font-weight: 700; color: var(--ink-2); }
.sales-chart svg { display: block; width: 100%; height: 105px; overflow: visible; }
.chart-grid { fill: none; stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.insight-card .chart-line { stroke-dasharray: 650; stroke-dashoffset: 650; animation: chart-draw 1.2s .25s ease forwards; }
.sales-chart circle { fill: var(--accent); stroke: var(--surface); stroke-width: 2; cursor: help; }
.sales-chart circle:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@keyframes chart-draw { to { stroke-dashoffset: 0; } }
.chart-labels { display: flex; justify-content: space-between; gap: 8px; color: var(--ink-3); font: 500 10px var(--font); }
.insight-details { margin-top: 10px; border-top: 1px solid var(--line); }
.insight-details summary { padding: 10px 0 2px; cursor: pointer; color: var(--accent-strong); font-size: 12px; font-weight: 700; }
.insight-table-wrap { max-height: 150px; overflow: auto; margin-top: 8px; }
.insight-details table { width: 100%; border-collapse: collapse; font-size: 11px; }
.insight-details th, .insight-details td { padding: 4px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.insight-details td { text-align: right; }
.insight-foot { margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--line); color: var(--ink-3); font-size: 11px; }
.compare-bars { display: grid; gap: 8px; margin-top: 14px; }
.compare-bars > div { display: grid; grid-template-columns: 30px 1fr 66px; align-items: center; gap: 8px; font-size: 11px; }
.compare-bars span { color: var(--ink-2); }
.compare-bars i { height: 9px; background: linear-gradient(90deg, var(--accent) var(--bar), var(--track) var(--bar)); border-radius: 99px; }
.compare-bars b { text-align: right; font: 600 11px var(--mono); }
.demo-suggestions { display: flex; gap: 7px; padding: 12px 16px 2px; overflow-x: auto; scrollbar-width: none; }
.demo-suggestions::-webkit-scrollbar { display: none; }
@media (max-width: 640px) { .demo-suggestions { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 32px; } }
.demo-suggestions button { flex: none; padding: 7px 10px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--ink-2); font: 500 11px var(--font); cursor: pointer; }
.demo-suggestions button:hover { border-color: var(--accent); color: var(--accent); }
.demo-suggestions button:disabled { opacity: .5; cursor: wait; }
.chat-input {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 10px 16px 0; padding: 5px 5px 5px 14px; border: 1px solid var(--line); border-radius: 14px;
  color: var(--ink-3); font-size: 14px; background: var(--surface);
}
.chat-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.chat-input input { width: 100%; min-width: 0; padding: 8px 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 14px var(--font); }
.chat-input input::placeholder { color: var(--ink-3); }
.chat-send { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border: 0; border-radius: 10px; background: var(--accent); color: var(--on-accent); cursor: pointer; }
.chat-send:disabled { opacity: .5; cursor: wait; }
.chat-send svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.demo-disclaimer { padding: 7px 16px 14px; color: var(--ink-3); font-size: 10.5px; }

/* ---------- platforms and video ---------- */
.section.platforms { padding: 84px 0; }
.platforms-intro { max-width: 720px; text-align: center; margin: 0 auto 32px; }
.platform-list { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 0; padding: 0; }
.platform-list li { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 86px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); font-size: 15px; font-weight: 700; white-space: nowrap; }
.platform-list img { width: 42px; height: 42px; flex: none; object-fit: contain; }
.device-note { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 24px; color: var(--ink-2); font-size: 14px; }
.device-icons { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); }
.device-icons svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.video-grid { display: grid; grid-template-columns: .7fr 1.3fr; gap: 56px; align-items: center; }
.video-link { display: inline-block; margin-top: 22px; color: var(--accent-strong); font-weight: 700; }
.video-player { aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: #1A1614; box-shadow: var(--shadow-lg); }
.video-player iframe { display: block; width: 100%; height: 100%; border: 0; }
.video-poster { display: block; position: relative; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; color: white; cursor: pointer; }
.video-poster img { display: block; width: 100%; height: 100%; object-fit: cover; }
.video-poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.55)); }
.video-play-pill { position: absolute; z-index: 1; left: 20px; bottom: 18px; display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; border-radius: 999px; background: rgba(20, 16, 14, .62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 6px 18px rgba(0,0,0,.25); transition: background .15s, transform .15s; }
.video-play-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--accent); }
.video-play-icon .lucide { width: 17px; height: 17px; margin-left: 2px; fill: currentColor; stroke-width: 2; }
.video-play-label { font-size: 14px; font-weight: 700; }
.video-poster:hover .video-play-pill, .video-poster:focus-visible .video-play-pill { background: rgba(20, 16, 14, .8); transform: translateY(-1px); }
.video-poster:hover .video-play-icon { background: #C45F42; }
.video-poster:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }

/* ---------- sources ---------- */
.section.capture-section { padding-top: 96px; padding-bottom: 96px; }
.capture-frame { margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.capture-frame a { display: block; overflow: hidden; border-radius: 14px; background: #1f1f1f; }
.capture-frame img { display: block; width: 100%; height: auto; }
.capture-frame figcaption, .phone-shot figcaption { margin-top: 12px; color: var(--ink-3); font-size: 13px; text-align: center; }
.sources { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 30px 0; }
.sources-title { text-align: center; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.sources-list { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.sources-list li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 14px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.source-mark { width: 26px; height: 26px; flex: none; display: inline-grid; place-items: center; border-radius: 7px; color: white; }
.source-mark .lucide { width: 16px; height: 16px; stroke-width: 2; }
.source-mark .si { width: 15px; height: 15px; fill: currentColor; }
.source-salesforce { background: #00A1E0; }
.source-postgres { background: #336791; }
.source-excel { background: #107C41; }
.source-onedrive { background: #0078D4; }
.source-sharepoint { background: #008272; }
.source-sheets { background: #188038; }

/* ---------- sections ---------- */
.section { padding: 112px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.kicker { font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
h2 { font-size: clamp(32px, 4.2vw, 50px); font-weight: 700; letter-spacing: -0.03em; }
.section-lead { margin-top: 18px; font-size: 18px; color: var(--ink-2); }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.card-icon {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: var(--accent-soft); margin-bottom: 20px;
}
.card-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 19px; margin-bottom: 10px; }
.card p { color: var(--ink-2); font-size: 15.5px; }

/* ---------- nimble ---------- */
.nimble-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 72px; align-items: center; }
.feature-list { list-style: none; padding: 0; margin: 40px 0 0; display: grid; gap: 26px; }
.feature-list li { position: relative; padding-left: 30px; }
.feature-list li::before {
  content: ""; position: absolute; left: 0; top: 5px; width: 14px; height: 14px;
  border-radius: 4px; background: var(--accent); transform: rotate(45deg);
}
.feature-list h3 { font-size: 18px; margin-bottom: 6px; }
.feature-list p { color: var(--ink-2); font-size: 15.5px; }
.phone-shot { width: 100%; max-width: 370px; margin: 0 auto; padding: 8px 8px 12px; border: 1px solid var(--line); border-radius: 28px; background: var(--surface); box-shadow: var(--shadow-lg); }
.phone-shot a { display: block; overflow: hidden; border-radius: 20px; }
.phone-shot img { display: block; width: 100%; height: auto; }

.phone {
  position: relative; width: 100%; max-width: 360px; margin: 0 auto;
  border-radius: 44px; padding: 12px; background: var(--ink);
  box-shadow: var(--shadow-lg);
}
:root[data-theme="dark"] .phone { background: #0F0C0B; outline: 1px solid var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .phone { background: #0F0C0B; outline: 1px solid var(--line); } }
.phone-notch { position: absolute; top: 20px; left: 50%; width: 90px; height: 24px; margin-left: -45px; border-radius: 20px; background: #000; z-index: 2; }
.phone-screen {
  border-radius: 34px; background: var(--surface-2); padding: 58px 14px 22px;
  display: flex; flex-direction: column; gap: 10px; min-height: 560px;
}
.phone .msg { font-size: 14px; max-width: 92%; }
.ws-list { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; font-size: 13.5px; }
.ws-list li::marker { color: var(--accent); font-weight: 700; }
.ws-list span { color: var(--ink-3); margin-left: 6px; }
.ws-list span::before { content: "· "; }
.typing { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); animation: blink 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }

/* ---------- how ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.step { padding: 30px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.step-num { font: 600 14px var(--mono); color: var(--accent); display: block; margin-bottom: 18px; }
.step h3 { font-size: 24px; margin-bottom: 10px; }
.step p { color: var(--ink-2); font-size: 15.5px; }

.flow { display: flex; align-items: center; margin-top: 48px; padding: 32px; border-radius: 24px; border: 1px dashed var(--line); }
.flow-node {
  flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
  padding: 18px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
}
.flow-node span { font-weight: 600; font-size: 15.5px; }
.flow-node small { color: var(--ink-3); font-size: 13px; }
.flow-core { border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.flow-core svg { width: 38px; height: 38px; margin-bottom: 6px; }
.flow-line { flex: .5; height: 2px; background: var(--line); position: relative; overflow: hidden; }
.flow-line i { position: absolute; inset: 0; width: 40%; background: linear-gradient(90deg, transparent, var(--accent), transparent); animation: pulse 2.4s linear infinite; }
@keyframes pulse { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* ---------- use cases ---------- */
.usecase-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.usecase { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.usecase h3 { font-size: 19px; margin-bottom: 18px; }
.q-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.q-list li {
  padding: 10px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line);
  font-size: 14.5px; color: var(--ink-2);
}
.q-list li { display: flex; gap: 10px; align-items: flex-start; }
.q-list li::before { content: ""; width: 16px; height: 16px; flex: none; margin-top: 3px; background: var(--accent); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719'/%3E%3C/svg%3E") center / contain no-repeat; }

/* ---------- cta ---------- */
.cta {
  position: relative; overflow: hidden; text-align: center;
  padding: 80px 32px; border-radius: 32px;
  background: var(--ink); color: var(--bg);
}
:root[data-theme="dark"] .cta { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cta { background: var(--surface); color: var(--ink); border: 1px solid var(--line); } }
.cta-mark { width: 64px; height: 64px; margin-bottom: 24px; }
.cta .mark-track { stroke: rgba(248, 246, 243, .16); }
.cta h2 { max-width: 760px; margin: 0 auto; }
.cta p { max-width: 580px; margin: 18px auto 0; font-size: 18px; opacity: .78; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 36px 0; }
.footer-inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-inner .brand-mark { width: 26px; height: 26px; }
.footer-inner .brand-word { font-size: 19px; }
.footer-tag { color: var(--ink-3); font-size: 14px; }
.footer-copy { margin-left: auto; color: var(--ink-3); font-size: 14px; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .nav-inner { position: relative; }
  .nav-links { display: none; position: absolute; left: 24px; right: 24px; top: calc(100% - 1px); margin: 0; padding: 14px; flex-direction: column; align-items: stretch; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 0 0 18px 18px; box-shadow: var(--shadow-lg); }
  .nav.is-open .nav-links { display: flex; }
  .nav-menu summary { padding: 13px 10px; justify-content: space-between; }
  .nav-dropdown { position: static; width: auto; min-width: 0; padding: 0 0 8px 10px; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
  .menu-toggle { display: inline-grid; }
  .nav-actions { margin-left: auto; }
  .hero-grid, .nimble-grid, .video-grid { grid-template-columns: 1fr; gap: 48px; }
  .platform-list { grid-template-columns: repeat(2, 1fr); }
  .card-grid, .usecase-grid, .steps { grid-template-columns: 1fr 1fr; }
  .hero-glow { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .nav-links { left: 16px; right: 16px; }
  .nav-cta, .nav-example { display: none; }
  .nav-mobile-cta { display: block; margin-top: 8px; padding: 12px 10px; color: var(--accent); font-weight: 600; }
  .hero { padding: 48px 0 64px; }
  .lead { font-size: 17px; }
  .section { padding: 76px 0; }
  .hero-demo .chat-body { height: 420px; }
  .platform-list li { flex-direction: column; gap: 7px; min-height: 100px; font-size: 13px; }
  .platform-list img { width: 36px; height: 36px; }
  .device-note { flex-direction: column; gap: 8px; text-align: center; }
  .video-play-pill { left: 12px; bottom: 12px; }
  .card-grid, .usecase-grid, .steps { grid-template-columns: 1fr; }
  .flow { flex-direction: column; padding: 20px; }
  .flow-node { width: 100%; }
  .flow-line { flex: none; width: 2px; height: 28px; }
  .flow-line i { width: 100%; height: 40%; background: linear-gradient(180deg, transparent, var(--accent), transparent); animation-name: pulse-v; }
  .cta { padding: 56px 20px; border-radius: 24px; }
  .footer-copy { margin-left: 0; }
  .insight-stats { grid-template-columns: 1fr 1fr; }
}
@keyframes pulse-v { from { transform: translateY(-100%); } to { transform: translateY(250%); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; animation-iteration-count: 1 !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- request-a-demo modal ---------- */
.demo-modal {
  width: min(540px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px);
  padding: 0; margin: auto; overflow: hidden;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.demo-modal.is-step-2 { width: min(760px, calc(100vw - 32px)); }
.demo-modal::backdrop { background: rgba(26, 22, 20, 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.demo-modal[open] { animation: demo-in .22s ease-out; }
@keyframes demo-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.demo-modal-inner { position: relative; max-height: calc(100dvh - 34px); overflow-y: auto; padding: 32px; overscroll-behavior: contain; }
.demo-modal-close { position: absolute; top: 16px; right: 16px; }
.demo-progress { display: flex; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; }
.demo-progress li { width: 28px; height: 4px; border-radius: 99px; background: var(--line); }
.demo-progress li.is-active { background: var(--accent); }
.demo-progress li.is-done { background: var(--accent-soft); }
.demo-modal-title { padding-right: 44px; font-size: 26px; line-height: 1.2; letter-spacing: -0.02em; }
.demo-modal-desc { margin: 8px 0 24px; color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.demo-form { display: grid; gap: 16px; }
.demo-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.demo-field { display: grid; gap: 6px; min-width: 0; }
.demo-field label { color: var(--ink-2); font-size: 13px; font-weight: 600; }
.demo-field input, .demo-field select, .demo-field textarea {
  width: 100%; min-width: 0; padding: 11px 14px;
  background: var(--surface-2); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: 15px/1.4 var(--font); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.demo-field textarea { resize: vertical; min-height: 84px; }
.demo-field input:focus, .demo-field select:focus, .demo-field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.demo-field .is-invalid { border-color: var(--accent-strong); }
.demo-select { position: relative; }
.demo-select select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer; }
.demo-select select:invalid { color: var(--ink-3); }
.demo-select select option { color: var(--ink); }
.demo-select::after { content: ""; position: absolute; top: 50%; right: 16px; width: 7px; height: 7px; margin-top: -6px; border-right: 1.8px solid var(--ink-3); border-bottom: 1.8px solid var(--ink-3); transform: rotate(45deg); pointer-events: none; }
.demo-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.demo-error { margin: 0; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-strong); font-size: 14px; }
.demo-submit { width: 100%; margin-top: 4px; }
.demo-submit:disabled { opacity: .65; cursor: progress; }
.demo-calendar iframe { display: block; }
html.demo-open { overflow: hidden; }
@media (max-width: 640px) {
  .demo-modal-inner { padding: 24px 20px; }
  .demo-modal-title { font-size: 22px; }
  .demo-row { grid-template-columns: 1fr; }
}

/* ---------- safety section (five safeguards) ---------- */
/* flex row: every card the same width, and a partial last row is centred */
.security-grid.safety-grid { display: flex; flex-wrap: wrap; justify-content: center; }
.safety-grid article { flex: 0 0 calc((100% - 64px) / 5); }
.safety-grid article .security-flow-icon { margin-bottom: 18px; }
.safety-grid h3 { font-size: 17px; }
.safety-foot { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.safety-experts { display: flex; align-items: flex-start; gap: 14px; max-width: 620px; margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.safety-experts strong { color: var(--ink); }
.safety-tagline { margin: 0; max-width: 380px; color: var(--ink); font-size: 17px; font-weight: 600; line-height: 1.4; text-align: right; }
.safety-tagline em { font-style: normal; color: var(--accent); }
@media (max-width: 1100px) { .safety-grid article { flex-basis: calc((100% - 32px) / 3); } }
@media (max-width: 760px) {
  .safety-grid article { flex-basis: 100%; }
  .safety-foot { flex-direction: column; align-items: flex-start; }
  .safety-tagline { text-align: left; }
}

/* ---------- Q&A ---------- */
.faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: start; }
.faq-grid .section-head { position: sticky; top: 110px; margin-bottom: 0; }
.faq-list { display: grid; gap: 10px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); transition: border-color .2s; }
.faq-item[open] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.faq-item summary { position: relative; padding: 18px 52px 18px 20px; color: var(--ink); font-size: 17px; font-weight: 600; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ""; position: absolute; top: 50%; right: 22px; width: 8px; height: 8px; margin-top: -6px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg); transition: transform .2s; }
.faq-item[open] summary::after { transform: rotate(225deg); margin-top: -2px; border-color: var(--accent); }
.faq-item p { margin: 0; padding: 0 20px 18px; color: var(--ink-2); font-size: 15.5px; line-height: 1.6; }
@media (max-width: 980px) {
  .faq-grid { grid-template-columns: 1fr; gap: 28px; }
  .faq-grid .section-head { position: static; }
}

/* ---------- flat nav ---------- */
.nav-link { white-space: nowrap; transition: color .15s ease; }
.nav-link:hover { color: var(--accent); }
@media (max-width: 980px) { .nav-link { padding: 13px 10px; } }

/* ---------- case study ---------- */
.case-fig { position: relative; display: grid; grid-template-columns: 1fr minmax(240px, .8fr) 1fr; gap: 48px; align-items: center; margin: 0; }
.case-fig::before { content: ""; position: absolute; left: 12%; right: 12%; top: 50%; border-top: 2px dashed var(--line); z-index: 0; }
.case-col, .case-core { position: relative; z-index: 1; }
.case-col { display: grid; gap: 10px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.case-label { margin: 0 0 4px; color: var(--ink-3); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.case-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--ink); font-size: 15.5px; font-weight: 600; }
.case-item .lucide { width: 20px; height: 20px; flex: none; color: var(--accent); }
.case-person span { display: flex; flex-direction: column; gap: 2px; }
.case-person b { font-weight: 600; }
.case-person small { color: var(--ink-3); font-size: 13.5px; font-weight: 500; }
.case-core { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 30px 24px; border: 1px solid var(--accent); border-radius: var(--radius); background: var(--surface); box-shadow: 0 0 0 6px var(--accent-soft); text-align: center; }
.case-mark { width: 64px; height: 64px; }
.case-core strong { color: var(--ink); font-size: 18px; }
.case-core span { color: var(--ink-3); font-size: 14px; line-height: 1.45; }
.case-metrics { margin-top: 36px; }
.case-metric-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 12px; }
.case-metric { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font-size: 16px; font-weight: 600; }
.case-metric .lucide { width: 22px; height: 22px; flex: none; color: var(--accent); }
@media (max-width: 860px) {
  .case-fig { grid-template-columns: 1fr; gap: 20px; }
  .case-fig::before { left: 50%; right: auto; top: 6%; bottom: 6%; border-top: 0; border-left: 2px dashed var(--line); }
  .case-metric-row { grid-template-columns: 1fr; }
}

/* self-hosted promo video: clickable in-video CTA + end card */
.video-player { position: relative; }
.video-player video { display: block; width: 100%; height: 100%; background: #000; }
.video-cta { position: absolute; left: 39.17%; top: 71.08%; width: 21.67%; height: 8.53%; border-radius: 999px; }
.video-cta:hover { box-shadow: 0 0 0 3px rgba(255,255,255,.8); }
.video-cta[hidden] { display: none; }
.video-cta.is-pulsing { animation: cta-pulse 1.4s ease-out infinite; }
@keyframes cta-pulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.9), 0 0 0 0 rgba(211,107,77,.7); } 70% { box-shadow: 0 0 0 10px rgba(255,255,255,0), 0 0 0 22px rgba(211,107,77,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0), 0 0 0 0 rgba(211,107,77,0); } }
@media (prefers-reduced-motion: reduce) { .video-cta.is-pulsing { animation: none; box-shadow: 0 0 0 3px #fff; } }
.demo-calendar { position: relative; min-height: 600px; }
.demo-calendar::before { content: attr(data-loading); position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); font-size: 14px; }
.demo-calendar.is-loaded::before { content: none; }
.demo-calendar iframe { position: relative; transition: opacity .3s; }
