/* Trackora landing page. Colors, fonts and radii come from the app (static/index.html, app.js):
   navy sidebar #091124, page #F4F6FB, blue-600 -> indigo-600 buttons, rounded-xl/2xl cards. */

:root {
  --ink: #0B1220;
  --ink-2: #1E293B;
  --muted: #526072;
  --faint: #8A97A8;
  --line: #E2E8F0;
  --line-2: #EEF2F7;
  --paper: #F4F6FB;
  --white: #FFFFFF;
  --tint: #EEF4FF;
  --navy: #091124;
  --navy-2: #0E1A36;
  --navy-3: #1B2B52;
  --blue: #2563EB;
  --blue-d: #1D4ED8;
  --indigo: #4F46E5;
  --blue-50: #EFF6FF;
  --blue-200: #BFDBFE;
  --green: #047857;
  --green-dot: #10B981;
  --green-50: #ECFDF5;
  --amber: #B45309;
  --amber-50: #FFFBEB;
  --rose: #E11D48;
  --rose-50: #FFF1F2;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --shadow: 0 2px 8px rgba(15, 23, 42, .04);
  --shadow-lg: 0 30px 60px -24px rgba(15, 23, 42, .28), 0 10px 24px -12px rgba(15, 23, 42, .1);
  --font: "Plus Jakarta Sans", "IBM Plex Sans Thai", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --nav-h: 72px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid rgb(37 99 235 / .45); outline-offset: 3px; border-radius: 6px; }

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  font-size: 20px;
  line-height: 1;
  user-select: none;
}

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }

/* type */
h1 {
  font-size: clamp(46px, 7.4vw, 96px);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: .98;
}
h1 .line { display: block; }
h2 {
  font-size: clamp(34px, 4.8vw, 62px);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.02;
}
h3 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; }
.lead { font-size: clamp(16px, 1.4vw, 19px); color: var(--muted); max-width: 34em; }
.grad {
  background: linear-gradient(90deg, var(--blue), var(--indigo));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: .08em;
}
html[lang="th"] h1, html[lang="th"] h2 { letter-spacing: -.01em; line-height: 1.22; }
html[lang="th"] h1 { font-size: clamp(40px, 6.4vw, 84px); }

.eyebrow { font-size: 13px; font-weight: 700; color: var(--faint); margin-bottom: 16px; }
.eyebrow-blue { color: var(--blue); }
.section-head { display: grid; gap: 18px; max-width: 760px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head .eyebrow { margin-bottom: 0; }

/* buttons and pills */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 42px; padding: 0 18px; border-radius: var(--r);
  font-weight: 650; font-size: 14.5px; white-space: nowrap;
  border: 1px solid transparent;
  transition: background .2s, box-shadow .2s, transform .2s, border-color .2s;
}
.btn .material-symbols-outlined { font-size: 18px; transition: transform .2s; }
.btn:hover .material-symbols-outlined { transform: translateX(2px); }
.btn:active { transform: translateY(1px); }
.btn-lg { height: 52px; padding: 0 24px; font-size: 16px; border-radius: 14px; }
.btn-primary {
  background: linear-gradient(90deg, var(--blue), var(--indigo)); color: #fff;
  box-shadow: 0 8px 20px -8px rgb(37 99 235 / .55);
}
.btn-primary:hover { background: linear-gradient(90deg, var(--blue-d), #4338CA); box-shadow: 0 12px 26px -10px rgb(37 99 235 / .6); }
.btn-ghost { background: var(--white); border-color: var(--line); color: var(--ink-2); box-shadow: var(--shadow); }
.btn-ghost:hover { background: #F8FAFC; border-color: #CBD5E1; }
.btn-dark { background: rgb(255 255 255 / .06); color: #E2E8F0; border-color: rgb(255 255 255 / .16); }
.btn-dark:hover { background: rgb(255 255 255 / .12); }

.pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 650; line-height: 1;
  padding: 5px 9px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent;
}
.pill .material-symbols-outlined { font-size: 14px; }
.pill-slate { background: #F1F5F9; color: #475569; }
.pill-blue { background: var(--blue-50); color: var(--blue-d); border-color: var(--blue-200); }
.pill-amber { background: var(--amber-50); color: var(--amber); border-color: #FDE68A; }
.pill-rose { background: var(--rose-50); color: var(--rose); border-color: #FECDD3; }
.pill-green { background: var(--green-50); color: var(--green); border-color: #A7F3D0; }

/* nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .3s, box-shadow .3s, backdrop-filter .3s;
}
.nav.is-scrolled, .nav.is-open {
  background: rgb(255 255 255 / .86);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.nav.is-dark:not(.is-open) { background: rgb(9 17 36 / .82); box-shadow: 0 1px 0 #152342; }
.nav.is-dark:not(.is-open) .brand, .nav.is-dark:not(.is-open) .nav-links a { color: #E2E8F0; }
.nav.is-dark:not(.is-open) .nav-links a:hover { background: rgb(255 255 255 / .08); color: #fff; }
.nav.is-dark:not(.is-open) .lang, .nav.is-dark:not(.is-open) .btn-ghost, .nav.is-dark:not(.is-open) .menu-btn {
  background: rgb(255 255 255 / .06); border-color: rgb(255 255 255 / .16); color: #E2E8F0; box-shadow: none;
}
.nav-inner {
  height: var(--nav-h); max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.03em; }
.logo { width: 30px; height: 30px; flex: none; }
.nav-links { display: flex; gap: 4px; margin: 0 auto; }
.nav-links a { padding: 8px 12px; border-radius: 10px; font-size: 14.5px; font-weight: 550; color: #334155; transition: background .2s, color .2s; }
.nav-links a:hover { background: rgb(15 23 42 / .05); color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.lang {
  height: 36px; min-width: 44px; padding: 0 10px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--white); font-size: 13px; font-weight: 650; color: #334155;
}
.lang:hover { border-color: #CBD5E1; }
.menu-btn { display: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--white); align-items: center; justify-content: center; }
.mobile-menu { padding: 8px var(--gutter) 20px; display: grid; gap: 2px; }
.mobile-menu[hidden] { display: none; }
.mobile-menu > a { padding: 12px 4px; font-size: 17px; font-weight: 600; border-bottom: 1px solid var(--line-2); }
.mobile-ctas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }

/* hero */
.hero { position: relative; padding: calc(var(--nav-h) + clamp(36px, 7vw, 88px)) 0 clamp(72px, 9vw, 120px); overflow: hidden; }
.hero-glow {
  position: absolute; inset: -20% -10% auto auto; width: 1000px; height: 900px; pointer-events: none;
  background:
    radial-gradient(closest-side, rgb(59 130 246 / .20), transparent 70%),
    radial-gradient(closest-side at 70% 60%, rgb(79 70 229 / .14), transparent 70%);
}
.hero-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image: radial-gradient(rgb(15 23 42 / .09) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 60% 60% at 70% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 70% 40%, #000 20%, transparent 75%);
}
.hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-copy { display: grid; gap: 26px; justify-items: start; }
.eyebrow-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 10px; border-radius: 999px;
  background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow);
  font-size: 13px; font-weight: 600; color: #334155;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green-dot); box-shadow: 0 0 0 0 rgb(16 185 129 / .5); animation: ping 2.2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 7px rgb(16 185 129 / 0); } 100% { box-shadow: 0 0 0 0 rgb(16 185 129 / 0); } }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.proof { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: 14px; font-weight: 550; }
.proof li { display: inline-flex; align-items: center; gap: 6px; }
.proof .material-symbols-outlined { font-size: 18px; color: var(--blue); }

.hero-visual { position: relative; perspective: 1400px; padding: 40px 0 56px; }
.spot {
  position: absolute; inset: -40px; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgb(37 99 235 / .13), transparent 70%);
}
.hero-visual:hover .spot { opacity: 1; }
.hero-card {
  position: relative; margin: 0 auto; max-width: 470px;
  background: var(--white); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow-lg); padding: 22px;
  transform-style: preserve-3d; will-change: transform;
}
.hc-head { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line-2); }
.hc-id { font-family: var(--mono); font-weight: 600; font-size: 22px; letter-spacing: -.02em; margin-bottom: 6px; }
.hc-spec { font-size: 13px; color: var(--muted); line-height: 1.5; }
.hc-spec b { color: var(--ink-2); font-weight: 650; margin-right: 4px; }
.hc-tags { display: grid; gap: 6px; justify-items: end; align-content: start; }

.hsteps { display: flex; align-items: flex-start; padding: 22px 0 16px; }
.hstep { display: grid; justify-items: center; gap: 8px; font-size: 11.5px; font-weight: 600; color: var(--faint); width: 56px; flex: none; text-align: center; }
.hdot {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--line); background: var(--white); position: relative;
}
.hdot .material-symbols-outlined { font-size: 17px; font-weight: 700; color: #fff; }
.hstep.is-done { color: var(--ink-2); }
.hstep.is-done .hdot { background: var(--green-dot); border-color: var(--green-dot); }
.hstep.is-work { color: var(--blue-d); }
.hstep.is-work .hdot { border-color: var(--blue); }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--blue); animation: blip 1.6s ease-in-out infinite; }
@keyframes blip { 50% { transform: scale(.6); opacity: .55; } }
.hstep-line { flex: 1; height: 2px; background: var(--line); margin-top: 14px; border-radius: 2px; min-width: 8px; }
.hstep-line.is-done { background: var(--green-dot); }
.hc-where {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--r);
  background: var(--blue-50); color: var(--blue-d); font-size: 13.5px; font-weight: 600;
}
.hc-where .material-symbols-outlined { font-size: 18px; }
.hero-tl { margin-top: 16px; display: grid; gap: 0; position: relative; }
.hero-tl li { display: grid; grid-template-columns: 52px 1fr; gap: 10px; font-size: 13px; color: var(--muted); padding: 6px 0; position: relative; }
.hero-tl time { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.hero-tl li.is-now { color: var(--ink); font-weight: 600; }
.hero-tl li.is-now time { color: var(--blue); }

.chip {
  position: absolute; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px 10px 10px; border-radius: 14px;
  background: rgb(255 255 255 / .94); border: 1px solid var(--line);
  box-shadow: 0 16px 34px -18px rgb(15 23 42 / .35);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-size: 13px; line-height: 1.3; max-width: 250px;
}
.chip > .material-symbols-outlined { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-size: 19px; flex: none; }
.chip b { display: block; font-weight: 650; color: var(--ink); }
.chip small { display: block; color: var(--muted); font-size: 12px; }
.chip-green > .material-symbols-outlined { background: var(--green-50); color: var(--green); }
.chip-blue > .material-symbols-outlined { background: var(--blue-50); color: var(--blue); }
.chip-rose > .material-symbols-outlined { background: var(--rose-50); color: var(--rose); }
.c1 { top: 4px; left: -28px; }
.c2 { bottom: 10px; right: -18px; }
.c3 { top: 46%; right: -40px; }

/* hide the hero until the intro animation is ready (see the <head> script) */
.anim-pending [data-hero-line], .anim-pending [data-hero-fade], .anim-pending .hero-card, .anim-pending .chip { opacity: 0; }

/* scenes 1 and 2 */
.chaos { background: var(--paper); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
/* Without scroll animation (narrow screens, reduced motion, scripts blocked) the scene simply
   stacks: problem copy, clutter, solution copy, board. The pinned overlay is under .motion below. */
.chaos-pin { padding-top: clamp(72px, 10vw, 110px); padding-bottom: clamp(72px, 10vw, 110px); display: flex; flex-direction: column; gap: 32px; }
.chaos-copy, .chaos-stage { display: contents; }
.copy-a, .copy-b { display: grid; gap: 18px; align-content: center; }
.copy-a { order: 1; }
.clutter-layer { order: 2; position: relative; height: 380px; pointer-events: none; }
.copy-b { order: 3; padding-top: 16px; }
.board { order: 4; }
.copy-a .eyebrow, .copy-b .eyebrow { margin-bottom: 0; }
.clutter {
  position: absolute; transform-origin: 0 0;
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 14px 30px -18px rgb(15 23 42 / .35);
  font-size: 13.5px; color: var(--ink-2); padding: 10px 14px; white-space: nowrap;
}
.bubble { border-radius: 18px 18px 18px 4px; }
.bubble.me { border-radius: 18px 18px 4px 18px; background: #E0ECFF; border-color: #C7DBFF; }
.note { background: #FEF3C7; border-color: #FDE68A; font-weight: 650; transform: rotate(-4deg); border-radius: 4px; padding: 14px 16px; }
.missed { display: flex; align-items: center; gap: 8px; color: var(--rose); font-weight: 600; }
.missed .material-symbols-outlined, .file .material-symbols-outlined { font-size: 18px; }
.file { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.sheet { padding: 0; overflow: hidden; font-family: var(--mono); font-size: 12px; border-radius: 8px; }
.sh-row { display: grid; grid-template-columns: 76px 58px 52px 70px; border-top: 1px solid var(--line-2); }
.sh-row span { padding: 6px 8px; border-left: 1px solid var(--line-2); min-height: 28px; }
.sh-row span:first-child { border-left: 0; }
.sh-head { background: #F1F5F9; border-top: 0; font-weight: 600; color: var(--muted); font-family: var(--font); }
.sheet .red { color: var(--rose); }
.k1 { left: 2%; top: 4%; }
.k2 { left: 46%; top: 0%; }
.k3 { left: 24%; top: 24%; }
.k4 { left: 72%; top: 20%; }
.k5 { left: 0%; top: 54%; }
.k6 { left: 56%; top: 58%; }
.k7 { left: 10%; top: 82%; }
.k8 { left: 52%; top: 84%; }

.board { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding-top: 22px; }
/* runs between the first and last column centres (12 px gaps, 4 columns) */
.board-line { position: absolute; left: calc((100% - 36px) / 8); right: calc((100% - 36px) / 8); top: 1px; height: 2.5px; border-radius: 2px; background: var(--blue); transform-origin: left center; }
.bcol { display: grid; gap: 8px; align-content: start; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; box-shadow: var(--shadow); position: relative; }
.bcol::before { content: ""; position: absolute; left: 50%; top: -26px; width: 12px; height: 12px; border-radius: 50%; transform: translateX(-50%); background: var(--white); border: 2.5px solid var(--blue); }
.bhead { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); padding-bottom: 6px; min-height: 30px; }
.bhead .material-symbols-outlined { font-size: 17px; color: var(--blue); }
.bcard { display: grid; gap: 6px; justify-items: start; padding: 10px; border-radius: var(--r); border: 1px solid var(--line); background: #FBFCFE; }
.bcard b { font-family: var(--mono); font-size: 13px; font-weight: 600; }

/* scene 3 */
.flow { background: var(--white); }
.flow-pin {
  padding-top: clamp(72px, 10vw, 110px); padding-bottom: clamp(72px, 10vw, 110px);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 72px); align-items: center;
}
.flow-copy { display: grid; gap: 18px; }
.flow-copy .eyebrow { margin-bottom: 0; }
.flow-copy h2 { font-size: clamp(32px, 3.8vw, 50px); }
.flow-steps { display: grid; gap: 4px; margin-top: 10px; }
.flow-steps li {
  display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 14px 16px; border-radius: var(--r-lg);
  transition: opacity .35s, background .35s;
}
.motion .flow-steps li { opacity: .42; }
.motion .flow-steps li.is-active { opacity: 1; background: var(--blue-50); }
.motion .flow-steps li.is-done { opacity: .75; }
.flow-steps .num { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--blue); padding-top: 3px; }
.flow-steps p { font-size: 14.5px; color: var(--muted); margin-top: 4px; }

.flow-visual {
  background: radial-gradient(120% 90% at 80% 0%, #13224A 0%, var(--navy) 60%);
  border-radius: var(--r-xl); padding: clamp(18px, 2.4vw, 28px); color: #E2E8F0;
  box-shadow: var(--shadow-lg); border: 1px solid #152342; overflow: hidden;
}
.fv-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.fv-id { font-family: var(--mono); font-weight: 600; font-size: 15px; color: #fff; }
.fv-where { font-size: 13px; font-weight: 600; color: #93C5FD; background: rgb(59 130 246 / .14); border: 1px solid rgb(59 130 246 / .3); padding: 5px 10px; border-radius: 999px; }
.fv-svg { width: 100%; height: auto; margin: 8px 0 4px; overflow: visible; }
.fv-base path { fill: none; stroke: #23345C; stroke-width: 2; stroke-dasharray: 4 6; }
.fv-draw path { fill: none; stroke: #60A5FA; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.fnode circle { fill: var(--navy-2); stroke: #2A3D69; stroke-width: 2; transition: fill .3s, stroke .3s; }
.fnode text { fill: #8EA0BF; font-size: 13px; font-weight: 600; text-anchor: middle; font-family: var(--font); transition: fill .3s; }
.fnode .tick { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity .3s; }
.fnode.is-wait circle { stroke: #60A5FA; }
.fnode.is-work circle { stroke: #3B82F6; fill: #12245A; animation: glow 1.6s ease-in-out infinite; }
.fnode.is-work text, .fnode.is-wait text { fill: #DBEAFE; }
.fnode.is-done circle { fill: var(--green-dot); stroke: var(--green-dot); }
.fnode.is-done .tick { opacity: 1; }
.fnode.is-done text { fill: #E2E8F0; }
@keyframes glow { 50% { stroke-width: 6; stroke: rgb(59 130 246 / .5); } }
.glyph { opacity: 0; }
.glyph[data-glyph="body"] rect, .glyph[data-glyph="body"] path, .glasses rect, .glasses path { fill: none; stroke: #E2E8F0; stroke-width: 2.2; }
.glasses rect { fill: rgb(96 165 250 / .55); stroke: #fff; }
.fv-chips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.fchip { display: grid; gap: 6px; padding: 10px; border-radius: var(--r); background: rgb(255 255 255 / .04); border: 1px solid rgb(255 255 255 / .08); font-size: 12px; min-width: 0; }
.fchip > span:first-child { color: #8EA0BF; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fchip .st { font-weight: 700; color: #64748B; }
.fchip .st.wait { color: #93C5FD; }
.fchip .st.work { color: #60A5FA; }
.fchip .st.done { color: #34D399; }
.fv-bar { height: 4px; background: rgb(255 255 255 / .08); border-radius: 4px; margin-top: 16px; overflow: hidden; }
.fv-bar span { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, var(--blue), #818CF8); }

/* scene 4 */
.journey { padding: clamp(96px, 12vw, 160px) 0; background: linear-gradient(180deg, var(--white), var(--tint) 120%); }
.jtrack { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; --jp: 1; }
.jline { position: absolute; left: 12.5%; right: 12.5%; top: 31px; height: 3px; background: repeating-linear-gradient(90deg, #CBD5E1 0 8px, transparent 8px 14px); border-radius: 3px; }
.jfill { position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--jp)); background: linear-gradient(90deg, var(--blue), var(--indigo)); border-radius: 3px; }
.jstage { position: relative; display: grid; justify-items: center; align-content: start; text-align: center; gap: 10px; transition: opacity .4s; }
.motion .jstage { opacity: .5; }
.motion .jstage.is-on { opacity: 1; }
.jicon {
  width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; margin-bottom: 8px;
  background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--faint);
  transition: background .4s, color .4s, box-shadow .4s, transform .4s;
}
.jicon .material-symbols-outlined { font-size: 28px; }
.jstage.is-on .jicon { background: linear-gradient(135deg, var(--blue), var(--indigo)); color: #fff; border-color: transparent; box-shadow: 0 14px 30px -12px rgb(37 99 235 / .6); transform: translateY(-2px); }
.jstage.is-next.is-on .jicon { background: var(--white); color: var(--blue); border: 2px dashed #93C5FD; box-shadow: none; }
.jstage p { color: var(--muted); font-size: 14.5px; max-width: 220px; }

/* scene 5 */
.showcase { background: var(--paper); border-top: 1px solid var(--line-2); }
.show-pin { padding-top: clamp(72px, 10vw, 110px); padding-bottom: clamp(72px, 10vw, 110px); display: grid; align-content: center; gap: 28px; }
.show-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.show-head h2 { font-size: clamp(32px, 4vw, 52px); }
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); }
.tabs button { border: 0; background: none; padding: 9px 14px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--muted); transition: background .25s, color .25s; }
.tabs button[aria-selected="true"] { background: var(--navy); color: #fff; }
.show-body { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: clamp(20px, 3vw, 40px); align-items: center; }
.callouts { display: grid; gap: 16px; align-content: center; justify-items: start; }
.callset { display: none; gap: 14px; }
.callset.is-active { display: grid; animation: rise .45s ease both; }
.callset p { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; font-size: 16px; font-weight: 600; line-height: 1.4; }
.callset .material-symbols-outlined { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--white); border: 1px solid var(--line); color: var(--blue); font-size: 19px; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

.browser { background: var(--white); border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow-lg); overflow: hidden; transform-origin: 50% 100%; }
.browser-bar { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #F8FAFC; }
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: #E2E8F0; }
.url { flex: 1; min-width: 0; text-align: center; font-family: var(--mono); font-size: 12px; color: var(--faint); background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.data-badge { font-size: 11.5px; font-weight: 650; color: var(--green); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.data-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.data-badge.is-sample { color: var(--faint); }
.views { position: relative; height: 460px; background: #F4F6FB; }
.view { position: absolute; inset: 0; padding: 18px; overflow: hidden; opacity: 0; visibility: hidden; transform: translateY(14px) scale(.985); transition: opacity .45s, transform .45s, visibility 0s .45s; }
.view.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity .45s, transform .45s, visibility 0s; }

/* app replica inside the browser frame */
.ap-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.ap-stat { flex: 1; min-width: 120px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.ap-stat b { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
.ap-stat span { font-size: 12.5px; color: var(--muted); font-weight: 550; }
.ap-stat.is-alert b { color: var(--rose); }
.ap-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 12px; }
.ap-card { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 14px; min-width: 0; }
.ap-title { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; margin-bottom: 10px; }
.ap-title .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rose); }
.ap-title .dot.blue { background: var(--blue); }
.ap-title .dot.green { background: var(--green-dot); }
.ap-list { display: grid; gap: 6px; }
.ap-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line-2); font-size: 12.5px; min-width: 0; }
.ap-item.is-rose { border-left: 3px solid var(--rose); }
.ap-item.is-amber { border-left: 3px solid #F59E0B; }
.ap-item b { font-family: var(--mono); font-weight: 600; font-size: 12.5px; flex: none; }
.ap-item span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-item time { margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--faint); flex: none; }
.ap-empty { font-size: 13px; color: var(--muted); padding: 8px 2px; }
.ap-lanes { display: grid; gap: 8px; }
.ap-lane { display: grid; grid-template-columns: 112px 1fr 28px; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.ap-lane i { height: 8px; border-radius: 8px; background: #E2E8F0; overflow: hidden; display: block; }
.ap-lane i span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--indigo)); border-radius: 8px; }
.ap-lane b { font-family: var(--mono); text-align: right; }
.ap-job { border: 2px solid var(--blue); border-left-width: 6px; }
.ap-job-id { font-family: var(--mono); font-size: 26px; font-weight: 600; letter-spacing: -.02em; margin: 2px 0 6px; }
.ap-job p { font-size: 13px; color: var(--muted); }
.ap-job .ap-btn { margin-top: 14px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 17px; font-weight: 700; color: #fff; background: linear-gradient(90deg, var(--blue), var(--indigo)); }
.ap-job .ap-btn.done { background: #059669; }
.ap-steps { display: flex; gap: 6px; margin: 10px 0 14px; flex-wrap: wrap; }
.ap-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; margin-bottom: 4px; }
.ap-tl { display: grid; gap: 0; }
.ap-tl li { display: grid; grid-template-columns: 96px 14px 1fr; gap: 10px; font-size: 12.5px; color: var(--muted); padding: 7px 0; }
.ap-tl li i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--blue); margin-top: 4px; background: var(--white); }
.ap-tl li:last-child { color: var(--ink); font-weight: 600; }
.ap-tl li:last-child i { background: var(--blue); }
.ap-tl time { font-family: var(--mono); font-size: 11.5px; color: var(--faint); padding-top: 1px; }

/* scene 6 */
.features { padding: clamp(96px, 12vw, 160px) 0; }
.benefits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 48px); padding-bottom: clamp(56px, 7vw, 88px); border-bottom: 1px solid var(--line); }
.benefit { display: grid; gap: 12px; align-content: start; }
.benefit h3 { font-size: clamp(20px, 1.8vw, 24px); letter-spacing: -.02em; }
.benefit p { color: var(--muted); }
.bnum { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--blue); padding-bottom: 14px; border-bottom: 2px solid var(--blue); width: 40px; }
.fgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 32px; padding-top: clamp(48px, 6vw, 72px); }
.fgrid li { display: grid; gap: 8px; align-content: start; }
.fgrid .material-symbols-outlined { color: var(--blue); font-size: 24px; margin-bottom: 4px; }
.fgrid h3 { font-size: 16px; }
.fgrid p { font-size: 14.5px; color: var(--muted); }

/* for businesses */
.business { padding: clamp(96px, 12vw, 150px) 0; background: var(--paper); border-top: 1px solid var(--line-2); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.side { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-xl); padding: clamp(24px, 3vw, 40px); display: grid; gap: 18px; align-content: start; }
.side h3 { font-size: clamp(22px, 2vw, 28px); letter-spacing: -.025em; }
.side-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--blue-50); color: var(--blue); }
.side-icon .material-symbols-outlined { font-size: 26px; }
.checks { display: grid; gap: 12px; }
.checks li { position: relative; padding-left: 30px; color: var(--ink-2); }
.checks li::before { content: "check"; font-family: "Material Symbols Outlined"; position: absolute; left: 0; top: 1px; font-size: 18px; width: 20px; height: 20px; border-radius: 50%; background: var(--green-50); color: var(--green); display: grid; place-items: center; line-height: 1; }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; color: var(--blue); }
.text-link .material-symbols-outlined { font-size: 18px; transition: transform .2s; }
.text-link:hover .material-symbols-outlined { transform: translateX(3px); }
.example { margin-top: 20px; display: flex; gap: 18px; align-items: center; padding: 22px 26px; border-radius: var(--r-xl); background: var(--navy); color: #CBD5E1; }
.example > .material-symbols-outlined { font-size: 34px; color: #93C5FD; flex: none; }
.example h3 { color: #fff; margin-bottom: 4px; }

/* faq */
.faq { padding: clamp(96px, 12vw, 150px) 0; }
.faq-inner { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.faq-list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 40px 22px 0; font-size: 17.5px; font-weight: 650; position: relative; letter-spacing: -.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "add"; font-family: "Material Symbols Outlined"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 22px; color: var(--blue); transition: transform .25s; line-height: 1; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--muted); padding: 0 40px 22px 0; max-width: 46em; }

/* final */
.final { background: radial-gradient(90% 120% at 50% 0%, #15275A 0%, var(--navy) 62%); color: #fff; padding: clamp(96px, 12vw, 150px) 0 clamp(64px, 8vw, 96px); overflow: hidden; }
.final-inner { display: grid; justify-items: center; text-align: center; gap: 22px; }
.final h2 { font-size: clamp(38px, 5.6vw, 76px); max-width: 12em; }
.final .lead { color: #A9B6CC; margin-bottom: 8px; }
.final .cta-row { justify-content: center; }
.loop { width: 100%; max-width: 820px; margin-top: 36px; overflow: visible; }
.loop path { fill: none; stroke: #2A3D69; stroke-width: 2; stroke-dasharray: 4 6; }
.lnodes circle { fill: var(--navy); stroke: #60A5FA; stroke-width: 2; }
.runner { fill: #60A5FA; filter: drop-shadow(0 0 6px #3B82F6); }
.runner.r2 { fill: #A5B4FC; }

/* footer */
.footer { background: var(--navy); color: #94A3B8; border-top: 1px solid #152342; padding: 40px 0; }
.footer .brand { color: #fff; }
.foot-inner { display: grid; grid-template-columns: 1fr auto; gap: 24px 40px; align-items: center; }
.foot-tag { margin-top: 8px; font-size: 14px; }
.foot-links { display: flex; gap: 22px; flex-wrap: wrap; font-size: 14px; }
.foot-links a:hover { color: #fff; }
.foot-note { grid-column: 1 / -1; font-size: 12.5px; color: #64748B; padding-top: 20px; border-top: 1px solid #152342; }

/* desktop with scroll animation: scenes become full-screen pinned stages */
@media (min-width: 1081px) {
  .motion .chaos-pin, .motion .flow-pin, .motion .show-pin {
    min-height: 100vh; min-height: 100svh;
    padding-top: calc(var(--nav-h) + 24px); padding-bottom: 32px;
  }
  .motion .chaos-pin { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
  .motion .chaos-copy { display: grid; }
  .motion .copy-a, .motion .copy-b { grid-area: 1 / 1; padding-top: 0; }
  .motion .chaos-stage { display: grid; align-items: center; position: relative; height: min(560px, calc(100vh - 150px)); min-height: 440px; }
  .motion .clutter-layer { position: absolute; inset: 0; height: auto; z-index: 2; }
  .motion .views { height: clamp(400px, calc(100vh - 330px), 460px); }
}

/* tablet */
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .menu-btn { display: inline-flex; }
  .nav-actions { margin-left: auto; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { max-width: 560px; width: 100%; margin: 0 auto; }
  .flow-pin { grid-template-columns: 1fr; }
  .show-body { grid-template-columns: 1fr; }
  .callouts { order: 2; }
  .callset { display: grid; }
  .callset:not(.is-active) { display: none; }
  .views { height: auto; min-height: 420px; }
  .view { position: relative; inset: auto; display: none; }
  .view.is-active { display: block; }
  .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .faq-inner { grid-template-columns: 1fr; }
}

/* phone */
@media (max-width: 720px) {
  :root { --nav-h: 64px; }
  .hide-sm { display: none; }
  .hero-visual { padding: 28px 0 40px; }
  .hero-card { padding: 16px; }
  .hc-head { flex-direction: column; }
  .hc-tags { justify-items: start; grid-auto-flow: column; justify-content: start; }
  .hstep { width: 46px; font-size: 10.5px; }
  .hdot { width: 26px; height: 26px; }
  .hstep-line { margin-top: 12px; }
  .chip { max-width: 210px; font-size: 12px; padding: 8px 10px 8px 8px; }
  .chip > .material-symbols-outlined { width: 28px; height: 28px; }
  .c1 { left: -6px; top: 0; }
  .c2 { right: -6px; bottom: 0; }
  .c3 { display: none; }
  .clutter { font-size: 12px; padding: 8px 10px; }
  .sh-row { grid-template-columns: 60px 46px 42px 58px; }
  .k2 { left: 38%; top: 2%; }
  .k3 { left: 6%; top: 22%; }
  .k4 { left: 58%; top: 46%; }
  .k6 { left: 46%; top: 66%; }
  .k8 { left: 40%; top: 88%; }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 36px; }
  .board-line { display: none; }
  .bcol::before { display: none; }
  .fv-chips { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fnode text { font-size: 19px; }   /* the diagram scales down to about half size on a phone */
  .jtrack { grid-template-columns: 1fr; gap: 28px; padding-left: 0; }
  .jline { left: 31px; right: auto; top: 32px; bottom: 32px; width: 3px; height: auto; background: repeating-linear-gradient(180deg, #CBD5E1 0 8px, transparent 8px 14px); }
  .jfill { transform-origin: top; transform: scaleY(var(--jp)); }
  .jstage { grid-template-columns: 64px 1fr; justify-items: start; text-align: left; column-gap: 18px; row-gap: 6px; }
  .jicon { grid-row: span 3; margin: 0; }
  .show-head { display: grid; }
  .tabs { width: 100%; overflow-x: auto; }
  .tabs button { flex: 1; padding: 9px 10px; font-size: 13px; white-space: nowrap; }
  .ap-grid { grid-template-columns: 1fr; }
  .ap-lane { grid-template-columns: 96px 1fr 24px; }
  .ap-tl li { grid-template-columns: 76px 14px 1fr; }
  .data-badge { display: none; }
  .benefits { grid-template-columns: 1fr; }
  .fgrid { gap: 28px 20px; }
  .split { grid-template-columns: 1fr; }
  .example { flex-direction: column; align-items: start; }
  .foot-inner { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .hide-xs { display: none; }
  .fgrid { grid-template-columns: 1fr; }
  .fv-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
