/* =========================================================
   AISMISR — Modern interface layer
   Loaded after page styles so the visual system stays unified.
   ========================================================= */

:root {
    --cyan: #42b6c7;
    --cyan-dark: #25899b;
    --cyan-light: #78cbd6;
    --cyan-glow: rgba(66, 182, 199, 0.12);
    --violet: #7c6cff;
    --violet-glow: rgba(124, 108, 255, 0.14);
    --bg-primary: #060b14;
    --bg-secondary: #0a1220;
    --bg-card: rgba(15, 27, 43, 0.76);
    --bg-card-hover: rgba(21, 38, 59, 0.92);
    --bg-nav: rgba(6, 11, 20, 0.7);
    --text-primary: #f5fbff;
    --text-secondary: #a9bdcc;
    --text-muted: #7891a5;
    --border: rgba(147, 216, 235, 0.12);
    --border-hover: rgba(49, 217, 242, 0.42);
    --shadow: rgba(0, 0, 0, 0.38);
    --shadow-cyan: rgba(0, 191, 220, 0.2);
    --container-max: 1280px;
    --section-py: clamp(48px, 5vw, 72px);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 34px;
    --surface-blur: blur(18px) saturate(135%);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --transition: all 0.42s var(--ease-out);
}

[data-theme="light"] {
    --cyan: #0b7488;
    --cyan-dark: #075e70;
    --cyan-light: #168da1;
    --cyan-glow: rgba(11, 116, 136, 0.09);
    --bg-primary: #f5f9fc;
    --bg-secondary: #edf4f8;
    --bg-card: rgba(255, 255, 255, 0.82);
    --bg-card-hover: rgba(255, 255, 255, 0.98);
    --bg-nav: rgba(248, 252, 255, 0.76);
    --text-primary: #0a1725;
    --text-secondary: #1e3d4f;
    --text-muted: #3d5a6c;
    --border: rgba(27, 91, 113, 0.13);
    --border-hover: rgba(0, 148, 177, 0.38);
    --shadow: rgba(17, 49, 65, 0.13);
    --shadow-cyan: rgba(0, 156, 185, 0.14);
}

html {
    scroll-padding-top: 88px;
}

body {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 8%, rgba(49, 217, 242, 0.08), transparent 28rem),
        radial-gradient(circle at 88% 24%, rgba(124, 108, 255, 0.07), transparent 30rem),
        var(--bg-primary);
    background-attachment: fixed;
    letter-spacing: -0.006em;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.38;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(to bottom, #000, transparent 80%);
}

[data-theme="light"] body::before {
    background-image:
        linear-gradient(rgba(18, 78, 99, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(18, 78, 99, 0.025) 1px, transparent 1px);
}

::selection {
    color: #041119;
    background: var(--cyan-light);
}

:focus-visible {
    outline: 3px solid rgba(49, 217, 242, 0.68);
    outline-offset: 4px;
}

.container {
    width: min(100%, var(--container-max));
    padding-inline: clamp(18px, 3vw, 34px);
}

.section {
    position: relative;
}

.section:nth-of-type(even):not(.hero):not(.page-hero):not(.clients-section) {
    background: linear-gradient(180deg, transparent, rgba(49, 217, 242, 0.018) 45%, transparent);
}

.section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 820px;
    margin-inline: auto;
    margin-bottom: clamp(28px, 3vw, 40px);
    text-align: center;
}

.section-tag,
.section-title,
.section-desc {
    text-align: center;
}

.section-tag {
    margin-inline: auto;
}

.section-tag,
.hero-badge,
.project-hero-type,
.blog-card-cat,
.blog-card-category,
.cs-filter-btn,
.projects-filter-btn {
    border: 1px solid rgba(49, 217, 242, 0.24);
    background: linear-gradient(135deg, rgba(49, 217, 242, 0.13), rgba(124, 108, 255, 0.08));
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.08), 0 8px 24px rgba(0, 0, 0, 0.06);
    backdrop-filter: var(--surface-blur);
    -webkit-backdrop-filter: var(--surface-blur);
}

[data-theme="light"] .section-tag,
[data-theme="light"] .hero-badge,
[data-theme="light"] .project-hero-type,
[data-theme="light"] .blog-card-cat,
[data-theme="light"] .blog-card-category,
[data-theme="light"] .cs-filter-btn,
[data-theme="light"] .projects-filter-btn {
    color: #075e70;
    border-color: rgba(11, 116, 136, 0.18);
    background: rgba(11, 116, 136, 0.065);
    box-shadow: none;
}

.section-tag {
    padding: 8px 18px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.section-title {
    max-width: 900px;
    margin-inline: auto;
    font-size: clamp(2rem, 4.2vw, 3.35rem);
    line-height: 1.18;
    letter-spacing: -0.035em;
    text-wrap: balance;
}

.section-desc {
    max-width: 720px;
    margin-inline: auto;
    font-size: clamp(0.98rem, 1.4vw, 1.12rem);
    text-wrap: pretty;
}

.about-content .section-tag,
.about-content .section-title {
    text-align: start;
    margin-inline: 0;
}

.gradient-text {
    background-image: linear-gradient(110deg, #9af3ff 0%, var(--cyan) 45%, #9588ff 100%);
}

[data-theme="light"] .gradient-text {
    background-image: linear-gradient(110deg, #007f98, #00a3be 48%, #5f52d7);
}

/* Navigation */
.site-header {
    padding: 10px clamp(8px, 2vw, 24px) 0;
}

.navbar {
    max-width: 1460px;
    margin-inline: auto;
    border: 1px solid transparent;
    border-radius: 0 0 22px 22px;
    background: transparent;
}

.navbar::before {
    background: linear-gradient(135deg, var(--bg-nav), rgba(13, 29, 45, 0.56));
    border-radius: inherit;
}

.navbar.scrolled {
    border-color: var(--border);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
}

.nav-container {
    height: 68px;
}

.nav-logo {
    transition: transform 0.4s var(--ease-out);
}

.nav-logo:hover {
    transform: translateY(-2px);
}

.logo-img {
    height: 44px;
}

.nav-link {
    isolation: isolate;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 999px;
}

.nav-link::after {
    content: '';
    position: absolute;
    inset-inline: 30%;
    bottom: 2px;
    height: 2px;
    border-radius: 2px;
    background: var(--cyan);
    transform: scaleX(0);
    transition: transform 0.32s var(--ease-out);
}

.nav-link:hover,
.nav-link.active {
    border-color: transparent;
    background: rgba(66, 182, 199, 0.065);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-link.active {
    color: #075e70;
    border-color: transparent;
    background: rgba(11, 116, 136, 0.055);
}

[data-theme="light"] .nav-link::after {
    background: #0b7488;
}

.theme-toggle,
.lang-switch {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
    backdrop-filter: blur(12px);
}

/* Buttons */
.btn {
    position: relative;
    isolation: isolate;
    min-height: 46px;
    justify-content: center;
    overflow: hidden;
    border-radius: 999px;
    padding-inline: 26px;
    letter-spacing: 0;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(105deg, transparent 20%, rgba(255,255,255,.32) 48%, transparent 76%);
    transform: translateX(-120%);
    transition: transform 0.75s var(--ease-out);
}

[dir="rtl"] .btn::before {
    transform: translateX(120%);
}

.btn:hover::before {
    transform: translateX(120%);
}

[dir="rtl"] .btn:hover::before {
    transform: translateX(-120%);
}

.btn-primary {
    color: #03141b;
    border-color: rgba(255, 255, 255, 0.18);
    background: linear-gradient(120deg, #83d6df, var(--cyan) 48%, #4da9bb);
    box-shadow: 0 12px 30px rgba(22, 126, 145, 0.18), inset 0 1px rgba(255, 255, 255, 0.42);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.015);
    box-shadow: 0 18px 44px rgba(22, 126, 145, 0.24), inset 0 1px rgba(255, 255, 255, 0.5);
}

[data-theme="light"] .btn-primary {
    color: #ffffff;
    background: linear-gradient(120deg, #137f92, #075e70);
    box-shadow: 0 10px 26px rgba(7, 94, 112, 0.18);
}

#pwaInstallBanner .pwa-btn-install {
    color: #075e70;
}

.btn-outline {
    color: var(--text-primary);
    border-color: rgba(135, 205, 226, 0.28);
    background: rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(12px);
}

.btn-outline:hover {
    color: var(--cyan-light);
    border-color: var(--border-hover);
    background: rgba(66, 182, 199, 0.08);
    transform: translateY(-3px);
}

[data-theme="light"] .btn-outline {
    color: #0a4a58;
    border-color: #0d6f80;
    background: #ffffff;
}

[data-theme="light"] .btn-outline:hover {
    color: #063844;
    border-color: #086070;
    background: #e7f4f7;
}

/* Home hero */
.hero {
    min-height: max(760px, 100svh);
}

.hero-bg-image {
    inset: -4%;
    animation-duration: 24s;
}

.hero-bg-overlay {
    background:
        linear-gradient(90deg, rgba(4, 9, 17, 0.94), rgba(5, 12, 22, 0.76) 52%, rgba(5, 12, 22, 0.82)),
        linear-gradient(180deg, transparent 65%, var(--bg-primary));
}

[dir="rtl"] .hero-bg-overlay {
    background:
        linear-gradient(270deg, rgba(4, 9, 17, 0.94), rgba(5, 12, 22, 0.76) 52%, rgba(5, 12, 22, 0.82)),
        linear-gradient(180deg, transparent 65%, var(--bg-primary));
}

[data-theme="light"] .hero-bg-overlay,
[data-theme="light"][dir="rtl"] .hero-bg-overlay {
    background:
        linear-gradient(90deg, rgba(245, 249, 252, 0.96), rgba(245, 249, 252, 0.76) 55%, rgba(245, 249, 252, 0.88)),
        linear-gradient(180deg, transparent 62%, var(--bg-primary));
}

.hero-grid {
    opacity: 0.3;
    background-size: 80px 80px;
    mask-image: radial-gradient(circle at center, #000, transparent 78%);
}

.hero-scan-lines {
    opacity: 0.025;
}

.hero-container {
    gap: clamp(48px, 7vw, 100px);
    padding-block: 118px 104px;
}

.hero-title {
    max-width: 760px;
    font-size: clamp(2.65rem, 5.3vw, 5rem);
    line-height: 1.06;
    letter-spacing: -0.045em;
    text-wrap: balance;
}

.hero-desc {
    max-width: 650px;
    font-size: clamp(1rem, 1.35vw, 1.18rem);
    color: color-mix(in srgb, var(--text-secondary) 92%, white);
}

[data-theme="light"] .hero-desc {
    color: #1a3544;
}

.hero-stats {
    width: fit-content;
    padding: 16px 22px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(8, 18, 30, 0.48);
    backdrop-filter: var(--surface-blur);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.055);
}

[data-theme="light"] .hero-stats {
    background: rgba(255, 255, 255, 0.66);
}

.hero-card-main {
    width: min(390px, 78vw);
    height: min(390px, 78vw);
    border-color: rgba(49, 217, 242, 0.25);
    border-radius: 38% 62% 54% 46% / 43% 42% 58% 57%;
    background:
        radial-gradient(circle at 32% 24%, rgba(49, 217, 242, 0.18), transparent 38%),
        linear-gradient(145deg, rgba(18, 36, 55, 0.9), rgba(8, 17, 29, 0.72));
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.4), 0 0 80px rgba(49, 217, 242, 0.08), inset 0 1px rgba(255,255,255,.1);
    animation: hero-morph 12s ease-in-out infinite;
}

[data-theme="light"] .hero-card-main {
    background:
        radial-gradient(circle at 32% 24%, rgba(49, 217, 242, 0.2), transparent 38%),
        linear-gradient(145deg, rgba(255,255,255,.94), rgba(224,241,248,.78));
}

.card-glow {
    inset: -2px;
    border-radius: inherit;
    background: conic-gradient(from 45deg, var(--cyan), transparent 24%, var(--violet), transparent 64%, var(--cyan));
    opacity: 0.28;
    filter: blur(1px);
}

.floating-badge,
.solutions-float-badge {
    border-color: rgba(49, 217, 242, 0.24);
    background: rgba(10, 22, 36, 0.72);
    backdrop-filter: var(--surface-blur);
    box-shadow: 0 20px 45px rgba(0,0,0,.24), inset 0 1px rgba(255,255,255,.08);
}

[data-theme="light"] .floating-badge,
[data-theme="light"] .solutions-float-badge {
    background: rgba(255, 255, 255, 0.78);
}

/* Unified cards and surfaces */
.service-card,
.service-card-link,
.project-card,
.blog-card,
.team-card,
.contact-card,
.about-card,
.metric-box,
.solution-item,
.sp-feature-card,
.sp-sidebar-card,
.sp-cta-card,
.article-body-card,
.article-services-panel,
.article-service-link,
.project-detail-content,
.project-detail-sidebar,
.project-gallery-item,
.cs-card,
.cs-intro-point,
.career-card,
.job-card,
.contact-form-wrap,
.cta-card {
    border-color: var(--border);
    background-color: var(--bg-card);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.055), 0 16px 50px rgba(0, 0, 0, 0.08);
    backdrop-filter: var(--surface-blur);
    -webkit-backdrop-filter: var(--surface-blur);
}

.service-card,
.service-card-link,
.project-card,
.blog-card,
.team-card,
.contact-card,
.solution-item,
.sp-feature-card,
.project-gallery-item,
.cs-card,
.cs-intro-point,
.career-card,
.job-card {
    position: relative;
    isolation: isolate;
    transition: transform 0.45s var(--ease-out), border-color 0.35s ease, box-shadow 0.45s ease, background-color 0.35s ease;
}

.service-card:hover,
.service-card-link:hover,
.project-card:hover,
.blog-card:hover,
.team-card:hover,
.contact-card:hover,
.solution-item:hover,
.sp-feature-card:hover,
.project-gallery-item:hover,
.cs-card:hover,
.cs-intro-point:hover,
.career-card:hover,
.job-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-hover);
    background-color: var(--bg-card-hover);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(49, 217, 242, 0.05);
}

.services-grid,
.blog-grid,
.projects-all-grid,
.team-grid {
    gap: clamp(18px, 2.5vw, 32px);
}

.service-card,
.service-card-link,
.project-card,
.blog-card,
.team-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.service-card-image,
.project-image,
.blog-card-img,
.blog-card-image {
    overflow: hidden;
}

.service-card-image img,
.project-image img,
.blog-card img,
.blog-card-img,
.blog-card-image img {
    transition: transform 0.75s var(--ease-out), filter 0.5s ease;
}

.service-card:hover img,
.project-card:hover .project-image img,
.blog-card:hover img,
.blog-card:hover .blog-card-img {
    transform: scale(1.055);
    filter: saturate(1.06) contrast(1.02);
}

.project-tag,
.sp-tech-badge,
.team-tag {
    border: 1px solid var(--border);
    background: rgba(49, 217, 242, 0.055);
    border-radius: 999px;
}

/* Feature layouts */
.about-grid,
.solutions-wrap {
    gap: clamp(36px, 6vw, 84px);
}

.about-card,
.solutions-image-card {
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.about-card {
    box-shadow: 0 35px 90px rgba(0, 0, 0, 0.2), 0 0 0 1px var(--border);
}

.metric-box {
    border-radius: 18px;
}

.solution-item {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 20px;
}

.solutions-image-card::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}

/* Page heroes */
.page-hero,
.page-hero-image,
.sp-hero,
.project-article-hero,
.cs-hero,
.case-study-hero,
.blog-article-hero {
    isolation: isolate;
}

.page-hero:not(.page-hero-image) {
    min-height: 430px;
    display: flex;
    align-items: center;
    padding-top: 128px;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    background:
        radial-gradient(circle at 18% 28%, rgba(49, 217, 242, .14), transparent 28rem),
        radial-gradient(circle at 82% 20%, rgba(124, 108, 255, .12), transparent 30rem),
        linear-gradient(180deg, var(--bg-secondary), var(--bg-primary));
}

[data-theme="light"] .page-hero-image .section-title {
    color: #0a1725;
}

[data-theme="light"] .page-hero-image .section-desc,
[data-theme="light"] .page-hero .section-desc,
[data-theme="light"] .hero-desc,
[data-theme="light"] .about-text {
    color: #1a3544;
}

.page-hero:not(.page-hero-image)::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: .42;
    background-image:
        linear-gradient(rgba(49,217,242,.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(49,217,242,.06) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: linear-gradient(to bottom, #000, transparent);
}

.sp-hero-overlay,
.project-hero-overlay,
.cs-hero-overlay,
.case-study-hero-overlay,
.blog-hero-overlay {
    background:
        linear-gradient(90deg, rgba(4, 9, 17, .96), rgba(6, 14, 25, .75) 55%, rgba(6, 14, 25, .54)),
        linear-gradient(180deg, transparent 58%, var(--bg-primary));
}

[dir="rtl"] .sp-hero-overlay,
[dir="rtl"] .project-hero-overlay,
[dir="rtl"] .cs-hero-overlay,
[dir="rtl"] .case-study-hero-overlay,
[dir="rtl"] .blog-hero-overlay {
    background:
        linear-gradient(270deg, rgba(4, 9, 17, .96), rgba(6, 14, 25, .75) 55%, rgba(6, 14, 25, .54)),
        linear-gradient(180deg, transparent 58%, var(--bg-primary));
}

.sp-hero-title,
.project-hero-title,
.cs-hero-title,
.case-study-hero-title,
.blog-hero-title,
.article-title {
    letter-spacing: -0.035em;
    text-wrap: balance;
}

/* Article and detail readability */
.article-page {
    padding-top: clamp(116px, 12vw, 160px);
}

.article-detail-layout {
    gap: clamp(28px, 4vw, 52px);
}

.article-featured {
    border-radius: var(--radius-xl);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.24);
}

.article-featured img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.article-body-card,
.article-services-panel,
.project-detail-content,
.project-detail-sidebar {
    border-radius: var(--radius-lg);
}

.article-content {
    font-size: clamp(1rem, 1.25vw, 1.08rem);
    line-height: 2;
}

.article-content h2,
.project-detail-content h2,
.sp-content h2 {
    position: relative;
    padding-inline-start: 18px;
    letter-spacing: -0.02em;
}

.article-content h2::before,
.project-detail-content h2::before,
.sp-content h2::before {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    top: .18em;
    bottom: .18em;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(var(--cyan), var(--violet));
}

.article-content a,
.project-detail-content a,
.sp-content a {
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.article-service-link {
    overflow: hidden;
    border-radius: 22px;
}

.article-sidebar-service {
    border-radius: 14px;
}

.project-gallery-item img {
    transition: transform .75s var(--ease-out);
}

/* Forms */
.form-group input,
.form-group textarea,
.form-group select,
input,
textarea,
select {
    border-radius: 14px;
    transition: border-color .25s ease, box-shadow .25s ease, background-color .25s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
input:focus,
textarea:focus,
select:focus {
    border-color: rgba(49, 217, 242, .58);
    box-shadow: 0 0 0 4px rgba(49, 217, 242, .1);
}

/* Footer and floating actions */
.footer {
    border-top: 1px solid rgba(49, 217, 242, .13);
    background:
        radial-gradient(circle at 15% 10%, rgba(49,217,242,.11), transparent 32rem),
        radial-gradient(circle at 88% 34%, rgba(124,108,255,.09), transparent 28rem),
        #050a12;
}

.float-action,
.scroll-top {
    width: 50px;
    height: 50px;
    min-width: 50px;
    max-width: 50px;
    padding: 0;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.14);
    box-shadow: 0 14px 34px rgba(0,0,0,.25);
    backdrop-filter: blur(14px);
    transition: transform .35s var(--ease-out), box-shadow .35s ease;
}

.float-action:hover,
.scroll-top:hover {
    transform: translateY(-4px) scale(1.04);
}

/* Motion system */
.has-motion .reveal-ready {
    opacity: 0;
    transform: translate3d(0, 30px, 0) scale(.985);
    transition:
        opacity .72s var(--ease-out) var(--reveal-delay, 0ms),
        transform .82s var(--ease-out) var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}

.has-motion .reveal-ready.reveal-from-side {
    transform: translate3d(var(--reveal-x, 34px), 0, 0);
}

.has-motion .reveal-ready.is-revealed {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    will-change: auto;
}

@keyframes hero-morph {
    0%, 100% { border-radius: 38% 62% 54% 46% / 43% 42% 58% 57%; transform: translateY(0) rotate(-1deg); }
    50% { border-radius: 56% 44% 39% 61% / 52% 62% 38% 48%; transform: translateY(-12px) rotate(1deg); }
}

@media (max-width: 1180px) {
    .site-header {
        padding-inline: 8px;
    }

    .hero-container {
        gap: 42px;
    }

    .hero-card-main {
        width: 330px;
        height: 330px;
    }
}

@media (max-width: 1024px) {
    body {
        background-attachment: scroll;
    }

    .site-header {
        padding: 0;
        padding-top: env(safe-area-inset-top, 0px);
    }

    .navbar,
    .navbar.scrolled {
        max-width: none;
        border-radius: 0;
        border: 0;
        border-bottom: 1px solid var(--border);
        background: var(--bg-nav);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        filter: none;
        transform: none;
        isolation: auto;
    }

    .navbar::before {
        display: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .site-header .nav-links,
    .nav-links {
        position: fixed;
        top: calc(64px + env(safe-area-inset-top, 0px));
        right: 0;
        bottom: 0;
        left: auto;
        width: min(320px, 88vw);
        max-width: 88vw;
        height: auto;
        margin: 0;
        border-radius: 0;
        border-left: 1px solid var(--border);
        background: var(--bg-card);
        padding: 16px 16px calc(24px + env(safe-area-inset-bottom, 0px));
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    [dir="ltr"] .site-header .nav-links,
    [dir="ltr"] .nav-links {
        right: 0;
        left: auto;
        border-right: 0;
        border-left: 1px solid var(--border);
        border-radius: 0;
    }

    [data-theme="light"] .site-header .nav-links,
    [data-theme="light"] .nav-links {
        background: #ffffff;
    }

    .nav-links .nav-link {
        overflow: visible;
        border-radius: 12px;
        white-space: normal;
    }

    .nav-links .nav-link::after {
        display: none;
    }

    .hero {
        min-height: auto;
        padding-bottom: 72px;
    }

    .hero-container {
        padding-block: 122px 64px;
    }

    .hero-content {
        max-width: 720px;
        margin-inline: auto;
        text-align: center;
    }

    .hero-title,
    .hero-desc {
        margin-inline: auto;
    }

    .hero-actions,
    .hero-stats {
        justify-content: center;
        margin-inline: auto;
    }

    .gulf-actions {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        gap: 10px;
        width: 100%;
    }

    .gulf-actions .btn {
        width: 100% !important;
        flex: 0 0 auto !important;
        max-width: none !important;
        justify-content: center;
    }

    .hero-visual {
        margin-top: 32px;
    }

    .page-hero:not(.page-hero-image) {
        min-height: 360px;
        padding-top: 112px;
    }
}

@media (max-width: 720px) {
    :root {
        --radius-lg: 20px;
        --radius-xl: 26px;
    }

    body::before {
        background-size: 48px 48px;
    }

    .section-title {
        letter-spacing: -0.025em;
    }

    .hero-container {
        padding-block: 104px 44px;
    }

    .hero-title {
        font-size: clamp(2.15rem, 11vw, 3.1rem);
    }

    .hero-actions {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: center;
        width: 100%;
        gap: 10px;
    }

    .hero-actions .btn {
        width: auto;
        flex: 1 1 0;
        max-width: none;
    }

    .hero-stats {
        width: 100%;
        gap: 14px;
        padding: 14px 10px;
    }

    .hero-card-main {
        width: min(280px, 74vw);
        height: min(280px, 74vw);
    }

    .floating-badge {
        padding: 8px 11px;
        transform: scale(.9);
    }

    .badge-top { inset-inline-end: -22px; }
    .badge-bottom { inset-inline-start: -22px; }
    .badge-left { inset-inline-start: -56px; }

    .section-header {
        margin-bottom: 34px;
    }

    .service-card,
    .service-card-link,
    .project-card,
    .blog-card,
    .team-card,
    .contact-card,
    .solution-item,
    .sp-feature-card,
    .article-body-card,
    .project-detail-content,
    .project-detail-sidebar {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .service-card:hover,
    .service-card-link:hover,
    .project-card:hover,
    .blog-card:hover,
    .team-card:hover,
    .contact-card:hover,
    .solution-item:hover,
    .sp-feature-card:hover,
    .project-gallery-item:hover,
    .cs-card:hover,
    .cs-intro-point:hover {
        transform: translateY(-3px);
    }

    .article-page {
        padding-top: 104px;
    }

    .article-body-card,
    .project-detail-content,
    .project-detail-sidebar,
    .contact-form-wrap {
        border-radius: 18px;
    }
}

@media (max-width: 480px) {
    .site-header {
        padding-inline: 4px;
    }

    .nav-actions {
        gap: 6px;
    }

    .nav-actions-lang .lang-switch {
        padding-inline: 8px;
    }

    .btn {
        width: 100%;
        padding-inline: 18px;
    }

    .hero-actions .btn {
        width: auto;
        flex: 1 1 0;
        padding-inline: 14px;
        font-size: 0.92rem;
    }

    .nav-actions .btn,
    .theme-toggle,
    .hamburger {
        width: auto;
    }

    .hero-badge {
        padding-inline: 13px;
    }

    .hero-stats {
        border-radius: 16px;
    }

    .stat-num {
        font-size: 1.55rem;
    }

    .floating-badge {
        display: none;
    }
}

/* ─── VITALITY & LIVE MOTION ─── */
@keyframes ais-fade-up {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes ais-tag-shine {
    0% { background-position: 120% 50%; }
    100% { background-position: -20% 50%; }
}

@keyframes ais-pulse-dot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(49, 217, 242, 0.45); }
    70% { box-shadow: 0 0 0 8px rgba(49, 217, 242, 0); }
}

@keyframes ais-float-soft {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes ais-card-shine {
    from { transform: translateX(-120%) skewX(-18deg); }
    to   { transform: translateX(220%) skewX(-18deg); }
}

@keyframes ais-grad-shift {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(12deg); }
}

.hero-badge,
.hero-desc,
.hero-actions,
.hero-stats {
    animation: ais-fade-up 0.7s var(--ease-out) both;
}

.hero-desc { animation-delay: 0.22s; }
.hero-actions { animation-delay: 0.32s; }
.hero-stats { animation-delay: 0.42s; }

/* The heading is the mobile LCP element, so it must paint immediately. */
.hero-title {
    animation: none;
    opacity: 1;
    transform: none;
}

@media (max-width: 767px) {
    .hero-badge,
    .hero-desc,
    .hero-actions,
    .hero-stats,
    .hero-card-main,
    .section-tag,
    .badge-dot,
    .gradient-text {
        animation: none;
    }
}

.hero-card-main {
    animation: ais-float-soft 6.5s ease-in-out infinite;
}

.section-tag {
    background-size: 220% 100%;
    animation: ais-tag-shine 5.5s ease-in-out infinite;
}

.badge-dot {
    animation: ais-pulse-dot 2.2s ease-out infinite;
}

.gradient-text {
    animation: ais-grad-shift 8s ease-in-out infinite;
}

.service-card,
.project-card,
.blog-card,
.team-card,
.contact-card,
.gulf-regions-list li {
    position: relative;
    overflow: hidden;
}

.service-card::after,
.project-card::after,
.blog-card::after,
.team-card::after {
    content: '';
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 38%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    transform: translateX(-120%) skewX(-18deg);
    pointer-events: none;
    z-index: 3;
}

.service-card:hover::after,
.project-card:hover::after,
.blog-card:hover::after,
.team-card:hover::after {
    animation: ais-card-shine 0.75s ease;
}

.service-card:hover,
.project-card:hover,
.blog-card:hover,
.team-card:hover {
    transform: translateY(-8px);
}

.btn-primary {
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease, background 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
}

.nav-link {
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
    transform: translateY(-1px);
}

.ticker-track {
    animation-duration: 36s;
}

[data-theme="light"] .service-card::after,
[data-theme="light"] .project-card::after,
[data-theme="light"] .blog-card::after,
[data-theme="light"] .team-card::after {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
}

[data-theme="light"] .gradient-text {
    animation: none;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }

    .has-motion .reveal-ready {
        opacity: 1;
        transform: none;
    }

    .hero-badge,
    .hero-title,
    .hero-desc,
    .hero-actions,
    .hero-stats,
    .hero-card-main,
    .section-tag,
    .badge-dot,
    .gradient-text {
        animation: none !important;
    }
}

.nav-drawer-label,
.nav-ico {
    display: none;
}

@media (max-width: 1024px) {
    .nav-drawer-label {
        display: block;
        padding: 4px 8px 12px;
        font-size: 0.72rem;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--text-muted);
    }

    .nav-ico {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        flex-shrink: 0;
        border-radius: 10px;
        background: rgba(0, 180, 200, 0.1);
        border: 1px solid rgba(0, 180, 200, 0.16);
        color: #0d6f80;
        font-size: 0.95rem;
        line-height: 1;
    }

    [data-theme="dark"] .nav-ico {
        background: rgba(49, 217, 242, 0.1);
        border-color: rgba(49, 217, 242, 0.18);
        color: var(--cyan);
    }

    .site-header .nav-links,
    .nav-links {
        width: min(340px, 86vw);
        max-width: 86vw;
        padding: 18px 14px calc(20px + env(safe-area-inset-bottom, 0px));
        gap: 6px;
        background:
            linear-gradient(180deg, rgba(0, 180, 200, 0.05), transparent 120px),
            #ffffff;
        box-shadow: 0 0 0 1px rgba(13, 27, 42, 0.06), -16px 0 40px rgba(13, 27, 42, 0.12);
    }

    [dir="ltr"] .site-header .nav-links,
    [dir="ltr"] .nav-links {
        box-shadow: 0 0 0 1px rgba(13, 27, 42, 0.06), -16px 0 40px rgba(13, 27, 42, 0.12);
    }

    [data-theme="dark"] .site-header .nav-links,
    [data-theme="dark"] .nav-links {
        background:
            linear-gradient(180deg, rgba(49, 217, 242, 0.08), transparent 140px),
            #0c1622;
        box-shadow: -16px 0 40px rgba(0, 0, 0, 0.45);
    }

    .nav-links li:not(.nav-mobile-cta):not(.nav-drawer-label):not(.nav-lang-item) {
        list-style: none;
    }

    .nav-links .nav-link {
        gap: 12px;
        min-height: 46px;
        padding: 8px 10px;
        font-size: 0.98rem;
        font-weight: 800;
        color: #0a1725;
        border: 1px solid transparent;
        border-radius: 14px;
        background: transparent;
    }

    [data-theme="dark"] .nav-links .nav-link {
        color: #eaf5f9;
    }

    .nav-links .nav-link:hover,
    .nav-links .nav-link.active {
        color: #086070;
        background: #e7f6f8;
        border-color: rgba(13, 111, 128, 0.16);
    }

    [data-theme="dark"] .nav-links .nav-link:hover,
    [data-theme="dark"] .nav-links .nav-link.active {
        color: var(--cyan);
        background: rgba(49, 217, 242, 0.1);
        border-color: rgba(49, 217, 242, 0.2);
    }

    .nav-links .nav-link.active {
        box-shadow: inset 3px 0 0 #0d6f80;
    }

    [dir="ltr"] .nav-links .nav-link.active {
        box-shadow: inset 3px 0 0 #0d6f80;
    }

    [dir="rtl"] .nav-links .nav-link.active {
        box-shadow: inset -3px 0 0 #0d6f80;
    }

    .nav-mobile-cta {
        margin-top: auto;
        padding: 14px 4px 4px;
        border-top: 1px solid rgba(13, 27, 42, 0.08);
        position: sticky;
        bottom: 0;
        background: inherit;
    }

    [data-theme="dark"] .nav-mobile-cta {
        border-top-color: rgba(255, 255, 255, 0.08);
    }

    .nav-mobile-cta .btn {
        border-radius: 14px;
        min-height: 50px;
        font-size: 1rem;
    }
}
