/* ============================================================
   Konvella — website
   Same palette as the app's default Midnight theme, so the site and the product
   read as one thing.
   ============================================================ */

:root {
  --bg: #0b0e14;
  --bg-2: #0f1218;
  --panel: #141822;
  --panel-2: #181d28;
  --surface: #1d232c;
  --surface-2: #242c37;
  --border: #2b323d;
  --border-soft: #1e2530;
  --text: #edeff2;
  --text-strong: #c3cad5;
  --text-dim: #8a93a3;
  --text-faint: #626d7a;
  --accent: #6e7bff;
  --accent-2: #9aa3ff;
  --accent-deep: #4f5bd5;
  --on-accent: #0f1218;
  --success: #4fd68c;
  --warning: #e8b34c;
  --danger: #ff6b6b;

  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.65);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.02em; text-wrap: balance; }
.section-lede, .lede { text-wrap: pretty; }
p { margin: 0; }
::selection { background: rgba(110, 123, 255, 0.35); }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 820px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--on-accent); padding: 10px 16px;
  border-radius: 10px; font-weight: 700; transition: top .2s;
}
.skip:focus { top: 16px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------------- icons ---------------- */
.ico, .f-ico svg, .sec-ico svg, .brand-mark svg, .sc svg {
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.ico { width: 18px; height: 18px; flex-shrink: 0; }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 600; font-size: 15px; border-radius: 12px; border: 1px solid transparent;
  padding: 12px 20px; cursor: pointer; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s, border-color .2s;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-sm { padding: 9px 15px; font-size: 14px; border-radius: 10px; }
.btn-lg { padding: 15px 24px; font-size: 16px; border-radius: 14px; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #fff;
  box-shadow: 0 10px 30px -8px rgba(110, 123, 255, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -10px rgba(110, 123, 255, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.22); }
.btn-ghost { background: rgba(255, 255, 255, 0.03); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.07); border-color: #3a4350; transform: translateY(-2px); }
.btn-ghost .ico { transition: transform .25s var(--ease); }
.btn-ghost:hover .ico { transform: translateX(3px); }
.btn-light { background: #fff; color: #10131a; box-shadow: 0 14px 40px -12px rgba(0, 0, 0, 0.5); }
.btn-light:hover { transform: translateY(-2px); }

/* ---------------- scroll progress ---------------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; pointer-events: none; }
.progress span {
  display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--accent), #c084fc);
}

/* ---------------- nav ---------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(11, 14, 20, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: rgba(43, 50, 61, 0.6);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 8px 20px -6px rgba(110, 123, 255, 0.7);
}
.brand-mark svg { width: 19px; height: 19px; color: #fff; stroke-width: 2.6; }
.nav-links { display: flex; gap: 6px; }
.nav-links a {
  color: var(--text-dim); font-size: 14.5px; font-weight: 500; padding: 8px 14px; border-radius: 9px;
  transition: color .2s, background .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.menu-btn {
  display: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border);
  background: transparent; cursor: pointer; position: relative;
}
.menu-btn span {
  position: absolute; left: 11px; right: 11px; height: 2px; background: var(--text); border-radius: 2px;
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.menu-btn span:first-child { top: 15px; }
.menu-btn span:last-child { top: 23px; }
.menu-btn[aria-expanded="true"] span:first-child { top: 19px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { top: 19px; transform: rotate(-45deg); }

/* ---------------- hero ---------------- */
.hero { position: relative; padding: 124px 0 60px; overflow: hidden; isolation: isolate; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); z-index: -1; opacity: 0.55; }
.orb-a { width: 620px; height: 620px; background: radial-gradient(circle, #4f5bd5 0%, transparent 70%); top: -220px; right: -120px; animation: drift 18s ease-in-out infinite; }
.orb-b { width: 520px; height: 520px; background: radial-gradient(circle, #7c3aed 0%, transparent 70%); bottom: -200px; left: -180px; opacity: 0.35; animation: drift 22s ease-in-out infinite reverse; }
@keyframes drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-40px, 30px); } }
.grid-bg {
  position: absolute; inset: 0; z-index: -1; opacity: 0.35;
  background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
}

.hero-inner { display: grid; grid-template-columns: 1.08fr 1fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600;
  color: var(--text-strong); padding: 7px 14px 7px 12px; border-radius: 999px;
  background: rgba(110, 123, 255, 0.1); border: 1px solid rgba(110, 123, 255, 0.28); margin-bottom: 22px;
}
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 rgba(79, 214, 140, 0.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(79, 214, 140, 0.55); } 70% { box-shadow: 0 0 0 9px rgba(79, 214, 140, 0); } 100% { box-shadow: 0 0 0 0 rgba(79, 214, 140, 0); } }

h1 { font-size: clamp(38px, 4.4vw, 60px); font-weight: 800; letter-spacing: -0.035em; }
h1 em {
  font-family: var(--serif); font-style: italic; font-weight: 500; letter-spacing: -0.02em;
  background: linear-gradient(120deg, var(--accent-2) 0%, #c4b5fd 50%, var(--accent) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { font-size: 18px; color: var(--text-dim); margin-top: 20px; max-width: 540px; line-height: 1.6; }
.hero-actions { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero-meta { margin-top: 18px; font-size: 13.5px; color: var(--text-faint); }

/* ---------------- the app miniature ---------------- */
.hero-visual { perspective: 1600px; }
.mock {
  position: relative; border-radius: 18px; overflow: hidden;
  background: var(--bg-2); border: 1px solid var(--border);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.03) inset, 0 0 120px -30px rgba(110, 123, 255, 0.45);
  transform: rotateY(-8deg) rotateX(4deg);
  transition: transform .8s var(--ease);
  font-size: 12px;
}
.hero-visual:hover .mock { transform: rotateY(-3deg) rotateX(1deg); }
.mock-bar { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; background: #0c0f15; border-bottom: 1px solid var(--border-soft); }
.mock-bar span { width: 10px; height: 10px; border-radius: 50%; background: #2b323d; }
.mock-bar span:nth-child(1) { background: #ff5f57; }
.mock-bar span:nth-child(2) { background: #febc2e; }
.mock-bar span:nth-child(3) { background: #28c840; }
.mock-bar em { font-style: normal; color: var(--text-faint); margin-left: 8px; font-weight: 600; font-size: 11.5px; }
.mock-body { display: grid; grid-template-columns: 46px 160px 1fr; height: 380px; }

.mock-rail { background: #10131a; border-right: 1px solid var(--border-soft); display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 0; }
.mock-rail i { display: block; width: 26px; height: 26px; border-radius: 8px; background: var(--surface); }
.mock-rail .m-logo { background: var(--accent); margin-bottom: 6px; }
.mock-rail .m-nav.on { background: var(--surface-2); box-shadow: inset 0 0 0 1px rgba(110, 123, 255, 0.5); }
.mock-rail .m-me { margin-top: auto; border-radius: 50%; background: linear-gradient(135deg, #4fd68c, #2e9e62); }

.mock-list { background: var(--panel); border-right: 1px solid var(--border-soft); padding: 10px 7px; overflow: hidden; }
.m-search { height: 24px; border-radius: 7px; background: var(--surface); margin: 0 3px 8px; }
.m-row { display: flex; align-items: center; gap: 8px; padding: 7px 6px; border-radius: 8px; }
.m-row.on { background: var(--surface); }
.m-row div { min-width: 0; flex: 1; }
.m-row b { display: block; font-size: 11.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-row small { display: block; font-size: 10.5px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .3s; }
.m-badge { min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: var(--on-accent); font-size: 9.5px; font-weight: 700; display: grid; place-items: center; transition: transform .3s var(--ease), opacity .3s; }
.m-badge.hide { transform: scale(0); opacity: 0; }

.av { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 11px; color: #0f1218; }
.av-a { background: linear-gradient(155deg, #9aa3ff, #6e7bff); }
.av-b { background: linear-gradient(155deg, #ffd08a, #e8b34c); }
.av-c { background: linear-gradient(155deg, #7ee0ad, #4fd68c); }
.av-d { background: linear-gradient(155deg, #ffb199, #ff8a65); }
.av.big { width: 84px; height: 84px; font-size: 30px; }

.mock-chat { display: flex; flex-direction: column; min-width: 0; }
.m-head { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-bottom: 1px solid var(--border-soft); }
.m-head div { flex: 1; }
.m-head b { display: block; font-size: 12px; }
.m-head small { display: block; font-size: 10.5px; color: var(--text-dim); transition: color .3s; }
.m-head small.typing { color: var(--accent); }
.m-call-btn { width: 24px; height: 24px; border-radius: 7px; background: var(--surface); box-shadow: inset 0 0 0 2px rgba(79, 214, 140, 0.35); }

.m-msgs { flex: 1; padding: 12px; display: flex; flex-direction: column; gap: 6px; overflow: hidden; justify-content: flex-end; }
.m-msg {
  max-width: 78%; padding: 7px 10px; border-radius: 12px 12px 12px 3px; background: var(--surface);
  color: var(--text); font-size: 11.5px; line-height: 1.45;
  animation: msgIn .5s var(--ease) both;
}
.m-msg.out { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-radius: 12px 12px 3px 12px; }
.m-msg .mention { background: rgba(232, 179, 76, 0.22); color: var(--warning); font-weight: 600; border-radius: 4px; padding: 0 3px; }
.m-msg.out .mention { background: rgba(15, 18, 24, 0.18); color: var(--on-accent); }
.m-file { display: flex; align-items: center; gap: 8px; }
.m-file i { width: 26px; height: 26px; border-radius: 7px; background: rgba(15, 18, 24, 0.2); flex-shrink: 0; }
.m-file b { display: block; font-size: 11px; }
.m-file small { display: block; font-size: 10px; opacity: 0.75; }
.m-typing { align-self: flex-start; display: inline-flex; gap: 3px; padding: 9px 11px; border-radius: 12px; background: var(--surface); animation: msgIn .4s var(--ease) both; }
.m-typing span { width: 5px; height: 5px; border-radius: 50%; background: var(--text-dim); animation: dot 1.1s infinite; }
.m-typing span:nth-child(2) { animation-delay: .16s; }
.m-typing span:nth-child(3) { animation-delay: .32s; }
@keyframes dot { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }

.m-compose { display: flex; align-items: center; gap: 7px; padding: 10px 12px; border-top: 1px solid var(--border-soft); }
.m-clip, .m-send { width: 26px; height: 26px; border-radius: 7px; background: var(--surface); flex-shrink: 0; }
.m-send { background: var(--accent); }
.m-input { flex: 1; height: 26px; border-radius: 7px; background: var(--surface); color: var(--text-faint); font-size: 11px; display: flex; align-items: center; padding: 0 10px; }

.m-dock {
  position: absolute; left: 58px; bottom: 14px; display: flex; align-items: center; gap: 8px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5); width: 196px;
  transform: translateY(20px) scale(.96); opacity: 0; transition: transform .5s var(--ease), opacity .5s;
}
.m-dock.show { transform: none; opacity: 1; }
.m-dock div { flex: 1; min-width: 0; }
.m-dock b { display: block; font-size: 11px; }
.m-timer { display: block; font-size: 10px; color: var(--success); font-variant-numeric: tabular-nums; }
.m-ctl { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); flex-shrink: 0; }
.m-ctl.share { background: var(--accent); }
.m-ctl.end { background: var(--danger); }

/* ---------------- facts strip ---------------- */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 80px; }
.fact { padding: 22px 22px; border-radius: var(--radius); background: rgba(20, 24, 34, 0.6); border: 1px solid var(--border-soft); transition: border-color .3s, transform .3s var(--ease); }
.fact:hover { border-color: rgba(110, 123, 255, 0.4); transform: translateY(-3px); }
.fact strong { display: block; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; background: linear-gradient(120deg, #fff, var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fact span { display: block; font-size: 14px; color: var(--text-dim); margin-top: 4px; }

/* ---------------- sections ---------------- */
.section { padding: 120px 0; position: relative; }
.section-alt { background: linear-gradient(180deg, transparent, rgba(20, 24, 34, 0.55) 18%, rgba(20, 24, 34, 0.55) 82%, transparent); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 64px; }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 14px; }
h2 { font-size: clamp(32px, 4vw, 48px); font-weight: 800; letter-spacing: -0.03em; }
.section-lede { font-size: 18px; color: var(--text-dim); margin-top: 18px; }

/* features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature {
  position: relative; padding: 30px 28px; border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(29, 35, 44, 0.55), rgba(20, 24, 34, 0.55));
  border: 1px solid var(--border-soft); overflow: hidden;
  transition: transform .45s var(--ease), border-color .3s, box-shadow .45s var(--ease);
}
.feature::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .45s;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(110, 123, 255, 0.14), transparent 45%);
}
.feature:hover { transform: translateY(-6px); border-color: rgba(110, 123, 255, 0.35); box-shadow: 0 24px 60px -24px rgba(110, 123, 255, 0.35); }
.feature:hover::before { opacity: 1; }
.f-ico {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 22px;
  background: rgba(110, 123, 255, 0.12); border: 1px solid rgba(110, 123, 255, 0.25); color: var(--accent-2);
  transition: transform .45s var(--ease);
}
.feature:hover .f-ico { transform: scale(1.08) rotate(-4deg); }
.f-ico svg { width: 22px; height: 22px; }
.feature h3 { font-size: 19px; font-weight: 700; margin-bottom: 10px; position: relative; }
.feature p { color: var(--text-dim); font-size: 15px; position: relative; }

/* split rows */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.split-rev .split-copy { order: 2; }
.split-rev .split-visual { order: 1; }
.split-copy h2 { margin-bottom: 20px; }
.split-copy > p:not([class]) { color: var(--text-dim); font-size: 17.5px; }
.checks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.checks li { position: relative; padding-left: 34px; color: var(--text-strong); font-size: 15.5px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(79, 214, 140, 0.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234FD68C' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* call stage */
.stage {
  border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-2); border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.stage-top { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border-soft); font-weight: 600; font-size: 14.5px; }
.stage-top em { font-style: normal; color: var(--text-dim); font-weight: 500; font-variant-numeric: tabular-nums; margin-left: auto; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); animation: pulse 2s infinite; }
.stage-body { display: flex; justify-content: center; gap: 48px; padding: 64px 20px 48px; }
.stage-av { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.stage-av small { color: var(--text-dim); font-size: 13.5px; }
.stage-av .ring { position: absolute; top: -8px; left: 50%; width: 100px; height: 100px; margin-left: -50px; border-radius: 50%; border: 3px solid var(--success); animation: speak 1.6s ease-in-out infinite; }
@keyframes speak { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.08); opacity: .35; } }
.stage-controls { display: flex; justify-content: center; gap: 12px; padding: 18px; border-top: 1px solid var(--border-soft); }
.sc { width: 48px; height: 48px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; color: var(--text); transition: transform .3s var(--ease); }
.sc:hover { transform: translateY(-3px); }
.sc svg { width: 20px; height: 20px; }
.sc.end svg { fill: currentColor; stroke: none; }
.sc.on { background: var(--accent); color: #fff; }
.sc.end { background: var(--danger); color: #fff; }

/* security */
.sec-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.sec-card {
  padding: 32px; border-radius: var(--radius-lg); border: 1px solid var(--border-soft);
  background: linear-gradient(180deg, rgba(29, 35, 44, 0.5), rgba(20, 24, 34, 0.5));
  transition: border-color .3s, transform .45s var(--ease);
}
.sec-card:hover { border-color: rgba(110, 123, 255, 0.3); transform: translateY(-4px); }
.sec-wide { grid-column: span 2; display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; }
.sec-ico { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; background: rgba(79, 214, 140, 0.12); border: 1px solid rgba(79, 214, 140, 0.28); color: var(--success); margin-bottom: 20px; }
.sec-wide .sec-ico { margin-bottom: 0; }
.sec-ico svg { width: 24px; height: 24px; }
.sec-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.sec-card p { color: var(--text-dim); font-size: 15px; }
.code-demo { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 24px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--border); min-width: 200px; }
.code-demo span { font-size: 30px; font-weight: 800; letter-spacing: 0.1em; font-variant-numeric: tabular-nums; }
.otp-bar { display: block; width: 100%; height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.otp-bar b { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: 0 50%; transition: transform 1s linear; }
.devices { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 340px; }
/* Grid items refuse by default to shrink below their content, and these rows hold
   long no-wrap text, which pushed the page wider than a phone screen. */
.sec-grid > *, .sec-wide > *, .features > *, .steps > *, .facts > *, .split > * { min-width: 0; }
.devices li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); }
.devices div { flex: 1; min-width: 0; }
.devices b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.devices small { display: block; font-size: 11.5px; color: var(--text-faint); }
.devices em { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--success); background: rgba(79, 214, 140, 0.14); padding: 3px 8px; border-radius: 20px; white-space: nowrap; }
.dv-ico { width: 30px; height: 30px; border-radius: 8px; background: var(--surface); flex-shrink: 0; }
.dv-x { font-size: 12px; color: var(--text-dim); border: 1px solid var(--border); padding: 4px 9px; border-radius: 8px; white-space: nowrap; }

/* themes */
.swatches { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.swatch {
  width: 52px; height: 52px; border-radius: 16px; border: 2px solid transparent; cursor: pointer; padding: 0;
  position: relative; overflow: hidden; transition: transform .3s var(--ease), border-color .2s;
}
.swatch:hover { transform: translateY(-3px); }
.swatch[aria-checked="true"] { outline: 2px solid var(--accent-2); outline-offset: 3px; transform: translateY(-3px); }
.swatch i { position: absolute; right: 7px; bottom: 7px; width: 16px; height: 16px; border-radius: 50%; }
.swatch-name { margin-top: 16px; font-weight: 600; color: var(--text-strong); min-height: 26px; }

.theme-mock {
  --t-bg: #0f1218; --t-rail: #10131a; --t-panel: #141822; --t-surface: #1d232c; --t-border: #1e2530;
  --t-text: #edeff2; --t-accent: #6e7bff; --t-on: #0f1218;
  display: grid; grid-template-columns: 54px 150px 1fr; height: 360px; border-radius: var(--radius-lg);
  overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--t-bg);
  transition: background .5s var(--ease);
}
.theme-mock * { transition: background .5s var(--ease), color .5s var(--ease), border-color .5s var(--ease); }
.tm-rail { background: var(--t-rail); display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 16px 0; border-right: 1px solid var(--t-border); }
.tm-rail i { width: 28px; height: 28px; border-radius: 9px; background: var(--t-surface); }
.tm-rail i:first-child { background: var(--t-accent); }
.tm-rail i.on { box-shadow: inset 0 0 0 2px var(--t-accent); }
.tm-list { background: var(--t-panel); border-right: 1px solid var(--t-border); padding: 14px 10px; display: grid; align-content: start; gap: 8px; }
.tm-row { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: 10px; }
.tm-row.on { background: var(--t-surface); }
.tm-av { width: 26px; height: 26px; border-radius: 50%; background: var(--t-accent); opacity: .85; flex-shrink: 0; }
.tm-row span { flex: 1; height: 8px; border-radius: 4px; background: var(--t-surface); }
.tm-row.on span { background: var(--t-border); }
.tm-chat { display: flex; flex-direction: column; gap: 10px; padding: 20px; justify-content: flex-end; }
.tm-bubble { max-width: 76%; padding: 10px 14px; border-radius: 14px 14px 14px 4px; background: var(--t-surface); color: var(--t-text); font-size: 13.5px; }
.tm-bubble.out { align-self: flex-end; background: var(--t-accent); color: var(--t-on); border-radius: 14px 14px 4px 14px; }
.tm-compose { height: 38px; border-radius: 10px; background: var(--t-surface); margin-top: 8px; }

/* download */
.download-card {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center;
  padding: 56px; border-radius: 28px; border: 1px solid rgba(110, 123, 255, 0.3);
  background: linear-gradient(135deg, rgba(79, 91, 213, 0.22), rgba(20, 24, 34, 0.9) 55%);
}
.dl-glow { position: absolute; width: 480px; height: 480px; top: -200px; left: -120px; border-radius: 50%; background: radial-gradient(circle, rgba(110, 123, 255, 0.45), transparent 70%); filter: blur(40px); pointer-events: none; animation: drift 16s ease-in-out infinite; }
.dl-copy { position: relative; }
.dl-copy h2 { margin-bottom: 16px; }
.dl-copy > p:not([class]) { color: var(--text-dim); font-size: 17px; max-width: 480px; }
.dl-actions { display: flex; align-items: center; gap: 22px; margin-top: 30px; flex-wrap: wrap; }
.text-link { color: var(--accent-2); font-weight: 600; font-size: 15px; transition: color .2s; }
.text-link:hover { color: #fff; }
.os-note { margin-top: 16px; font-size: 14px; color: var(--warning); }
.dl-specs { position: relative; margin: 0; display: grid; gap: 2px; padding: 8px; border-radius: 18px; background: rgba(11, 14, 20, 0.6); border: 1px solid var(--border); }
.dl-specs div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 16px; border-radius: 12px; }
.dl-specs div:hover { background: rgba(255, 255, 255, 0.03); }
.dl-specs dt { color: var(--text-dim); font-size: 14.5px; }
.dl-specs dd { margin: 0; font-weight: 600; font-size: 14.5px; text-align: right; font-variant-numeric: tabular-nums; }

.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { display: flex; gap: 16px; padding: 24px; border-radius: var(--radius); border: 1px solid var(--border-soft); background: rgba(20, 24, 34, 0.5); }
.steps span { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; font-weight: 800; background: rgba(110, 123, 255, 0.15); color: var(--accent-2); }
.steps b { display: block; margin-bottom: 4px; }
.steps p { color: var(--text-dim); font-size: 14.5px; }

/* faq */
.faq { display: grid; gap: 12px; }
.faq details { border-radius: var(--radius); border: 1px solid var(--border-soft); background: rgba(20, 24, 34, 0.6); overflow: hidden; transition: border-color .3s; }
.faq details[open] { border-color: rgba(110, 123, 255, 0.35); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 26px; font-weight: 600; font-size: 16.5px;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 12px; height: 12px; flex-shrink: 0; border-right: 2px solid var(--text-dim); border-bottom: 2px solid var(--text-dim);
  transform: rotate(45deg) translate(-3px, -3px); transition: transform .35s var(--ease);
}
.faq details[open] summary::after { transform: rotate(225deg) translate(-3px, -3px); }
.faq-body { padding: 0 26px 22px; color: var(--text-dim); font-size: 15.5px; }
.faq-body strong { color: var(--text); }

/* final cta */
.cta { padding: 40px 0 120px; }
.cta-inner {
  text-align: center; padding: 72px 24px; border-radius: 28px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #5561e0 0%, #6e7bff 45%, #8b5cf6 100%);
  box-shadow: 0 40px 100px -30px rgba(110, 123, 255, 0.6);
}
.cta-inner::before {
  content: ""; position: absolute; inset: 0; opacity: .25;
  background-image: radial-gradient(circle at 20% 20%, #fff 1px, transparent 1.5px);
  background-size: 22px 22px;
}
.cta-inner h2 { color: #fff; position: relative; }
.cta-inner p { color: rgba(255, 255, 255, 0.82); font-size: 18px; margin: 14px 0 30px; position: relative; }
.cta-inner .btn { position: relative; }

/* footer */
.footer { border-top: 1px solid var(--border-soft); padding: 64px 0 36px; background: #090b10; }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-brand p { color: var(--text-faint); margin-top: 14px; font-size: 14.5px; max-width: 280px; }
.footer-links { display: flex; gap: 64px; }
.footer-links div { display: grid; gap: 10px; align-content: start; }
.footer-links b { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-strong); margin-bottom: 4px; }
.footer-links a { color: var(--text-faint); font-size: 14.5px; transition: color .2s; }
.footer-links a:hover { color: var(--text); }
.footer-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border-soft); color: var(--text-faint); font-size: 13.5px; }

/* ---------------- reveal on scroll ---------------- */
/* Only hidden when JavaScript is confirmed to be running (see js-flag.js). */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }
.js .hero-visual.reveal { transform: translateY(40px) scale(.97); }
.js .hero-visual.reveal.in { transform: none; }

/* ---------------- responsive ---------------- */
@media (max-width: 1040px) {
  .hero-inner { grid-template-columns: 1fr; gap: 64px; }
  .hero-copy { text-align: center; }
  .lede { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .mock { transform: none; max-width: 720px; margin: 0 auto; }
  .hero-visual:hover .mock { transform: none; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 48px; }
  .split-rev .split-copy, .split-rev .split-visual { order: initial; }
  .sec-wide { grid-template-columns: 1fr; }
  .devices, .code-demo { min-width: 0; }
  .download-card { grid-template-columns: 1fr; padding: 40px; }
  .facts { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav-links {
    position: fixed; top: 72px; left: 0; right: 0; flex-direction: column; gap: 2px;
    background: rgba(11, 14, 20, 0.97); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    padding: 12px 16px 20px; border-bottom: 1px solid var(--border);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: transform .35s var(--ease), opacity .3s;
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 13px 14px; font-size: 16px; }
  .menu-btn { display: block; }
  .nav-cta .btn { display: none; }
  .hero { padding-top: 120px; }
  .mock-body { grid-template-columns: 40px 1fr; height: 330px; }
  .mock-list { display: none; }
  .m-dock { left: 50px; }
  .features, .sec-grid, .steps { grid-template-columns: 1fr; }
  .sec-wide { grid-column: auto; }
  .section { padding: 88px 0; }
  .theme-mock { grid-template-columns: 44px 1fr; }
  .tm-list { display: none; }
  .download-card { padding: 30px 22px; }
  .footer-links { gap: 36px; }
}

@media (max-width: 460px) {
  .facts { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
}

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

/* ---------------- 404 ---------------- */
.notfound { min-height: 100vh; display: grid; place-items: center; position: relative; overflow: hidden; isolation: isolate; padding: 40px 24px; }
.notfound-inner { text-align: center; max-width: 560px; }
.notfound .brand { margin-bottom: 40px; }
.notfound-code {
  font-size: clamp(96px, 20vw, 168px); font-weight: 800; line-height: 1; letter-spacing: -0.06em;
  background: linear-gradient(120deg, var(--accent-2), #c4b5fd, var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 12px;
}
.notfound h1 { font-size: clamp(30px, 5vw, 44px); }
.notfound .lede { margin-left: auto; margin-right: auto; }
.notfound .hero-actions { justify-content: center; }
