/* KeyFlip website. Self-hosted fonts, no third-party requests. */

@font-face { font-family: "KF Latin"; src: url(fonts/jakarta-latin.woff2) format("woff2"); font-weight: 200 800; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "KF Latin"; src: url(fonts/jakarta-latin-ext.woff2) format("woff2"); font-weight: 200 800; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "KF Arabic"; src: url(fonts/cairo-arabic.woff2) format("woff2"); font-weight: 200 1000; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "KF Arabic"; src: url(fonts/cairo-latin.woff2) format("woff2"); font-weight: 200 1000; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "KF Other"; src: url(fonts/rubik-cyrillic.woff2) format("woff2"); font-weight: 300 900; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "KF Other"; src: url(fonts/rubik-hebrew.woff2) format("woff2"); font-weight: 300 900; font-display: swap;
  unicode-range: U+0307-0308, U+0590-05FF, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "KF Persian"; src: url(fonts/vazirmatn-arabic.woff2) format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC; }

:root {
  --bg: #fbfaff; --bg-2: #f4f1ff; --card: #ffffff; --card-2: #f7f5ff;
  --ink: #14112b; --muted: #5b5676; --faint: #8a85a6; --line: #e6e2f5; --line-2: #d9d3f1;
  --brand: #5b33f2; --brand-ink: #4a26d9; --accent: #0b9fc4; --sel: rgba(91, 51, 242, .2);
  --grad: linear-gradient(135deg, #7b4dff 0%, #5e5bf6 50%, #14c2e8 100%);
  --grad-soft: linear-gradient(135deg, rgba(123, 77, 255, .12), rgba(20, 194, 232, .12));
  --shadow: 0 1px 2px rgba(20, 17, 43, .04), 0 14px 34px -16px rgba(46, 26, 140, .22);
  --shadow-lg: 0 30px 60px -28px rgba(46, 26, 140, .42), 0 10px 24px -12px rgba(20, 17, 43, .18);
  --key-top: #ffffff; --key-bot: #f0edfb; --key-edge: #d6cff2; --key-ink: #2b2550;
  --toast: #17152b; --toast-ink: #ffffff;
  --radius: 22px;
  --font: "KF Latin", "KF Arabic", "KF Other", "KF Persian", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
.lang-ar { --font: "KF Arabic", "KF Other", "KF Persian", "KF Latin", ui-sans-serif, system-ui, "Segoe UI", Tahoma, sans-serif; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0a15; --bg-2: #100e20; --card: #161429; --card-2: #1c1a33;
    --ink: #f2f0ff; --muted: #a9a5c7; --faint: #7d79a0; --line: #29264a; --line-2: #36325d;
    --brand: #a28dff; --brand-ink: #b9abff; --accent: #4fd4f0; --sel: rgba(162, 141, 255, .3);
    --grad-soft: linear-gradient(135deg, rgba(123, 77, 255, .2), rgba(20, 194, 232, .14));
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 40px -18px rgba(0, 0, 0, .6);
    --shadow-lg: 0 30px 60px -28px rgba(0, 0, 0, .8), 0 10px 24px -12px rgba(0, 0, 0, .5);
    --key-top: #2c2948; --key-bot: #211e3a; --key-edge: #0d0b1c; --key-ink: #ecebff;
    --toast: #ffffff; --toast-ink: #17152b;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0a15; --bg-2: #100e20; --card: #161429; --card-2: #1c1a33;
  --ink: #f2f0ff; --muted: #a9a5c7; --faint: #7d79a0; --line: #29264a; --line-2: #36325d;
  --brand: #a28dff; --brand-ink: #b9abff; --accent: #4fd4f0; --sel: rgba(162, 141, 255, .3);
  --grad-soft: linear-gradient(135deg, rgba(123, 77, 255, .2), rgba(20, 194, 232, .14));
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 40px -18px rgba(0, 0, 0, .6);
  --shadow-lg: 0 30px 60px -28px rgba(0, 0, 0, .8), 0 10px 24px -12px rgba(0, 0, 0, .5);
  --key-top: #2c2948; --key-bot: #211e3a; --key-edge: #0d0b1c; --key-ink: #ecebff;
  --toast: #ffffff; --toast-ink: #17152b;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.65 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
.lang-ar body, body.lang-ar { line-height: 1.85; }
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -.025em; text-wrap: balance; }
.lang-ar h1, .lang-ar h2, .lang-ar h3 { letter-spacing: 0; }
p { margin: 0; }
b, strong { font-weight: 700; }
code { font: 600 .88em/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--grad-soft); padding: .12em .45em; border-radius: 7px; direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
::selection { background: var(--sel); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 8px; }
.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: 24px; }
.wrap.narrow { max-width: 860px; }
.center { text-align: center; justify-content: center; }
.nw { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 12px; background: var(--ink); color: var(--bg); font-weight: 700; }
.skip:focus { top: 12px; }
.ic { width: 1.15em; height: 1.15em; flex: none; }
[dir="rtl"] .dir-ic { transform: scaleX(-1); }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* ---------- buttons, keys ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55em; padding: .8em 1.3em; border-radius: 14px; border: 1px solid transparent; font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2; cursor: pointer; text-decoration: none !important; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease; white-space: nowrap; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn.sm { padding: .55em 1em; font-size: .92rem; border-radius: 12px; }
.btn.lg { padding: .95em 1.5em; font-size: 1.06rem; border-radius: 16px; }
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 12px 28px -12px rgba(91, 51, 242, .65), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn.primary:hover { box-shadow: 0 16px 36px -12px rgba(91, 51, 242, .8), inset 0 1px 0 rgba(255, 255, 255, .25); transform: translateY(-1px); }
.btn.ghost { background: var(--card); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow); }
.btn.ghost:hover { border-color: var(--line-2); transform: translateY(-1px); }
.btn.light { background: #fff; color: #3d1fd0; box-shadow: 0 16px 36px -16px rgba(0, 0, 0, .5); }
.btn.outline-light { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .5); }
.btn.outline-light:hover, .btn.light:hover { transform: translateY(-1px); }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; transition: border-color .2s, transform .15s; }
.icon-btn:hover { border-color: var(--line-2); }
.icon-btn .ic { width: 20px; height: 20px; }

kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 2em; padding: .32em .6em; border-radius: 9px; font: 700 .86em/1 "KF Latin", ui-sans-serif, system-ui, sans-serif; color: var(--key-ink); background: linear-gradient(var(--key-top), var(--key-bot)); border: 1px solid var(--line-2); box-shadow: 0 2px 0 var(--key-edge), 0 4px 10px -4px rgba(30, 20, 80, .25); white-space: nowrap; vertical-align: .08em; transition: transform .12s ease, box-shadow .12s ease, background .12s ease, color .12s ease; }
.combo { display: inline-flex; align-items: center; gap: .3em; white-space: nowrap; unicode-bidi: isolate; vertical-align: baseline; }
.combo .plus { color: var(--faint); font-weight: 700; font-size: .85em; }
.combo.sm kbd { font-size: .74em; padding: .3em .5em; border-radius: 7px; box-shadow: 0 1.5px 0 var(--key-edge); }
.combo.big kbd { font-size: 1.15rem; padding: .55em .85em; border-radius: 12px; box-shadow: 0 4px 0 var(--key-edge), 0 12px 24px -10px rgba(30, 20, 80, .35); }
.combo.huge { gap: .5em; }
.combo.huge kbd { font-size: 1.6rem; padding: .55em .8em; min-width: 2.6em; border-radius: 16px; box-shadow: 0 5px 0 var(--key-edge), 0 18px 30px -14px rgba(30, 20, 80, .4); }
.combo.huge .plus { font-size: 1.3rem; }
kbd.press, .combo.huge:hover kbd { transform: translateY(3px); box-shadow: 0 1px 0 var(--key-edge), 0 4px 10px -6px rgba(30, 20, 80, .3); background: var(--grad); color: #fff; border-color: transparent; }

/* ---------- header ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s, background .2s; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav-in { display: flex; align-items: center; gap: 20px; height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; text-decoration: none !important; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.nav-links { display: flex; gap: 4px; margin-inline-start: 12px; }
.nav-links a { padding: 8px 12px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: .95rem; text-decoration: none; }
.nav-links a:hover { color: var(--ink); background: var(--card-2); }
.nav-tools { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.lang-switch { padding: 8px 12px; border-radius: 10px; font-weight: 700; color: var(--ink); border: 1px solid var(--line); background: var(--card); text-decoration: none !important; }
.lang-switch[lang="ar"] { font-family: "KF Arabic", sans-serif; }
.lang-switch[lang="en"] { font-family: "KF Latin", sans-serif; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 56px 0 96px; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.b1 { width: 560px; height: 560px; background: radial-gradient(circle, rgba(123, 77, 255, .55), transparent 65%); top: -60px; inset-inline-end: -120px; }
.b2 { width: 520px; height: 520px; background: radial-gradient(circle, rgba(20, 194, 232, .45), transparent 65%); bottom: 0; inset-inline-start: -160px; }
.grid { position: absolute; inset: 0; background-image: radial-gradient(var(--line-2) 1.2px, transparent 1.2px); background-size: 26px 26px; mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%); opacity: .7; }
.hero-in { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--brand-ink); font-weight: 700; font-size: .9rem; box-shadow: var(--shadow); }
[dir="rtl"] .eyebrow { padding: 6px 10px 6px 14px; }
.hero h1 { font-size: clamp(2.5rem, 5.2vw, 4.35rem); line-height: 1.04; margin: 22px 0 20px; }
.lang-ar .hero h1 { line-height: 1.3; font-size: clamp(2.3rem, 4.8vw, 4rem); }
.lead { font-size: clamp(1.08rem, 1.5vw, 1.25rem); color: var(--muted); max-width: 34em; }
.lead .combo { font-size: .95em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.trust { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 0; margin: 28px 0 0; color: var(--muted); font-weight: 600; font-size: .95rem; }
.trust li { display: inline-flex; align-items: center; gap: 7px; }
.trust .ic { color: #12b886; stroke-width: 2.6; }
.browsers { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; color: var(--faint); font-size: .92rem; font-weight: 600; }
.browsers.center { display: flex; }

.demo { position: relative; perspective: 1400px; }
.win { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-lg); overflow: visible; transform: rotateY(-6deg) rotateX(3deg); transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
[dir="rtl"] .win { transform: rotateY(6deg) rotateX(3deg); }
.demo:hover .win { transform: none; }
.win-bar { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.dots { display: flex; gap: 7px; direction: ltr; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }
.win-title { font-weight: 700; font-size: .95rem; }
.win-row { display: flex; gap: 14px; padding: 11px 20px; border-bottom: 1px solid var(--line); font-size: .95rem; }
.win-row .lbl { color: var(--faint); min-width: 64px; }
.win-body { padding: 18px 20px 92px; min-height: 230px; }
.state { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; transition: color .3s; }
.lang-ar .state { letter-spacing: 0; text-transform: none; font-size: .85rem; }
.state.fixed { color: #12b886; }
.field { font-size: clamp(1.45rem, 2.6vw, 1.9rem); font-weight: 600; line-height: 1.5; min-height: 3em; display: flex; align-items: flex-start; flex-wrap: wrap; }
.field .txt { display: inline-block; border-radius: 6px; padding: 0 .12em; transition: transform .26s cubic-bezier(.5, 0, .5, 1), opacity .26s ease, background .2s ease; transform-origin: 50% 60%; unicode-bidi: isolate; }
.field .txt.sel { background: var(--sel); box-shadow: 0 0 0 2px var(--sel); }
.field .txt.out { transform: rotateX(90deg); opacity: 0; }
.field .caret { width: 2px; height: 1.25em; margin-top: .14em; background: var(--brand); animation: blink 1s steps(1) infinite; }
.field .caret.off { visibility: hidden; }
@keyframes blink { 50% { opacity: 0; } }
.demo-keys { position: absolute; bottom: 74px; inset-inline-end: 22px; }
.toast { position: absolute; bottom: -22px; inset-inline-start: 50%; translate: -50% 0; display: inline-flex; align-items: center; gap: 10px; padding: 11px 18px 11px 12px; border-radius: 16px; background: var(--toast); color: var(--toast-ink); font-weight: 700; font-size: .95rem; white-space: nowrap; box-shadow: 0 24px 40px -18px rgba(20, 10, 60, .6); opacity: 0; transform: translateY(10px) scale(.96); transition: opacity .3s ease, transform .3s cubic-bezier(.2, .9, .3, 1.2); }
[dir="rtl"] .toast { translate: 50% 0; padding: 11px 12px 11px 18px; }
.toast.show { opacity: 1; transform: none; }
.toast .t-ic { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--grad); color: #fff; }
.toast .t-ic .ic { width: 16px; height: 16px; }
.toast small { font-weight: 500; color: color-mix(in srgb, var(--toast-ink) 72%, transparent); display: inline-flex; align-items: center; gap: 6px; }
.toast small .combo { font-size: .85em; }
.toast kbd { color: var(--toast-ink); background: color-mix(in srgb, var(--toast-ink) 14%, transparent); border-color: color-mix(in srgb, var(--toast-ink) 22%, transparent); box-shadow: none; }
.toast .plus { color: inherit; }

/* ---------- sections ---------- */
.section { padding: clamp(72px, 10vw, 124px) 0; position: relative; }
.section.alt { background: linear-gradient(180deg, var(--bg-2), var(--bg)); }
.head { max-width: 760px; margin: 0 auto 52px; }
.head.center { text-align: center; }
.kicker { display: inline-block; color: var(--brand); font-weight: 800; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px; }
.lang-ar .kicker { letter-spacing: 0; text-transform: none; font-size: .98rem; }
h2 { font-size: clamp(1.95rem, 3.7vw, 3.05rem); line-height: 1.12; }
.lang-ar h2 { line-height: 1.4; }
.sub { color: var(--muted); font-size: clamp(1.03rem, 1.3vw, 1.15rem); margin-top: 16px; }
.head .sub { max-width: 640px; margin-inline: auto; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

/* three ways */
.ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.way { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; transition: transform .25s ease, box-shadow .25s ease; }
.way:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.vis { position: relative; height: 200px; display: grid; place-items: center; background: var(--grad-soft); border-bottom: 1px solid var(--line); overflow: hidden; }
.vis::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(var(--line-2) 1px, transparent 1px); background-size: 18px 18px; opacity: .5; pointer-events: none; }
.vis > * { position: relative; z-index: 1; }
.way-txt { padding: 24px 26px 28px; position: relative; }
.num { position: absolute; top: -18px; inset-inline-end: 22px; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 800; box-shadow: 0 10px 20px -8px rgba(91, 51, 242, .6); }
.way h3 { font-size: 1.28rem; margin-bottom: 8px; }
.way p { color: var(--muted); }
.way .note { margin-top: 12px; font-size: .9rem; padding: 10px 12px; border-radius: 12px; background: var(--card-2); border: 1px dashed var(--line-2); }
.vis-fab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.vis-fab .line { font-size: 1.6rem; font-weight: 600; }
.vis-fab mark { background: var(--sel); color: inherit; border-radius: 5px; padding: 0 .15em; }
.fab { display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px 7px 8px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 16px 30px -14px rgba(46, 26, 140, .45); font-size: .98rem; animation: floaty 3.2s ease-in-out infinite; }
[dir="rtl"] .fab { padding: 7px 8px 7px 14px; }
.fab-ic { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--grad); color: #fff; }
.fab-ic .ic { width: 16px; height: 16px; }
.fab-dir { color: var(--faint); font-weight: 600; font-size: .85rem; }
@keyframes floaty { 50% { transform: translateY(-6px); } }
.menu-wrap { position: relative; }
.menu { list-style: none; margin: 0; padding: 6px; width: 290px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 24px 40px -18px rgba(20, 10, 60, .45); font-size: .9rem; }
.menu li { padding: 6px 12px; border-radius: 7px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.menu li.sep { height: 1px; padding: 0; margin: 5px 6px; background: var(--line); }
.menu li.on { background: var(--grad); color: #fff; font-weight: 700; white-space: nowrap; }
.menu li.on img { width: 16px; height: 16px; border-radius: 4px; background: #fff; }
.menu .dim { opacity: .8; font-weight: 500; margin-inline-start: auto; }
.cursor { position: absolute; width: 26px; height: 26px; color: var(--ink); fill: var(--card); bottom: -16px; inset-inline-start: 52%; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .25)); }

/* playground */
.play { max-width: 940px; margin: 0 auto; padding: 22px; }
.play-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.play-lbl { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--muted); }
.pair { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
select { font: inherit; font-size: .93rem; font-weight: 600; color: var(--ink); background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; max-width: 100%; min-width: 0; cursor: pointer; }
select:hover { border-color: var(--line-2); }
textarea { display: block; width: 100%; min-height: 150px; resize: vertical; font: 600 clamp(1.3rem, 2.4vw, 1.65rem)/1.55 var(--font); color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 16px; padding: 18px 20px; transition: border-color .2s, box-shadow .2s; }
textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--sel); }
textarea.flash { animation: flash .6s ease; }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(91, 51, 242, .5); } 100% { box-shadow: 0 0 0 14px rgba(91, 51, 242, 0); } }
.play-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.hint-combo { display: inline-flex; margin-inline-start: 4px; padding-inline-start: 10px; border-inline-start: 1px solid rgba(255, 255, 255, .35); }
.hint-combo kbd { background: rgba(255, 255, 255, .18); color: #fff; border-color: rgba(255, 255, 255, .3); box-shadow: none; }
.hint-combo .plus { color: rgba(255, 255, 255, .7); }
.play-status { flex: 1 1 220px; color: var(--muted); font-weight: 600; font-size: .95rem; min-height: 1.6em; }
.play-status.ok { color: #12a67a; }
.play-amb { margin-top: 14px; padding: 14px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--line); }
.play-amb p { font-weight: 700; font-size: .95rem; margin-bottom: 10px; }
.amb-word { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.amb-word .src { font-weight: 700; color: var(--faint); margin-inline-end: 6px; }
.amb-word .tag { font-size: .78rem; font-weight: 700; color: #12a67a; margin-inline-start: 4px; }
.play-samples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.play-samples .lbl { font-weight: 700; color: var(--faint); font-size: .9rem; margin-inline-end: 4px; }
.chip { font: inherit; font-size: .9rem; font-weight: 600; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; transition: border-color .2s, background .2s, color .2s; }
.chip:hover { border-color: var(--brand); }
.chip.on, .chip[aria-pressed="true"] { background: var(--grad); color: #fff; border-color: transparent; }
.play-hint { margin-top: 12px; font-size: .88rem; color: var(--faint); }

/* spotlights */
.spot { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 80px); align-items: center; }
.spot.flip .spot-media { order: -1; }
.spot-txt h2 { font-size: clamp(1.8rem, 3.2vw, 2.65rem); }
.spot-txt .sub kbd { font-size: .8em; }
.ticks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.ticks li { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.ticks .ic { width: 26px; height: 26px; padding: 5px; border-radius: 8px; background: var(--grad); color: #fff; stroke-width: 3; }
.shot { margin: 0; position: relative; }
.shot img { border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--shadow-lg); width: 100%; background: var(--card); }
.shot.glow::before { content: ""; position: absolute; inset: 8% 6%; background: var(--grad); filter: blur(60px); opacity: .35; z-index: -1; border-radius: 50%; }
.shot.popup { max-width: 380px; margin-inline: auto; }
.kb-compare { padding: 28px; }
.kb-cap { font-weight: 800; color: var(--muted); margin-bottom: 18px; text-align: center; }
.krow { display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 14px; }
.krow + .krow { margin-top: 14px; }
.kname { font-weight: 800; font-size: .95rem; }
.krow.k-win .kname { color: var(--accent); }
.krow.k-mac .kname { color: var(--brand); }
.keys { display: flex; gap: 10px; flex-wrap: wrap; }
.key { position: relative; width: 66px; height: 66px; border-radius: 14px; background: linear-gradient(var(--key-top), var(--key-bot)); border: 1px solid var(--line-2); box-shadow: 0 4px 0 var(--key-edge), 0 12px 20px -12px rgba(30, 20, 80, .35); display: grid; place-items: center; }
.key small { position: absolute; top: 5px; left: 8px; font: 700 .7rem/1 "KF Latin", sans-serif; color: var(--faint); }
.key b { font: 700 1.55rem/1 "KF Arabic", sans-serif; color: var(--key-ink); }
.krow.k-win .key { border-top: 3px solid var(--accent); }
.krow.k-mac .key { border-top: 3px solid var(--brand); }

/* features */
.feats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feat { padding: 26px 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .25s ease, border-color .25s ease; }
.feat:hover { transform: translateY(-3px); border-color: var(--line-2); }
.feat-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--grad-soft); color: var(--brand); margin-bottom: 18px; border: 1px solid var(--line); }
.feat-ic .ic { width: 24px; height: 24px; }
.feat h3 { font-size: 1.12rem; margin-bottom: 8px; }
.feat p { color: var(--muted); font-size: .97rem; }
.feat .combo { font-size: .9em; }

/* video */
.video { max-width: 1000px; margin: 0 auto; border-radius: 24px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-lg); background: #0f0d1f; aspect-ratio: 16 / 9; }
.video video { width: 100%; height: 100%; object-fit: cover; }

/* languages */
.langs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lang { display: flex; align-items: center; gap: 16px; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.glyph { flex: none; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 16px; background: var(--grad); color: #fff; font-size: 1.75rem; font-weight: 800; box-shadow: 0 12px 24px -12px rgba(91, 51, 242, .6); }
.lang h3 { font-size: 1.08rem; display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.lang h3 small { color: var(--faint); font-weight: 600; font-size: .85rem; }
.lang p { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pill { font-size: .8rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); color: var(--muted); }

/* privacy */
.privacy { background: radial-gradient(800px 400px at 15% 20%, rgba(123, 77, 255, .35), transparent 60%), radial-gradient(700px 400px at 90% 90%, rgba(20, 194, 232, .25), transparent 60%), #100d24; color: #f2f0ff; }
.privacy .kicker { color: #bcaeff; }
.privacy .sub { color: #c4c0e0; }
.priv-in { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; align-items: center; }
.priv-badge { position: relative; width: min(320px, 70vw); aspect-ratio: 1; margin: 0 auto; display: grid; place-items: center; }
.ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(188, 174, 255, .35); }
.ring.r1 { inset: 12%; border-color: rgba(188, 174, 255, .5); animation: pulse 3.6s ease-in-out infinite; }
.ring.r2 { animation: pulse 3.6s ease-in-out infinite 1.2s; }
@keyframes pulse { 0%, 100% { transform: scale(.96); opacity: .6; } 50% { transform: scale(1.03); opacity: 1; } }
.core { width: 46%; aspect-ratio: 1; border-radius: 32%; display: grid; place-items: center; background: var(--grad); box-shadow: 0 30px 60px -20px rgba(123, 77, 255, .8), inset 0 2px 0 rgba(255, 255, 255, .3); color: #fff; }
.core .ic { width: 44%; height: 44%; }
.priv-list { list-style: none; padding: 0; margin: 28px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.priv-list li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); font-weight: 600; }
.priv-list .ic { color: #8fe8ff; width: 22px; height: 22px; }
.privacy .link { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 700; border-bottom: 2px solid rgba(255, 255, 255, .35); padding-bottom: 2px; text-decoration: none; }
.privacy .link:hover { border-color: #fff; }

/* install */
.install { max-width: 880px; margin: 0 auto; padding: clamp(28px, 5vw, 56px); text-align: center; position: relative; overflow: hidden; }
.install::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--grad); }
.install .sub { max-width: 560px; margin-inline: auto; }
.steps { list-style: none; padding: 0; margin: 30px auto 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; text-align: start; max-width: 760px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--line); }
.steps .n { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; background: var(--grad); color: #fff; font-weight: 800; }
.install .browsers { margin-top: 26px; }
.install .ver { margin-top: 14px; color: var(--muted); font-weight: 700; font-size: .92rem; }
.install .ver-note { margin-top: 4px; color: var(--faint); font-size: .88rem; }

/* faq */
.faq { display: grid; gap: 12px; }
.qa { background: var(--card); border: 1px solid var(--line); border-radius: 18px; transition: border-color .2s, box-shadow .2s; }
.qa[open] { border-color: var(--line-2); box-shadow: var(--shadow); }
.qa summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; font-weight: 700; font-size: 1.06rem; }
.qa summary::-webkit-details-marker { display: none; }
.pm { flex: none; position: relative; width: 28px; height: 28px; border-radius: 9px; background: var(--card-2); border: 1px solid var(--line); }
.pm::before, .pm::after { content: ""; position: absolute; inset: 50% auto auto 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; background: var(--brand); border-radius: 2px; transition: transform .25s ease; }
.pm::after { transform: rotate(90deg); }
.qa[open] .pm::after { transform: rotate(0deg); }
.ans { padding: 0 22px 20px; color: var(--muted); }

/* final */
.final { padding: clamp(64px, 9vw, 110px) 0; background: var(--grad); color: #fff; text-align: center; position: relative; overflow: hidden; isolation: isolate; }
.final::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(255, 255, 255, .22) 1.2px, transparent 1.2px); background-size: 24px 24px; mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%); }
.final h2 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); }
.final .grad { color: #fff; -webkit-background-clip: border-box; background-clip: border-box; background: linear-gradient(transparent 58%, rgba(255, 255, 255, .26) 58%, rgba(255, 255, 255, .26) 90%, transparent 90%); padding-inline: .08em; }
.final p { margin-top: 14px; font-size: 1.15rem; opacity: .9; }

/* footer */
.foot { padding: 48px 0 32px; border-top: 1px solid var(--line); }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.foot-brand { display: flex; align-items: center; gap: 14px; }
.foot-brand img { border-radius: 9px; }
.foot-brand p { color: var(--muted); font-size: .93rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot-links a { color: var(--muted); font-weight: 600; }
.foot-links a:hover { color: var(--ink); }
.foot-copy { margin-top: 22px; color: var(--faint); font-size: .85rem; }

/* privacy policy page */
.doc-switch { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); margin-bottom: 18px; }
.doc-switch button { font: inherit; font-weight: 700; padding: 8px 16px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.doc-switch button[aria-pressed="true"] { background: var(--grad); color: #fff; }
.doc-switch button[lang="ar"] { font-family: "KF Arabic", sans-serif; }
.doc { padding: clamp(24px, 5vw, 52px); }
.doc[lang="ar"] { font-family: "KF Arabic", "KF Latin", sans-serif; line-height: 1.9; }
.doc h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.doc .date { color: var(--faint); margin: 6px 0 22px; }
.doc h2 { display: none; }
.doc h3 { font-size: 1.25rem; margin: 30px 0 8px; }
.doc p, .doc li { color: var(--muted); }
.doc strong { color: var(--ink); }
.doc ul { padding-inline-start: 22px; }
.doc li { margin: 6px 0; }
.main-section { padding-top: 40px; }
.doc-page main.section { padding-top: 48px; }

/* 404 */
.nf h1 { font-size: clamp(2rem, 4vw, 3rem); margin-top: 18px; }
.nf h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-top: 36px; font-family: "KF Arabic", sans-serif; line-height: 1.5; }
.nf-code { display: inline-flex; align-items: center; gap: 18px; font-size: clamp(2.6rem, 8vw, 5rem); font-weight: 800; }
.nf-code .g { color: var(--faint); text-decoration: line-through; text-decoration-thickness: .06em; }
.nf-code .ic { width: .6em; height: .6em; color: var(--brand); }
.nf-code span:last-child { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nf .sub { margin-inline: auto; }

/* reveal on scroll (only when JS is running) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .feats { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
}
@media (max-width: 920px) {
  .langs { grid-template-columns: repeat(2, 1fr); }
  .hero { padding-top: 32px; }
  .hero-in, .spot, .priv-in { grid-template-columns: 1fr; }
  .hero-demo { max-width: 600px; width: 100%; margin: 8px auto 0; }
  .win, [dir="rtl"] .win { transform: none; }
  .ways { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
  .spot.flip .spot-media { order: 0; }
  .spot-media { max-width: 620px; width: 100%; margin-inline: auto; }
  .priv-badge { width: min(220px, 60vw); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding-inline: 16px; }
  .nav-in { height: 62px; gap: 10px; }
  .nav-cta { display: none; }
  .brand span { font-size: 1.1rem; }
  .hero-cta .btn { flex: 1 1 100%; }
  .feats, .priv-list, .steps, .langs { grid-template-columns: 1fr; }
  .win-body { padding: 16px 16px 84px; min-height: 200px; }
  .win-row { padding: 10px 16px; }
  .demo-keys { bottom: 66px; inset-inline-end: 14px; }
  .combo.big kbd { font-size: .95rem; }
  .toast { font-size: .85rem; padding: 9px 14px 9px 10px; }
  .toast small { display: none; }
  .play { padding: 16px; }
  .play-top { flex-direction: column; align-items: stretch; }
  .pair { display: grid; grid-template-columns: 1fr auto 1fr; }
  .pair select { width: 100%; }
  .krow { grid-template-columns: 1fr; gap: 8px; }
  .key { width: 56px; height: 56px; }
  .key b { font-size: 1.3rem; }
  .menu { width: 270px; }
}

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