/* Algo Connector Desk - public website. Same tokens as the Algo Connector family
   (trade-connector-gateway/app/globals.css). Dark by default, [data-theme="light"] flips it. */
:root {
  --bg: #0a0e17;
  --surface: #111826;
  --surface-2: #1a2333;
  --border: #262f42;
  --text: #e8ecf5;
  --muted: #8a93a8;
  --accent: #7c3aed;
  --accent-2: #a78bfa;
  --up: #22c55e;
  --down: #f87171;
  --warn: #f0b44c;
  --r: 18px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px -14px rgba(0, 0, 0, 0.6);
  --shadow-lift: 0 22px 60px -22px rgba(0, 0, 0, 0.6);
  --glass: rgba(17, 24, 38, 0.72);
  --glass-border: rgba(255, 255, 255, 0.1);
  --hero-grad: linear-gradient(95deg, #a78bfa 0%, #60a5fa 50%, #34d399 100%);
  --wa: #25d366;
  --bubble-in: #1a2333;
  --bubble-out: #183a2b;
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f2f5fb;
  --surface: #ffffff;
  --surface-2: #f5f8fc;
  --border: #dde5f2;
  --text: #101828;
  --muted: #5d6679;
  --accent: #6d28d9;
  --accent-2: #7c3aed;
  --up: #15803d;
  --down: #dc2626;
  --warn: #b7791f;
  --shadow: 0 1px 2px rgba(20, 20, 40, 0.04), 0 10px 30px -14px rgba(20, 20, 40, 0.12);
  --shadow-lift: 0 22px 50px -24px rgba(20, 20, 40, 0.28);
  --glass: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(20, 20, 40, 0.08);
  --hero-grad: linear-gradient(95deg, #6d28d9 0%, #2563eb 50%, #047857 100%);
  --bubble-in: #f1f4f9;
  --bubble-out: #dcf6e4;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 16px/1.6 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
.muted { color: var(--muted); }
.grad { background: var(--hero-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
section { padding: clamp(56px, 8vw, 96px) 0; position: relative; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 12px; }
.sec-head { max-width: 720px; margin-bottom: 40px; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.sec-head h2 { font-size: clamp(28px, 4vw, 42px); margin-bottom: 14px; }
.sec-head p { color: var(--muted); font-size: 18px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600;
  padding: 12px 22px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--accent-2); transform: translateY(-1px); }
.btn.primary { background: linear-gradient(135deg, #7c3aed, #4f46e5); border-color: transparent; color: #fff; box-shadow: 0 10px 30px -10px rgba(124, 58, 237, .7); }
.btn.primary:hover { box-shadow: 0 14px 36px -10px rgba(124, 58, 237, .85); }
.btn.ghost { background: transparent; }
.btn.small { padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .6; cursor: default; transform: none; }

/* header */
.top { position: sticky; top: 0; z-index: 30; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: var(--bg); background: color-mix(in srgb, var(--bg) 78%, transparent); border-bottom: 1px solid var(--glass-border); }
.top .wrap { display: flex; align-items: center; gap: 20px; height: 66px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; text-decoration: none; }
.logo .mark { width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(135deg, #7c3aed, #2563eb 60%, #10b981); display: grid; place-items: center; color: #fff; box-shadow: 0 6px 18px -6px rgba(124, 58, 237, .8); }
.nav { display: flex; gap: 22px; margin-left: 18px; }
.nav a { text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 500; }
.nav a:hover { color: var(--text); }
.top .actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); display: grid; place-items: center; cursor: pointer; font-size: 17px; }
.menu-btn { display: none; }
.mobile-nav { display: none; }

/* hero */
.hero { padding-top: clamp(48px, 7vw, 88px); overflow: hidden; }
.aurora { position: absolute; inset: -20% -10% auto; height: 760px; pointer-events: none; z-index: 0; filter: blur(70px); opacity: .55; }
.aurora::before, .aurora::after { content: ""; position: absolute; border-radius: 50%; }
.aurora::before { width: 520px; height: 420px; left: 8%; top: 10%; background: radial-gradient(circle, rgba(124, 58, 237, .65), transparent 70%); }
.aurora::after { width: 520px; height: 420px; right: 6%; top: 22%; background: radial-gradient(circle, rgba(16, 185, 129, .45), transparent 70%); }
[data-theme="light"] .aurora { opacity: .35; }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 999px; border: 1px solid var(--glass-border); background: var(--glass); font-size: 14px; color: var(--muted); margin-bottom: 22px; }
.pill b { background: rgba(37, 211, 102, .15); color: var(--wa); padding: 2px 10px; border-radius: 999px; font-size: 12px; }
.hero h1 { font-size: clamp(36px, 5.4vw, 62px); margin-bottom: 20px; }
.hero .lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 560px; margin-bottom: 30px; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.hero .fine { font-size: 14px; color: var(--muted); }

/* product mock */
.mock { position: relative; background: var(--glass); border: 1px solid var(--glass-border); border-radius: 22px; box-shadow: var(--shadow-lift); padding: 18px; backdrop-filter: blur(10px); }
.mock .bar { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, #f59e0b, #ef4444); display: grid; place-items: center; color: #fff; font-weight: 700; flex-shrink: 0; }
.mock .who { font-weight: 600; }
.mock .who small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); white-space: nowrap; }
.chip.svc { background: rgba(234, 88, 12, .14); border-color: rgba(234, 88, 12, .35); color: #fb923c; }
.chip.hot { background: rgba(239, 68, 68, .14); border-color: rgba(239, 68, 68, .35); color: #f87171; }
.chip.ok { background: rgba(34, 197, 94, .14); border-color: rgba(34, 197, 94, .35); color: var(--up); }
.chip.ai { background: rgba(124, 58, 237, .16); border-color: rgba(167, 139, 250, .4); color: var(--accent-2); }
.msgs { display: flex; flex-direction: column; gap: 8px; }
.bubble { max-width: 82%; padding: 9px 12px; border-radius: 14px; font-size: 14.5px; line-height: 1.45; }
.bubble.in { background: var(--bubble-in); border: 1px solid var(--border); border-top-left-radius: 4px; align-self: flex-start; }
.bubble.out { background: var(--bubble-out); border-top-right-radius: 4px; align-self: flex-end; }
.bubble .t { display: block; font-size: 11px; color: var(--muted); text-align: right; margin-top: 2px; }
.draft { margin-top: 14px; border: 1.5px dashed var(--accent-2); border-radius: 14px; padding: 12px; background: rgba(124, 58, 237, .08); }
.draft .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; font-size: 13px; }
.draft .txt { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; font-size: 14px; margin-bottom: 10px; }
.draft .btns { display: flex; gap: 8px; }
.draft .btns span { font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); }
.draft .btns span.go { background: var(--up); color: #fff; border-color: transparent; }
.float { position: absolute; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lift); padding: 10px 14px; font-size: 13px; }
.float.f1 { left: -28px; bottom: -64px; }
.float.f2 { right: -18px; top: -18px; }
.float b { display: block; font-size: 18px; }

/* trust strip */
.trust { padding: 26px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface); }
.trust .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.trust .item { display: flex; gap: 12px; align-items: center; font-size: 15px; }
.trust .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); font-size: 19px; flex-shrink: 0; }
.trust small { display: block; color: var(--muted); font-size: 13px; }

/* cards & grids */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 26px; box-shadow: var(--shadow); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.step .num { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; background: linear-gradient(135deg, rgba(124, 58, 237, .25), rgba(37, 99, 235, .2)); color: var(--accent-2); margin-bottom: 16px; }
.step h3 { font-size: 20px; margin-bottom: 8px; }
.step p { color: var(--muted); }

.fgroup h3 { font-size: 20px; display: flex; gap: 10px; align-items: center; margin-bottom: 16px; }
.fgroup h3 .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); }
.fgroup ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.fgroup li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; color: var(--muted); font-size: 15px; }
.fgroup li::before { content: "✓"; color: var(--up); font-weight: 700; }
.fgroup li b { color: var(--text); font-weight: 600; }

/* sorted automatically */
.sorted { display: grid; gap: 12px; }
.sort-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px 18px; }
.sort-row .q { font-size: 15px; }
.sort-row .q::before { content: "💬 "; }
.sort-row .arrow { color: var(--accent-2); font-size: 20px; }
.sort-row .to { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.sort-row .to small { color: var(--muted); font-size: 13px; }

/* industries */
.inds { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.ind h3 { font-size: 17px; margin-bottom: 10px; }
.ind .chips { margin-left: 0; }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; align-items: stretch; }
.plan { display: flex; flex-direction: column; gap: 16px; position: relative; }
.plan.best { border-color: var(--accent-2); box-shadow: 0 24px 60px -24px rgba(124, 58, 237, .6); background: linear-gradient(180deg, rgba(124, 58, 237, .1), var(--surface) 40%); }
.plan .tag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, #7c3aed, #4f46e5); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 14px; border-radius: 999px; white-space: nowrap; }
.plan h3 { font-size: 20px; }
.price { font-size: 42px; font-weight: 800; letter-spacing: -0.03em; }
.price small { font-size: 16px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; flex: 1; }
.plan li { display: grid; grid-template-columns: 20px 1fr; gap: 8px; font-size: 15px; color: var(--muted); }
.plan li::before { content: "✓"; color: var(--up); font-weight: 700; }
.plan .limits { font-size: 14px; color: var(--muted); border-top: 1px solid var(--border); padding-top: 12px; display: grid; gap: 4px; }
.plans-note { text-align: center; color: var(--muted); margin-top: 24px; font-size: 15px; }
.skeleton { min-height: 360px; background: linear-gradient(90deg, var(--surface), var(--surface-2), var(--surface)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--r); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* comparison */
.compare { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.compare th, .compare td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); font-size: 15px; }
.compare th { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface-2); }
.compare td.y { color: var(--up); font-weight: 600; }
.compare td.n { color: var(--muted); }
.compare tr:last-child td { border-bottom: 0; }
.table-scroll { overflow-x: auto; border-radius: var(--r); }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 820px; margin: 0 auto; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 4px 20px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent-2); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); padding-bottom: 16px; }

/* forms */
.form { display: grid; gap: 14px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label.f { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
label.f span.opt { color: var(--muted); font-weight: 400; }
input, select, textarea {
  font: inherit; font-size: 15px; color: var(--text); background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 11px; padding: 11px 13px; width: 100%; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(124, 58, 237, .2); }
textarea { resize: vertical; min-height: 96px; }
.pw { position: relative; }
.pw input { padding-right: 70px; }
.pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--accent-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 6px 8px; }
.msg { font-size: 14px; min-height: 1.4em; }
.msg.err { color: var(--down); }
.msg.ok { color: var(--up); }

.demo { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: start; }
.demo .points { display: grid; gap: 14px; margin-top: 22px; }
.demo .points div { display: flex; gap: 12px; color: var(--muted); }
.demo .points div::before { content: "→"; color: var(--accent-2); font-weight: 700; }

.cta-band { background: linear-gradient(135deg, rgba(124, 58, 237, .22), rgba(37, 99, 235, .14) 50%, rgba(16, 185, 129, .16)); border: 1px solid var(--glass-border); border-radius: 26px; padding: clamp(32px, 5vw, 56px); text-align: center; }
.cta-band h2 { font-size: clamp(26px, 3.6vw, 38px); margin-bottom: 12px; }
.cta-band p { color: var(--muted); margin-bottom: 26px; }

/* footer */
footer { border-top: 1px solid var(--border); padding: 40px 0 32px; margin-top: 40px; }
footer .wrap { display: flex; gap: 32px; flex-wrap: wrap; justify-content: space-between; }
footer .links { display: flex; gap: 22px; flex-wrap: wrap; }
footer a { text-decoration: none; color: var(--muted); font-size: 14px; }
footer a:hover { color: var(--text); }
footer .copy { width: 100%; color: var(--muted); font-size: 13px; border-top: 1px solid var(--border); padding-top: 20px; }

/* auth pages */
.auth { min-height: calc(100vh - 66px); display: grid; grid-template-columns: 1fr 1fr; }
.auth .side { position: relative; overflow: hidden; padding: clamp(32px, 6vw, 72px); border-right: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; justify-content: center; }
.auth .side .aurora { inset: -30% -40% auto; }
.auth .side > *:not(.aurora) { position: relative; z-index: 1; }
.auth .side h2 { font-size: clamp(26px, 3vw, 36px); margin-bottom: 14px; }
.auth .side ul { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 14px; }
.auth .side li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; color: var(--muted); }
.auth .side li::before { content: "✓"; color: var(--up); font-weight: 700; }
.auth .main { display: grid; place-items: center; padding: clamp(32px, 6vw, 72px) var(--gutter); }
.auth .box { width: 100%; max-width: 440px; }
.auth .box h1 { font-size: 30px; margin-bottom: 8px; }
.auth .box > p { color: var(--muted); margin-bottom: 26px; }
.auth .alt { text-align: center; color: var(--muted); font-size: 15px; margin-top: 20px; }
.auth .alt a { color: var(--accent-2); font-weight: 600; text-decoration: none; }

/* legal + 404 */
.legal { max-width: 780px; }
.legal h1 { font-size: clamp(30px, 4vw, 40px); margin-bottom: 8px; }
.legal h2 { font-size: 21px; margin: 32px 0 10px; }
.legal p, .legal li { color: var(--muted); margin-bottom: 10px; }
.legal ul { padding-left: 20px; }
.nf { min-height: 70vh; display: grid; place-items: center; text-align: center; overflow: hidden; }
.nf .big { font-size: clamp(80px, 16vw, 150px); font-weight: 800; line-height: 1; margin-bottom: 10px; }

/* responsive */
@media (max-width: 980px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .mock { max-width: 560px; }
  .float.f1 { left: 8px; }
  .float.f2 { right: 8px; }
  .trust .wrap { grid-template-columns: repeat(2, 1fr); }
  .grid3 { grid-template-columns: 1fr; }
  .demo { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth .side { border-right: 0; border-bottom: 1px solid var(--border); }
}
@media (max-width: 820px) {
  .nav, .top .actions .hide-sm { display: none; }
  .menu-btn { display: grid; }
  .mobile-nav.open { display: grid; gap: 4px; padding: 10px var(--gutter) 16px; border-top: 1px solid var(--border); }
  .mobile-nav a { text-decoration: none; padding: 10px 4px; color: var(--text); font-weight: 500; }
  .grid2 { grid-template-columns: 1fr; }
  .sort-row { grid-template-columns: 1fr; gap: 8px; }
  .sort-row .arrow { display: none; }
  .sort-row .to { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .trust .wrap { grid-template-columns: 1fr; }
  .form .two { grid-template-columns: 1fr; }
  .float { display: none; }
  .hero .ctas .btn { flex: 1; }
  .card { padding: 20px; }
  .compare th, .compare td { padding: 12px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
