:root {
  --bg: #ffffff;
  --bg-alt: #f7f7fb;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #e6e8f0;
  --brand: #4f46e5;
  --brand-2: #a855f7;
  --brand-soft: #eef2ff;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px rgba(15, 23, 42, .06);
  --radius: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0d14;
    --bg-alt: #10131c;
    --surface: #141824;
    --text: #eef1f8;
    --muted: #a3acc2;
    --border: #232a3b;
    --brand: #818cf8;
    --brand-2: #c084fc;
    --brand-soft: #1b1f3a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0d14; --bg-alt: #10131c; --surface: #141824; --text: #eef1f8; --muted: #a3acc2;
  --border: #232a3b; --brand: #818cf8; --brand-2: #c084fc; --brand-soft: #1b1f3a; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 12px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--border); }
.nav__in { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -.01em; text-decoration: none; }
.brand__mark { width: 34px; height: 34px; }
.nav__links { display: flex; gap: 28px; margin-left: auto; }
.nav__links a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: 15px; }
.nav__links a:hover { color: var(--text); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; border-radius: 999px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-weight: 600; text-decoration: none; border: 0; box-shadow: 0 8px 22px color-mix(in srgb, var(--brand) 32%, transparent); transition: transform .15s ease, box-shadow .15s ease; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 28px color-mix(in srgb, var(--brand) 40%, transparent); }
.btn--sm { padding: 9px 16px; font-size: 14px; }
.btn--lg { padding: 16px 28px; font-size: 17px; }
.btn--ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--border); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--brand); }

/* hero */
.hero { position: relative; padding: 96px 0 72px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -30% -10% auto; height: 560px; background: radial-gradient(40% 60% at 30% 40%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 70%), radial-gradient(35% 55% at 75% 30%, color-mix(in srgb, var(--brand-2) 20%, transparent), transparent 70%); pointer-events: none; z-index: -1; }
.hero__in { max-width: 860px; text-align: center; }
.eyebrow { display: inline-block; margin: 0 0 18px; padding: 6px 14px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-weight: 600; font-size: 14px; }
h1 { font-size: clamp(38px, 6vw, 64px); line-height: 1.06; letter-spacing: -.03em; margin: 0 0 20px; font-weight: 800; }
.grad { background: linear-gradient(135deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(17px, 2.2vw, 20px); color: var(--muted); margin: 0 auto 32px; max-width: 700px; }
.hero__cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.facts { list-style: none; padding: 0; margin: 44px 0 0; display: flex; justify-content: center; gap: 12px 40px; flex-wrap: wrap; color: var(--muted); font-size: 15px; }
.facts strong { color: var(--text); font-size: 17px; margin-right: 4px; }

/* sections */
.section { padding: 88px 0; }
.section--alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section__head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
h2 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -.02em; line-height: 1.15; margin: 0 0 12px; font-weight: 800; }
.section__head p { color: var(--muted); margin: 0; font-size: 18px; }

/* app cards */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.card { display: flex; flex-direction: column; gap: 18px; padding: 26px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .2s ease, border-color .2s ease; }
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); }
.card__icon { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 6px 16px rgba(15, 23, 42, .12); }
.card__body { flex: 1; }
.card h3 { margin: 0 0 8px; font-size: 20px; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.badge { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); }
.tags { list-style: none; padding: 0; margin: 16px 0 0; display: flex; gap: 8px; flex-wrap: wrap; }
.tags li { font-size: 12.5px; padding: 4px 10px; border-radius: 8px; background: var(--bg-alt); border: 1px solid var(--border); color: var(--muted); }
.card__link { font-weight: 600; font-size: 15px; color: var(--brand); text-decoration: none; }
.card__link:hover { text-decoration: underline; }
.card__link--muted { color: var(--muted); font-weight: 500; }
.card--cta { background: linear-gradient(135deg, var(--brand-soft), var(--surface)); justify-content: space-between; }

/* why */
.why { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.why__item { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.why__icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); margin-bottom: 16px; }
.why__icon svg { width: 24px; height: 24px; fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.why__item h3 { margin: 0 0 8px; font-size: 18px; }
.why__item p { margin: 0; color: var(--muted); font-size: 15px; }

/* contact */
.contact { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 44px; border-radius: 26px; background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 12%, var(--surface)), color-mix(in srgb, var(--brand-2) 10%, var(--surface))); border: 1px solid var(--border); }
.contact h2 { margin-bottom: 8px; }
.contact p { margin: 0; color: var(--muted); max-width: 560px; font-size: 17px; }

/* footer */
.footer { padding: 36px 0 48px; border-top: 1px solid var(--border); }
.footer__in { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.brand--foot { font-size: 16px; }
.brand--foot .brand__mark { width: 28px; height: 28px; }
.footer__links { display: flex; gap: 22px; margin-left: auto; }
.footer__links a { color: var(--muted); text-decoration: none; font-size: 14px; }
.footer__links a:hover { color: var(--text); }
.footer__copy { width: 100%; margin: 8px 0 0; color: var(--muted); font-size: 13px; }

/* legal pages */
.legal { max-width: 760px; padding: 64px 24px 88px; }
.legal h1 { font-size: clamp(32px, 5vw, 44px); }
.legal h2 { font-size: 22px; margin-top: 36px; }
.legal p, .legal li { color: var(--muted); }
.legal a { color: var(--brand); }

@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .why { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .nav__links { display: none; }
  .nav .btn--sm { margin-left: auto; }
  .hero { padding: 64px 0 48px; }
  .section { padding: 64px 0; }
  .grid, .why { grid-template-columns: 1fr; }
  .contact { flex-direction: column; align-items: flex-start; padding: 28px; }
  .contact .btn--lg { width: 100%; font-size: 15px; white-space: normal; }
  .footer__links { margin-left: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn, .card { transition: none; } }

/* app filters + card footer */
.filters { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: -16px 0 32px; }
.filters[hidden] { display: none; }
.chip { font: inherit; font-size: 14px; font-weight: 600; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; transition: border-color .15s ease, color .15s ease, background .15s ease; }
.chip:hover { color: var(--text); border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.card[hidden] { display: none; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
.card__demo { font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; }
.card__demo:hover { color: var(--text); text-decoration: underline; }
.badge--free { background: color-mix(in srgb, #16a34a 14%, var(--surface)); color: #15803d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge--free { color: #4ade80; } }
:root[data-theme="dark"] .badge--free { color: #4ade80; }
@media (max-width: 640px) {
  .filters { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; margin: -8px -16px 24px; padding: 0 16px 4px; scrollbar-width: none; }
  .chip { flex: none; }
}
.grid > .card--cta { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 24px; }
@media (max-width: 640px) { .grid > .card--cta { flex-direction: column; align-items: flex-start; } }
