/* ==========================================================================
   Portfolio — main.css
   Indigo + teal on a cool off-white. Plus Jakarta Sans.
   Mobile-first. Breakpoints: 640 / 768 / 1024 / 1280.
   Sections: tokens · base · layout · headings · buttons · header · hero ·
   services · timeline · products · about · stats · contact · footer ·
   pages · utilities · motion
   ========================================================================== */

/* ---------------------------------------------------------------- Tokens */
:root {
    --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    --primary: #312e81;          /* indigo */
    --primary-hover: #26236b;
    --primary-soft: #e0e7ff;     /* soft indigo (hero circle, placeholders) */
    --accent: #14b8a6;           /* teal — use sparingly */
    --accent-soft: #ccfbf1;      /* light teal (icon squares) */
    --accent-icon: #0d9488;      /* teal icons on light teal */
    --accent-on-dark: #5eead4;   /* teal on indigo */

    --bg: #f8f9fc;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;

    --radius-btn: 10px;
    --radius-card: 16px;
    --shadow-card: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
    --shadow-card-hover: 0 4px 8px rgba(15, 23, 42, .05), 0 18px 40px rgba(15, 23, 42, .10);

    --container: 1200px;
    --gutter: 20px;
    --section-y: 64px;
    --header-h: 68px;

    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (min-width: 768px) {
    :root { --gutter: 32px; }
}
@media (min-width: 1024px) {
    :root { --section-y: 96px; --header-h: 76px; }
}

/* ---------------------------------------------------------------- Base */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3 { font-weight: 700; line-height: 1.2; color: var(--text); margin: 0 0 .5em; }
p { margin: 0 0 1em; }
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }

:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
    border-radius: 4px;
}
.section--indigo :focus-visible { outline-color: var(--accent-on-dark); }

.icon { flex-shrink: 0; vertical-align: middle; }

/* ---------------------------------------------------------------- Layout */
.container {
    width: 100%;
    max-width: calc(var(--container) + 2 * var(--gutter));
    margin-inline: auto;
    padding-inline: var(--gutter);
}
.container--narrow { max-width: calc(820px + 2 * var(--gutter)); }

.section { padding-block: var(--section-y); }
.section--alt {
    background: var(--card);
    border-block: 1px solid var(--border);
}

.card {
    background: var(--card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
}

/* ---------------------------------------------------------------- Headings */
.section-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 48px;
}
.section-head::before {
    content: "";
    display: block;
    width: 40px;
    height: 3px;
    margin: 0 auto 16px;
    border-radius: 2px;
    background: var(--accent);
}
.section-title {
    margin: 0;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--primary);
}
.section-head__lead { margin: 14px 0 0; color: var(--muted); }

.section-head--left { text-align: start; margin-inline: 0; }
.section-head--left::before { margin-inline: 0; }

/* ---------------------------------------------------------------- Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: 1.5px solid var(--primary);
    border-radius: var(--radius-btn);
    background: var(--primary);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
}
.btn:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(49, 46, 129, .22);
}
.btn:disabled { opacity: .7; cursor: progress; transform: none; }

.btn--secondary { background: var(--card); color: var(--primary); }
.btn--secondary:hover { background: var(--card); color: var(--primary); border-color: var(--primary); }

/* Teal button: dark text keeps the contrast readable on #14B8A6. */
.btn--teal { background: var(--accent); border-color: var(--accent); color: var(--text); }
.btn--teal:hover { background: #0fa393; border-color: #0fa393; color: var(--text); box-shadow: 0 10px 20px rgba(20, 184, 166, .28); }

/* ---------------------------------------------------------------- Header */
.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 1000;
    padding: 10px 16px;
    border-radius: var(--radius-btn);
    background: var(--primary);
    color: #fff;
    font-weight: 600;
}
.skip-link:focus { top: 12px; color: #fff; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    border-bottom: 1px solid var(--border);
    transition: box-shadow .25s var(--ease);
}
/* The blur lives on a pseudo-element: backdrop-filter on the header itself would
   become the containing block of the fixed mobile menu and clip it. */
.site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(255, 255, 255, .8);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}
.site-header.scrolled { box-shadow: 0 4px 20px rgba(15, 23, 42, .06); }
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 100%;
}

.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); flex-shrink: 0; }
.logo:hover { color: var(--text); }
.logo__text { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
/* Second name (Latin name on the Arabic site), after a thin divider. */
.logo__alt {
    padding-inline-start: 10px;
    border-inline-start: 1px solid var(--border);
    font-family: "Plus Jakarta Sans", system-ui, sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}

.nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-btn);
    background: var(--card);
    color: var(--text);
}
.nav-toggle__close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: block; }

/* Mobile slide-in menu */
.site-nav {
    position: fixed;
    top: var(--header-h);
    bottom: 0;
    inset-inline-end: 0;
    width: min(320px, 86vw);
    padding: 20px var(--gutter) 40px;
    background: var(--card);
    border-inline-start: 1px solid var(--border);
    box-shadow: -12px 0 30px rgba(15, 23, 42, .08);
    overflow-y: auto;
    transform: translateX(105%);
    visibility: hidden;
    transition: transform .3s var(--ease), visibility 0s linear .3s;
}
[dir="rtl"] .site-nav { transform: translateX(-105%); }
.site-nav.is-open { transform: none; visibility: visible; transition: transform .3s var(--ease), visibility 0s; }

.nav-list { display: flex; flex-direction: column; }
.nav-link {
    position: relative;
    display: block;
    padding: 12px 0;
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
}
.nav-link:hover { color: var(--primary); }
.nav-link.is-active { color: var(--primary); font-weight: 600; }
.nav-link.is-active::after {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    bottom: 6px;
    width: 24px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
}

.lang-switch { display: flex; gap: 4px; margin-top: 20px; }
.lang-switch a {
    display: block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}
.lang-switch a:hover { color: var(--primary); }
.lang-switch a.is-active { color: var(--primary); background: var(--primary-soft); }

/* No JS: show the menu inline instead of a drawer. */
html:not(.js) .nav-toggle { display: none; }
html:not(.js) .site-header { height: auto; position: static; }
html:not(.js) .site-header__inner { flex-wrap: wrap; padding-block: 12px; }
html:not(.js) .site-nav {
    position: static;
    width: 100%;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: none;
    transform: none;
    visibility: visible;
}
html:not(.js) .nav-list { flex-direction: row; flex-wrap: wrap; gap: 0 20px; }

@media (min-width: 1024px) {
    .nav-toggle { display: none; }
    .site-nav, [dir="rtl"] .site-nav, html:not(.js) .site-nav {
        position: static;
        display: flex;
        align-items: center;
        gap: 28px;
        width: auto;
        padding: 0;
        border: 0;
        background: none;
        box-shadow: none;
        overflow: visible;
        transform: none;
        visibility: visible;
        transition: none;
    }
    .nav-list, html:not(.js) .nav-list { flex-direction: row; gap: 26px; }
    .nav-link { padding: 8px 0; }
    .nav-link.is-active::after { bottom: 0; width: 100%; }
    .lang-switch { margin: 0; padding-inline-start: 20px; border-inline-start: 1px solid var(--border); }
    html:not(.js) .site-header { position: sticky; height: var(--header-h); }
    html:not(.js) .site-header__inner { flex-wrap: nowrap; padding-block: 0; }
}

/* ---------------------------------------------------------------- Hero */
.hero { padding-block: 56px var(--section-y); overflow: hidden; }
.hero__inner {
    display: grid;
    gap: 56px;
    align-items: center;
}
.hero__title {
    margin-bottom: 20px;
    font-size: clamp(34px, 5vw, 54px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}
/* All words stacked in one grid cell: the box always fits the longest word (no layout shift). */
.typewriter {
    display: inline-grid;
    max-width: 100%;
    color: var(--primary);
    vertical-align: bottom;
}
.typewriter__sizer,
.typewriter__live { grid-area: 1 / 1; }
.typewriter__sizer { visibility: hidden; }
.typewriter__live { text-align: start; }
.typewriter__cursor {
    display: inline-block;
    width: 3px;
    height: .9em;
    margin-inline-start: 4px;
    vertical-align: -0.08em;
    border-radius: 2px;
    background: var(--accent);
    animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero__subtitle { max-width: 540px; margin-bottom: 32px; font-size: 18px; color: var(--muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Device mockups: MacBook + iPhone frames (images) over a soft indigo circle */
.hero__visual {
    position: relative;
    width: 100%;
    max-width: 580px;
    margin-inline: auto;
    padding: 16px 0 24px;
}
.hero__circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 86%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--primary-soft);
    transform: translate(-50%, -50%);
}
.hero__laptop {
    position: relative;
    width: 90%;
    filter: drop-shadow(0 24px 40px rgba(15, 23, 42, .18));
}
.hero__phone {
    position: absolute;
    right: 0;
    bottom: 8px;
    width: 25%;
    filter: drop-shadow(0 18px 30px rgba(15, 23, 42, .28));
}
[dir="rtl"] .hero__phone { right: auto; left: 0; }

@media (min-width: 1024px) {
    .hero { padding-top: 72px; }
    .hero__inner { grid-template-columns: 1.05fr .95fr; gap: 48px; }
    .hero__visual { max-width: none; }
}

/* ---------------------------------------------------------------- Services */
.services {
    display: grid;
    gap: 24px;
}
@media (min-width: 768px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .services { grid-template-columns: repeat(3, 1fr); } }

.service {
    padding: 28px;
    transition: translate .25s var(--ease), box-shadow .25s var(--ease);
}
.service:hover { translate: 0 -4px; box-shadow: var(--shadow-card-hover); }
.service__icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent-icon);
}
.service__title { font-size: 18px; margin-bottom: 8px; }
.service__text { margin: 0; font-size: 15px; color: var(--muted); }

/* ---------------------------------------------------------------- How we build (timeline) */
.timeline { position: relative; }
.timeline__step {
    position: relative;
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 20px;
    padding-bottom: 36px;
}
.timeline__step:last-child { padding-bottom: 0; }
/* Thin line joining the circles */
.timeline__step:not(:last-child)::before {
    content: "";
    position: absolute;
    top: 48px;
    bottom: 0;
    inset-inline-start: 23px;
    width: 2px;
    background: rgba(20, 184, 166, .35);
}
.timeline__num {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--text);
    font-size: 18px;
    font-weight: 700;
    box-shadow: 0 0 0 6px var(--accent-soft);
}
.timeline__body { padding-top: 8px; }
.timeline__title { font-size: 20px; margin-bottom: 6px; }
.timeline__text { margin: 0; color: var(--muted); }

@media (min-width: 768px) {
    .timeline__step { grid-template-columns: 56px 1fr; gap: 28px; padding-bottom: 44px; }
    .timeline__step:not(:last-child)::before { top: 56px; inset-inline-start: 27px; }
    .timeline__num { width: 56px; height: 56px; font-size: 20px; }
    .timeline__body { padding-top: 12px; }
}

/* ---------------------------------------------------------------- Products */
.products {
    display: grid;
    gap: 24px;
}
@media (min-width: 640px) { .products { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .products { grid-template-columns: repeat(3, 1fr); gap: 28px; } }

.product {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: translate .25s var(--ease), box-shadow .25s var(--ease);
}
.product:hover { translate: 0 -4px; box-shadow: var(--shadow-card-hover); }
.product__media {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    background: var(--primary-soft);
}
.product__media { position: relative; }
.product__img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.product__body { display: flex; flex-direction: column; flex: 1; padding: 22px 24px 24px; }
.product__name { font-size: 20px; margin-bottom: 6px; }
.product__text { flex: 1; font-size: 15px; color: var(--muted); }
.product__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    font-weight: 600;
    color: var(--primary);
}
.product__link span[aria-hidden] { transition: transform .2s var(--ease); }
.product__link:hover span[aria-hidden] { transform: translateX(4px); }
.product__link--case { margin-bottom: 8px; }

.case-label {
    display: inline-block;
    margin-bottom: 18px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-icon);
    font-size: 13px;
    font-weight: 600;
}
.case-hero__tagline {
    max-width: 560px;
    margin-bottom: 14px;
    font-size: clamp(19px, 2.2vw, 23px);
    font-weight: 600;
    line-height: 1.45;
    color: var(--primary);
}
.case-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.case-badges li {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--card);
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
}
.case-hero__visual { max-width: 640px; }

.shot {
    position: relative;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
    box-shadow: var(--shadow-card-hover);
}
.shot::before {
    content: "";
    display: block;
    height: 26px;
    border-bottom: 1px solid var(--border);
    background:
        radial-gradient(circle, #f87171 0 4px, transparent 4.5px) 10px 50% / 12px 12px no-repeat,
        radial-gradient(circle, #fbbf24 0 4px, transparent 4.5px) 26px 50% / 12px 12px no-repeat,
        radial-gradient(circle, #34d399 0 4px, transparent 4.5px) 42px 50% / 12px 12px no-repeat,
        var(--bg);
}
.shot__img { width: 100%; }
.shot__link { display: block; cursor: zoom-in; }
.shot__link .shot__img { transition: transform .3s var(--ease); }
.shot__link:hover .shot__img { transform: scale(1.015); }
.feature__phone-link { display: contents; cursor: zoom-in; }
.feature__phone { cursor: zoom-in; }

.lightbox {
    max-width: 96vw;
    max-height: 94vh;
    padding: 0;
    border: 0;
    overflow: visible;
    background: transparent;
    cursor: zoom-out;
}
.lightbox::backdrop { background: rgba(15, 23, 42, .86); }
.lightbox__img {
    width: auto;
    max-width: 96vw;
    max-height: 94vh;
    border-radius: 10px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .4);
}
.lightbox__close {
    position: fixed;
    top: 14px;
    inset-inline-end: 18px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 26px;
    line-height: 1;
}
.lightbox__close:hover { background: rgba(255, 255, 255, .26); }

.case-closing {
    margin: 36px 0 0;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}
.service__icon--alert { background: #fee2e2; color: #dc2626; }

.case-overview .shot { max-width: 1040px; margin-inline: auto; }

.case-features { display: grid; gap: 72px; }
.feature { display: grid; gap: 32px; align-items: center; }
.feature__num {
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--accent-icon);
}
.feature__title {
    margin-bottom: 14px;
    font-size: clamp(24px, 3vw, 32px);
    letter-spacing: -0.01em;
    color: var(--primary);
}
.feature__text { font-size: 17px; color: var(--muted); }
.feature__list { display: grid; gap: 10px; }
.feature__list li { display: flex; align-items: flex-start; gap: 10px; }
.feature__list .icon { margin-top: 3px; color: var(--accent-icon); }

.feature__media { position: relative; min-width: 0; }
.feature__media--pair { display: grid; gap: 16px; }
.feature__phone {
    width: min(220px, 55%);
    margin: 20px auto 0;
    filter: drop-shadow(0 18px 30px rgba(15, 23, 42, .28));
}

.services--4 { grid-template-columns: 1fr; }
@media (min-width: 768px) { .services--4 { grid-template-columns: repeat(2, 1fr); } }

.case-cta { text-align: center; }
.case-cta .section-head { margin-bottom: 20px; }
.case-cta__text { max-width: 640px; margin: 0 auto 32px; font-size: 17px; }
.case-cta__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

.case-tech { padding-block: 48px; }

.brain { display: grid; gap: 16px; align-items: center; }
.brain__col { padding: 28px; }
.brain__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.brain__chips li {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg);
    font-size: 15px;
    font-weight: 600;
}
.brain__link {
    justify-self: center;
    font-size: 30px;
    line-height: 1;
    color: var(--accent);
    transform: rotate(90deg);
}
.brain__core {
    border-radius: var(--radius-card);
    background: var(--primary);
    box-shadow: 0 18px 40px rgba(49, 46, 129, .28);
    color: rgba(255, 255, 255, .86);
}
.brain__core-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}
.brain__core-title .icon { color: var(--accent-on-dark); }
.brain__steps { display: grid; gap: 10px; counter-reset: brain; }
.brain__steps li { display: flex; align-items: center; gap: 12px; counter-increment: brain; }
.brain__steps li::before {
    content: counter(brain);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(94, 234, 212, .16);
    color: var(--accent-on-dark);
    font-size: 13px;
    font-weight: 700;
}

.device { display: block; cursor: zoom-in; }
.device__img {
    width: 100%;
    filter: drop-shadow(0 22px 34px rgba(15, 23, 42, .22));
    transition: transform .3s var(--ease);
}
.device:hover .device__img { transform: translateY(-4px); }

.phone-trio {
    display: grid;
    grid-template-columns: 1fr 1.15fr 1fr;
    align-items: end;
    max-width: 560px;
}
.phone-trio .device { position: relative; }
.phone-trio .device:nth-of-type(1) { margin-inline-end: -14%; margin-bottom: 6%; }
.phone-trio .device:nth-of-type(2) { z-index: 1; }
.phone-trio .device:nth-of-type(3) { margin-inline-start: -14%; margin-bottom: 6%; }

.feature__media--device .device { width: min(280px, 72%); margin-inline: auto; }

.admin-list { display: grid; gap: 12px; }
.admin-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
    font-weight: 500;
}
.admin-list .icon { color: var(--accent-icon); }

.bot-run { padding: 28px; }
.bot-run__title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    font-weight: 700;
    color: var(--primary);
}
.bot-run__title .icon { color: var(--accent-icon); }
.bot-run__steps { display: grid; gap: 12px; }
.bot-run__steps li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    font-weight: 500;
}
.bot-run__tick {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent-icon);
}

@media (min-width: 1024px) {
    .case-features { gap: 120px; }
    .feature { grid-template-columns: .85fr 1.15fr; gap: 64px; }
    .feature--reverse { grid-template-columns: 1.15fr .85fr; }
    .feature--reverse .feature__media { order: -1; }

    .feature__media--pair { display: block; }
    .feature__media--pair .shot { width: 88%; }
    .feature__media--pair .shot + .shot { z-index: 1; margin-top: -22%; margin-inline-start: auto; }

    .feature__media--phone { padding-bottom: 12%; }
    .feature__media--phone .shot { width: 90%; }
    .feature__phone {
        position: absolute;
        z-index: 2;
        inset-inline-end: 0;
        bottom: 0;
        width: 28%;
        margin: 0;
    }

    .services--4 { grid-template-columns: repeat(4, 1fr); }

    .brain { grid-template-columns: 1fr auto 1.2fr auto 1fr; gap: 20px; }
    .feature--device { grid-template-columns: 1.2fr .8fr; }
    .feature--device.feature--reverse { grid-template-columns: .8fr 1.2fr; }
    .brain__link { transform: none; }
}

/* ---------------------------------------------------------------- About */
.about {
    display: grid;
    gap: 40px;
    align-items: center;
    max-width: 1000px;
    margin-inline: auto;
}
.about__photo { order: -1; width: min(300px, 80%); margin-inline: auto; }
.about__img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    object-position: center 35%;
    border-radius: 50%;
    border: 6px solid var(--card);
    background: var(--primary-soft);
    box-shadow: 0 0 0 1px var(--border), var(--shadow-card-hover);
}
.about__text p { font-size: 17px; line-height: 1.8; color: #334155; }
.about__text p:last-child { margin-bottom: 0; }

@media (min-width: 1024px) {
    .about { grid-template-columns: 1.3fr 1fr; gap: 64px; }
    .about__photo { order: 2; }
}

/* ---------------------------------------------------------------- FAQ */
.faq { display: grid; gap: 12px; }
.faq__item {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
    transition: box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.faq__item[open] { border-color: rgba(20, 184, 166, .5); box-shadow: var(--shadow-card); }
.faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    list-style: none;
}
.faq__question::-webkit-details-marker { display: none; }
.faq__question:hover { color: var(--primary); }
.faq__icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--accent-icon);
    transition: transform .25s var(--ease);
}
.faq__item[open] .faq__icon { transform: rotate(45deg); }
.faq__answer { margin: 0; padding: 0 20px 20px; color: var(--muted); line-height: 1.75; }
.faq__item[open] .faq__answer { animation: faq-in .25s var(--ease); }
@keyframes faq-in { from { opacity: 0; transform: translateY(-4px); } }

/* ---------------------------------------------------------------- Contact (indigo) */
.section--indigo { background: var(--primary); color: rgba(255, 255, 255, .82); }
.section--indigo .section-title { color: #fff; }

.contact { display: grid; gap: 40px; }
@media (min-width: 1024px) { .contact { grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: start; } }

.contact .section-head { margin-bottom: 20px; }
.contact__intro { max-width: 440px; margin-bottom: 32px; font-size: 17px; }
.contact-list { display: grid; gap: 18px; }
.contact-list li { display: flex; align-items: center; gap: 14px; }
.contact-list__icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .1);
    color: var(--accent-on-dark);
}
.contact-list__label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .6);
}
.contact-list a { color: #fff; font-weight: 500; text-decoration: underline; text-decoration-color: rgba(94, 234, 212, .6); text-underline-offset: 4px; }
.contact-list a:hover { color: var(--accent-on-dark); }
.contact-list li > span:last-child { color: #fff; font-weight: 500; }

.contact-form {
    position: relative;
    display: grid;
    gap: 14px;
    align-content: start;
    padding: 24px 20px;
    border-radius: var(--radius-card);
    background: var(--card);
    color: var(--text);
    box-shadow: 0 24px 60px rgba(15, 23, 42, .25);
}
@media (min-width: 768px) { .contact-form { padding: 36px; } }
.form-field { display: grid; gap: 4px; }
.input {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-btn);
    background: var(--bg);
    color: var(--text);
    font: inherit;
    font-size: 15px;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.input::placeholder { color: #8391a7; }
.input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--card);
    box-shadow: 0 0 0 3px rgba(49, 46, 129, .15);
}
textarea.input { resize: vertical; min-height: 140px; }
.has-error .input { border-color: #dc2626; }
.form-error { margin: 0; font-size: 13px; color: #b91c1c; }
.form-error:empty { display: none; }
.form-note { margin: 2px 0 6px; font-size: 13px; color: var(--muted); }
.contact-form .btn { justify-self: start; min-width: 170px; }

.form-status {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-btn);
    font-size: 14px;
}
.form-status.is-success { background: #f0fdfa; color: #0f766e; }
.form-status.is-error { background: #fef2f2; color: #b91c1c; }
.form-status .icon { margin-top: 2px; }

.btn.is-loading::before {
    content: "";
    width: 14px;
    height: 14px;
    border: 2px solid rgba(15, 23, 42, .3);
    border-top-color: var(--text);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Honeypot: clipped to 1px, not display:none (some bots skip hidden fields) and not
   pushed off-screen (a -9999px offset makes RTL pages scroll sideways). */
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; pointer-events: none; }

/* ---------------------------------------------------------------- Footer (copyright bar) */
.site-footer {
    background: #1e1b4b;
    color: rgba(255, 255, 255, .7);
    font-size: 13px;
}
.site-footer__inner { padding-block: 18px; text-align: center; }
.site-footer p { margin: 0; }
.site-footer__sep { margin-inline: 6px; opacity: .6; }
.site-footer__socials { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.site-footer__socials a {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: rgba(255, 255, 255, .75);
    transition: background-color .2s var(--ease), color .2s var(--ease);
}
.site-footer__socials a:hover { background: rgba(255, 255, 255, .1); color: var(--accent-on-dark); }

/* ---------------------------------------------------------------- 404 page */
.not-found { text-align: center; max-width: 560px; }
.not-found__code { margin-bottom: 8px; font-size: 96px; font-weight: 700; line-height: 1; color: var(--primary); }
.not-found .page-title { font-size: 28px; }
.not-found .btn { margin-top: 12px; }

/* ---------------------------------------------------------------- Utilities */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------------------------------------------------------------- Motion */
.js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .6s var(--ease) var(--delay, 0ms), transform .6s var(--ease) var(--delay, 0ms),
        translate .25s var(--ease), box-shadow .25s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

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

/* ---------------------------------------------------------------- Arabic / right-to-left */
html[lang="ar"] { --font: "IBM Plex Sans Arabic", "Plus Jakarta Sans", system-ui, sans-serif; }
/* Letter-spacing breaks the joining of Arabic letters. */
html[lang="ar"] * { letter-spacing: 0 !important; }
html[lang="ar"] body { line-height: 1.85; }
html[lang="ar"] .hero__title { line-height: 1.35; }
html[lang="ar"] .section-title { line-height: 1.4; }

[dir="rtl"] .product__link:hover span[aria-hidden] { transform: translateX(-4px); }
/* Emails and phone numbers are typed left-to-right, even in Arabic. */
[dir="rtl"] input[type="email"],
[dir="rtl"] input[type="tel"] { direction: ltr; text-align: right; }
[dir="rtl"] input[type="email"]::placeholder,
[dir="rtl"] input[type="tel"]::placeholder { direction: rtl; }

.about__cta { margin-top: 22px; }
