/* Malath School — landing page. Palette and type follow malathapp.com (purple #5F4D9B / #523F94, magenta accent, Tajawal). */
:root {
  --p900: #241A4D;
  --p800: #3B2A78;
  --p700: #523F94;
  --p600: #5F4D9B;
  --p500: #7B66C2;
  --p300: #BDB2E6;
  --p100: #EAE8F2;
  --p50: #F6F4FB;
  --accent: #D10EDD;
  --accent-600: #B00CBA;
  --ink: #1C2030;
  --text: #3E4456;
  --muted: #6B7183;
  --line: #E4E1EF;
  --bg: #FFFFFF;
  --dark: #20262E;
  --ok: #157F55;
  --err: #B42318;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 18px 50px -20px rgba(59, 42, 120, .35);
  --shadow-sm: 0 6px 20px -10px rgba(59, 42, 120, .25);
  --wrap: 1200px;
  --font: 'Tajawal', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.7; font-size: 17px; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--p700); text-decoration: none; }
a:hover { color: var(--accent-600); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; margin: 0 0 .5em; font-weight: 800; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.icon { width: 1.25em; height: 1.25em; flex: none; }
.logo-white { filter: brightness(0) invert(1); }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--p700); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 100; }
.skip:focus { top: 12px; color: #fff; }
[dir="rtl"] .arrow, [dir="rtl"] .link-arrow span { display: inline-block; transform: scaleX(-1); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; border: 0; border-radius: 999px; padding: .7em 1.4em; font: inherit; font-weight: 700; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease; white-space: nowrap; line-height: 1.2; }
.btn--lg { padding: .9em 1.7em; font-size: 1.05rem; }
.btn--primary { background: var(--p700); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--p800); color: #fff; transform: translateY(-1px); }
.btn--accent { background: linear-gradient(135deg, var(--accent), #8E2DE2); color: #fff; box-shadow: 0 12px 30px -10px rgba(209, 14, 221, .6); }
.btn--accent:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 16px 36px -10px rgba(209, 14, 221, .7); }
.btn--ghost { background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .45); backdrop-filter: blur(6px); }
.btn--ghost:hover { background: rgba(255, 255, 255, .22); color: #fff; }
.btn[disabled] { opacity: .7; pointer-events: none; }
.link-arrow { font-weight: 700; display: inline-flex; gap: .4em; align-items: center; }
.link-arrow--light { color: #fff; opacity: .9; }
.link-arrow--light:hover { color: #fff; opacity: 1; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .86); backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.topbar.is-scrolled { border-color: var(--line); box-shadow: 0 6px 24px -18px rgba(36, 26, 77, .5); }
.topbar__inner { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--p700); }
.brand img { width: 40px; height: auto; }
.brand__name { display: flex; flex-direction: column; font-weight: 900; font-size: 1.3rem; line-height: 1; color: var(--p700); }
.brand__name small { font-size: .62rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-top: 4px; }
.brand--light .brand__name { color: #fff; }
.nav { display: flex; gap: 4px; margin-inline-start: auto; }
.nav a { color: var(--ink); font-weight: 500; padding: 8px 12px; border-radius: 999px; font-size: .97rem; }
.nav a:hover { background: var(--p50); color: var(--p700); }
.nav__cta-mobile { display: none; }
.topbar__actions { display: flex; align-items: center; gap: 10px; }
.lang { position: relative; }
.lang summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); font-weight: 700; color: var(--p700); font-size: .9rem; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary svg { width: 18px; height: 18px; fill: currentColor; }
.lang ul { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); list-style: none; padding: 6px; margin: 0; min-width: 190px; z-index: 60; }
.lang li a { display: block; padding: 9px 12px; border-radius: 10px; color: var(--ink); }
.lang li a:hover, .lang li a[aria-current] { background: var(--p50); color: var(--p700); font-weight: 700; }
.burger { display: none; width: 44px; height: 44px; border: 1px solid var(--line); background: #fff; border-radius: 12px; cursor: pointer; padding: 11px 10px; flex-direction: column; justify-content: space-between; }
.burger span { display: block; height: 2px; background: var(--p700); border-radius: 2px; transition: transform .25s, opacity .25s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Hero */
.hero { position: relative; color: #fff; background: radial-gradient(1200px 600px at 85% -10%, rgba(209, 14, 221, .45), transparent 60%), linear-gradient(135deg, var(--p800) 0%, var(--p600) 55%, #8E3AC8 100%); padding: 72px 0 150px; overflow: hidden; }
.hero__glow { position: absolute; inset: auto -10% -40% auto; width: 620px; height: 620px; background: radial-gradient(circle, rgba(255, 255, 255, .18), transparent 60%); border-radius: 50%; pointer-events: none; }
[dir="rtl"] .hero__glow { inset: auto auto -40% -10%; }
.hero__grid { position: relative; display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center; }
.hero h1 { color: #fff; font-size: clamp(2.3rem, 4.6vw, 3.9rem); font-weight: 900; letter-spacing: -.01em; margin: 18px 0 18px; }
.hero__lead { font-size: 1.18rem; color: rgba(255, 255, 255, .88); max-width: 560px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 22px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: .85rem; letter-spacing: .04em; }
.pill--light { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .3); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 10px 18px; list-style: none; margin: 0; padding: 0; color: rgba(255, 255, 255, .92); font-weight: 500; font-size: .95rem; }
.chips li { display: inline-flex; align-items: center; gap: 6px; }
.chips .icon { color: #F7B6FB; }
.hero__visual { position: relative; }
.device { margin: 0; border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 40px 90px -30px rgba(20, 10, 60, .65), 0 0 0 1px rgba(255, 255, 255, .25); }
.device__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #F3F1FA; border-bottom: 1px solid var(--line); direction: ltr; }
.device__bar span { width: 10px; height: 10px; border-radius: 50%; background: #E5DFF5; }
.device__bar span:nth-child(1) { background: #FF6B6B; } .device__bar span:nth-child(2) { background: #FFC24B; } .device__bar span:nth-child(3) { background: #36C88A; }
.device__bar em { font-style: normal; font-size: .75rem; color: var(--muted); margin-inline-start: 10px; background: #fff; padding: 2px 12px; border-radius: 999px; }
.hero .device { transform: perspective(1600px) rotateY(-8deg) rotateX(3deg); transition: transform .6s ease; }
[dir="rtl"] .hero .device { transform: perspective(1600px) rotateY(8deg) rotateX(3deg); }
.hero__visual:hover .device { transform: none; }
.float-card { position: absolute; inset-inline-start: -36px; bottom: -40px; background: #fff; color: var(--ink); border-radius: 18px; padding: 16px 20px; box-shadow: var(--shadow); min-width: 250px; animation: floaty 6s ease-in-out infinite; }
.float-card strong { display: block; font-size: .95rem; margin-bottom: 8px; color: var(--p700); }
.float-card ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .88rem; }
.float-card li { display: flex; align-items: center; gap: 8px; }
.float-card li span { width: 10px; height: 10px; border-radius: 50%; background: var(--p300); }
.float-card li.done span { background: var(--ok); }
.float-card li.now span { background: var(--accent); box-shadow: 0 0 0 4px rgba(209, 14, 221, .18); }
@keyframes floaty { 50% { transform: translateY(-8px); } }
.hero__wave { position: absolute; bottom: -1px; left: 0; width: 100%; height: 110px; fill: var(--bg); }

/* Stats */
.stats { position: relative; margin-top: -90px; z-index: 2; }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; border: 1px solid var(--line); }
.stat { text-align: center; padding: 6px; }
.stat strong { display: block; font-size: 2.3rem; font-weight: 900; background: linear-gradient(135deg, var(--p700), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .95rem; }

/* Sections */
.section { padding: 96px 0; position: relative; }
.section--tint { background: linear-gradient(180deg, var(--p50), #fff); }
.section--dark { background: radial-gradient(900px 400px at 10% 0%, rgba(209, 14, 221, .18), transparent 60%), linear-gradient(160deg, var(--p900), #2E2163 70%, var(--p800)); color: rgba(255, 255, 255, .85); }
.section__head { max-width: 760px; margin: 0 auto 48px; text-align: center; }
.section__head h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
.section__head p { color: var(--muted); font-size: 1.1rem; }
.section__head--light h2 { color: #fff; }
.section__head--light p { color: rgba(255, 255, 255, .75); }
.kicker { display: inline-block; font-size: .8rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); background: rgba(209, 14, 221, .08); padding: 5px 14px; border-radius: 999px; margin-bottom: 14px; }
.kicker--light { color: #F7B6FB; background: rgba(255, 255, 255, .1); }
[lang="ar"] .kicker { letter-spacing: 0; }
.subhead { text-align: center; font-size: 1.4rem; margin: 64px 0 24px; }
.grid { display: grid; gap: 20px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); transition: transform .25s, box-shadow .25s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card h3 { font-size: 1.2rem; }
.card p { color: var(--muted); margin: 0; }
.card__num { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--p50); color: var(--p700); font-weight: 900; margin-bottom: 14px; }
.card--principle .card__num { background: linear-gradient(135deg, var(--p700), var(--accent)); color: #fff; border-radius: 50%; }

/* Pathway */
.pathway { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; position: relative; counter-reset: step; }
.pathway::before { content: ""; position: absolute; top: 34px; inset-inline: 12%; height: 3px; background: linear-gradient(90deg, var(--p300), var(--accent)); border-radius: 3px; }
[dir="rtl"] .pathway::before { background: linear-gradient(-90deg, var(--p300), var(--accent)); }
.pathway__step { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pathway__dot { width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 3px solid var(--p300); color: var(--p700); box-shadow: var(--shadow-sm); position: relative; z-index: 1; margin-bottom: 8px; }
.pathway__dot .icon { width: 28px; height: 28px; }
.pathway__step:last-child .pathway__dot { border-color: var(--accent); color: var(--accent); }
.pathway__step strong { font-size: 1.15rem; color: var(--ink); }
.pathway__step span { color: var(--muted); font-size: .95rem; max-width: 220px; }

/* Features */
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; transition: transform .25s, box-shadow .25s, border-color .25s; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--p300); }
.feature h3 { font-size: 1.08rem; margin-top: 14px; }
.feature p { color: var(--muted); font-size: .95rem; margin: 0; }
.feature__icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: linear-gradient(135deg, var(--p50), #F9E8FB); color: var(--p700); }
.feature__icon .icon { width: 24px; height: 24px; }

/* Product tour */
.tour__tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 28px; }
.tour__tabs button { font: inherit; font-weight: 700; color: rgba(255, 255, 255, .8); background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); padding: 9px 18px; border-radius: 999px; cursor: pointer; transition: background .2s, color .2s; }
.tour__tabs button:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.tour__tabs button[aria-selected="true"] { background: #fff; color: var(--p700); border-color: #fff; }
.tour__panel { margin: 0 auto; max-width: 1040px; animation: fadeUp .45s ease; }
.tour__zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.device--dark { box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .15); }
.tour__panel figcaption { text-align: center; margin-top: 18px; font-size: 1.05rem; color: rgba(255, 255, 255, .85); }
.tour__note { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 20px auto 0; font-size: .9rem; color: #F7B6FB; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Governance */
.assistant { display: flex; gap: 16px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.assistant img { width: 72px; height: 72px; border-radius: 18px; background: var(--p50); object-fit: contain; padding: 6px; }
.assistant h4 { font-size: 1.15rem; margin: 0; }
.assistant__aud { display: inline-block; font-size: .8rem; font-weight: 700; color: var(--accent); margin: 2px 0 6px; }
.assistant p { color: var(--muted); font-size: .92rem; margin: 0; }
.protect { margin-top: 64px; background: linear-gradient(135deg, var(--p50), #fff); border: 1px solid var(--line); border-radius: 28px; padding: 40px; text-align: center; }
.protect h3 { font-size: 1.4rem; }
.protect__levels { list-style: none; margin: 24px auto 24px; padding: 0; display: grid; gap: 10px; max-width: 760px; }
.protect__levels li { display: flex; flex-direction: column; gap: 2px; padding: 16px 22px; border-radius: 16px; color: #fff; margin-inline: calc(var(--lvl) * 48px); background: linear-gradient(135deg, var(--p800), var(--p600)); text-align: start; }
.protect__levels li:nth-child(2) { background: linear-gradient(135deg, var(--p600), var(--p500)); }
.protect__levels li:nth-child(3) { background: linear-gradient(135deg, #8E3AC8, var(--accent)); }
.protect__levels span { opacity: .9; font-size: .95rem; }

/* About */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.about__intro h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
.about__intro > p { font-size: 1.08rem; }
.mv { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.mv > div { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.mv h3 { display: flex; align-items: center; gap: 8px; font-size: 1.1rem; color: var(--p700); }
.mv p { color: var(--muted); margin: 0; font-size: .95rem; }
.about__side { background: #fff; border: 1px solid var(--line); border-radius: 28px; padding: 32px; box-shadow: var(--shadow); text-align: center; }
.about__logo { width: 120px; margin: 0 auto 16px; }
.values { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; text-align: start; }
.values li { padding: 14px 16px; border-radius: 14px; background: var(--p50); }
.values strong { display: block; color: var(--p700); }
.values span { color: var(--muted); font-size: .92rem; }
.audiences { margin-top: 40px; }

/* Implementation */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.steps li { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; }
.steps li > span { position: absolute; top: -18px; inset-inline-start: 24px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--p700), var(--accent)); color: #fff; font-weight: 900; }
.steps h3 { font-size: 1.15rem; margin-top: 6px; }
.steps p { color: var(--muted); margin: 0; font-size: .95rem; }

/* Demo */
.section--demo { background: radial-gradient(700px 400px at 90% 10%, rgba(209, 14, 221, .4), transparent 60%), linear-gradient(135deg, var(--p800), var(--p600)); color: rgba(255, 255, 255, .9); overflow: hidden; }
.demo { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.demo h2 { color: #fff; font-size: clamp(1.8rem, 3vw, 2.5rem); }
.demo__note { display: flex; gap: 8px; align-items: flex-start; margin-top: 18px; font-size: .9rem; color: rgba(255, 255, 255, .75); }
.demo__accounts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.demo__accounts a { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 16px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); color: #fff; transition: background .2s, transform .2s; }
.demo__accounts a:hover { background: rgba(255, 255, 255, .2); transform: translateX(4px); color: #fff; }
[dir="rtl"] .demo__accounts a:hover { transform: translateX(-4px); }
.demo__accounts strong { display: block; }
.demo__accounts small { color: rgba(255, 255, 255, .75); }
.demo__accounts .arrow { margin-inline-start: auto; }
.demo__avatar { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: #fff; color: var(--p700); flex: none; }

/* FAQ */
.faq__list { max-width: 860px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 0 22px; transition: box-shadow .2s, border-color .2s; }
.faq details[open] { box-shadow: var(--shadow-sm); border-color: var(--p300); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 0; font-weight: 700; color: var(--ink); display: flex; justify-content: space-between; gap: 16px; align-items: center; font-size: 1.05rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq__icon { width: 28px; height: 28px; border-radius: 50%; background: var(--p50); position: relative; flex: none; }
.faq__icon::before, .faq__icon::after { content: ""; position: absolute; inset: 50% auto auto 50%; width: 12px; height: 2px; background: var(--p700); transform: translate(-50%, -50%); transition: transform .25s; }
.faq__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq details[open] .faq__icon::after { transform: translate(-50%, -50%) rotate(0); }
.faq details p { color: var(--muted); padding-bottom: 18px; margin: 0; }

/* Contact */
.contact { display: grid; grid-template-columns: .85fr 1.15fr; gap: 48px; align-items: start; }
.contact__info h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
.contact__channels { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 12px; }
.contact__channels li { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; }
.contact__channels .icon { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--p50); color: var(--p700); }
.contact__channels small { display: block; color: var(--muted); font-size: .8rem; }
.contact__channels a { font-weight: 700; }
.form { background: #fff; border: 1px solid var(--line); border-radius: 28px; padding: 32px; box-shadow: var(--shadow); }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 18px 0; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 700; color: var(--ink); font-size: .92rem; }
.field--full { grid-column: 1 / -1; }
.field small { font-weight: 400; color: var(--muted); font-size: .8rem; }
.field input, .field select, .field textarea { font: inherit; font-weight: 400; color: var(--ink); background: var(--p50); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; transition: border-color .2s, box-shadow .2s, background .2s; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--p500); box-shadow: 0 0 0 4px rgba(123, 102, 194, .18); background: #fff; }
.field input.is-invalid { border-color: var(--err); }
.segmented { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.segmented legend { font-weight: 700; color: var(--ink); margin-bottom: 8px; font-size: .92rem; }
.segmented label { cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: inline-block; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--p50); font-weight: 700; font-size: .92rem; color: var(--p700); transition: all .2s; }
.segmented input:checked + span { background: var(--p700); border-color: var(--p700); color: #fff; }
.segmented input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--text); }
.consent input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--p700); flex: none; }
.form__foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 22px; flex-wrap: wrap; }
.form__foot small { color: var(--muted); }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; margin-bottom: 18px; font-weight: 700; }
.alert--ok { background: #E8F6EF; color: var(--ok); }
.alert--err { background: #FDECEA; color: var(--err); }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Footer */
.footer { background: var(--dark); color: rgba(255, 255, 255, .72); padding: 64px 0 24px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer__brand p { margin-top: 16px; max-width: 340px; }
.footer h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer a { color: rgba(255, 255, 255, .72); }
.footer a:hover { color: #fff; }
.footer__bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 40px; padding-top: 20px; font-size: .88rem; }

/* Legal pages */
.doc-hero { position: relative; color: #fff; background: radial-gradient(900px 400px at 85% -10%, rgba(209, 14, 221, .4), transparent 60%), linear-gradient(135deg, var(--p800), var(--p600)); padding: 56px 0 130px; }
.doc-hero h1 { color: #fff; font-size: clamp(2rem, 4vw, 3rem); margin: 18px 0 6px; }
.doc-hero p { color: rgba(255, 255, 255, .8); margin: 0; }
.doc { padding-top: 24px; }
.doc__grid { display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: start; }
.doc__toc { position: sticky; top: 96px; }
.doc__toc nav { display: grid; gap: 6px; background: var(--p50); border-radius: 18px; padding: 10px; }
.doc__toc a { padding: 10px 14px; border-radius: 12px; color: var(--ink); font-weight: 500; }
.doc__toc a[aria-current] { background: #fff; color: var(--p700); font-weight: 800; box-shadow: var(--shadow-sm); }
.doc__body { max-width: 820px; }
.doc__intro { font-size: 1.15rem; color: var(--ink); }
.doc__body h2 { display: flex; align-items: center; gap: 12px; font-size: 1.35rem; margin-top: 36px; }
.doc__body h2 span { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--p50); color: var(--p700); font-size: .95rem; flex: none; }
.doc__body ul { padding-inline-start: 1.3em; }
.doc__body li { margin-bottom: 6px; }
.doc__body li::marker { color: var(--accent); }
.doc__notice { margin-top: 40px; padding: 24px; border-radius: 18px; background: var(--p50); border: 1px solid var(--line); }

/* Legal popups */
.modal { width: min(860px, 100% - 24px); max-height: min(88vh, 900px); padding: 0; border: 0; border-radius: 24px; box-shadow: 0 40px 100px -20px rgba(20, 14, 45, .6); color: var(--text); display: none; flex-direction: column; overflow: hidden; }
.modal[open] { display: flex; animation: modalIn .28s ease; }
.modal::backdrop { background: rgba(20, 14, 45, .62); backdrop-filter: blur(4px); }
.modal__head { display: flex; align-items: center; gap: 14px; padding: 18px 22px; background: linear-gradient(135deg, var(--p800), var(--p600)); color: #fff; }
.modal__head img { width: 34px; filter: brightness(0) invert(1); }
.modal__head h2 { color: #fff; font-size: 1.25rem; margin: 0; }
.modal__head small { display: block; color: rgba(255, 255, 255, .78); font-size: .78rem; line-height: 1.4; }
.modal__head > div { flex: 1; min-width: 0; }
.modal__close { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .16); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; flex: none; }
.modal__close:hover { background: rgba(255, 255, 255, .28); }
.modal__body { overflow-y: auto; padding: 8px 28px 24px; max-width: none; overscroll-behavior: contain; }
.modal__body h2 { font-size: 1.12rem; margin-top: 26px; }
.modal__body h2 span { width: 30px; height: 30px; font-size: .85rem; }
.modal__body p, .modal__body li { font-size: .97rem; }
.modal__body .doc__intro { font-size: 1.02rem; margin-top: 18px; }
.modal__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--p50); }
.doc__body ol { padding-inline-start: 1.5em; }
.doc__body ol li::marker { color: var(--p700); font-weight: 800; }
body.modal-open { overflow: hidden; }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 600px) {
  .modal { width: 100%; max-height: 100dvh; height: 100dvh; border-radius: 0; margin: 0; max-width: 100%; }
  .modal__body { padding: 4px 18px 20px; }
  .modal__foot { flex-direction: column-reverse; align-items: stretch; text-align: center; }
}

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(20, 14, 45, .88); display: grid; place-items: center; padding: 24px; backdrop-filter: blur(6px); }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(1500px, 100%); max-height: 90vh; border-radius: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.lightbox__close { position: absolute; top: 18px; inset-inline-end: 18px; width: 46px; height: 46px; border-radius: 50%; border: 0; background: #fff; color: var(--p700); font-size: 28px; cursor: pointer; line-height: 1; }

/* Reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal--delay { transition-delay: .12s; }
.js .reveal.is-in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 1100px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .nav a { padding: 8px 9px; font-size: .92rem; }
}
@media (max-width: 960px) {
  body { font-size: 16px; }
  .burger { display: inline-flex; }
  .topbar__cta { display: none; }
  .nav { position: fixed; inset: 72px 0 auto 0; flex-direction: column; background: #fff; padding: 16px; gap: 4px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); transform: translateY(-120%); transition: transform .3s ease; z-index: 40; margin: 0; }
  .nav.is-open { transform: none; }
  .nav a { padding: 12px 14px; font-size: 1rem; }
  .nav__cta-mobile { display: inline-flex; margin-top: 8px; color: #fff !important; }
  .hero { padding: 48px 0 130px; }
  .hero__grid, .about, .demo, .contact, .doc__grid { grid-template-columns: 1fr; }
  .hero .device, [dir="rtl"] .hero .device { transform: none; }
  .float-card { inset-inline-start: 12px; bottom: -28px; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .grid--3, .steps { grid-template-columns: 1fr 1fr; }
  .pathway { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .pathway::before { display: none; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .doc__toc { position: static; }
  .protect__levels li { margin-inline: 0; }
}
@media (max-width: 600px) {
  .section { padding: 64px 0; }
  .grid--3, .grid--4, .steps, .mv, .form__grid, .footer__grid { grid-template-columns: 1fr; }
  .pathway { grid-template-columns: 1fr; }
  .stats__grid { padding: 16px; gap: 8px; }
  .stat strong { font-size: 1.8rem; }
  .float-card { display: none; }
  .form, .protect, .about__side { padding: 22px; }
  .tour__tabs { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
  .tour__tabs button { flex: none; }
  .brand__name { font-size: 1.1rem; }
  .lang summary { padding: 8px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
