/* =========================================================
   Edu4 — School DNA
   Identity: deep navy + periwinkle blue + logo cyan, Tajawal
   ========================================================= */
:root {
  --navy-950: #061c46;
  --navy-900: #082868;
  --navy-800: #0a3276;
  --navy-700: #0c4488;
  --navy-600: #0c4c98;
  --blue: #0a80c4;
  --blue-soft: #7cc4e8;
  --cyan: #1cc0ee;
  --sky: #a8e6f8;
  --ink: #0c2a5e;
  --body: #55667f;
  --muted: #8794a8;
  --line: #e1ecf4;
  --tint: #f2f8fc;
  --white: #fff;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 50px -22px rgba(8, 40, 104, .35);
  --shadow-sm: 0 8px 24px -14px rgba(8, 40, 104, .3);
  --header-h: 78px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  /* a very light page with a soft sky tint in one corner, as in the reference design */
  background: #f4f8fc;
  font-family: "Tajawal", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--body);
  font-size: 1.0625rem;
  line-height: 1.85;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { color: var(--ink); font-weight: 800; line-height: 1.35; margin: 0; }
p { margin: 0; }
a { color: var(--blue); text-decoration: none; transition: color .2s; }
a:hover { color: var(--navy-600); }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

/* English page: Latin typeface, tighter leading */
html[lang="en"] body { font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif; line-height: 1.7; }
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] h3, html[lang="en"] h4 { line-height: 1.25; letter-spacing: -.015em; }
html[lang="en"] .hero-title { font-weight: 800; line-height: 1.15; }
html[lang="en"] .hero-product { font-weight: 800; letter-spacing: -.03em; }
html[lang="en"] .eyebrow { text-transform: uppercase; font-size: .78rem; letter-spacing: .12em; }
html[lang="en"] .section-head h2, html[lang="en"] .h-section, html[lang="en"] .contact h2 { font-weight: 800; }
html[lang="en"] .navbar .nav-link { font-size: .95rem; padding-inline: .7rem !important; }
html[lang="en"] .navbar .nav-link::after { inset-inline: .7rem; }
html[lang="en"] .ui { line-height: 1.45; }
[lang="ar"] { font-family: "Tajawal", sans-serif; }

.lang-switch { display: inline-flex; align-items: center; gap: .4rem; margin-inline-end: 1rem; padding: .35rem .8rem; font-weight: 700; font-size: .95rem; color: var(--navy-800); border: 1px solid var(--line); background: #fff; border-radius: 999px; }
.lang-switch:hover { color: #fff; background: var(--navy-700); border-color: var(--navy-700); }
html[lang="ar"] .lang-switch { font-family: "Manrope", system-ui, sans-serif; }

/* ---------- Buttons ---------- */
.btn { font-weight: 700; border-radius: 999px; padding: .65rem 1.5rem; border: 1px solid transparent; transition: transform .2s, box-shadow .2s, background .2s, color .2s, border-color .2s; }
.btn-lg { padding: .85rem 2rem; font-size: 1.05rem; }
.btn-brand { background: linear-gradient(135deg, #0c7cc8, #0a58a0); color: #fff; box-shadow: 0 12px 28px -12px rgba(10, 110, 190, .7); }
.btn-brand:hover, .btn-brand:focus { color: #fff; transform: translateY(-2px); box-shadow: 0 16px 34px -12px rgba(10, 110, 190, .85); }
.btn-ghost { color: var(--navy-800); border-color: #c9dcea; background: #fff; }
.btn-ghost:hover { color: #fff; background: var(--navy-700); border-color: var(--navy-700); }
.section-dark .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .35); background: transparent; }
.btn-ghost i { margin-inline-start: .35rem; }

/* ---------- Shared ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: .85rem; font-weight: 700; letter-spacing: .06em;
  color: var(--blue); margin-bottom: .9rem;
}
.eyebrow::before { content: ""; width: 34px; height: 2px; background: linear-gradient(90deg, var(--cyan), var(--blue)); border-radius: 2px; }
.eyebrow-light { color: var(--sky); }
.hero .eyebrow-light { color: var(--blue); }
.section { padding: 110px 0; position: relative; }
.section-tint { background: var(--tint); }
.section-dark { background: linear-gradient(160deg, var(--navy-900), var(--navy-700)); color: rgba(255, 255, 255, .78); }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-head { max-width: 760px; margin-bottom: 3.2rem; }
.section-head.text-center { margin-inline: auto; }
.section-head.text-center .eyebrow::after { content: ""; width: 34px; height: 2px; background: linear-gradient(90deg, var(--blue), var(--cyan)); border-radius: 2px; }
.section-head h2, .h-section { font-size: clamp(1.8rem, 3.4vw, 2.7rem); font-weight: 900; margin-bottom: 1rem; }
.section-head p { font-size: 1.12rem; }
.fineprint { font-size: .88rem; color: var(--muted); margin-top: 1.4rem; }
.section-dark .fineprint { color: rgba(255, 255, 255, .5); }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Header ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 1030; transition: background .3s, box-shadow .3s; }
.topbar { font-size: .85rem; border-bottom: 1px solid rgba(8, 40, 104, .08); padding: .45rem 0; transition: margin .3s, opacity .3s; }
.topbar a, .topbar span { color: var(--body); }
.topbar a:hover { color: var(--blue); }
.topbar-contact { display: flex; gap: 1.6rem; }
.topbar-contact i { margin-inline-end: .4rem; color: var(--blue); }
/* company registration number: a quiet trust signal, not a second logo */
.topbar-duns b { font-weight: 700; color: var(--navy-800); letter-spacing: .03em; }
.topbar-social { display: flex; gap: 1rem; }
.navbar { padding: .7rem 0; }
.navbar-brand img { height: 50px; width: auto; }
.navbar .nav-link { color: var(--navy-800); font-weight: 600; padding: .5rem .85rem !important; position: relative; }
.navbar .nav-link:hover, .navbar .nav-link.active { color: var(--blue); }
.navbar .nav-link::after { content: ""; position: absolute; inset: auto .85rem 0 .85rem; height: 2px; background: var(--blue); transform: scaleX(0); transition: transform .25s; border-radius: 2px; }
.navbar .nav-link.active::after, .navbar .nav-link:hover::after { transform: scaleX(1); }
.navbar-toggler { border: 1px solid #c9dcea; background: #fff; padding: .4rem .6rem; }
.navbar-toggler:focus { box-shadow: none; }
.site-header.scrolled { background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px); box-shadow: 0 10px 30px -20px rgba(8, 40, 104, .45); }
.site-header.scrolled .topbar { margin-top: -38px; opacity: 0; pointer-events: none; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 190px 0 150px; color: var(--body); background: #f4f8fc; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 560px at 6% 0%, #dff6fc, transparent 62%),
    radial-gradient(760px 480px at 96% 92%, #e3f1fb, transparent 60%),
    linear-gradient(180deg, #f1f9fd, #f4f8fc);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(8, 40, 104, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(8, 40, 104, .045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
}
.hero-title { color: var(--navy-900); font-size: clamp(2.2rem, 4.6vw, 3.7rem); font-weight: 900; line-height: 1.25; margin-bottom: 1.4rem; }
.hero-product {
  display: block; font-size: clamp(2.8rem, 6.4vw, 5.2rem); letter-spacing: -.01em; line-height: 1.1; margin-bottom: .5rem;
  background: linear-gradient(100deg, #0a80c4 5%, #1cb4e6 60%, #0a80c4); -webkit-background-clip: text; background-clip: text; color: transparent;
  direction: ltr; text-align: left;
}
[dir="rtl"] .hero-product { text-align: right; }
.hero-lead { font-size: 1.18rem; max-width: 560px; margin-bottom: 2.2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 3rem; }
.hero-pillars { list-style: none; padding: 1.6rem 0 0; margin: 0; display: grid; grid-template-columns: repeat(4, auto); gap: 1.2rem; justify-content: start; border-top: 1px solid rgba(8, 40, 104, .1); }
.hero-pillars li { display: flex; align-items: center; gap: .6rem; font-size: .82rem; color: var(--muted); line-height: 1.4; }
.hero-pillars i { font-size: 1.5rem; color: var(--blue); }
.hero-pillars b { display: block; color: var(--navy-900); font-size: .92rem; }

.hero-visual { position: relative; }
.browser-frame { border-radius: 16px; overflow: hidden; background: #f4f6fb; box-shadow: 0 44px 80px -36px rgba(8, 40, 104, .5), 0 0 0 1px var(--line); transform: perspective(1600px) rotateY(7deg) rotateX(2deg); transition: transform .6s ease; }
.hero-visual:hover .browser-frame { transform: perspective(1600px) rotateY(0) rotateX(0); }
.float-card { position: absolute; display: flex; align-items: center; gap: .75rem; background: rgba(255, 255, 255, .96); color: var(--ink); border-radius: 14px; padding: .8rem 1.1rem; box-shadow: var(--shadow); font-size: .9rem; line-height: 1.5; animation: floaty 6s ease-in-out infinite; }
.float-card i { font-size: 1.5rem; color: var(--blue); }
.float-card b { display: block; }
.float-card small { color: var(--muted); }
.float-card-a { top: -26px; inset-inline-end: -14px; }
.float-card-b { bottom: -30px; inset-inline-start: -18px; animation-delay: -3s; }
@keyframes floaty { 50% { transform: translateY(-10px); } }

/* ---------- Edu4 character (char.js) ----------
   Vector mascot: shapes traced from the brand artwork, limbs as navy strokes of the artwork's weight. */
.echar { display: block; width: 100%; height: auto; overflow: visible;
  /* a thin white edge keeps the navy lines readable on the dark sections */
  filter: drop-shadow(1.1px 0 0 #fff) drop-shadow(-1.1px 0 0 #fff) drop-shadow(0 1.1px 0 #fff) drop-shadow(0 -1.1px 0 #fff) drop-shadow(0 7px 9px rgba(12, 18, 48, .26)); }
/* torso: a thick rounded line; arms and legs: filled shapes that taper (see limbShape in char.js) */
.ec-line { fill: none; stroke: #0b3476; stroke-width: 22; stroke-linecap: round; stroke-linejoin: round; }
.ec-limb { fill: #0b3476; stroke: #0b3476; stroke-width: 3; stroke-linejoin: round; }
/* the traced shape is the white of the face; its outline is the outer half of a double-width stroke painted underneath */
.ec-face { fill: #fff; stroke: #0b3476; stroke-width: 21; stroke-linejoin: round; paint-order: stroke; }
.ec-eye, .ec-eye-open, .ec-mouth, .ec-wow { fill: #082862; }
/* eyes: open and blinking by default; the artwork's closed smile when happy */
.ec-eyes-smile { display: none; }
.is-happy .ec-eyes-smile { display: block; }
.is-happy .ec-eyes-open { display: none; }
.ec-eyes-open { transform-box: fill-box; transform-origin: center; animation: ec-blink 4.6s infinite; }
@keyframes ec-blink { 0%, 94.5%, 98%, 100% { transform: scaleY(1); } 96.2% { transform: scaleY(.08); } }
.ec-mouth { transition: scale .2s; transform-box: fill-box; transform-origin: 50% 20%; }
.is-happy .ec-mouth { scale: 1.1; }
.ec-wow { display: none; }
.is-wow .ec-wow { display: block; }
.is-wow .ec-mouth { display: none; }
.ec-cap-base { fill: #0a5cb5; }
.ec-rib { fill: url(#echarRib); }
.ec-hand, .ec-shoe { fill: #0b3476; }

/* ---------- Mascot (mascot.js) ----------
   Sits on the top edge of a block. --w is the figure's box width; the hip sits 82/364 of it above the box bottom. */
.mascot { position: absolute; z-index: 3; cursor: pointer; width: var(--w); bottom: calc(100% - var(--w) * .2253); }
.mascot-hero { --w: 150px; inset-inline-start: -1%; }
.mascot-host { position: relative; }
.mascot-perch { --w: 104px; inset-inline-end: 7%; }

/* ---------- Climber (climber.js) ----------
   Hangs by one hand from the top edge of a block and leaps row to row as the page scrolls;
   when the visitor stops it climbs up and sits on the block. */
.climber { position: absolute; left: 0; top: 0; z-index: 1000; width: 66px; pointer-events: none; opacity: 0; transition: opacity .35s; will-change: transform; }
.climber.on { opacity: 1; }

/* ---------- Figures ---------- */
.figures { position: relative; z-index: 2; margin-top: -64px; }
.figures-row { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.figure { padding: 1.8rem 1.5rem; text-align: center; border-inline-start: 1px solid var(--line); }
.figure:first-child { border: 0; }
.figure b { display: block; direction: ltr; font-size: 2.5rem; font-weight: 900; color: var(--navy-900); line-height: 1.2; font-variant-numeric: tabular-nums; }
.figure span { font-size: .92rem; }
.figure b span { font-size: inherit; }

/* ---------- Helix ornament ---------- */
.helix { display: flex; justify-content: center; gap: 9px; height: 46px; margin-bottom: 1.4rem; direction: ltr; }
.helix span { position: relative; width: 6px; }
.helix span::before, .helix span::after { content: ""; position: absolute; left: 0; width: 6px; height: 6px; border-radius: 50%; animation: helix 2.4s ease-in-out infinite; animation-delay: inherit; }
.helix span::before { background: var(--blue); top: 0; }
.helix span::after { background: var(--cyan); top: 0; animation-direction: reverse; }
@keyframes helix { 0%, 100% { transform: translateY(0) scale(1); opacity: 1; } 50% { transform: translateY(40px) scale(.55); opacity: .45; } }

/* ---------- Architecture ---------- */
.arch { display: grid; grid-template-columns: 1fr minmax(240px, 300px) 1fr; grid-template-areas: "a core c" "b core d"; gap: 28px 70px; align-items: center; position: relative; }
.arch-a { grid-area: a; } .arch-b { grid-area: b; } .arch-c { grid-area: c; } .arch-d { grid-area: d; }
.arch-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem 1.7rem; box-shadow: var(--shadow-sm); transition: transform .3s, box-shadow .3s, border-color .3s; }
.arch-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--blue-soft); }
.arch-card i { font-size: 1.8rem; color: var(--blue); }
.arch-card h3 { font-size: 1.2rem; margin: .5rem 0 .4rem; }
.arch-card h3 small { display: block; font-size: .8rem; font-weight: 500; color: var(--muted); letter-spacing: .03em; }
.arch-card p { font-size: .97rem; }
.arch-card::after { content: ""; position: absolute; top: 50%; width: 70px; height: 2px; background: linear-gradient(90deg, var(--sky), var(--blue-soft)); }
.arch-a::after, .arch-b::after { inset-inline-end: -71px; }
.arch-c::after, .arch-d::after { inset-inline-start: -71px; }
.arch-core { grid-area: core; position: relative; aspect-ratio: 1; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: rgba(255, 255, 255, .75); background: radial-gradient(circle at 35% 25%, var(--navy-600), var(--navy-900)); box-shadow: 0 30px 70px -25px rgba(8, 40, 104, .7), inset 0 0 0 1px rgba(255, 255, 255, .12); font-size: .95rem; padding: 1rem; }
.arch-core img { width: 58px; height: auto; margin-bottom: .5rem; }
.arch-core b { color: #fff; font-size: 1.35rem; font-weight: 800; direction: ltr; }
.arch-ring { position: absolute; inset: -16px; border-radius: 50%; border: 1px dashed rgba(10, 128, 196, .55); animation: spin 40s linear infinite; }
.arch-ring::before { content: ""; position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 5px rgba(10, 110, 190, .2); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Sword duel (fight.js): runs along the whole top edge of the roles block */
.fight { position: absolute; bottom: 100%; left: 0; width: 100%; overflow: visible; pointer-events: none; }
.fight path, .fight circle { fill: none; stroke-width: 3.1; stroke-linecap: round; stroke-linejoin: round; }
.fight .f-hero .f-limbs { stroke: var(--cyan); }
.fight .f-hero .f-head { fill: #fff; stroke: var(--cyan); stroke-width: 2.2; }
.fight .f-hero .f-eyes { stroke: var(--navy-800); stroke-width: 2; }
.fight .f-hero .f-sword { stroke: var(--navy-600); stroke-width: 1.15; }
.fight .f-hero .f-guard { stroke: #f5b83d; stroke-width: 1.7; }
.fight .f-cap { fill: var(--blue); stroke: #fff; stroke-width: .9; }
.fight .f-tassel { stroke: #f5b83d; stroke-width: 1.2; }
.fight .f-rival .f-limbs { stroke: #a3abbd; }
.fight .f-rival .f-head { fill: #fff; stroke: #a3abbd; stroke-width: 2.2; }
.fight .f-rival .f-eyes { stroke: #7d8699; stroke-width: 2; }
.fight .f-rival .f-sword, .fight .f-loose .f-sword { stroke: #6f788c; stroke-width: 1.15; }
.fight .f-rival .f-guard, .fight .f-loose .f-guard { stroke: #a3abbd; stroke-width: 1.7; }
.fight .f-eyes.ko { stroke-width: 1.1; }
.fight .f-spark { stroke: #f5b83d; stroke-width: 1.5; }
.roles { position: relative; margin-top: 5rem; background: var(--tint); border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px); padding: 2.6rem; }
.roles-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem 2rem; margin-bottom: 1.8rem; }
.roles-head h3 { font-size: 1.5rem; }
.role { background: #fff; border-radius: var(--radius-sm); padding: 1.5rem; height: 100%; border: 1px solid var(--line); transition: transform .3s, box-shadow .3s; }
.role:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.role i { font-size: 1.7rem; color: var(--navy-600); }
.role h4 { font-size: 1.15rem; margin: .5rem 0 .6rem; }
.role ul { list-style: none; padding: 0; margin: 0; font-size: .95rem; }
.role li { padding-inline-start: 1rem; position: relative; }
.role li::before { content: ""; position: absolute; inset-inline-start: 0; top: .85em; width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); }

/* ---------- Modules ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2rem; }
.filter { font: inherit; font-size: .95rem; font-weight: 700; color: var(--body); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .5rem 1.25rem; cursor: pointer; transition: all .2s; }
.filter:hover { border-color: var(--blue-soft); color: var(--navy-600); }
.filter.active { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
.module { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.7rem 1.5rem; height: 100%; overflow: hidden; transition: transform .3s, box-shadow .3s; }
.module::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--cyan), var(--blue)); transform: scaleX(0); transform-origin: left; transition: transform .35s; }
[dir="rtl"] .module::before { transform-origin: right; }
.module:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.module:hover::before { transform: scaleX(1); }
.module i { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; font-size: 1.45rem; color: var(--navy-600); background: linear-gradient(135deg, #e6f3fb, #e3f5fc); margin-bottom: 1rem; }
.module h3 { font-size: 1.08rem; margin-bottom: .45rem; }
.module p { font-size: .94rem; line-height: 1.75; }

/* ---------- Tour ---------- */
.tour-list { display: flex; flex-direction: column; gap: .55rem; }
.tour-item { font: inherit; text-align: start; display: flex; align-items: center; gap: 1rem; padding: .9rem 1.1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; color: var(--body); transition: all .25s; line-height: 1.5; }
.tour-item i { font-size: 1.4rem; color: var(--blue); flex: none; }
.tour-item b { display: block; color: var(--ink); font-size: 1.02rem; }
.tour-item small { color: var(--muted); font-size: .85rem; }
.tour-item:hover { border-color: var(--blue-soft); }
.tour-item.active { background: var(--navy-700); border-color: var(--navy-700); box-shadow: var(--shadow-sm); }
.tour-item.active b { color: #fff; }
.tour-item.active small { color: rgba(255, 255, 255, .65); }
.tour-item.active i { color: var(--sky); }
.tour-groups { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; max-width: 620px; margin-bottom: 1.6rem; }
.tour-group { font: inherit; text-align: start; display: flex; align-items: center; gap: .9rem; padding: .9rem 1.2rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; line-height: 1.4; transition: all .25s; }
.tour-group i { font-size: 1.6rem; color: var(--blue); }
.tour-group b { display: block; color: var(--ink); }
.tour-group small { color: var(--muted); font-size: .78rem; display: block; }
.tour-group:hover { border-color: var(--blue-soft); }
.tour-group.active { background: linear-gradient(135deg, var(--blue), var(--cyan)); border-color: transparent; box-shadow: 0 14px 30px -16px rgba(10, 110, 190, .8); }
.tour-group.active i, .tour-group.active b { color: #fff; }
.tour-group.active small { color: rgba(255, 255, 255, .8); }
.tour-stage { background: var(--tint); border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px); overflow: hidden; }
.tour-screen { padding: 1.2rem 1.2rem 0; }
.tour-screen .ui { box-shadow: var(--shadow); border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom: 0; }
.tour-caption { padding: 1.6rem 1.8rem 1.8rem; background: #fff; border-top: 1px solid var(--line); }
.tour-caption h3 { font-size: 1.25rem; margin-bottom: .35rem; }
.tour-caption p { font-size: 1rem; }
.tour-points { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: .4rem 1.5rem; font-size: .93rem; color: var(--ink); }
.tour-points i { color: var(--cyan); margin-inline-end: .45rem; vertical-align: -1px; }

/* ---------- Product screens (coded previews) ----------
   Everything is sized in em; the font-size follows the host width,
   so a screen scales as one piece from hero to phone. */
.ui-host { container-type: inline-size; }
.ui { font-size: 10px; font-size: 1.3cqw; text-align: start; line-height: 1.5; color: #4f6079; background: #f4f6fb; border: 1px solid var(--line); border-radius: 1.2em; overflow: hidden; user-select: none; cursor: default; }
.ui * { box-sizing: border-box; }
.ui em { font-style: normal; font-size: .6em; font-weight: 700; color: var(--muted); }
.ui-bar { display: flex; align-items: center; gap: .5em; padding: .75em 1.2em; background: #e8ecf6; direction: ltr; }
.ui-bar i { width: .85em; height: .85em; border-radius: 50%; background: #c9d1e4; }
.ui-bar i:first-child { background: #f1707f; } .ui-bar i:nth-child(2) { background: #f3bd4f; } .ui-bar i:nth-child(3) { background: #5cc98b; }
.ui-bar span { margin: 0 auto; padding: .1em 1.6em; font-size: .9em; color: var(--muted); background: #fff; border-radius: 99em; }
[dir="rtl"] .ui-bar span { direction: rtl; }
.ui-body { display: grid; grid-template-columns: 14.5em 1fr; height: 38em; }
.ui-side { display: flex; flex-direction: column; gap: .2em; padding: 1.2em .9em; color: rgba(255, 255, 255, .72); background: linear-gradient(180deg, var(--navy-800), var(--navy-600)); }
.ui-brand { display: flex; align-items: center; gap: .6em; padding: 0 .4em 1em; margin-bottom: .6em; color: #fff; font-weight: 800; font-size: 1.15em; border-bottom: 1px solid rgba(255, 255, 255, .13); }
[dir="rtl"] .ui-brand { direction: ltr; justify-content: flex-end; }
.ui-brand img { height: 2.2em; width: auto; }
.ui-nav { display: flex; align-items: center; gap: .7em; padding: .5em .7em; border-radius: .6em; white-space: nowrap; }
.ui-nav i { font-size: 1.15em; }
.ui-nav.on { color: #fff; font-weight: 700; background: rgba(255, 255, 255, .15); box-shadow: inset .25em 0 0 var(--cyan); }
[dir="rtl"] .ui-nav.on { box-shadow: inset -.25em 0 0 var(--cyan); }
.ui-main { position: relative; display: flex; flex-direction: column; gap: 1.1em; padding: 1.3em 1.5em; overflow: hidden; min-width: 0; }
.ui-main::after { content: ""; position: absolute; inset: auto 0 0 0; height: 3em; background: linear-gradient(transparent, #f4f6fb); pointer-events: none; }
.ui-top { display: flex; justify-content: space-between; align-items: center; }
.ui-top h5 { margin: 0; font-size: 1.55em; font-weight: 800; color: var(--ink); }
.ui-user { display: inline-flex; align-items: center; gap: .5em; padding: .25em .9em .25em .3em; background: #fff; border-radius: 99em; font-size: .95em; font-weight: 700; color: var(--ink); box-shadow: 0 .3em 1em -.6em rgba(8, 40, 104, .4); }
.ui-av { display: inline-grid; place-items: center; flex: none; width: 2em; height: 2em; border-radius: 50%; font-size: .9em; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--blue), var(--cyan)); }
.ui-person { display: inline-flex; align-items: center; gap: .55em; font-weight: 700; color: var(--ink); }
.ui-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1em; }
.ui-kpi { position: relative; display: flex; flex-direction: column; padding: .9em 1.1em; background: #fff; border-radius: .9em; border-inline-start: .3em solid var(--c); box-shadow: 0 .4em 1.2em -.8em rgba(8, 40, 104, .45); }
.ui-kpi small { font-size: .85em; font-weight: 700; color: var(--c); }
.ui-kpi b { font-size: 1.55em; font-weight: 800; color: var(--ink); line-height: 1.35; white-space: nowrap; }
.ui-kpi span { font-size: .8em; color: var(--muted); }
.ui-kpi > i { position: absolute; top: .5em; inset-inline-end: .6em; font-size: 1.9em; color: var(--c); opacity: .28; }
.ui-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1em; }
.ui-card { padding: 1em 1.2em; background: #fff; border-radius: .9em; box-shadow: 0 .4em 1.2em -.8em rgba(8, 40, 104, .45); min-width: 0; }
.ui-card h6 { display: flex; align-items: center; gap: .5em; margin: 0 0 .8em; font-size: 1.08em; font-weight: 800; color: var(--navy-600); }
.ui-card h6 > .ui-badge, .ui-card h6 > .ui-btn { margin-inline-start: auto; }
.ui-table { width: 100%; border-collapse: collapse; font-size: .95em; }
.ui-table th { padding: .55em .7em; text-align: start; font-weight: 700; color: var(--ink); background: #f4f6fb; white-space: nowrap; }
.ui-table th:first-child { border-start-start-radius: .5em; border-end-start-radius: .5em; } .ui-table th:last-child { border-start-end-radius: .5em; border-end-end-radius: .5em; }
.ui-table td { padding: .55em .7em; border-top: 1px solid #edf0f7; white-space: nowrap; }
.ui-badge { display: inline-block; padding: .08em .75em; border-radius: 99em; font-size: .85em; font-weight: 700; color: #fff; white-space: nowrap; }
.ui-blue { background: #0a80c4; } .ui-cyan { background: #1cc0ee; } .ui-green { background: #1fa97a; } .ui-amber { background: #f0a92b; }
.ui-red { background: #e2536b; } .ui-violet { background: #0a58a0; } .ui-gray { background: #9aa3bd; } .ui-navy { background: #0c4488; }
.ui-btn { display: inline-flex; align-items: center; gap: .45em; padding: .4em 1em; border-radius: .6em; font-size: .92em; font-weight: 700; color: #fff; white-space: nowrap; background: linear-gradient(135deg, #0a80c4, #0a58a0); }
.ui-btn.g { background: #1fa97a; } .ui-btn.c { background: #1cc0ee; } .ui-btn.a { background: #f0a92b; } .ui-btn.n { background: #0c4488; }
.ui-acts { display: inline-flex; gap: .3em; }
.ui-acts i { display: grid; place-items: center; width: 1.9em; height: 1.9em; font-size: .85em; border-radius: .4em; border: 1px solid #cfd8f2; color: var(--blue); }
.ui-acts i:nth-child(2) { color: #f0a92b; border-color: #f6dca6; } .ui-acts i:nth-child(3) { color: #1fa97a; border-color: #b4e3d2; }
.ui-money { color: #1fa97a; } .ui-plus { color: #1fa97a; font-weight: 700; } .ui-minus { color: #e2536b; font-weight: 700; } .ui-muted { color: #a6aec6 !important; }
.ui-toolbar { display: flex; align-items: center; gap: .7em; }
.ui-grow { flex: 1; }
.ui-input { flex: 1; display: flex; align-items: center; gap: .6em; padding: .5em 1em; background: #fff; border: 1px solid #e1e6f2; border-radius: .6em; color: #a6aec6; }
.ui-field { display: flex; justify-content: space-between; align-items: center; gap: .6em; padding: .35em .8em; background: #fff; border: 1px solid #e1e6f2; border-radius: .5em; color: var(--ink); font-weight: 700; min-width: 6em; }
.ui-filters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1em; padding: 1em 1.2em; background: #fff; border-radius: .9em; }
.ui-filters small { display: block; margin-bottom: .2em; font-size: .85em; font-weight: 700; color: var(--muted); }
.ui-quick { display: flex; gap: .8em; }
.ui-quick .ui-btn { flex: 1; justify-content: center; padding: .6em 0; }
.ui-donut-wrap { display: flex; align-items: center; gap: 1.6em; }
.ui-donut { flex: none; width: 10.5em; height: 10.5em; border-radius: 50%; background: conic-gradient(#0a80c4 0 22%, #1cc0ee 0 50%, #1fa97a 0 72%, #f0a92b 0 90%, #0a58a0 0); -webkit-mask: radial-gradient(circle, transparent 42%, #000 43%); mask: radial-gradient(circle, transparent 42%, #000 43%); }
.ui-legend { display: grid; gap: .45em; font-size: .95em; }
.ui-legend span { display: flex; align-items: center; gap: .5em; }
.ui-legend i { width: 1.4em; height: .7em; border-radius: .3em; }
.ui-bars { display: flex; align-items: flex-end; gap: .9em; height: 10.5em; padding: 0 .4em; border-bottom: 1px solid #e1e6f2; background: repeating-linear-gradient(#fff 0 2.55em, #eef1f8 2.55em 2.62em); }
.ui-bargrp { flex: 1; display: flex; align-items: flex-end; gap: .2em; height: 100%; }
.ui-bargrp i { flex: 1; border-radius: .3em .3em 0 0; background: linear-gradient(#0a80c4, #1cc0ee); }
.ui-bargrp i + i { background: #f3a8b4; }
.ui-steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: .8em; }
.ui-step { position: relative; padding: .7em .5em; text-align: center; background: #fff; border-radius: .8em; border-top: .28em solid var(--c); box-shadow: 0 .4em 1.2em -.8em rgba(8, 40, 104, .45); }
.ui-step b { display: block; font-size: 1.6em; font-weight: 800; color: var(--c); line-height: 1.25; }
.ui-step small { font-size: .85em; font-weight: 700; color: var(--ink); white-space: nowrap; }
.ui-tt { display: grid; grid-template-columns: 4.6em repeat(5, 1fr); gap: .5em; }
.ui-tt-h { padding: .4em; text-align: center; font-weight: 800; color: var(--ink); background: #e8ecf6; border-radius: .5em; }
.ui-tt-t { display: grid; place-items: center; font-weight: 700; color: var(--muted); direction: ltr; }
.ui-tt-c { padding: .4em .7em; background: #fff; border-radius: .6em; border-top: .25em solid var(--c); box-shadow: 0 .3em .9em -.6em rgba(8, 40, 104, .45); line-height: 1.35; }
.ui-tt-c b { display: block; color: var(--ink); font-size: .95em; }
.ui-tt-c small { font-size: .82em; color: var(--c); font-weight: 700; }
.ui-tt-break { grid-column: span 5; padding: .3em; text-align: center; font-weight: 700; color: #1fa97a; background: #e2f5ee; border-radius: .6em; letter-spacing: .4em; }
.ui-subjects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1em; }
.ui-subject, .ui-exam { display: flex; flex-direction: column; align-items: flex-start; gap: .55em; }
.ui-subject h6, .ui-exam h6 { margin: 0; color: var(--ink); }
.ui-subject h6 i, .ui-exam h6 i { color: var(--blue); }
.ui-exam { border-inline-start: .3em solid #1fa97a; }
.ui-meta { display: flex; align-items: center; gap: .5em; font-size: .9em; color: var(--muted); }
.ui-subject .ui-meta { width: 100%; padding-top: .55em; border-top: 1px solid #edf0f7; }
.ui-strip { display: flex; align-items: center; gap: 1.6em; padding: .9em 1.2em; background: #fff; border-radius: .9em; }
.ui-strip > span:first-child { flex: 1; }
.ui-strip b { display: block; color: var(--ink); font-size: 1.05em; }
.ui-strip small { color: var(--muted); font-size: .88em; }
.ui-stat { text-align: center; }
.ui-stat b { font-size: 1.4em; color: var(--blue); }
.ui-tabs { display: flex; gap: .5em; border-bottom: 1px solid #e1e6f2; }
.ui-tabs span { display: flex; align-items: center; gap: .45em; padding: .45em 1em; font-weight: 700; color: var(--blue); border-radius: .5em .5em 0 0; }
.ui-tabs .on { color: var(--ink); background: #fff; border: 1px solid #e1e6f2; border-bottom-color: #fff; margin-bottom: -1px; }

/* ---------- Platform ---------- */
.cap { height: 100%; padding: 1.8rem; border-radius: var(--radius); background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); transition: background .3s, transform .3s, border-color .3s; }
.cap:hover { background: rgba(255, 255, 255, .09); transform: translateY(-4px); border-color: rgba(159, 220, 238, .4); }
.cap i { font-size: 1.9rem; color: var(--sky); }
.cap h3 { font-size: 1.15rem; margin: .7rem 0 .45rem; }
.cap p { font-size: .96rem; }
.integrations { margin-top: 4rem; padding-top: 3rem; border-top: 1px solid rgba(8, 40, 104, .1); }
.integrations > h3 { font-size: 1.5rem; margin-bottom: 1.6rem; }
.integ { height: 100%; display: flex; flex-direction: column; gap: .15rem; padding: 1.2rem 1.3rem; border-radius: var(--radius-sm); background: #fff; color: var(--body); line-height: 1.5; }
.integ i { font-size: 1.5rem; color: var(--blue); }
.integ b { color: var(--ink); }
.integ small { color: var(--muted); font-size: .82rem; }

/* ---------- Partners ---------- */
.partners { padding: 2.6rem 0 2.2rem; border-bottom: 1px solid var(--line); }
.partners-title { text-align: center; font-size: .9rem; font-weight: 700; color: var(--muted); letter-spacing: .04em; margin-bottom: 1.2rem; }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track img { height: 62px; width: auto; margin: 0 1.2rem; filter: grayscale(1); opacity: .7; transition: filter .3s, opacity .3s; }
.marquee-track img:hover { filter: none; opacity: 1; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Services ---------- */
.sector { position: relative; height: 100%; padding: 2.2rem; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; transition: transform .3s, box-shadow .3s; }
.sector:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.sector > i { font-size: 2.2rem; color: var(--blue); }
.sector h3 { font-size: 1.35rem; margin: .7rem 0 .5rem; }
.sector a { display: inline-block; margin-top: 1rem; font-weight: 700; }
.sector-main { background: linear-gradient(150deg, var(--navy-800), var(--navy-600)); border-color: transparent; color: rgba(255, 255, 255, .8); }
.sector-main h3 { color: #fff; }
.sector-main > i, .sector-main a { color: var(--sky); }
.sector-main a:hover { color: #fff; }
.sector-tag { position: absolute; top: 1.4rem; inset-inline-end: 1.4rem; font-size: .75rem; font-weight: 700; color: var(--navy-800); background: var(--sky); border-radius: 999px; padding: .1rem .8rem; }
.svc { height: 100%; padding: 1.5rem; border-radius: var(--radius-sm); background: var(--tint); border: 1px solid var(--line); }
.svc i { font-size: 1.6rem; color: var(--navy-600); }
.svc h3 { font-size: 1.05rem; margin: .5rem 0 .35rem; }
.svc p { font-size: .93rem; line-height: 1.75; }

/* ---------- About ---------- */
.lead-text { font-size: 1.2rem; color: var(--ink); font-weight: 500; margin-bottom: 1rem; }
.principles { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: .6rem 1rem; font-weight: 700; color: var(--ink); }
.principles i { color: var(--cyan); margin-inline-end: .5rem; font-size: 1.15rem; vertical-align: -2px; }
.vm { height: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; }
.vm i { font-size: 1.8rem; color: var(--blue); }
.vm h3 { font-size: 1.25rem; margin: .5rem 0; }
.vm p { font-size: .98rem; }
.process { margin-top: 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; }
.process h3 { font-size: 1.25rem; margin-bottom: 1.4rem; }
.process ol { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; counter-reset: none; }
.process li { position: relative; padding-top: 1rem; border-top: 2px solid var(--line); line-height: 1.5; }
.process li::before { content: ""; position: absolute; top: -2px; inset-inline-start: 0; width: 36px; height: 2px; background: linear-gradient(90deg, var(--cyan), var(--blue)); }
.process b { display: block; font-size: 1.6rem; font-weight: 900; color: var(--blue-soft); }
.process span { display: block; font-weight: 800; color: var(--ink); margin: .2rem 0; }
.process small { color: var(--muted); font-size: .84rem; }

/* ---------- Clients ---------- */
/* clients strip: same marquee as the partners, slower and running the other way */
.marquee-clients .marquee-track { animation-duration: 90s; animation-direction: reverse; }
.marquee-clients .marquee-track img { height: 72px; margin: 0 1rem; }

/* ---------- Contact ---------- */
.contact h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); font-weight: 900; margin-bottom: 1rem; }
.contact-list { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1.1rem; }
.contact-list li { display: flex; gap: 1rem; align-items: center; }
.contact-list i { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; font-size: 1.25rem; color: var(--sky); background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); }
.contact-list small { display: block; color: rgba(255, 255, 255, .5); font-size: .8rem; line-height: 1.3; }
.contact-list a { color: #fff; font-weight: 700; }
.contact-list a:hover { color: var(--sky); }
.demo-form { background: #fff; color: var(--body); border-radius: calc(var(--radius) + 6px); padding: 2.4rem; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .55); }
.demo-form h3 { color: var(--ink); font-size: 1.35rem; margin-bottom: 1.5rem; }
.form-label { font-weight: 700; color: var(--ink); font-size: .92rem; margin-bottom: .3rem; }
.form-label .opt { font-weight: 400; color: var(--muted); }
.form-control, .form-select { border-color: var(--line); border-radius: 12px; padding: .7rem 1rem; font-size: 1rem; background-color: var(--tint); }
.form-control:focus, .form-select:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(10, 128, 196, .15); background-color: #fff; }
.form-control.is-invalid { border-color: #d9455f; background-image: none; }
.form-note { font-size: .92rem; color: var(--navy-600); }
.form-note.error { color: #c2334d; }
.btn .bi-send { margin-inline-start: .4rem; display: inline-block; }
[dir="rtl"] .btn .bi-send { transform: scaleX(-1); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: rgba(255, 255, 255, .6); padding: 70px 0 0; font-size: .96rem; }
.site-footer img { height: 54px; width: auto; margin-bottom: 1rem; }
.site-footer h4 { color: #fff; font-size: 1.05rem; margin-bottom: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.site-footer a { color: rgba(255, 255, 255, .6); }
.site-footer a:hover { color: #fff; }
.footer-duns { margin-top: .9rem; font-size: .9rem; }
.footer-duns i { color: var(--sky); margin-inline-end: .4rem; }
.footer-duns b { color: #fff; letter-spacing: .04em; }
.footer-social { display: flex; gap: .6rem; margin-top: 1.2rem; }
.footer-social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .15); }
.footer-social a:hover { background: var(--blue); border-color: var(--blue); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 2rem; margin-top: 3rem; padding: 1.4rem 0; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .88rem; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 1.2rem; }

.to-top { position: fixed; bottom: 22px; inset-inline-start: 22px; z-index: 1020; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--navy-700); color: #fff; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(10px); transition: all .3s; }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--blue); color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 1199.98px) {
  .arch { gap: 24px 44px; }
  .arch-card::after { width: 44px; }
  .arch-a::after, .arch-b::after { inset-inline-end: -45px; }
  .arch-c::after, .arch-d::after { inset-inline-start: -45px; }
}
@media (max-width: 991.98px) {
  .section { padding: 80px 0; }
  .site-header { background: rgba(255, 255, 255, .96); box-shadow: 0 10px 30px -22px rgba(8, 40, 104, .45); }
  .navbar-collapse { padding: 1rem 0 1.2rem; }
  .navbar .nav-link::after { display: none; }
  .navbar-collapse .btn { width: 100%; margin-top: .6rem; }
  .lang-switch { margin: .4rem 0 0; }
  .hero { padding: 130px 0 120px; }
  .browser-frame { transform: none; }
  .float-card-a { inset-inline-end: 8px; }
  /* No sidebar at this width, so the character stands on the frame instead of dangling over the title */
  .hero-visual { margin-top: 170px; }
  .mascot-hero { --w: 118px; inset-inline-start: 3%; }
  .mascot-perch { display: none; }
  .float-card-b { inset-inline-start: 8px; }
  .figure:nth-child(odd) { border-inline-start: 0; }
  .figure:nth-child(n+3) { border-top: 1px solid var(--line); }
  .arch { grid-template-columns: 1fr 1fr; grid-template-areas: "core core" "a c" "b d"; gap: 16px; }
  .arch-core { width: 230px; margin: 0 auto 1.4rem; }
  .arch-card::after { display: none; }
  .process ol { grid-template-columns: 1fr 1fr; gap: 1.4rem 1rem; }
  .tour-list { flex-direction: row; overflow-x: auto; margin-inline: -12px; padding: 0 12px 8px; scrollbar-width: none; scroll-snap-type: x proximity; }
  .tour-list::-webkit-scrollbar { display: none; }
  .tour-item { flex: none; scroll-snap-align: start; padding: .6rem 1rem; border-radius: 999px; }
  .tour-item small { display: none; }
  .tour-item i { font-size: 1.15rem; }
  .ui-side { display: none; }
  .ui-body { grid-template-columns: 1fr; height: 40em; }
  .tour-screen .ui, .hero .ui { font-size: 1.75cqw; }
}
@media (max-width: 575.98px) {
  body { font-size: 1rem; }
  .hero-pillars { grid-template-columns: 1fr 1fr; }
  .hero-actions .btn { width: 100%; }
  .float-card { display: none; }
  .hero-visual { margin-top: 140px; }
  .mascot-hero { --w: 100px; }
  .figure { padding: 1.3rem .8rem; }
  .figure b { font-size: 2rem; }
  .arch { grid-template-columns: 1fr; grid-template-areas: "core" "a" "b" "c" "d"; }
  .roles { padding: 1.4rem; }
  .role { padding: 1.1rem; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin-inline: -12px; padding: 0 12px 6px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex: none; }
  .tour-points { grid-template-columns: 1fr; }
  .tour-caption { padding: 1.2rem; }
  .tour-screen { padding: .7rem .7rem 0; }
  .tour-group { padding: .7rem .8rem; gap: .6rem; }
  .tour-group small { display: none; }
  .demo-form { padding: 1.5rem; }
  .principles { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Sub-pages: privacy, terms, refund (built from one layout) ---------- */
.page-hero { position: relative; padding: 190px 0 70px; background: #f4f8fc; overflow: hidden; }
.page-hero .container { position: relative; }
.crumbs { display: flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--muted); margin-bottom: 1.6rem; }
.crumbs i { font-size: .7rem; }
.page-hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.3rem); font-weight: 900; margin-bottom: 1rem; }
.page-hero .lead { max-width: 720px; font-size: 1.14rem; color: var(--body); }
.page-updated { display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.4rem; font-size: .9rem; color: var(--muted); }
.page-updated i { color: var(--blue); }
.legal-tabs { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2rem; }
.legal-tabs a { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem 1.1rem; border-radius: 999px; border: 1px solid #c9dcea; background: #fff; color: var(--navy-800); font-weight: 700; font-size: .95rem; }
.legal-tabs a:hover { border-color: var(--blue); color: var(--blue); }
.legal-tabs a.active { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }

.legal { padding: 30px 0 110px; }
.legal-toc { position: sticky; top: 110px; padding: 1.6rem; background: #fff; border: 1px solid var(--line); border-radius: 18px; }
.legal-toc h2 { font-size: .85rem; letter-spacing: .08em; color: var(--muted); margin-bottom: 1rem; }
html[lang="en"] .legal-toc h2 { text-transform: uppercase; font-size: .76rem; letter-spacing: .12em; }
.legal-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; counter-reset: part; }
.legal-toc a { display: flex; gap: .7rem; padding: .42rem .7rem; border-radius: 10px; color: var(--body); font-size: .95rem; line-height: 1.5; counter-increment: part; }
.legal-toc a::before { content: counter(part, decimal-leading-zero); font-weight: 800; font-size: .8rem; color: var(--blue-soft); padding-top: .12rem; font-variant-numeric: tabular-nums; }
.legal-toc a:hover { color: var(--blue); }
.legal-toc a.active { background: var(--tint); color: var(--navy-800); font-weight: 700; }
.legal-toc a.active::before { color: var(--blue); }

.legal-doc { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: clamp(1.5rem, 4vw, 3.2rem); box-shadow: 0 30px 60px -45px rgba(8, 40, 104, .4); }
.legal-doc section { scroll-margin-top: 120px; }
.legal-doc section + section { margin-top: 2.6rem; padding-top: 2.6rem; border-top: 1px solid var(--line); }
.legal-doc h2 { display: flex; align-items: baseline; gap: .8rem; font-size: clamp(1.25rem, 2.2vw, 1.55rem); margin-bottom: 1rem; }
.legal-doc h2 span { flex: none; font-size: .85rem; font-weight: 800; color: var(--blue); font-variant-numeric: tabular-nums; }
.legal-doc h3 { font-size: 1.05rem; margin: 1.4rem 0 .5rem; }
.legal-doc p + p, .legal-doc ul + p, .legal-doc p + ul { margin-top: .9rem; }
.legal-doc ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .55rem; }
.legal-doc li { position: relative; padding-inline-start: 1.5rem; }
.legal-doc li::before { content: ""; position: absolute; inset-inline-start: .2rem; top: .78em; width: 7px; height: 7px; border-radius: 50%; background: linear-gradient(135deg, var(--cyan), var(--blue)); }
html[lang="en"] .legal-doc li::before { top: .68em; }
.legal-doc b { color: var(--ink); }
.legal-note { display: flex; gap: .9rem; margin-top: 1.2rem; padding: 1.1rem 1.3rem; background: var(--tint); border: 1px solid var(--line); border-radius: 14px; }
.legal-note i { flex: none; font-size: 1.25rem; color: var(--blue); line-height: 1.4; }
.legal-contact { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem; margin-top: 1.3rem; }
.legal-contact > * { display: flex; flex-direction: column; gap: .3rem; padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); font-weight: 700; font-size: .95rem; overflow-wrap: anywhere; }
.legal-contact i { font-size: 1.2rem; color: var(--blue); }
.legal-contact small { font-weight: 500; color: var(--muted); }
a.legal-contact-item:hover { border-color: var(--blue); color: var(--blue); }
@media (max-width: 991.98px) {
  .page-hero { padding: 130px 0 50px; }
  .legal { padding-bottom: 80px; }
  .legal-toc { position: static; }
}
@media (max-width: 575.98px) {
  .legal-contact { grid-template-columns: 1fr; }
  .legal-tabs a { flex: 1 1 auto; justify-content: center; }
}

/* Arabic menu: labels are wider than the English ones, so tighten the bar on mid-size desktops to keep it on one line */
.navbar .nav-link, .navbar .btn, .lang-switch { white-space: nowrap; }
@media (min-width: 992px) and (max-width: 1399.98px) {
  html[lang="ar"] .navbar .nav-link { font-size: .95rem; padding-inline: .55rem !important; }
  html[lang="ar"] .navbar .nav-link::after { inset-inline: .55rem; }
  html[lang="ar"] .navbar .btn { padding-inline: 1.1rem; font-size: .95rem; }
  html[lang="ar"] .lang-switch { margin-inline-end: .6rem; }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
  html[lang="ar"] .navbar .nav-link { font-size: .86rem; padding-inline: .32rem !important; }
  html[lang="ar"] .navbar .nav-link::after { inset-inline: .32rem; }
  html[lang="ar"] .navbar-brand img { height: 42px; }
  html[lang="ar"] .navbar .btn { padding-inline: .8rem; font-size: .86rem; }
  html[lang="ar"] .lang-switch { padding-inline: .6rem; font-size: .86rem; margin-inline-end: .4rem; }
}

/* ---------- App store links (platform card + footer) ---------- */
.stores { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.1rem; }
.store { display: inline-flex; align-items: center; gap: .6rem; padding: .45rem .95rem; border-radius: 12px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .22); color: #fff; line-height: 1.2; transition: background .2s, border-color .2s, transform .2s; }
.store:hover { color: #fff; background: var(--blue); border-color: var(--blue); transform: translateY(-2px); }
.store i, .cap .store i { font-size: 1.45rem; color: #fff; }
.store span { display: flex; flex-direction: column; }
.store small { font-size: .68rem; opacity: .75; }
.store b { font-size: .95rem; font-weight: 700; font-family: "Manrope", system-ui, sans-serif; }
.stores-footer { margin-top: 1.3rem; }

/* ---------- Demo form: AJAX states ---------- */
.demo-form .hp { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; overflow: hidden; clip-path: inset(50%); pointer-events: none; }
.demo-form { position: relative; }
.demo-form .btn:disabled { opacity: .75; transform: none; cursor: progress; }
.demo-form .btn.is-sending i { animation: sendPulse .9s ease-in-out infinite alternate; }
@keyframes sendPulse { to { transform: translate(4px, -4px); opacity: .4; } }
.form-select.is-invalid { border-color: #d9455f; }
.form-note { flex: 1 1 220px; }
