:root {
  --brand: #5b4bff;
  --brand-ink: #4436e0;
  --bg: #ffffff;
  --bg-soft: #f4f3ff;
  --text: #16151f;
  --muted: #5d5b6e;
  --line: #e4e2f2;
  --card: #ffffff;
  --ok: #1b9e5a;
  --error: #d43c3c;
  --radius: 18px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0e17;
    --bg-soft: #17152a;
    --text: #f1f0fa;
    --muted: #a9a6c2;
    --line: #2a2840;
    --card: #17152a;
    --brand-ink: #8a7dff;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.55; }
a { color: var(--brand-ink); }
img { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Navigation */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px max(16px, calc((100% - 1100px) / 2));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--text); text-decoration: none; }
.nav nav { display: flex; align-items: center; gap: 20px; }
.nav nav a { color: var(--muted); text-decoration: none; font-weight: 500; }
.nav nav a:hover { color: var(--text); }
/* Language menu */
.lang {
  font: inherit; font-size: 14px; color: var(--muted); background: transparent; border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 10px; cursor: pointer;
}
.lang:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
/* Letter spacing breaks Arabic's joined letters and looks wrong in Hindi and Chinese. */
:lang(ar) *, :lang(hi) *, :lang(zh) * { letter-spacing: 0 !important; }
:lang(ar) .eyebrow, :lang(hi) .eyebrow { text-transform: none; }
.nav .nav-cta { color: #fff; background: var(--brand); padding: 8px 16px; border-radius: 999px; }
.nav .nav-cta:hover { color: #fff; background: var(--brand-ink); }
@media (max-width: 720px) { .nav nav a:not(.nav-cta) { display: none; } }

main > section { padding: 72px max(16px, calc((100% - 1100px) / 2)); }
h1 { font-size: clamp(34px, 6vw, 56px); line-height: 1.08; margin: 0 0 20px; letter-spacing: -0.02em; }
h1 span { color: var(--brand-ink); }
h1 .plain { color: inherit; }
h2 { font-size: clamp(26px, 4vw, 38px); margin: 0 0 32px; letter-spacing: -0.01em; }
h3 { margin: 12px 0 6px; font-size: 19px; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }
.eyebrow { color: var(--brand-ink); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 13px; margin: 0 0 12px; }
.lead { font-size: 19px; color: var(--muted); margin: 0 0 28px; max-width: 34em; }

/* Join form */
.join { display: flex; flex-wrap: wrap; gap: 10px; max-width: 520px; }
.join input {
  flex: 1 1 240px; min-width: 0; padding: 14px 16px; font-size: 16px;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text);
}
.join input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 20%, transparent); }
.join button {
  flex: 0 0 auto; padding: 14px 22px; font-size: 16px; font-weight: 700; color: #fff;
  background: var(--brand); border: 0; border-radius: 12px; cursor: pointer;
}
.join button:hover { background: var(--brand-ink); }
.join button:disabled { opacity: 0.6; cursor: wait; }
.form-note { flex-basis: 100%; margin: 4px 0 0; font-size: 14px; color: var(--muted); min-height: 1.4em; }
.form-note.ok { color: var(--ok); font-weight: 600; }
.form-note.error { color: var(--error); }

/* Interactive phone demo (demo.js). Layers: list < panel 3 < recording frame 4 < popup 5 < markers 6 < AI card 7 < messages 8 */
[hidden] { display: none !important; }
.demo { justify-self: center; display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; }
.phone {
  width: min(300px, 82vw); aspect-ratio: 9 / 19; padding: 12px;
  min-height: 0; overflow: hidden; /* keep the phone's shape; the list scrolls inside it */
  background: #1c1b26; border-radius: 42px; box-shadow: 0 30px 80px -20px rgba(91, 75, 255, 0.45);
}
.screen {
  position: relative; height: 100%; overflow: hidden; border-radius: 32px; background: #f6f6f8; color: #222;
  display: flex; flex-direction: column;
  user-select: none; -webkit-user-select: none; font-size: 15px;
}
.screen button { font: inherit; cursor: pointer; }
.app-bar { display: flex; justify-content: space-between; align-items: center; background: #00897b; color: #fff; font-weight: 700; padding: 34px 16px 12px; }
.total { font-size: 13px; background: rgba(255, 255, 255, 0.2); padding: 2px 10px; border-radius: 999px; }
/* The list scrolls (finger, wheel, or Zikmik's swipes); scrollbars hidden like on a phone. */
.rows { list-style: none; margin: 0; padding: 0; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.rows::-webkit-scrollbar { display: none; }
.rows li { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px 9px 50px; border-bottom: 1px solid #e3e3e8; }
.like {
  display: inline-flex; align-items: center; gap: 9px; min-width: 60px; justify-content: center;
  border: 0; border-radius: 999px; padding: 5px 10px; background: #ecebf3; color: #555; font-size: 13px !important;
}
.like .heart::before { content: "♡"; }
.like.liked { color: #c62848; background: #fde4ea; }
.like.liked .heart::before { content: "♥"; }
.like.pop { animation: pop 0.3s; }
@keyframes pop { 50% { transform: scale(1.18); } }

.panel {
  position: absolute; left: 0; top: 36%; z-index: 3; display: flex; flex-direction: column; gap: 4px; padding: 8px 4px;
  background: #1f1f24; border-radius: 0 14px 14px 0;
}
.panel button { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 9px; background: none; color: #fff; }
.panel button:hover, .panel button:focus-visible { background: rgba(255, 255, 255, 0.14); outline: none; }
.panel i { font-style: normal; display: block; }
.panel .play { width: 0; height: 0; border-left: 12px solid #fff; border-top: 7px solid transparent; border-bottom: 7px solid transparent; margin-left: 3px; }
.panel .playing .play { width: 11px; height: 11px; border: 0; margin: 0; background: #fff; border-radius: 2px; }
.panel .ai { color: #ffd23f; font-size: 17px; }
.panel .rec { width: 13px; height: 13px; background: #e53935; border-radius: 50%; }
.panel .on .rec { border-radius: 3px; animation: blink 1s infinite; }
.panel .reset { font-size: 18px; line-height: 1; }
@keyframes blink { 50% { opacity: 0.35; } }

.markers { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.marker {
  position: absolute; width: 26px; height: 26px; display: grid; place-items: center; transform: translate(-50%, -50%);
  color: #fff; font-weight: 700; font-size: 11px; background: #1e88e5; border: 2px solid #fff; border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); animation: marker-in 0.25s ease-out; transition: background 0.15s, transform 0.15s;
}
.marker.active { background: #ffb300; transform: translate(-50%, -50%) scale(1.15); }
.marker.fix { background: #e53935; }
.marker.find { border-style: dashed; }
.marker.swipe { width: 20px; height: 20px; font-size: 10px; background: #43a047; }
.marker.swipe-end { background: #1b5e20; }
.swipe-line {
  position: absolute; width: 4px; margin-left: -2px; border-radius: 2px; background: #43a047;
  box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.45);
}
.finger {
  position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%;
  background: rgba(91, 75, 255, 0.55); box-shadow: 0 0 0 6px rgba(91, 75, 255, 0.18);
}
@keyframes marker-in { from { transform: translate(-50%, -50%) scale(0); } }
.ripple {
  position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: rgba(91, 75, 255, 0.55); animation: ripple 0.5s ease-out forwards;
}
@keyframes ripple { from { transform: scale(0.4); opacity: 1; } to { transform: scale(5); opacity: 0; } }

.screen.recording::after {
  content: "● Recording"; position: absolute; inset: 0; z-index: 4; pointer-events: none; border: 3px solid #e53935; border-radius: 32px;
  display: flex; justify-content: center; padding-top: 7px; color: #e53935; font-size: 11px; font-weight: 800; letter-spacing: 0.04em;
}
.screen.scanning::after {
  content: ""; position: absolute; left: 0; right: 0; height: 80px; z-index: 4; pointer-events: none;
  background: linear-gradient(transparent, rgba(91, 75, 255, 0.3), transparent); animation: scan 1.3s ease-in-out;
}
@keyframes scan { from { top: -80px; } to { top: 100%; } }

.ai-card {
  position: absolute; left: 10px; right: 10px; top: 17%; z-index: 7; padding: 14px; border-radius: 16px;
  background: #202124; color: #fff; font-size: 13px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}
.ai-card p { margin: 0; }
.ai-title { font-weight: 700; font-size: 15px; }
.ai-input { margin: 10px 0 !important; min-height: 50px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.12); }
.ai-input .placeholder { color: rgba(255, 255, 255, 0.5); }
.ai-input.typing::after { content: "▏"; animation: blink 0.8s infinite; }
.ai-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-presets button { border: 1px solid rgba(255, 255, 255, 0.3); background: none; color: #fff; border-radius: 999px; padding: 5px 10px; font-size: 12px; }
.ai-presets button:hover, .ai-presets button.picked { border-color: #ffd54f; color: #ffd54f; }
.ai-actions { display: flex; justify-content: flex-end; gap: 4px; margin-top: 10px; }
.ai-actions button { border: 0; background: none; color: #ffd54f; font-weight: 700; padding: 6px 8px; }
.ai-actions button:disabled { opacity: 0.35; cursor: default; }
.ai-card.compact { top: 26px; padding: 9px 12px; }
.ai-card.compact > :not(.ai-input) { display: none; }
.ai-card.compact .ai-input { margin: 0 !important; min-height: 0; padding: 0; background: none; font-weight: 600; }

.popup { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: rgba(0, 0, 0, 0.45); }
.popup-box { width: 78%; padding: 16px; border-radius: 18px; background: #fff; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); }
.popup-box p { margin: 0 0 6px; }
.stars { color: #ffb300; font-size: 20px; letter-spacing: 2px; }
.popup-box button { border: 0; background: none; color: #00897b; font-weight: 700; padding: 8px 12px; }
.banner {
  position: absolute; left: 10px; right: 10px; top: 28px; z-index: 8; padding: 8px 12px; border-radius: 12px;
  font-size: 12.5px; font-weight: 700; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}
.banner.warn { background: #ffb300; color: #222; }
.banner.fix { background: #5b4bff; color: #fff; }
.banner.ok { background: #1b9e5a; color: #fff; }
.toast {
  position: absolute; left: 50%; bottom: 22px; z-index: 8; transform: translateX(-50%); white-space: nowrap;
  background: #2d2c37; color: #fff; font-size: 12px; padding: 7px 12px; border-radius: 999px;
  opacity: 0; transition: opacity 0.25s; pointer-events: none;
}
.toast.show { opacity: 1; }

.demo-hint { margin: 0; max-width: 340px; min-height: 3.2em; text-align: center; color: var(--muted); font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chips button {
  padding: 8px 14px; font: 600 14px/1.2 inherit; font-family: inherit; color: var(--text); background: var(--card);
  border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer;
}
.chips button:hover, .chips button:focus-visible { border-color: var(--brand); outline: none; }
@media (prefers-reduced-motion: reduce) { .screen *, .screen::after { animation-duration: 0.01s !important; } }

/* Features */
.features { background: var(--bg-soft); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.grid article { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.grid p { margin: 0; color: var(--muted); }
.ico { width: 44px; height: 44px; display: grid; place-items: center; font-size: 22px; color: var(--brand); background: var(--bg-soft); border-radius: 12px; }

/* How it works */
.how ol { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 18px; max-width: 760px; }
.how li { counter-increment: step; position: relative; padding-inline-start: 60px; font-size: 18px; color: var(--muted); }
.how li b { color: var(--text); }
.how li::before {
  content: counter(step); position: absolute; inset-inline-start: 0; top: -4px; width: 40px; height: 40px;
  display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--brand); border-radius: 50%;
}

/* FAQ */
.faq { background: var(--bg-soft); }
.faq details { max-width: 760px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; margin-bottom: 12px; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq p { color: var(--muted); margin: 12px 0 0; }

/* Final call to action */
.cta { text-align: center; }
.cta p { color: var(--muted); max-width: 36em; margin: -16px auto 24px; }
.cta .join { margin: 0 auto; justify-content: center; }
.cta .form-note { text-align: center; }

footer {
  display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; padding: 28px 16px;
  color: var(--muted); border-top: 1px solid var(--line); font-size: 14px;
}
footer a { color: var(--muted); }

/* Policy pages */
.doc { max-width: 760px; margin: 0 auto; padding: 48px 16px 72px; }
.doc h1 { font-size: clamp(30px, 5vw, 42px); }
.doc h2 { font-size: 22px; margin: 36px 0 10px; }
.doc p, .doc li { color: var(--muted); }
.doc .updated { font-size: 14px; }
