/* ================================================================
   Landing Page Stylesheet
   All colors reference CSS variables defined in the master layout.
   ================================================================ */

/* ── Global ── */
html { scroll-behavior: smooth; overflow-x: hidden; }
body { font-family: 'IBM Plex Sans Arabic', 'Inter', sans-serif; background-color: var(--surface); overflow-x: hidden; }
/* RTL: force scrollbar to right — html direction controls scrollbar placement;
   body direction restores RTL content flow */
html[dir="rtl"] { direction: ltr; }
html[dir="rtl"] > body { direction: rtl; }
h1, h2, h3, h4, h5, h6 { font-family: 'Sora', 'IBM Plex Sans Arabic', sans-serif; }

/* ── Gradient text ── */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Skip-to-content ── */
.visually-hidden-focusable:focus {
    position: fixed;
    top: 1rem;
    inset-inline-start: 1rem;
    z-index: var(--z-skip);
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    outline: 2px solid white;
    outline-offset: 2px;
}

/* ── Section label chip ── */
.section-label {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

/* ── Gradient button ── */
.btn-gradient {
    background: var(--gradient-primary);
    color: white;
    border: none;
    transition: all 0.3s ease;
}
.btn-gradient:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.28);
}
.btn-gradient:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.2);
}
.btn-gradient:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.2);
}

/* ── Section defaults ── */
section { padding: clamp(48px, 8vw, 96px) 0; }
.section-title  { color: var(--dark-2); font-weight: 700; font-size: clamp(2rem,4vw,3rem); letter-spacing: -0.02em; overflow-wrap: break-word; }
.section-subtitle { color: var(--text-muted); font-size: clamp(0.95rem,1.8vw,1.05rem); overflow-wrap: break-word; }

/* ── Bootstrap overrides ── */
.text-primary  { color: var(--primary) !important; }
.bg-primary    { background-color: var(--primary) !important; }
.btn-primary   { background-color: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background-color: var(--primary-dark); border-color: var(--primary-dark); }

/* ── Hover lift ── */
.hover-lift { transition: transform 0.25s ease, box-shadow 0.25s ease; }
.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(var(--primary-rgb), 0.12) !important;
}

/* ── Fade-in animation ── */
.fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── Navbar ── */
.navbar-brand { font-weight: 700; font-size: 1.4rem; font-family: 'Sora', sans-serif; }
.navbar-nav .nav-link { position: relative; transition: color 0.2s; }
.navbar-nav .nav-link:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.25s ease;
}
.navbar-nav .nav-link:not(.btn):hover::after { transform: scaleX(1); }
.navbar-nav .nav-link:not(.btn).active::after { transform: scaleX(1); }
.navbar-nav .nav-link:not(.btn).active { color: var(--primary); opacity: 1; }
.navbar-nav .nav-link:not(.btn):focus-visible { outline: none; }
.navbar-nav .nav-link:not(.btn):focus-visible::after { transform: scaleX(1); }
#mainNavbar { position: fixed !important; top: 12px; left: 1rem; right: 1rem; z-index: var(--z-nav); transition: box-shadow 0.3s ease, transform 0.35s ease, padding 0.3s ease; background: rgba(var(--dark-rgb), 0.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-radius: 16px; border: 1px solid rgba(255,255,255,0.12); overflow: hidden; }
#mainNavbar.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,0.3) !important; padding-top: 0.35rem !important; padding-bottom: 0.35rem !important; border-color: rgba(var(--primary-rgb), 0.2) !important; }
@media (max-width: 575.98px) { #mainNavbar { top: 0.5rem; left: 0.5rem; right: 0.5rem; border-radius: 12px; } }
#mainNavbar .navbar-brand img { transition: height 0.3s ease; }
#mainNavbar.scrolled .navbar-brand img { height: 34px; }
.nav-hamburger { display:flex; flex-direction:column; justify-content:center; align-items:center; gap:5px; width:34px; height:34px; padding:0; }
.ham-bar { display:block; width:22px; height:2px; background:white; border-radius:2px; transition: transform 0.3s ease, opacity 0.3s ease; }
.nav-hamburger[aria-expanded="true"] .ham-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger[aria-expanded="true"] .ham-bar:nth-child(2) { opacity:0; transform: scaleX(0); }
.nav-hamburger[aria-expanded="true"] .ham-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.lang-pill { display:inline-block; padding:0.2rem 0.6rem; background: rgba(255,255,255,0.15); border:1px solid rgba(255,255,255,0.5); border-radius:999px; font-size:0.75rem; font-weight:600; letter-spacing:0.05em; color: white; transition: background 0.2s, border-color 0.2s; }
.nav-lang-toggle:hover .lang-pill { background: rgba(255,255,255,0.25); border-color: rgba(255,255,255,0.8); }

/* ── Form placeholder ── */
.form-control::placeholder { color: rgba(255, 255, 255, 0.55); }

/* ── Bounce (scroll indicator) ── */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(5px); }
}
.anim-bounce { animation: bounce 1.8s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .anim-bounce { animation: none; } }

/* ── Footer ── */
.footer-brand { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 1.3rem; }
.footer-link  { color: rgba(255,255,255,0.72); text-decoration: none; transition: color 0.2s; display: block; margin-bottom: 0.5rem; }
.footer-link:hover { color: white; }

/* ── Dot grid background texture ── */
.dot-grid-bg {
    background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 28px 28px;
}

/* ── Corner mark ── */
.corner-mark { position: relative; }
.corner-mark::before, .corner-mark::after {
    content: '';
    position: absolute;
    width: 20px; height: 20px;
    border-color: rgba(var(--primary-rgb), 0.4);
    border-style: solid;
}
.corner-mark::before { top: 0; right: 0; border-width: 1px 1px 0 0; }
.corner-mark::after  { bottom: 0; left: 0; border-width: 0 0 1px 1px; }
[dir="rtl"] .corner-mark::before { right: auto; left: 0; border-width: 1px 0 0 1px; }
[dir="rtl"] .corner-mark::after  { left: auto; right: 0; border-width: 0 1px 1px 0; }

/* ── Accent underline ── */
.text-accent-line { position: relative; display: inline; }
.text-accent-line::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0; right: 0;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

/* ── Thin separator line ── */
.line-accent {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.5;
    border: none;
}


/* ── WhatsApp FAB ── */
.fab-whatsapp {
    position: fixed;
    inset-inline-end: 1.5rem;
    bottom: 2rem;
    z-index: var(--z-fab);
    width: 56px; height: 56px;
    background: var(--wa-green);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(var(--wa-rgb), 0.4);
    opacity: 0; pointer-events: none;
    transition: opacity var(--dur-slow) ease, transform var(--dur-fast) ease;
    text-decoration: none;
    animation: waPulse 2.8s ease-in-out infinite;
}
.fab-whatsapp.visible { opacity: 1; pointer-events: all; }
.fab-whatsapp:hover   { transform: scale(1.1); }
.fab-icon { font-size: 1.5rem; }
.fab-whatsapp:focus-visible {
    outline: 2px solid white;
    outline-offset: 3px;
    box-shadow: 0 0 0 5px rgba(var(--wa-rgb), 0.35);
}
@keyframes waPulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(var(--wa-rgb), 0.35); }
    50%       { box-shadow: 0 4px 28px rgba(var(--wa-rgb), 0.65); }
}

/* ── Section tag ── */
.section-tag {
    --tag-color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--tag-color);
    margin-bottom: 1rem;
}
.section-tag::before {
    content: '';
    display: inline-block;
    width: 24px; height: 2px;
    background: var(--tag-color);
    border-radius: 1px;
}
[dir="rtl"] .section-tag::before { order: 1; }

/* ── Step number watermark ── */
.step-num-bg {
    position: absolute;
    top: -0.5rem;
    inset-inline-start: 0;
    font-size: clamp(5rem, 10vw, 8rem);
    font-weight: 900;
    font-family: 'Sora', sans-serif;
    color: var(--primary);
    opacity: 0.06;
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

/* ── Stats band divider ── */
.stat-divider {
    width: 1px;
    background: rgba(var(--primary-rgb), 0.2);
    align-self: stretch;
    margin: 1.5rem 0;
}

/* ── Featured project layout ── */
.project-featured {
    display: grid;
    grid-template-columns: 55% 45%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform var(--dur-std) ease, box-shadow var(--dur-std) ease;
}
.project-featured:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 48px rgba(0,0,0,0.10);
}
@media (max-width: 991px) { .project-featured { grid-template-columns: 1fr; } }
[dir="rtl"] .project-featured { direction: rtl; }

/* ── How We Work step card ── */
.step-card {
    border-inline-start: 1px solid var(--border);
    padding: 2rem 1.5rem;
    position: relative;
    transition: background 0.25s ease;
}
.step-card:hover { background: rgba(var(--primary-rgb), 0.025); }
.step-card:first-child { border-inline-start: none; }
@media (max-width: 767px) {
    .step-card { border-inline-start: none; border-top: 1px solid var(--border); }
    .step-card:first-child { border-top: none; }
}

/* ── Testimonial card ── */
.testi-card-v2 {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.testi-card-v2:hover {
    border-color: rgba(var(--primary-rgb), 0.3);
    box-shadow: 0 12px 36px rgba(var(--primary-rgb), 0.10);
    transform: translateY(-2px);
}

/* ── Back to top ── */
.btn-back-top {
    position: fixed;
    inset-inline-start: 1.5rem;
    bottom: 2rem;
    z-index: var(--z-fab);
    width: 44px; height: 44px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    color: white; text-decoration: none;
    box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.3);
}
.btn-back-top.visible { opacity: 1; pointer-events: all; }
.btn-back-top:hover   { color: white; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.45); }
.btn-back-top:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.25);
}

/* ── Stats ── */
#stats { border-top: 1px solid rgba(var(--primary-rgb), 0.2); }
.stat-number {
    font-size: clamp(2.2rem, 4.5vw, 4rem);
    font-weight: 800;
    font-family: 'Sora', sans-serif;
    line-height: 1;
    letter-spacing: -0.02em;
}
.stat-label { font-size: clamp(0.9rem,1.4vw,1rem); letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.7; overflow-wrap: break-word; }
.stat-icon  { font-size: 0.9rem; color: var(--accent); }

/* ── Services ── */
.service-card-v2 {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    background: white;
}
.service-card-v2::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: inline-start;
    transition: transform 0.3s ease;
}
.service-card-v2:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: 0 12px 32px rgba(var(--primary-rgb), 0.09); }
.service-card-v2:hover::before { transform: scaleX(1); }
.service-card-num {
    position: absolute;
    inset-inline-end: 1rem;
    top: 0.5rem;
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 900;
    font-family: 'Sora', sans-serif;
    color: var(--primary);
    opacity: 0.06;
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

/* ── Testimonials ── */
.testimonial-quote-icon {
    position: absolute;
    top: 1rem;
    inset-inline-end: 1.25rem;
    font-size: 4rem;
    color: rgba(var(--primary-rgb), 0.07);
    line-height: 1;
}

/* ── FAQ ── */
.faq-accordion .accordion-item {
    border-radius: 10px !important;
    overflow: hidden;
    margin-bottom: 8px;
    border: 1px solid var(--border) !important;
    box-shadow: none;
}
.faq-accordion .accordion-button {
    background: transparent;
    color: var(--dark);
    font-weight: 600;
    padding: 1.25rem 1.5rem;
    font-family: 'Sora', sans-serif;
    box-shadow: none !important;
}
.faq-accordion .accordion-button:not(.collapsed) { color: var(--primary); background: rgba(var(--primary-rgb), 0.04); }
.faq-accordion .accordion-button::after { display: none; }
.faq-accordion .accordion-toggle-icon {
    margin-inline-start: auto;
    font-size: 1.1rem;
    flex-shrink: 0;
    color: var(--primary);
    transition: transform 0.3s ease;
}
.faq-accordion .accordion-button:not(.collapsed) .accordion-toggle-icon { transform: rotate(45deg); }
.faq-accordion .accordion-item:hover { border-color: rgba(var(--primary-rgb), 0.25) !important; }
.faq-accordion .accordion-body { color: var(--secondary); line-height: 1.7; }
.faq-number {
    width: 26px; height: 26px;
    background: rgba(var(--primary-rgb), .12);
    color: var(--primary);
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 700;
    flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    margin-inline-end: 0.75rem;
}

/* ── Contact ── */
#contact .form-control-lg {
    font-size: 0.95rem;
    padding: 0.65rem 1rem;
}
#contact .form-control {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: white;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
#contact .form-control:focus {
    background: rgba(255,255,255,0.1);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.2);
    color: white;
}
#contact .form-control.is-invalid {
    border-color: var(--color-danger-text);
    background: rgba(var(--danger-rgb), 0.08);
}
#contact .invalid-feedback {
    color: var(--color-danger-text);
}
.contact-info-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex; align-items: center; gap: 1rem;
    transition: background 0.2s ease;
}
.contact-info-card:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.25); }
.contact-info-icon {
    width: 42px; height: 42px;
    border-radius: 10px;
    background: var(--gradient-primary);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.contact-info-icon--whatsapp { background: linear-gradient(135deg, var(--wa-green, #25D366), var(--wa-dark, #128C7E)); }
.contact-label { opacity: 0.6; }
.contact-section-title {
    font-size: clamp(1.85rem, 3.5vw, 2.5rem);
    letter-spacing: -0.02em;
}
.contact-section-subtitle {
    opacity: 0.75;
    font-size: clamp(0.95rem, 1.8vw, 1.05rem);
}

/* ── Contact trust signal ── */
.contact-trust-block {
    padding: 1.25rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-inline-start-width: 3px;
    border-inline-start-color: var(--accent);
    border-radius: 12px;
    margin-top: 1.5rem;
}
.contact-trust-stars { gap: 0.2rem; }
.contact-trust-stars i { font-size: 0.78rem; }
.contact-trust-quote {
    font-size: 0.9rem;
    line-height: 1.65;
    color: rgba(255,255,255,0.85);
    font-style: italic;
    margin: 0.5rem 0;
}
.contact-trust-author {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255,255,255,0.6);
    letter-spacing: 0.02em;
}
.contact-trust-stats {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.42);
    letter-spacing: 0.03em;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 0.75rem;
    margin-top: 0.75rem;
}

/* ── Navigation & footer ── */
#contact { position: relative; }
.nav-logo { height: 44px; max-width: 180px; width: auto; object-fit: contain; }
.footer-heading { font-size: 0.875rem; letter-spacing: 0.08em; padding-inline-start: 0.75rem; border-inline-start: 2px solid var(--primary); }
.footer-hr { border: none; height: 1px; background: linear-gradient(to right, transparent, rgba(var(--primary-rgb), 0.25) 30%, rgba(var(--primary-rgb), 0.25) 70%, transparent); margin-top: 2.5rem; }
footer.section-bg-dark { border-top: 1px solid rgba(var(--primary-rgb), 0.15); }

/* ── Utility: text color tokens ── */
.text-accent { color: var(--accent); }

.testi-thumb-btn img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* ── Portfolio: screenshot placeholder ── */
.pf-placeholder {
    background: var(--gradient-primary);
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pf-placeholder-icon { font-size: 4rem; opacity: 0.4; }

/* ── Hero ── */
.hero-headline    { font-size: clamp(2.8rem,7vw,6rem); font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; overflow-wrap: break-word; }
.hero-subheadline { font-size: clamp(1rem,2vw,1.15rem); opacity: 0.75; line-height: 1.8; max-width: 580px; overflow-wrap: break-word; transition-delay: 0.15s; }
.hero-scroll-label { font-size: 1.05rem; letter-spacing: 0.08em; text-transform: uppercase; }
.hero-cta-group   { transition-delay: 0.3s; }
.hero-scroll-wrap { transition-delay: 0.45s; }

/* ── Hero: browser + phone mockup ── */
.hm-wrap {
    position: relative;
    width: 100%;
    max-width: 560px;
    animation: hmFloat 7s ease-in-out infinite;
}
@keyframes hmFloat {
    0%,100% { transform: translateY(0px); }
    50%      { transform: translateY(-14px); }
}

/* Browser frame */
.hm-browser {
    border-radius: 14px;
    overflow: hidden;
    box-shadow:
        0 50px 100px rgba(0,0,0,0.55),
        0 0 0 1px rgba(255,255,255,0.07),
        inset 0 1px 0 rgba(255,255,255,0.12);
}
.hm-chrome {
    background: #1e2535;
    padding: 11px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.hm-dots { display: flex; gap: 6px; flex-shrink: 0; }
.hm-dot  { width: 12px; height: 12px; border-radius: 50%; }
.hm-dot-r { background: #FF5F57; }
.hm-dot-y { background: #FEBC2E; }
.hm-dot-g { background: #28C840; }
.hm-urlbar {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    padding: 4px 13px;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.35);
    font-family: 'Inter', monospace;
    letter-spacing: 0.01em;
}
.hm-screen { background: #f1f5f9; overflow: hidden; height: 280px; }
@media (prefers-reduced-motion: reduce) {}

/* Fake site — nav */
.hm-sn {
    background: #071E3D;
    height: 34px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    gap: 8px;
}
.hm-sn-logo { width: 58px; height: 8px; background: var(--gradient-primary); border-radius: 4px; }
.hm-sn-gap  { flex: 1; }
.hm-sn-link { width: 32px; height: 6px; background: rgba(255,255,255,0.18); border-radius: 3px; }
.hm-sn-btn  { width: 46px; height: 18px; background: var(--accent); border-radius: 9px; margin-inline-start: 5px; }

/* Fake site — hero */
.hm-sh {
    background: linear-gradient(140deg, #071E3D 0%, #0d3468 100%);
    padding: 20px 18px 22px;
}
.hm-sh-tag { width: 66px; height: 7px; background: rgba(61,174,233,0.45); border-radius: 3px; margin-bottom: 11px; }
.hm-sh-h1  { width: 82%; height: 13px; background: rgba(255,255,255,0.9); border-radius: 5px; margin-bottom: 6px; }
.hm-sh-h2  { width: 58%; height: 13px; background: var(--gradient-primary); border-radius: 5px; margin-bottom: 11px; }
.hm-sh-p   { width: 92%; height: 6px; background: rgba(255,255,255,0.22); border-radius: 3px; margin-bottom: 5px; }
.hm-sh-p-s { width: 62%; }
.hm-sh-btns     { display: flex; gap: 7px; margin-top: 13px; }
.hm-sh-btn-a    { width: 72px; height: 20px; background: var(--accent); border-radius: 10px; }
.hm-sh-btn-b    { width: 60px; height: 20px; border: 1px solid rgba(255,255,255,0.28); border-radius: 10px; }

/* Fake site — cards row */
.hm-sc {
    background: #f1f5f9;
    padding: 14px 12px;
    display: flex;
    gap: 8px;
}
.hm-sc-card {
    flex: 1;
    background: white;
    border-radius: 9px;
    padding: 11px 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}
.hm-sc-ico { width: 24px; height: 24px; border-radius: 6px; background: var(--gradient-primary); margin-bottom: 7px; }
.hm-sc-t   { width: 72%; height: 6px; background: #1e293b; border-radius: 3px; margin-bottom: 5px; opacity: 0.75; }
.hm-sc-d   { width: 88%; height: 5px; background: #94a3b8; border-radius: 3px; margin-bottom: 4px; }
.hm-sc-d-s { width: 55%; }

/* Fake site — second section (scrolls into view) */
.hm-s2 {
    background: white;
    padding: 16px 12px;
}
.hm-s2-label { width: 44px; height: 6px; background: rgba(var(--primary-rgb),0.25); border-radius: 3px; margin-bottom: 12px; }
.hm-s2-row   { display: flex; gap: 7px; margin-bottom: 14px; }
.hm-s2-card  { flex: 1; height: 36px; background: #f1f5f9; border-radius: 7px; }
.hm-s2-card-accent { background: var(--gradient-primary); opacity: 0.5; }
.hm-s2-bar-row { display: flex; flex-direction: column; gap: 5px; }
.hm-s2-bar { height: 6px; background: rgba(var(--primary-rgb),0.15); border-radius: 3px; }

/* Floating phone */
.hm-phone {
    position: absolute;
    bottom: -34px;
    inset-inline-end: -34px;
    width: 136px;
    background: #14192a;
    border-radius: 26px;
    padding: 12px 10px 14px;
    box-shadow:
        0 24px 60px rgba(0,0,0,0.5),
        0 0 0 1px rgba(255,255,255,0.09),
        inset 0 1px 0 rgba(255,255,255,0.1);
    transform: rotate(5deg);
}
.hm-ph-notch {
    width: 38px; height: 6px;
    background: rgba(0,0,0,0.45);
    border-radius: 3px;
    margin: 0 auto 8px;
}
.hm-ph-screen {
    background: #071E3D;
    border-radius: 14px;
    padding: 10px 9px;
    overflow: hidden;
}
.hm-ph-header { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.hm-ph-av     { width: 20px; height: 20px; border-radius: 50%; background: var(--gradient-primary); flex-shrink: 0; }
.hm-ph-nm     { width: 46px; height: 6px; background: rgba(255,255,255,0.65); border-radius: 3px; }
.hm-ph-row    { width: 100%; height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; margin-bottom: 5px; }
.hm-ph-row-accent { background: rgba(61,174,233,0.35); width: 75%; }
.hm-ph-row-short  { width: 55%; }
.hm-ph-bars   { display: flex; align-items: flex-end; gap: 4px; height: 32px; margin-top: 9px; }
.hm-ph-bar    { flex: 1; border-radius: 2px 2px 0 0; background: rgba(61,174,233,0.35); }
.hm-ph-bar-hi { background: rgba(61,174,233,0.65); }
.hm-ph-bar-top{ background: #3DAEE9; }

/* Floating stat badges */
.hm-badge {
    position: absolute;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 13px;
    padding: 8px 14px 8px 8px;
    display: flex;
    align-items: center;
    gap: 9px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.18);
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
}
.hm-badge strong {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}
.hm-badge span {
    font-size: 0.67rem;
    color: #64748b;
}
.hm-badge-ico {
    width: 32px; height: 32px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem;
    color: white;
    flex-shrink: 0;
}
.hm-badge-ico-blue  { background: var(--gradient-primary); }
.hm-badge-ico-amber { background: linear-gradient(135deg, #F97316, #ef4444); }

.hm-badge-top {
    top: -18px;
    inset-inline-start: -18px;
    animation: hmBadgeFloat 5s ease-in-out infinite;
}
.hm-badge-bot {
    bottom: 52px;
    inset-inline-start: -22px;
    animation: hmBadgeFloat 5s ease-in-out 1.8s infinite;
}
@keyframes hmBadgeFloat {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(-9px); }
}

@media (prefers-reduced-motion: reduce) {
    .hm-wrap, .hm-badge-top, .hm-badge-bot { animation: none; }
}

/* Hero blob positions */
.section-bg-hero .blob-a { width: 560px; height: 560px; top: -100px; inset-inline-end: -80px; }
.section-bg-hero .blob-b { width: 380px; height: 380px; bottom: 40px; inset-inline-start: -60px; }

/* ── Card typography ── */
.card-title-sm { font-weight: 700; font-size: clamp(1rem,1.8vw,1.15rem); letter-spacing: -0.01em; margin-bottom: 0.5rem; overflow-wrap: break-word; }
.card-desc     { color: var(--text-muted); font-size: clamp(0.9rem,1.5vw,1rem); line-height: 1.75; margin: 0; }
.icon-sm       { font-size: 1.1rem; }

/* ── Testimonials typography ── */
.testi-quote-text   { line-height: 1.7; font-size: clamp(0.9rem,1.6vw,1rem); color: var(--text-body); }
.testi-author-name  { font-size: clamp(0.9rem,1.5vw,1rem); font-weight: 700; }
.testi-author-role  { font-size: clamp(0.875rem,1.4vw,0.9rem); color: var(--text-muted); }

/* ── Portfolio ── */
.portfolio-project-title { font-size: clamp(1.4rem,2.5vw,2rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.75rem; }
.feature-tag { font-size: 0.875rem; padding: 0.25rem 0.75rem; background: rgba(var(--primary-rgb), 0.07); color: var(--primary); border-radius: 4px; font-weight: 500; overflow-wrap: break-word; }

/* ================================================================
   Section Backgrounds
   ================================================================ */
.section-bg-white   { background: white; }
.section-bg-surface { background: var(--surface); }
.section-bg-dark    { background: var(--dark); }
.section-bg-hero    {
    background: var(--gradient-hero);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}
#hero { padding-top: 90px; }

/* Hero canvas */
.hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}
.section-bg-primary { background: var(--gradient-primary); }

/* ================================================================
   Visual FX Layer — Blobs · Glass · Stagger · Particles · Hover
   ================================================================ */

/* Animated blobs */
@keyframes blobFloat {
    0%,100% { transform:translate(0,0) scale(1); }
    33%     { transform:translate(40px,-30px) scale(1.08); }
    66%     { transform:translate(-25px,20px) scale(.95); }
}
@keyframes blobFloat2 {
    0%,100% { transform:translate(0,0) scale(1); }
    33%     { transform:translate(-35px,25px) scale(1.06); }
    66%     { transform:translate(30px,-18px) scale(.96); }
}
.blob {
    position: absolute; border-radius: 50%; filter: blur(72px);
    pointer-events: none; user-select: none; will-change: transform;
}
.blob-a {
    animation: blobFloat  15s ease-in-out infinite;
    background: radial-gradient(circle, var(--blob-a, rgba(109,40,217,.10)) 0%, transparent 70%);
}
.blob-b {
    animation: blobFloat2 20s ease-in-out infinite;
    background: radial-gradient(circle, var(--blob-b, rgba(212,168,83,.07)) 0%, transparent 70%);
}

/* Card stagger entrance */
.stagger-1 { transition-delay: .06s; }
.stagger-2 { transition-delay: .16s; }
.stagger-3 { transition-delay: .26s; }
.stagger-4 { transition-delay: .36s; }

/* Glassmorphism */
.glass {
    background: rgba(255,255,255,.05) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255,255,255,.14) !important;
}


/* Portfolio: image zoom + hover overlay */
.portfolio-img-area { overflow: hidden; position: relative; }
.portfolio-img-area img {
    transition: transform .55s cubic-bezier(.4,0,.2,1);
    will-change: transform;
}
.project-featured:hover .portfolio-img-area img { transform: scale(1.06); }
.portfolio-img-overlay {
    position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(180deg,transparent 55%,rgba(9,9,14,.6) 100%);
    opacity: 0; transition: opacity .4s ease; pointer-events: none;
}
.project-featured:hover .portfolio-img-overlay { opacity: 1; }

/* Stats: floating particles */
@keyframes particleDrift {
    0%,100% { transform: translateY(0) translateX(0); opacity: .2; }
    50%      { transform: translateY(-20px) translateX(10px); opacity: .65; }
}
.stat-particle {
    position: absolute; width: 5px; height: 5px; border-radius: 50%;
    background: rgba(255,255,255,.55);
    animation: particleDrift var(--dur,4s) ease-in-out infinite;
    animation-delay: var(--delay,0s); pointer-events: none;
}

/* Services: gradient icon box */
.service-icon-lg {
    width: 56px; height: 56px; border-radius: 12px;
    background: var(--gradient-primary);
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0; margin-bottom: 1.25rem;
    box-shadow: 0 8px 24px rgba(var(--primary-rgb), .12);
    transition: transform var(--dur-std) ease, box-shadow var(--dur-std) ease;
}
.service-icon-lg i { font-size: 1.5rem; color: white; }
#services { background: var(--surface); }

.service-card-v2:hover .service-icon-lg {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 14px 36px rgba(var(--primary-rgb), .2);
}

.svc-subtitle { max-width: 360px; margin-top: 1rem; }

/* ── How We Work: dark redesign ── */
.hww-section-tag {
    display: inline-flex; align-items: center; gap: 0.75rem;
    font-size: 0.78rem; font-weight: 700; letter-spacing: 0.18em;
    text-transform: uppercase; color: rgba(255,255,255,.55);
    margin-bottom: 1.25rem;
}
.hww-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent); display: inline-block; flex-shrink: 0;
}
.hww-headline {
    font-size: clamp(1.85rem, 3.5vw, 2.75rem);
    font-weight: 800; letter-spacing: -0.02em;
    color: white; line-height: 1.2;
}
.hww-circle {
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--gradient-primary);
    display: flex; align-items: center; justify-content: center;
    position: relative; z-index: 2;
    box-shadow: 0 8px 28px rgba(var(--primary-rgb), .2);
    margin-bottom: 1rem;
    transition: transform var(--dur-std) ease, box-shadow var(--dur-std) ease;
}
.hww-circle i { font-size: 1.5rem; color: white; }
.hww-circle:hover {
    transform: scale(1.1);
    box-shadow: 0 14px 40px rgba(var(--primary-rgb), .35);
}
.hww-num {
    font-size: clamp(3.5rem, 6vw, 5rem);
    font-weight: 900; font-family: 'Sora', sans-serif;
    color: white; line-height: 1; letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}
.hww-title {
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    font-weight: 700; color: white; margin-bottom: 0.6rem;
    overflow-wrap: break-word;
}
.hww-desc {
    font-size: 0.9rem; color: rgba(255,255,255,.5);
    line-height: 1.75; max-width: 220px; margin: 0 auto;
    overflow-wrap: break-word;
}
/* ── HWW: SVG rope wrapper ── */
.hww-connector-wrap {
    position: absolute;
    top: 7rem;
    inset-inline-start: 12.5%;
    inset-inline-end: 12.5%;
    height: 24px;
    z-index: 1;
    overflow: visible;
}

/* Rope path stroke — default (dark bg) */
.hww-rope {
    stroke: rgba(255,255,255,.42);
}

/* SVG fills 100% of wrapper */
.hww-connector-svg {
    width: 100%; height: 100%;
    overflow: visible;
    display: block;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
    mask-image:         linear-gradient(90deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
}

/* Knot ring markers (CSS circles — never distorted) */
.hww-knot {
    position: absolute;
    top: 6px;
    transform: translate(-50%, -50%);
    width: 10px; height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.5);
    background: transparent;
    opacity: 0;
    transition: opacity .35s ease;
    z-index: 2;
}
.hww-knot:nth-of-type(1) { left: 16.7%; }
.hww-knot:nth-of-type(2) { left: 50%;   transition-delay: .45s; }
.hww-knot:nth-of-type(3) { left: 83.3%; transition-delay: .75s; }
.hww-knot:nth-of-type(4) { transition-delay: 1.05s; }

/* Pulse dot */
.hww-connector-wrap::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 8px; height: 8px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 0 8px 3px rgba(255,255,255,.5), 0 0 18px 5px rgba(255,255,255,.2);
    animation: connectorPulse 3s ease-in-out infinite;
    animation-play-state: paused;
}
.hww-card {
    background: white;
    border: 1px solid rgba(var(--primary-rgb), .07);
    border-radius: 16px;
    padding: 2rem 1.5rem 1.75rem;
    box-shadow: 0 4px 20px rgba(var(--primary-rgb), .07), 0 1px 4px rgba(0,0,0,.04);
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.hww-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(var(--primary-rgb), .13), 0 4px 12px rgba(0,0,0,.06);
    border-color: rgba(var(--primary-rgb), .18);
}
@media (max-width: 991.98px) {
    .hww-step:not(:last-child)::after {
        content: '';
        display: block;
        width: 2px;
        height: 28px;
        background: linear-gradient(180deg, rgba(var(--primary-rgb), .3), transparent);
        margin: 0.25rem auto 0;
    }
}

/* How We Work — section background depth */
#how-we-work {
    background:
        radial-gradient(ellipse 70% 55% at 50% 105%, rgba(var(--primary-rgb), .06) 0%, transparent 65%),
        radial-gradient(circle, rgba(var(--primary-rgb), .04) 1px, transparent 1px),
        var(--surface);
    background-size: auto, 32px 32px, auto;
}

/* How We Work — light background overrides (section moved to surface) */
#how-we-work .hww-section-tag   { color: var(--text-muted); }
#how-we-work .hww-headline      { color: var(--dark-2); }
#how-we-work .hww-num           { color: rgba(var(--primary-rgb), .06); }
#how-we-work .hww-title         { color: var(--dark-2); }
#how-we-work .hww-desc          { color: var(--text-muted); }
/* Light-bg (#how-we-work) overrides */
#how-we-work .hww-rope {
    stroke: rgba(var(--primary-rgb), .52);
}
#how-we-work .hww-knot {
    border-color: rgba(var(--primary-rgb), .6);
    background: white;
    box-shadow: 0 0 6px rgba(var(--primary-rgb), .2);
}
#how-we-work .hww-connector-wrap::after {
    background: var(--primary);
    box-shadow: 0 0 8px 3px rgba(var(--primary-rgb), .45), 0 0 18px 5px rgba(var(--primary-rgb), .2);
}


/* How We Work: gradient icon box (legacy) */
.step-icon-box {
    width: 52px; height: 52px; border-radius: 12px;
    background: var(--gradient-primary);
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0; margin-bottom: 1.25rem;
    position: relative; z-index: 1;
    box-shadow: 0 8px 24px rgba(var(--primary-rgb), .3);
    transition: transform var(--dur-std) ease, box-shadow var(--dur-std) ease;
}
.step-icon-box i { font-size: 1.3rem; color: white; }
.step-card:hover .step-icon-box {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 14px 36px rgba(var(--primary-rgb), .5);
}

/* Testimonial: left accent bar on hover */
.testi-card-v2::before {
    content: ''; position: absolute;
    inset-inline-start: 0; top: 18%; bottom: 18%;
    width: 3px; background: var(--gradient-primary);
    border-radius: 0 3px 3px 0; opacity: 0;
    transition: opacity .3s ease;
}
.testi-card-v2:hover::before { opacity: 1; }

/* ===== Portfolio: number badge ===== */
.portfolio-num-badge {
    position: absolute; top: 14px; inset-inline-start: 14px; z-index: 3;
    font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em;
    color: white; background: var(--gradient-primary);
    padding: 4px 10px; border-radius: 20px;
}

/* ===== Portfolio: hover overlay ===== */
.portfolio-img-overlay {
    position: absolute; inset: 0; z-index: 2;
    background: rgba(9,9,14,.55);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity .3s ease;
}
.portfolio-img-overlay .overlay-label {
    color: white; font-weight: 700; font-size: 0.95rem; pointer-events: none;
}
.portfolio-img-area:hover .portfolio-img-overlay { opacity: 1; }

/* ================================================================
   Visual FX Layer 2 — Scroll Progress · Directional Anims ·
   Typewriter · Spotlight · Pulse Rings · Line Draw · Clip Reveal
   ================================================================ */

/* ── Effect 1: Scroll Progress Bar ── */
#scrollProgressBar {
    position: fixed; top: 0; left: 0; z-index: var(--z-progress);
    height: 3px; width: 0%;
    background: var(--gradient-primary);
    transition: width 0.1s linear;
    pointer-events: none;
}

/* ── Effect 2: Directional scroll animations ── */
.slide-left  { opacity: 0; transform: translateX(-24px); transition: opacity .55s ease, transform .55s ease; }
.slide-right { opacity: 0; transform: translateX(24px);  transition: opacity .55s ease, transform .55s ease; }
.zoom-in     { opacity: 0; transform: scale(.95);        transition: opacity .5s ease, transform .5s ease; }
.slide-left.visible, .slide-right.visible, .zoom-in.visible { opacity: 1; transform: none; }


/* ── Effect 5: Pulse rings on stats ── */
@keyframes ringPulse {
    0%   { transform: scale(1);   opacity: .7; }
    100% { transform: scale(2.2); opacity: 0;  }
}
.stat-ring {
    position: absolute; inset: -8px; border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.25);
    animation: ringPulse 1.8s ease-out infinite;
    pointer-events: none;
}
.stat-ring-2 { animation-delay: 0.6s; }
.stat-ring-3 { animation-delay: 1.2s; }

/* ── Effect 6: Connector line draw + pulse dot ── */
@keyframes connectorPulse {
    0%   { left: 0%;   opacity: 1; }
    92%  { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}
/* stroke-dashoffset handles the draw — scaleX removed */
#hwwPath {
    stroke-dasharray: 9999;
    stroke-dashoffset: 9999;  /* hide rope before JS sets exact pathLen */
    transition: stroke-dashoffset 1.2s cubic-bezier(.4, 0, .2, 1);
}
#hwwLine.drawn .hww-knot  { opacity: 1; }
#hwwLine.drawn::after     { animation-play-state: running; }

/* RTL: mirror the whole wrapper so draw goes right-to-left */
[dir="rtl"] #hwwLine { transform: scaleX(-1); }

/* ── Effect 7: Clip-path image reveal ── */
.clip-reveal {
    clip-path: inset(0 100% 0 0);
    transition: clip-path .9s cubic-bezier(.4, 0, .2, 1);
}
[dir="rtl"] .clip-reveal { clip-path: inset(0 0 0 100%); }
.clip-reveal.visible { clip-path: inset(0 0% 0 0); }
[dir="rtl"] .clip-reveal.visible { clip-path: inset(0 0 0 0%); }

/* ── Accessibility: reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .slide-left, .slide-right, .zoom-in, .clip-reveal,
    #hwwLine, .hww-connector-wrap::after, .stat-ring, #scrollProgressBar {
        transition: none !important; animation: none !important;
        opacity: 1 !important; transform: none !important;
        clip-path: none !important;
    }
    .fab-whatsapp  { animation: none !important; }
    .blob-a, .blob-b { animation: none !important; }
    .preloader-fill, .card-glow-wrap::after { animation: none !important; }
}

/* ================================================================
   Project Detail Page
   ================================================================ */

/* ── Browser mockup frame ── */
.project-browser-chrome { border-radius: 12px; overflow: hidden; box-shadow: 0 24px 64px rgba(0,0,0,.45); }
.project-browser-bar {
    background: #1E2436; padding: 10px 16px;
    display: flex; align-items: center; gap: 8px;
}
.project-browser-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.project-browser-dot:nth-child(1) { background: #FF5F57; }
.project-browser-dot:nth-child(2) { background: #FFBD2E; }
.project-browser-dot:nth-child(3) { background: #28CA41; }
.project-browser-url {
    flex: 1; background: rgba(255,255,255,.08); border-radius: 4px;
    padding: 3px 10px; font-size: .72rem; color: rgba(255,255,255,.4);
    font-family: monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.project-browser-img { display: block; width: 100%; max-height: 520px; object-fit: cover; }

/* ── Benefit card on dark bg ── */
.benefit-card-dark {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 12px; padding: 1.75rem;
    transition: background .25s ease, border-color .25s ease, transform .25s ease;
}
.benefit-card-dark:hover {
    background: rgba(255,255,255,.07);
    border-color: rgba(var(--primary-rgb), .45);
    transform: translateY(-3px);
}
.benefit-icon-dark {
    width: 48px; height: 48px; border-radius: 10px;
    background: rgba(var(--primary-rgb), .2); border: 1px solid rgba(var(--primary-rgb), .35);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1rem; color: var(--accent); font-size: 1.25rem;
    transition: background .3s ease, transform .3s ease;
}
.benefit-card-dark:hover .benefit-icon-dark {
    background: var(--gradient-primary);
    transform: scale(1.08) rotate(-4deg);
    color: white;
}

/* ── Hero stat badges (project detail page) ── */
.hero-tech-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.1rem;
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 999px;
    color: rgba(255,255,255,.88);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* ── Section-label variant for dark bg ── */
.section-label-dark {
    display: inline-block; padding: .35rem 1rem;
    background: rgba(var(--accent-rgb), .12); color: var(--accent);
    border: 1px solid rgba(var(--accent-rgb), .25);
    border-radius: 999px; font-size: 0.875rem; font-weight: 600;
    letter-spacing: .08em; text-transform: uppercase; margin-bottom: 1rem;
}

/* ── Carousel pill dots ── */
.carousel-pill-dots { display: flex; gap: 6px; justify-content: center; padding: 12px 0 4px; }
.carousel-pill-dots button {
    width: 8px; height: 8px; border-radius: 50%; border: none;
    background: rgba(255,255,255,.25); padding: 0; cursor: pointer;
    transition: background .2s ease, width .2s ease; flex-shrink: 0;
}
.carousel-pill-dots button.active { background: var(--accent); width: 24px; border-radius: 4px; }

/* ================================================================
   Testimonials: Spotlight Carousel
   ================================================================ */

/* Section wrapper — subtle radial glow overlay */
.testi-spotlight-wrap {
    background: var(--surface);
    position: relative;
    overflow: hidden;
}
.testi-spotlight-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 60% at 50% 80%, rgba(var(--primary-rgb), 0.07) 0%, transparent 70%);
    pointer-events: none;
}

/* Carousel container */
.testi-spotlight-carousel {
    position: relative;
    padding: 2rem 3.5rem;
    text-align: center;
}


/* CSS Grid stacking trick — all slides occupy the same cell */
.testi-slides-wrap {
    display: grid;
    position: relative;
    z-index: 1;
}

/* Individual slide */
.testi-slide {
    grid-area: 1 / 1;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
}
.testi-slide.is-active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Large centered quote text */
.testi-spot-quote {
    font-size: clamp(1.1rem, 2.2vw, 1.45rem);
    font-style: italic;
    max-width: 680px;
    overflow-wrap: break-word;
    margin: 0 auto;
    color: var(--dark-2);
    line-height: 1.75;
    border: none;
    padding: 0;
}

/* Avatar with gradient ring */
.testi-spot-avatar-ring {
    position: relative;
    display: inline-block;
}
.testi-spot-avatar-ring::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: var(--gradient-primary);
    z-index: 0;
}
.testi-spot-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    z-index: 1;
    border: 3px solid white;
    display: block;
}

/* Author name and role */
.testi-spot-name {
    font-weight: 700;
    color: var(--dark-2);
    font-size: 1rem;
}
.testi-spot-role {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Prev / Next ghost arrow buttons */
.testi-arrow-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--dark-2);
    transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    z-index: 2;
    font-size: 1.1rem;
}
.testi-arrow-btn:hover,
.testi-arrow-btn:focus-visible {
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.2);
}
.testi-arrow-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.testi-arrow-prev { inset-inline-start: -1.5rem; }
.testi-arrow-next { inset-inline-end:   -1.5rem; }
[dir="rtl"] .testi-arrow-btn i { transform: scaleX(-1); }

/* Thumbnail avatar navigation */
.testi-thumbs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}
.testi-thumb-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid transparent;
    padding: 0;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.25s ease, transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    background: transparent;
    overflow: hidden;
    flex-shrink: 0;
}
.testi-thumb-btn.is-active {
    opacity: 1;
    transform: scale(1.18);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.25);
}
.testi-thumb-btn:hover:not(.is-active) { opacity: 0.7; }

/* Auto-play progress bar */
.testi-progress-bar {
    height: 2px;
    background: var(--border);
    margin-top: 2rem;
    overflow: hidden;
    border-radius: 1px;
}
.testi-progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    width: 0%;
}

/* Responsive: arrows move inward on tablet */
@media (max-width: 991px) {
    .testi-arrow-prev { inset-inline-start: 0; }
    .testi-arrow-next { inset-inline-end:   0; }
    .testi-spotlight-carousel { padding-inline: 3rem; }
}

/* Responsive: arrows hidden on mobile — thumbs suffice */
@media (max-width: 576px) {
    .testi-arrow-btn { display: none; }
    .testi-spotlight-carousel { padding-inline: 0.5rem; }
}

/* Accessibility: reduced motion */
@media (prefers-reduced-motion: reduce) {
    .testi-slide          { transition: none !important; }
    .testi-progress-fill  { transition: none !important; }
}

/* ================================================================
   Portfolio: Typographic Accordion
   ================================================================ */

.pf-accord-section {
    background: var(--dark);
    position: relative;
    overflow: hidden;
}

/* Section-tag color overrides — uses existing --tag-color custom property */
.pf-accord-section .section-tag,
#contact .section-tag {
    --tag-color: var(--accent);
}

.pf-accord-list {
    margin-top: 1rem;
}

.pf-accord-item {
    position: relative;
}

/* ── Header button ── */
.pf-accord-head {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    padding: 1.75rem 0;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: start;
    transition: background 0.2s ease;
    border-radius: 4px;
}
.pf-accord-head:hover {
    background: rgba(255,255,255,0.025);
}
.pf-accord-head:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ── Number chip ── */
.pf-accord-num {
    font-family: monospace;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--accent);
    flex-shrink: 0;
}

/* ── Project title ── */
.pf-accord-title {
    font-family: 'Sora', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 700;
    color: rgba(255,255,255,0.65);
    flex: 1;
    min-width: 0;
    overflow-wrap: break-word;
    transition: color 0.25s ease;
    line-height: 1.2;
}
.pf-accord-item:hover .pf-accord-title {
    color: white;
}
.pf-accord-item.is-open .pf-accord-title {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Category pill ── */
.pf-accord-cat {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255,255,255,0.65); /* was 0.35 — failed WCAG AA (~2.5:1); now ~5.2:1 */
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 999px;
    padding: 0.3rem 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.pf-accord-item.is-open .pf-accord-cat {
    color: var(--accent);
    background: rgba(var(--accent-rgb), 0.1);
    border-color: var(--accent);
}

/* ── Toggle icon circle ── */
.pf-accord-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: transform 0.35s ease, border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}
.pf-accord-item.is-open .pf-accord-toggle {
    transform: rotate(45deg);
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(var(--accent-rgb), 0.1);
}

/* ── CSS Grid height animation trick ── */
.pf-accord-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.pf-accord-item.is-open .pf-accord-body {
    grid-template-rows: 1fr;
}

.pf-accord-inner {
    overflow: hidden;
    position: relative;
}

.pf-accord-content {
    padding: 1rem 0 2.5rem;
}

/* ── Ghost watermark ── */
.pf-accord-watermark {
    position: absolute;
    inset-inline-end: 0;
    top: 0;
    font-size: clamp(6rem, 14vw, 12rem);
    font-weight: 900;
    font-family: 'Sora', sans-serif;
    color: white;
    opacity: 0.03;
    pointer-events: none;
    user-select: none;
    line-height: 1;
}

/* ── Description text ── */
.pf-accord-desc {
    color: rgba(255,255,255,0.6);
    font-size: 0.95rem;
    line-height: 1.75;
    margin-bottom: 1.25rem;
}

/* ── Separator line ── */
.pf-sep {
    height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,0.08), transparent);
}
[dir="rtl"] .pf-sep {
    background: linear-gradient(270deg, rgba(255,255,255,0.08), transparent);
}

/* ── Feature tag on dark background ── */
.pf-accord-section .feature-tag {
    background: rgba(var(--primary-rgb), 0.15);
    color: rgba(255,255,255,0.75);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .pf-accord-body,
    .pf-accord-toggle,
    .pf-accord-title { transition: none !important; }
}

/* ================================================================
   Project Detail Page — Elite Enhancements
   ================================================================ */

/* ── Live dot with pulsing ring ── */
@keyframes livePulse {
    0%   { transform: scale(1);   opacity: .65; }
    70%  { transform: scale(2.4); opacity: 0;   }
    100% { transform: scale(2.4); opacity: 0;   }
}
.live-dot {
    display: inline-block;
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #28CA41;
    flex-shrink: 0;
}
.live-dot::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #28CA41;
    opacity: .65;
    animation: livePulse 2.2s ease-out infinite;
}

/* ── Hero preview card ── */
.project-hero-preview {
    width: 100%;
    max-width: 560px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 32px 64px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.08);
    transform: perspective(1100px) rotateY(-6deg) rotateX(3deg);
    transition: transform .4s ease, box-shadow .4s ease;
    will-change: transform;
}
.project-hero-preview:hover {
    transform: perspective(1100px) rotateY(-2deg) rotateX(1deg) translateY(-6px);
    box-shadow: 0 40px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.12);
}
[dir="rtl"] .project-hero-preview {
    transform: perspective(1100px) rotateY(6deg) rotateX(3deg);
}
[dir="rtl"] .project-hero-preview:hover {
    transform: perspective(1100px) rotateY(2deg) rotateX(1deg) translateY(-6px);
}
/* ── Carousel RTL: restore LTR float mechanics ── */
/* Bootstrap RTL reverses carousel-item float (left→right) which conflicts with
   our html[dir=rtl]{direction:ltr} scrollbar hack. Revert slide stacking to LTR.
   Bootstrap RTL still correctly positions controls (prev right, next left) and
   flips the arrow icons — only the internal slide mechanics are reverted. */
[dir="rtl"] .carousel-item {
    float: left !important;
    margin-right: -100% !important;
    margin-left: 0 !important;
}
[dir="rtl"] .carousel-item-next:not(.carousel-item-start),
[dir="rtl"] .active.carousel-item-end {
    transform: translateX(100%) !important;
}
[dir="rtl"] .carousel-item-prev:not(.carousel-item-end),
[dir="rtl"] .active.carousel-item-start {
    transform: translateX(-100%) !important;
}
.project-hero-preview__bar {
    background: #1E2436;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.project-hero-preview__url {
    flex: 1;
    background: rgba(255,255,255,.07);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: .68rem;
    color: rgba(255,255,255,.35);
    font-family: monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-inline-start: 4px;
}
.project-hero-preview__img {
    display: block;
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    object-position: top;
}

/* ── Screenshots: radial glow wrapper ── */
.project-browser-glow { position: relative; }
.project-browser-glow::before {
    content: '';
    position: absolute;
    inset: -40px -20px;
    background: radial-gradient(ellipse 70% 60% at 50% 50%,
        rgba(var(--primary-rgb), .18) 0%,
        rgba(6,182,212,.06) 50%,
        transparent 75%);
    pointer-events: none;
    z-index: 0;
}
.project-browser-glow .project-browser-chrome {
    position: relative;
    z-index: 1;
}

/* ── Features: numbered gradient chip ── */
.feature-num-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--gradient-primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    font-family: 'Sora', monospace;
    letter-spacing: 0.04em;
    flex-shrink: 0;
    margin-top: 2px;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), .2);
}

/* ── Business benefits: dedicated light card ── */
.benefit-card-light {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
    background: white;
    transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.benefit-card-light::before {
    content: '';
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    inset-inline-end: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: inline-start;
    transition: transform .3s ease;
}
.benefit-card-light:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(var(--primary-rgb), .09);
}
.benefit-card-light:hover::before { transform: scaleX(1); }
.benefit-card-light__num {
    position: absolute;
    inset-inline-end: 1rem;
    top: 0.5rem;
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 900;
    font-family: 'Sora', sans-serif;
    color: var(--primary);
    opacity: 0.06;
    line-height: 1;
    pointer-events: none;
    user-select: none;
}
.benefit-card-light .service-icon-lg { margin-bottom: 1rem; }

/* ── Related project: view link ── */
.related-view-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.04em;
    transition: gap .2s ease, color .2s ease;
}
.hover-lift:hover .related-view-link {
    gap: 0.55rem;
    color: white;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .live-dot::after { animation: none !important; }
    .project-hero-preview,
    .project-hero-preview:hover { transform: none !important; transition: none !important; }
}

/* ── Hero bottom wave (dark → white) ── */
.hero-wave-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    line-height: 0;
    pointer-events: none;
    z-index: 2;
}
[dir="rtl"] .hero-wave-bottom { transform: scaleX(-1); }

/* ── Client benefit dark card: ghost number watermark ── */
.benefit-card-dark__num {
    position: absolute;
    inset-inline-end: 1rem;
    top: 0.5rem;
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 900;
    font-family: 'Sora', sans-serif;
    color: var(--primary);
    opacity: 0.12;
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

/* ── Contact form alert ── */
#contact-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem 1.1rem;
    border-radius: 10px;
    border: none;
    border-left: 4px solid;
    font-size: 0.92rem;
    line-height: 1.5;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
#contact-alert i {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}
#contact-alert.alert-success {
    border-left-color: var(--color-success, #10B981);
    color: var(--color-success-text, #6EE7B7);
}
#contact-alert.alert-danger {
    border-left-color: var(--color-danger, #EF4444);
    color: var(--color-danger-text, #FCA5A5);
}

/* ── Cursor glow trail ── */
#cursorGlow {
    position: fixed;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.10) 0%, transparent 65%);
    pointer-events: none;
    z-index: var(--z-cursor);
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
    will-change: transform; /* GPU-composited: correct usage with transform */
    /* Position offset (-210px = half of 420px) handled in JS via transform */
}
@media (prefers-reduced-motion: reduce) { #cursorGlow { display: none; } }
@media (hover: none) { #cursorGlow { display: none; } }

/* ── Preloader ── */
#preloader {
    position: fixed; inset: 0; z-index: var(--z-preloader);
    background: var(--gradient-hero);
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.55s ease, visibility 0.55s ease;
}
#preloader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-inner { text-align: center; }
.preloader-logo { height: 52px; max-width: 200px; object-fit: contain; margin-bottom: 1.5rem; }
.preloader-name { font-family: 'Sora', sans-serif; font-size: 2rem; font-weight: 800; }
.preloader-bar {
    width: 160px; height: 2px; background: rgba(255,255,255,0.1);
    border-radius: 2px; margin: 1.25rem auto 0; overflow: hidden;
}
.preloader-fill {
    height: 100%; width: 0%;
    background: var(--gradient-primary);
    border-radius: 2px;
    animation: preloaderFill 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes preloaderFill { to { width: 100%; } }

/* ── Animated gradient border on service cards ── */
@property --ga {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}
@keyframes spinGradient { to { --ga: 360deg; } }

.card-glow-wrap {
    position: relative;
    border-radius: 10px;
}
.card-glow-wrap::after {
    content: '';
    position: absolute;
    inset: -1.5px;
    border-radius: 11px;
    background: conic-gradient(from var(--ga), var(--primary), var(--accent), var(--primary));
    animation: spinGradient 3.5s linear infinite;
    opacity: 0;
    z-index: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
.card-glow-wrap:hover::after { opacity: 0.4; }
.service-card-v2 { position: relative; z-index: 1; }

/* ============================================================
   English locale — font family and size overrides
   ============================================================ */

/* Swap font priority: Inter first for Latin text */
html[lang="en"] body {
    font-family: 'Inter', 'IBM Plex Sans Arabic', sans-serif;
}

/* Hero subheadline — lift max from 18.4px → 19px */
html[lang="en"] .hero-subheadline {
    font-size: clamp(1rem, 2.2vw, 1.2rem);
}

/* Section subtitle — lift max from 16.8px → 18px */
html[lang="en"] .section-subtitle {
    font-size: clamp(1rem, 2vw, 1.125rem);
}

/* Service card descriptions — lift max from 16px → 16.8px */
html[lang="en"] .card-desc {
    font-size: clamp(0.95rem, 1.6vw, 1.05rem);
}

/* HWW step descriptions — convert fixed 0.9rem to clamp */
html[lang="en"] .hww-desc {
    font-size: clamp(0.9rem, 1.5vw, 1rem);
}
