/* ============================================================
   TidaTek — design tokens & global styles
   ============================================================ */

/* ---- font pairings (driven by data-fonts on <html>) ---- */
:root {
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}
html[data-fonts="sora"] {
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
}
html[data-fonts="outfit"] {
  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
}

/* ---- accent (driven by --accent on :root, set by tweaks) ---- */
:root {
  --accent: #5b8cff;
  --accent-ink: #06122e;
}

/* ---- dark theme (default) ---- */
:root,
html[data-theme="dark"] {
  --bg: #070a12;
  --bg-grad-1: #0a1124;
  --bg-grad-2: #070a12;
  --surface: #0b1020;
  --surface-2: #0e1426;
  --card: #10172b;
  --card-hover: #131b34;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #eaeefb;
  --text-mid: #aab4d4;
  --text-dim: #6b7699;
  --glow: color-mix(in oklab, var(--accent) 40%, transparent);
  --accent-tint: color-mix(in oklab, var(--accent) 14%, transparent);
  --accent-line: color-mix(in oklab, var(--accent) 38%, transparent);
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

/* ---- light theme ---- */
html[data-theme="light"] {
  --bg: #f5f7fb;
  --bg-grad-1: #eef2fb;
  --bg-grad-2: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafd;
  --card: #ffffff;
  --card-hover: #fbfcfe;
  --line: rgba(10, 14, 26, 0.10);
  --line-strong: rgba(10, 14, 26, 0.18);
  --text: #0a0e1a;
  --text-mid: #46506b;
  --text-dim: #8590ab;
  --glow: color-mix(in oklab, var(--accent) 26%, transparent);
  --accent-tint: color-mix(in oklab, var(--accent) 11%, transparent);
  --accent-line: color-mix(in oklab, var(--accent) 40%, transparent);
  --shadow: 0 30px 70px -34px rgba(20, 33, 71, 0.35);
  color-scheme: light;
}

/* ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background 0.5s ease, color 0.5s ease;
}
body.nav-open { overflow: hidden; }

/* skip link */
.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 16px; outline: none; }

/* visible keyboard focus */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
input:focus-visible,
textarea:focus-visible,
.hd:focus-visible,
.ha:focus-visible,
.nav-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

::selection { background: var(--accent); color: #fff; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }

.wrap { width: min(1240px, 100% - 48px); margin-inline: auto; }

/* eyebrow / mono label */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--accent-line);
}
.eyebrow.center::after {
  content: "";
  width: 22px; height: 1px;
  background: var(--accent-line);
}

/* section scaffolding */
section { position: relative; }
.section-pad { padding-block: clamp(72px, 9vw, 140px); }
/* surface-toned section; alternates with plain --bg sections for separation */
.band { background: var(--surface); border-block: 1px solid var(--line); }

.section-head { max-width: 720px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 {
  font-size: clamp(30px, 4.4vw, 52px);
  margin-top: 18px;
}
.section-head p {
  color: var(--text-mid);
  font-size: clamp(16px, 1.5vw, 19px);
  margin-top: 18px;
  max-width: 56ch;
}
.section-head.center p { margin-inline: auto; }

/* ---- buttons ---- */
.btn {
  --_bg: var(--accent);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15.5px;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.25s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn .arr { transition: transform 0.22s ease; }
.btn:hover .arr { transform: translateX(4px); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 30px -10px var(--glow), inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 42px -12px var(--glow), inset 0 1px 0 rgba(255,255,255,0.25); }
.btn-ghost {
  background: color-mix(in oklab, var(--text) 5%, transparent);
  color: var(--text);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: color-mix(in oklab, var(--text) 9%, transparent); transform: translateY(-2px); }
.btn-lg { padding: 17px 28px; font-size: 16.5px; border-radius: 14px; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: 0.07s; }
.reveal[data-d="2"] { transition-delay: 0.14s; }
.reveal[data-d="3"] { transition-delay: 0.21s; }
.reveal[data-d="4"] { transition-delay: 0.28s; }
.reveal[data-d="5"] { transition-delay: 0.35s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: color-mix(in oklab, var(--bg) 72%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a {
  font-size: 14.5px; color: var(--text-mid); font-weight: 500;
  transition: color 0.2s ease; position: relative; white-space: nowrap;
}
.nav-links a:hover { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 14px; }
.nav-cta { display: inline-flex; }

.theme-toggle {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: color-mix(in oklab, var(--text) 4%, transparent);
  color: var(--text-mid);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.theme-toggle:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: color-mix(in oklab, var(--text) 8%, transparent);
  transform: translateY(-1px);
}
.theme-toggle .icon-sun,
.theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
html[data-theme="light"] .theme-toggle .icon-moon { display: block; }
.theme-toggle-drawer {
  width: 100%;
  height: auto;
  padding: 14px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}
.theme-toggle-drawer .theme-toggle-label {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: color-mix(in oklab, var(--text) 4%, transparent);
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-drawer {
  position: fixed;
  inset: 74px 0 0 0;
  z-index: 55;
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-top: 1px solid var(--line);
  overflow-y: auto;
}
.nav-drawer-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-block: 28px 40px;
}
.nav-drawer a {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-mid);
  padding: 12px 0;
  transition: color 0.2s ease;
}
.nav-drawer a:hover { color: var(--text); }
.nav-drawer .btn { margin-top: 18px; justify-content: center; width: 100%; }

@media (max-width: 1160px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-cta-desktop { display: none; }
}

/* logo */
.logo { display: inline-flex; align-items: center; gap: 11px; cursor: pointer; }
.logo svg { display: block; }
.logo .wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: -0.03em;
  color: var(--text);
}
.logo .wordmark b { color: var(--accent); font-weight: 600; }

/* ============================================================
   HERO
   ============================================================ */
.hero { padding-top: 132px; padding-bottom: clamp(60px, 8vw, 110px); overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.hero-bg .grid-fade {
  position: absolute; inset: -2px;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 58px 58px;
  -webkit-mask-image: radial-gradient(120% 80% at 70% 0%, #000 0%, transparent 70%);
  mask-image: radial-gradient(120% 80% at 70% 0%, #000 0%, transparent 70%);
  opacity: 0.6;
}
.hero-bg .orb {
  position: absolute; border-radius: 50%;
  filter: blur(70px); opacity: 0.5;
}
.hero-bg .orb.a { width: 540px; height: 540px; top: -180px; right: -120px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 65%); opacity: 0.32; }
.hero-bg .orb.b { width: 460px; height: 460px; top: 180px; left: -160px;
  background: radial-gradient(circle, color-mix(in oklab, var(--accent) 70%, #a78bfa) 0%, transparent 65%); opacity: 0.20; }

.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center;
}
.hero-copy { max-width: 620px; }
.hero h1,
.hero .hero-title {
  font-size: clamp(40px, 6vw, 72px);
  margin-top: 22px;
  letter-spacing: -0.035em;
}
.hero h1 .accent,
.hero .hero-title .accent { color: var(--accent); }
.hero-sub {
  color: var(--text-mid);
  font-size: clamp(17px, 1.7vw, 20px);
  margin-top: 24px;
  max-width: 50ch;
}
.hero-cta { display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap; }
.hero-trust { display: flex; align-items: center; gap: 20px; margin-top: 40px; color: var(--text-dim); font-size: 13.5px; font-family: var(--font-mono); letter-spacing: 0.02em; flex-wrap: wrap; }
.hero-trust .dot { width: 6px; height: 6px; border-radius: 50%; background: #3ddc97; box-shadow: 0 0 10px #3ddc97; }
.hero-trust .pill { display: inline-flex; align-items: center; gap: 8px; }

/* hero layout variants */
html[data-hero="centered"] .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 48px; }
html[data-hero="centered"] .hero-copy { max-width: 820px; margin-inline: auto; }
html[data-hero="centered"] .hero-sub { margin-inline: auto; }
html[data-hero="centered"] .hero-cta { justify-content: center; }
html[data-hero="centered"] .hero-trust { justify-content: center; }
html[data-hero="centered"] .hero-visual { max-width: 980px; margin-inline: auto; width: 100%; }
html[data-hero="centered"] .eyebrow { justify-content: center; }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-copy { max-width: 700px; }
}

/* ---- hero dashboard visual ---- */
.dash {
  position: relative;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.dash::after {
  content: ""; position: absolute; inset: 0; border-radius: 20px; pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.dash-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 13px 16px; border-bottom: 1px solid var(--line);
  background: color-mix(in oklab, var(--surface) 60%, transparent);
}
.dash-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.dash-title { margin-left: 8px; font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); letter-spacing: 0.04em; }
.dash-live { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 11px; color: var(--text-mid); }
.dash-live i { width: 6px; height: 6px; border-radius: 50%; background: #3ddc97; box-shadow: 0 0 8px #3ddc97; animation: pulse 1.8s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }

.dash-body { padding: 18px; display: grid; gap: 14px; }
.dash-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.kpi {
  background: var(--card); border: 1px solid var(--line); border-radius: 13px; padding: 13px 14px;
}
.kpi .lbl { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); }
.kpi .val { font-family: var(--font-display); font-size: 25px; font-weight: 600; margin-top: 6px; letter-spacing: -0.02em; }
.kpi .chg { font-size: 11.5px; font-weight: 600; margin-top: 3px; display: inline-flex; align-items: center; gap: 4px; }
.kpi .chg.up { color: #3ddc97; }
.kpi .chg.down { color: #ff7a7a; }

.dash-chart {
  background: var(--card); border: 1px solid var(--line); border-radius: 13px; padding: 14px 14px 8px;
  position: relative;
}
.chart-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.chart-head .t { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); }
.chart-head .v { font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.chart-head .v small { color: #3ddc97; font-size: 12px; font-weight: 600; margin-left: 6px; }
.dash-chart svg { display: block; width: 100%; height: 92px; overflow: visible; }

/* dashboard stream row */
.dashboard-row {
  background: var(--card); border: 1px solid var(--line); border-radius: 13px; padding: 12px 14px;
  font-family: var(--font-mono); font-size: 12px; color: var(--text-mid);
  min-height: 92px;
}
.dashboard-row .ahead { display: flex; align-items: center; gap: 8px; color: var(--text-dim); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 9px; }
.dashboard-row .ahead .spin { width: 11px; height: 11px; border-radius: 50%; border: 1.6px solid var(--accent-line); border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.dashboard-line { display: flex; gap: 8px; align-items: baseline; padding: 2px 0; opacity: 0; transform: translateY(4px); }
.dashboard-line.show { opacity: 1; transform: none; transition: all 0.35s ease; }
.dashboard-line .tk { color: var(--accent); }
.dashboard-line .ok { color: #3ddc97; }

/* floating badge on dash */
.dash-badge {
  position: absolute; z-index: 3;
  background: var(--card); border: 1px solid var(--line-strong);
  border-radius: 13px; padding: 11px 14px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 11px;
}
.dash-badge .ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-tint); color: var(--accent); }
.dash-badge .tx b { display: block; font-family: var(--font-display); font-size: 14px; font-weight: 600; }
.dash-badge .tx span { font-size: 11.5px; color: var(--text-dim); font-family: var(--font-mono); }
.dash-badge.b1 { bottom: 5px; right: 15px; animation: floaty 6s ease-in-out infinite; }
@keyframes floaty { 0%,100%{ transform: translateY(0) } 50%{ transform: translateY(-9px) } }
@media (max-width: 560px){ .dash-badge.b1{ left: 8px; } }

/* ============================================================
   MARQUEE / INDUSTRIES
   ============================================================ */
.trusted { padding-block: 40px; border-block: 1px solid var(--line); background: var(--surface); }
.trusted .lab { text-align: center; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 26px; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: 64px; width: max-content; animation: scroll-x 36s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes scroll-x { to { transform: translateX(-50%); } }
.industry {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: -0.02em;
  color: var(--text-mid); opacity: 0.85; white-space: nowrap;
  transition: opacity 0.2s, color 0.2s;
}
.industry:hover { opacity: 1; color: var(--text); }
.industry-icon { width: 24px; height: 24px; display: grid; place-items: center; color: var(--text-dim); flex-shrink: 0; }
@media (prefers-reduced-motion: reduce){ .marquee-track{ animation: none; } }

/* ============================================================
   STATS BAND
   ============================================================ */
.stats { background: var(--bg); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.stat { background: var(--surface); padding: 38px 30px; }
.stat .n { font-family: var(--font-display); font-weight: 600; font-size: clamp(26px, 3.2vw, 40px); letter-spacing: -0.03em; }
.stat .n .u { color: var(--accent); }
.stat .k { color: var(--text-mid); font-size: 14.5px; margin-top: 8px; }
@media (max-width: 860px){ .stats-grid{ grid-template-columns: repeat(2,1fr); } }

/* ============================================================
   PRODUCT SHOWCASE
   ============================================================ */
.showcase-grid { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 56px; align-items: center; }
@media (max-width: 980px){ .showcase-grid{ grid-template-columns: 1fr; gap: 40px; } }
.feature-list { margin-top: 34px; display: grid; gap: 8px; }
.feat {
  display: grid; grid-template-columns: 42px 1fr; gap: 16px; align-items: start;
  padding: 18px; border-radius: 14px; border: 1px solid transparent;
  transition: background 0.25s, border-color 0.25s;
  cursor: default;
}
.feat:hover { background: var(--card); border-color: var(--line); }
.feat .fi { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-tint); color: var(--accent); border: 1px solid var(--accent-line); }
.feat h4 { font-size: 17.5px; }
.feat p { color: var(--text-mid); font-size: 14.5px; margin-top: 5px; line-height: 1.55; }

/* showcase visual = analytics panel */
.panel {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-top { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.panel-top .seg { display: flex; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: 3px; }
.panel-top .seg span { font-family: var(--font-mono); font-size: 11px; padding: 5px 11px; border-radius: 6px; color: var(--text-dim); }
.panel-top .seg span.on { background: var(--accent); color: #fff; }
.panel-top .pright { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }
.panel-body { padding: 20px; }
.bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 7px; align-items: end; height: 168px; margin-bottom: 18px; }
.bars .bcol { display: grid; gap: 3px; align-content: end; height: 100%; }
.bars .b { width: 100%; border-radius: 4px 4px 2px 2px; background: var(--accent); opacity: 0.9; transform-origin: bottom; }
.bars .b.b2 { background: color-mix(in oklab, var(--accent) 45%, transparent); }
.donut-row { display: grid; grid-template-columns: 150px 1fr; gap: 22px; align-items: center; padding-top: 18px; border-top: 1px solid var(--line); }
.donut { position: relative; width: 150px; height: 150px; }
.donut .lbl { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut .lbl b { font-family: var(--font-display); font-size: 28px; font-weight: 600; }
.donut .lbl span { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); }
.legend { display: grid; gap: 11px; }
.legend .li { display: flex; align-items: center; gap: 11px; font-size: 14px; color: var(--text-mid); }
.legend .li .sw { width: 11px; height: 11px; border-radius: 3px; }
.legend .li b { margin-left: auto; font-family: var(--font-mono); color: var(--text); font-size: 13px; }

/* ============================================================
   ADVANCED DASHBOARDS SPOTLIGHT
   ============================================================ */
.dashboards { background:
    radial-gradient(120% 70% at 80% 0%, var(--accent-tint), transparent 60%),
    var(--bg); overflow: hidden; }
.dashboards-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 980px){ .dashboards-grid{ grid-template-columns: 1fr; gap: 40px; } }
.steps { margin-top: 30px; display: grid; gap: 0; }
.step { display: grid; grid-template-columns: 40px 1fr; gap: 18px; padding-bottom: 26px; position: relative; }
.step:not(:last-child)::before { content: ""; position: absolute; left: 19px; top: 40px; bottom: 0; width: 1.5px; background: var(--line); }
.step .num { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line-strong); font-family: var(--font-mono); font-size: 14px; color: var(--accent); font-weight: 600; z-index: 1; }
.step h4 { font-size: 18px; }
.step p { color: var(--text-mid); font-size: 14.5px; margin-top: 5px; }

/* terminal-style dashboard console */
.console {
  background: #060912; border: 1px solid var(--line-strong); border-radius: 18px;
  box-shadow: var(--shadow); overflow: hidden; font-family: var(--font-mono);
}
html[data-theme="light"] .console { background: #0a0f1c; }
.console-bar { display: flex; align-items: center; gap: 8px; padding: 12px 15px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.console-bar .d { width: 9px; height: 9px; border-radius: 50%; }
.console-bar .t { margin-left: 8px; font-size: 11.5px; color: #6b7699; letter-spacing: 0.04em; }
.console-bar .chip { margin-left: auto; font-size: 10.5px; color: #9be7c4; background: rgba(61,220,151,0.12); border: 1px solid rgba(61,220,151,0.3); padding: 3px 9px; border-radius: 20px; }
.console-body { padding: 18px; font-size: 13px; line-height: 1.85; color: #aab4d4; min-height: 320px; }
.cl { display: flex; gap: 9px; opacity: 0; transform: translateY(5px); }
.cl.show { opacity: 1; transform: none; transition: all 0.3s ease; }
.cl .pre { color: #5b8cff; flex-shrink: 0; width: 38px; text-align: right; }
.cl .pre.tool { color: #a78bfa; }
.cl .pre.done { color: #3ddc97; }
.cl .tx em { color: #eaeefb; font-style: normal; }
.cl .tx .tag { color: #ffce6b; }
.cursor-blk { display: inline-block; width: 8px; height: 15px; background: #5b8cff; vertical-align: middle; animation: blink 1s step-end infinite; }
@keyframes blink { 50%{ opacity: 0; } }

/* ============================================================
   SERVICES
   ============================================================ */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 48px; }
@media (max-width: 1080px){ .svc-grid{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px){ .svc-grid{ grid-template-columns: 1fr; } }
.svc {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 28px;
  position: relative; overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.svc:hover { transform: translateY(-4px); border-color: var(--accent-line); background: var(--card-hover); }
.svc::before {
  content: ""; position: absolute; inset: 0; border-radius: 18px; padding: 1px;
  background: linear-gradient(160deg, var(--accent-line), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.3s;
}
.svc:hover::before { opacity: 1; }
.svc .si { width: 50px; height: 50px; border-radius: 13px; display: grid; place-items: center; background: var(--accent-tint); color: var(--accent); border: 1px solid var(--accent-line); margin-bottom: 22px; }
.svc h3 { font-size: 20px; }
.svc p { color: var(--text-mid); font-size: 14.5px; margin-top: 11px; line-height: 1.6; }
.svc .tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.svc .tags span { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); border: 1px solid var(--line); border-radius: 20px; padding: 4px 10px; }

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.tcols { columns: 3; column-gap: 18px; margin-top: 48px; }
@media (max-width: 980px){ .tcols{ columns: 2; } }
@media (max-width: 620px){ .tcols{ columns: 1; } }
.tcard {
  break-inside: avoid; margin-bottom: 18px;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 24px;
  transition: border-color 0.25s, transform 0.25s;
}
.tcard:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.tcard .q { font-size: 15.5px; line-height: 1.6; color: var(--text); }
.tcard .stars { color: var(--accent); letter-spacing: 2px; font-size: 13px; margin-bottom: 13px; }
.tcard .who { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.tcard .who .av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: 15px; color: #fff; }
.tcard .who b { display: block; font-size: 14.5px; font-family: var(--font-display); }
.tcard .who span { font-size: 12.5px; color: var(--text-dim); }

/* ============================================================
   CONTACT
   ============================================================ */
.contact { background: var(--bg); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
@media (max-width: 920px){ .contact-grid{ grid-template-columns: 1fr; gap: 44px; } }
.contact-points { margin-top: 30px; display: grid; gap: 18px; }
.cp { display: flex; gap: 14px; align-items: flex-start; }
.cp .ci { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-tint); color: var(--accent); border: 1px solid var(--accent-line); flex-shrink: 0; }
.cp b { font-family: var(--font-display); font-size: 15px; }
.cp b a { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 3px; }
.cp b a:hover { color: var(--accent); }
.cp p { color: var(--text-mid); font-size: 14px; margin-top: 2px; }

.form { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 30px; box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { margin-top: 14px; }
.field:first-child, .form-row:first-child .field { margin-top: 0; }
.field label { display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 7px; }
.field input, .field textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 11px;
  padding: 13px 14px; color: var(--text); font-family: var(--font-body); font-size: 15px; resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.field input::placeholder, .field textarea::placeholder { color: var(--text-dim); }
.form .btn-primary { width: 100%; justify-content: center; margin-top: 18px; }
.form-note { margin-top: 14px; font-size: 13px; color: var(--text-dim); line-height: 1.5; }
.form-note a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.form-err { margin-top: 12px; font-size: 14px; color: #ff7a7a; }
.form-err[hidden] { display: none; }
.form-ok { text-align: center; padding: 24px 10px; }
.form-ok[hidden] { display: none; }
.form-ok.show { display: block; }
.form-ok .ok-ic { width: 56px; height: 56px; border-radius: 50%; background: var(--accent-tint); color: var(--accent); display: grid; place-items: center; margin: 0 auto 16px; }
.form-ok h4 { font-size: 22px; }
.form-ok p { color: var(--text-mid); margin-top: 8px; font-size: 15px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--bg); padding-top: 72px; padding-bottom: 32px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
@media (max-width: 820px){ .footer-grid{ grid-template-columns: 1fr 1fr; gap: 32px; } }
.footer-col h5 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 16px; }
.footer-col a { display: block; color: var(--text-mid); font-size: 14.5px; padding: 6px 0; transition: color 0.2s; }
.footer-col a:hover { color: var(--accent); }
.footer-brand p { color: var(--text-mid); font-size: 14.5px; margin-top: 16px; max-width: 34ch; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 56px; padding-top: 26px; border-top: 1px solid var(--line); flex-wrap: wrap; gap: 14px; }
.footer-bottom p { color: var(--text-dim); font-size: 13.5px; font-family: var(--font-mono); }
.privacy-band {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  max-width: 72ch;
}
.privacy-band h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.privacy-band p { color: var(--text-mid); font-size: 14px; line-height: 1.65; }
.privacy-band a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.footer-social a[hidden] { display: none; }
.footer-social { display: flex; gap: 10px; }
.footer-social a { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--text-mid); transition: all 0.2s; }
.footer-social a:hover { color: var(--accent); border-color: var(--accent-line); transform: translateY(-2px); }

/* ============================================================
   HERO CAROUSEL
   ============================================================ */
.hero-viewport { position: relative; z-index: 1; overflow: hidden; }
.hero-track { display: flex; transition: transform 0.85s cubic-bezier(.65, 0, .35, 1); will-change: transform; }
.hero-slide { min-width: 100%; flex: 0 0 100%; }

@media (prefers-reduced-motion: no-preference) {
  .hero-slide .h-anim { opacity: 0; transform: translateY(24px);
    transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
  .hero-slide.active .h-anim { opacity: 1; transform: none; }
  .hero-slide.active .h-anim[data-d="1"] { transition-delay: .08s; }
  .hero-slide.active .h-anim[data-d="2"] { transition-delay: .16s; }
  .hero-slide.active .h-anim[data-d="3"] { transition-delay: .24s; }
  .hero-slide.active .h-anim[data-d="4"] { transition-delay: .32s; }
}

/* controls */
.hero-nav-row { position: relative; z-index: 2; display: flex; align-items: center;
  justify-content: space-between; margin-top: 42px; gap: 18px; flex-wrap: wrap; }
.hero-dots { display: flex; gap: 9px; flex-wrap: wrap; }
.hd { position: relative; background: none; border: 1px solid var(--line); border-radius: 30px;
  padding: 9px 16px; color: var(--text-dim); font-family: var(--font-mono); font-size: 11.5px;
  letter-spacing: .03em; cursor: pointer; overflow: hidden; transition: color .25s, border-color .25s; }
.hd .hd-label { position: relative; z-index: 1; }
.hd .hd-prog { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent-tint); z-index: 0; }
.hd:hover { color: var(--text-mid); }
.hd.active { color: var(--text); border-color: var(--accent-line); }
.hero-arrows { display: flex; gap: 8px; }
.ha { width: 46px; height: 46px; border-radius: 13px; border: 1px solid var(--line);
  background: color-mix(in oklab, var(--text) 4%, transparent); color: var(--text-mid);
  display: grid; place-items: center; cursor: pointer; transition: color .2s, border-color .2s, transform .2s, background .2s; }
.ha:hover { color: var(--text); border-color: var(--line-strong); transform: translateY(-2px);
  background: color-mix(in oklab, var(--text) 8%, transparent); }
.ha[aria-pressed="true"] { color: var(--accent); border-color: var(--accent-line); }
@media (max-width: 560px) { .hd { padding: 8px 12px; font-size: 10.5px; } }

/* ---- trading visual ---- */
.trade-dash .ticker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
.ticker .tk { background: var(--card); border: 1px solid var(--line); border-radius: 13px; padding: 12px 13px; display: grid; gap: 3px; }
.ticker .tk .s { font-family: var(--font-mono); font-size: 10px; letter-spacing: .05em; color: var(--text-dim); text-transform: uppercase; }
.ticker .tk .p { font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: -.02em; }
.ticker .tk .c { font-size: 11px; font-weight: 600; }
.ticker .tk .c.up { color: #3ddc97; }
.ticker .tk .c.down { color: #ff7a7a; }
#candleChart { display: block; width: 100%; height: 108px; overflow: visible; }
#candleChart rect, #candleChart line { transform-box: fill-box; transform-origin: bottom; }
@media (prefers-reduced-motion: no-preference) {
  #candleChart rect, #candleChart line { transform: scaleY(0); opacity: 0; transition: transform .5s cubic-bezier(.2,.8,.2,1), opacity .4s; }
  #candleChart.lit rect, #candleChart.lit line { transform: scaleY(1); opacity: 1; }
}
.api-strip { background: var(--card); border: 1px solid var(--line); border-radius: 13px; padding: 11px 13px; font-family: var(--font-mono); font-size: 11.5px; display: grid; gap: 5px; }
.api-strip .mline { color: var(--text-mid); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.api-strip .mverb { color: var(--accent); font-weight: 500; }
.api-strip .mres { color: var(--text-dim); }
.api-strip .mok { color: #3ddc97; }

/* ---- ui/web mock visual ---- */
.uimock { background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line-strong); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; position: relative; }
.ui-bar { display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-bottom: 1px solid var(--line); background: color-mix(in oklab, var(--card) 55%, transparent); }
.ui-url { margin-left: 10px; font-family: var(--font-mono); font-size: 11px; color: var(--text-mid); background: var(--card); border: 1px solid var(--line); border-radius: 7px; padding: 4px 14px; }
.ui-body { display: grid; grid-template-columns: 80px 1fr; min-height: 318px; }
.ui-side { border-right: 1px solid var(--line); padding: 16px 14px; display: flex; flex-direction: column; gap: 13px; background: color-mix(in oklab, var(--card) 60%, transparent); }
.ui-logo { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); box-shadow: 0 6px 16px -6px var(--glow); }
.ui-navi { height: 9px; border-radius: 5px; background: color-mix(in oklab, var(--text) 18%, transparent); }
.ui-navi.on { background: var(--accent); width: 88%; }
.ui-navi.sm { width: 62%; margin-top: auto; }
.ui-main { padding: 20px; display: grid; grid-template-rows: auto auto 1fr; gap: 16px; }
.ui-top { display: flex; align-items: center; justify-content: space-between; }
.ui-h { width: 156px; height: 15px; border-radius: 6px; background: color-mix(in oklab, var(--text) 28%, transparent); }
.ui-btn { width: 96px; height: 33px; border-radius: 9px; background: var(--accent); box-shadow: 0 8px 20px -8px var(--glow); }
.ui-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ui-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 9px; }
.ui-card .l { width: 66%; height: 8px; border-radius: 5px; background: color-mix(in oklab, var(--text) 20%, transparent); }
.ui-card b { width: 50px; height: 20px; border-radius: 6px; background: var(--accent); display: block; opacity: 0.92; }
.ui-card:nth-child(2) b { background: color-mix(in oklab, var(--accent) 55%, var(--text)); opacity: 0.5; }
.ui-card:nth-child(3) b { width: 38px; }
.ui-graph { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; align-items: flex-end; }
.ui-bars { display: flex; align-items: flex-end; gap: 9px; height: 100%; min-height: 96px; width: 100%; }
.ui-bars span { flex: 1; height: var(--h); border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, var(--accent), color-mix(in oklab, var(--accent) 38%, transparent)); transform-origin: bottom; }
@media (prefers-reduced-motion: no-preference) {
  .hero-slide .uimock .ui-bars span { transform: scaleY(0); transition: transform .55s cubic-bezier(.2,.8,.2,1); }
  .hero-slide.active .uimock .ui-bars span { transform: scaleY(1); }
  .uimock .ui-bars span:nth-child(1){transition-delay:.10s}
  .uimock .ui-bars span:nth-child(2){transition-delay:.16s}
  .uimock .ui-bars span:nth-child(3){transition-delay:.22s}
  .uimock .ui-bars span:nth-child(4){transition-delay:.28s}
  .uimock .ui-bars span:nth-child(5){transition-delay:.34s}
  .uimock .ui-bars span:nth-child(6){transition-delay:.40s}
  .uimock .ui-bars span:nth-child(7){transition-delay:.46s}
  .uimock .ui-bars span:nth-child(8){transition-delay:.52s}
}

/* utility */
.center { text-align: center; }
.mt-cta { margin-top: 48px; display: flex; justify-content: center; }

/* ============================================================
   BI hero report visual
   ============================================================ */
.bi-dash .bi-rank { display: grid; gap: 11px; }
.bi-rank .r { display: grid; grid-template-columns: 84px 1fr 42px; align-items: center; gap: 12px; }
.bi-rank .r .lbl { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }
.bi-rank .r .track { height: 8px; border-radius: 5px; background: var(--line); overflow: hidden; }
.bi-rank .r .track i { display: block; height: 100%; border-radius: 5px; background: var(--accent); width: var(--w); transform-origin: left; }
.bi-rank .r .pct { font-family: var(--font-mono); font-size: 11.5px; color: var(--text); text-align: right; }
#biChart { display: block; width: 100%; height: 92px; overflow: visible; }
@media (prefers-reduced-motion: no-preference) {
  .bi-rank .r .track i { transform: scaleX(0); transition: transform .8s cubic-bezier(.2,.8,.2,1); }
  .hero-slide.active .bi-rank .r .track i { transform: scaleX(1); }
  .bi-rank .r:nth-child(2) .track i { transition-delay: .1s; }
  .bi-rank .r:nth-child(3) .track i { transition-delay: .2s; }
}

/* ============================================================
   LLM chat visual
   ============================================================ */
.llm-dash .chat-body { padding: 18px 16px 6px; display: grid; gap: 12px; align-content: start; }
.cmsg { display: flex; gap: 10px; max-width: 90%; }
.cmsg.user { margin-left: auto; flex-direction: row-reverse; }
.cmsg .cav { width: 30px; height: 30px; border-radius: 9px; background: var(--accent-tint); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; font-size: 13px; border: 1px solid var(--accent-line); }
.cmsg .bub { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 11px 14px; font-size: 14px; line-height: 1.5; color: var(--text); }
.cmsg.user .bub { background: var(--accent); color: #fff; border-color: transparent; border-bottom-right-radius: 5px; }
.cmsg.bot .bub { border-bottom-left-radius: 5px; min-height: 22px; }
.chat-input { margin: 10px 16px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 13px; padding: 9px 9px 9px 15px; color: var(--text-dim); font-size: 13.5px; }
.chat-input .send { width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: #fff; display: grid; place-items: center; flex-shrink: 0; }

/* ============================================================
   Reversed showcase + BI section report table
   ============================================================ */
@media (min-width: 981px) {
  .showcase-grid.rev > :first-child { order: 2; }
  .showcase-grid.rev > :last-child { order: 1; }
}
.line-chart { display: block; width: 100%; height: 178px; overflow: visible; }
.report-table { margin-top: 18px; }
.rrow { display: grid; grid-template-columns: 1fr auto auto; gap: 18px; align-items: center; padding: 11px 2px; border-top: 1px solid var(--line); font-size: 14.5px; }
.rrow:first-child { border-top: none; }
.rrow .rn { color: var(--text-mid); }
.rrow .rv { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; }
.rrow .rt { font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; }
.rrow .rt.up { color: #3ddc97; }
.rrow .rt.down { color: #ff7a7a; }
