/* AfriSkill AI — Interactive Experience Layer */

html.ix-cursor-on,
html.ix-cursor-on body,
html.ix-cursor-on a,
html.ix-cursor-on button {
    cursor: none !important;
}
html.ix-cursor-on input,
html.ix-cursor-on textarea,
html.ix-cursor-on select,
html.ix-cursor-on [contenteditable],
html.ix-cursor-on input *,
html.ix-cursor-on textarea * {
    cursor: text !important;
}

.ix-cursor {
    position: fixed;
    top: 0; left: 0;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #818CF8;
    pointer-events: none;
    z-index: 10050;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
    transition: width 0.25s, height 0.25s, background 0.25s, opacity 0.25s;
    opacity: 0;
}
.ix-cursor-trail {
    position: fixed;
    top: 0; left: 0;
    width: 36px; height: 36px;
    border: 1.5px solid rgba(129, 140, 248, 0.7);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10049;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: width 0.3s, height 0.3s, border-color 0.3s, opacity 0.3s;
}
.ix-cursor.is-visible,
.ix-cursor-trail.is-visible { opacity: 1; }
.ix-cursor.is-hover {
    width: 18px; height: 18px;
    background: #C4B5FD;
}
.ix-cursor-trail.is-hover {
    width: 64px; height: 64px;
    border-color: rgba(167, 139, 250, 0.9);
}
.ix-cursor.is-media,
.ix-cursor-trail.is-media {
    width: auto;
    height: auto;
    min-width: 96px;
    padding: 10px 16px;
    border-radius: 100px;
    background: rgba(79, 70, 229, 0.92);
    border: 0;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    mix-blend-mode: normal;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}
.ix-cursor.is-media { display: none; }
.ix-cursor-trail.is-media {
    width: auto;
    height: auto;
}

.ix-scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0%;
    z-index: 10040;
    background: linear-gradient(90deg, #4F46E5, #2563EB, #7C3AED);
    box-shadow: 0 0 16px rgba(79, 70, 229, 0.55);
    transition: width 0.1s linear;
}

/* Loader cinematic */
.page-loader .loader-scan {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(129, 140, 248, 0.15), transparent);
    animation: ixScan 1.6s ease-in-out infinite;
    pointer-events: none;
}
@keyframes ixScan {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}
.loader-pct {
    margin-top: 14px;
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #A5B4FC;
}

/* Mega menu */
.mega-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    width: min(860px, 92vw);
    padding: 24px;
    background: rgba(3, 7, 18, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    backdrop-filter: blur(28px) saturate(1.4);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    gap: 20px;
    z-index: 1100;
}
.has-mega:hover .mega-menu,
.has-mega:focus-within .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.mega-services {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.mega-item {
    display: flex;
    gap: 12px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid transparent;
    transition: background 0.25s, border-color 0.25s;
}
.mega-item:hover {
    background: rgba(79, 70, 229, 0.12);
    border-color: rgba(129, 140, 248, 0.25);
}
.mega-icon {
    width: 40px; height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(79, 70, 229, 0.18);
    color: #A5B4FC;
    flex-shrink: 0;
}
.mega-item h4 { font-size: 0.9375rem; margin-bottom: 4px; }
.mega-item p { font-size: 0.75rem; color: var(--muted); line-height: 1.45; }
.mega-badge {
    display: inline-block;
    font-size: 0.625rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 100px;
    background: rgba(16, 185, 129, 0.15);
    color: #34D399;
    margin-left: 6px;
}
.mega-aside {
    padding: 18px;
    border-radius: 16px;
    background: linear-gradient(160deg, rgba(79, 70, 229, 0.2), rgba(15, 23, 42, 0.5));
    border: 1px solid rgba(129, 140, 248, 0.2);
}
.mega-aside h3 { font-size: 1rem; margin-bottom: 8px; }
.mega-aside p { font-size: 0.8125rem; color: var(--muted); margin-bottom: 16px; line-height: 1.55; }
.mega-projects { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.mega-project {
    font-size: 0.8125rem;
    color: #C7D2FE;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
}

/* Featured carousel */
.fx-carousel {
    position: relative;
    margin-top: 24px;
    overflow: hidden;
}
.fx-track {
    display: flex;
    width: 100%;
    cursor: grab;
    touch-action: pan-y;
    will-change: transform;
}
.fx-track.is-dragging { cursor: grabbing; }
.fx-slide {
    flex: 0 0 100%;
    width: 100%;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
    min-height: 420px;
    padding: 4px;
}
.fx-slide-copy h3 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 12px 0;
}
.fx-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}
.fx-chip {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 100px;
    background: rgba(214, 179, 106, 0.08);
    border: 1px solid rgba(214, 179, 106, 0.22);
    color: var(--accent-gold, #D6B36A);
}
.fx-desc { color: var(--muted); line-height: 1.7; margin-bottom: 20px; max-width: 34rem; }
.fx-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.fx-visual {
    position: relative;
    display: flex;
    justify-content: center;
    min-height: 360px;
}
.fx-visual img {
    width: min(100%, 520px);
    border-radius: 20px;
    object-fit: cover;
    aspect-ratio: 16/10;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.fx-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}
.fx-btn {
    width: 48px; height: 48px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.fx-btn:hover { border-color: var(--accent-gold, #D6B36A); color: var(--accent-gold, #D6B36A); }
.fx-dots { display: flex; gap: 8px; align-items: center; }
.fx-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 0;
}
.fx-dot.is-active {
    width: 22px;
    border-radius: 100px;
    background: var(--gradient);
}

/* Logo marquee */
.logo-wall { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.logo-track {
    display: flex;
    gap: 28px;
    width: max-content;
    animation: logoMarquee 40s linear infinite;
}
.logo-track:hover { animation-play-state: paused; }
@keyframes logoMarquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
.logo-item {
    flex: 0 0 auto;
    min-width: 140px;
    height: 72px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    filter: grayscale(1);
    opacity: 0.7;
    transition: filter 0.35s, opacity 0.35s, box-shadow 0.35s, border-color 0.35s;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--muted);
}
.logo-item img { max-height: 36px; width: auto; object-fit: contain; }
.logo-item:hover {
    filter: none;
    opacity: 1;
    border-color: rgba(129, 140, 248, 0.4);
    box-shadow: 0 0 28px rgba(79, 70, 229, 0.25);
    color: var(--text);
}

/* Awards */
.awards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
    gap: 16px;
}
.award-card {
    padding: 28px 22px;
    text-align: center;
}
.award-icon {
    width: 56px; height: 56px;
    margin: 0 auto 16px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(79, 70, 229, 0.15);
    color: #A5B4FC;
    font-size: 1.25rem;
}
.award-card h3 { font-size: 1rem; margin-bottom: 6px; }
.award-card p { font-size: 0.8125rem; color: var(--muted); line-height: 1.55; }
.award-year { font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.1em; color: #818CF8; margin-bottom: 8px; }

/* Milestones */
.milestone-rail {
    position: relative;
    display: grid;
    gap: 24px;
    max-width: 760px;
    margin: 0 auto;
}
.milestone-rail::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, rgba(79, 70, 229, 0.8), rgba(124, 58, 237, 0.2));
}
.milestone-item {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 18px;
    align-items: start;
}
.milestone-dot {
    width: 16px; height: 16px;
    margin: 8px 0 0 10px;
    border-radius: 50%;
    background: var(--gradient);
    box-shadow: 0 0 18px rgba(79, 70, 229, 0.6);
}
.milestone-card { padding: 22px 24px; }
.milestone-year { font-size: 0.75rem; font-weight: 800; color: #A5B4FC; letter-spacing: 0.08em; margin-bottom: 6px; }

/* Global map */
.ix-map {
    position: relative;
    aspect-ratio: 2 / 1;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background:
        radial-gradient(ellipse at 30% 40%, rgba(79, 70, 229, 0.18), transparent 45%),
        radial-gradient(ellipse at 70% 55%, rgba(124, 58, 237, 0.12), transparent 40%),
        linear-gradient(160deg, rgba(15, 23, 42, 0.9), rgba(3, 7, 18, 0.95));
    overflow: hidden;
}
.ix-map-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    opacity: 0.5;
}
.ix-pin {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 14px; height: 14px;
    border-radius: 50%;
    background: #818CF8;
    box-shadow: 0 0 0 6px rgba(79, 70, 229, 0.25), 0 0 24px rgba(79, 70, 229, 0.5);
    border: 0;
    cursor: pointer;
    animation: ixPulse 2.4s ease-in-out infinite;
}
@keyframes ixPulse {
    0%, 100% { box-shadow: 0 0 0 6px rgba(79, 70, 229, 0.25), 0 0 24px rgba(79, 70, 229, 0.5); }
    50% { box-shadow: 0 0 0 12px rgba(79, 70, 229, 0.12), 0 0 32px rgba(79, 70, 229, 0.65); }
}
.ix-pin-tip {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    min-width: 160px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(3, 7, 18, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    text-align: left;
    white-space: nowrap;
}
.ix-pin:hover .ix-pin-tip,
.ix-pin:focus .ix-pin-tip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.ix-pin-tip strong { display: block; font-size: 0.8125rem; }
.ix-pin-tip span { font-size: 0.75rem; color: var(--muted); }

/* Social dock */
.ix-dock {
    position: fixed;
    right: 18px;
    bottom: 24px;
    z-index: 9000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.35s, opacity 0.35s;
}
.ix-dock.is-hidden {
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
}
.ix-dock a,
.ix-dock button {
    width: 46px; height: 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(3, 7, 18, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    color: var(--accent-gold, #D6B36A);
    font-size: 0.75rem;
    font-weight: 800;
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.ix-dock a:hover,
.ix-dock button:hover {
    transform: translateY(-3px);
    border-color: rgba(214, 179, 106, 0.55);
    box-shadow: 0 10px 30px rgba(214, 179, 106, 0.22);
}

/* AI Chat */
.ix-chat-toggle {
    position: fixed;
    right: 18px;
    bottom: 24px;
    z-index: 9010;
    min-width: 56px;
    height: 56px;
    padding: 0 18px;
    border-radius: 100px;
    border: 0;
    background: var(--gradient-gold, linear-gradient(135deg, #D6B36A 0%, #F0D38A 100%));
    color: #07080C;
    font-weight: 700;
    box-shadow: 0 14px 40px rgba(214, 179, 106, 0.35);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.ix-dock + .ix-chat-toggle,
body:has(.ix-dock) .ix-chat-toggle {
    bottom: 24px;
}
.ix-chat {
    position: fixed;
    right: 18px;
    bottom: 96px;
    width: min(360px, calc(100vw - 24px));
    max-height: min(520px, 70vh);
    z-index: 9011;
    display: none;
    flex-direction: column;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(3, 7, 18, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(24px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.ix-chat.is-open { display: flex; }
.ix-chat-head {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ix-chat-head h3 { font-size: 0.9375rem; }
.ix-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ix-msg {
    max-width: 90%;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 0.875rem;
    line-height: 1.55;
}
.ix-msg.ix-typing {
    opacity: 0.7;
    font-style: italic;
}
.ix-msg.bot {
    background: rgba(214, 179, 106, 0.1);
    border: 1px solid rgba(214, 179, 106, 0.22);
    align-self: flex-start;
}
.ix-msg.user {
    background: rgba(255, 255, 255, 0.06);
    align-self: flex-end;
}
.ix-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.ix-quick button {
    font-size: 0.75rem;
    padding: 8px 12px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary, #C8C2B4);
}
.ix-chat-form {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.ix-chat-form input {
    flex: 1;
    min-height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    padding: 0 12px;
}
.ix-chat-form button {
    border: 0;
    border-radius: 12px;
    padding: 0 14px;
    background: var(--gradient);
    color: #fff;
    font-weight: 700;
}

/* FAQ search */
.faq-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0 24px;
}
.faq-tools input,
.faq-tools select {
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}
.faq-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}
.faq-filter {
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
    color: var(--muted);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.25s;
}
.faq-filter:hover,
.faq-filter.is-active {
    color: #fff;
    border-color: rgba(129,140,248,0.55);
    background: rgba(79,70,229,0.2);
}
.faq-q-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}
.faq-cat-pill {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #A5B4FC;
}
.faq-item.is-filtered-out { display: none; }

/* Floating labels */
.form-group--float { position: relative; }
.form-group--float label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    pointer-events: none;
    transition: 0.2s ease;
}
.form-group--textarea.form-group--float label {
    top: 18px;
    transform: none;
}
.form-group--float input,
.form-group--float textarea {
    padding-top: 18px;
    padding-bottom: 10px;
}
.form-group--float input:focus + label,
.form-group--float input:not(:placeholder-shown) + label,
.form-group--float textarea:focus + label,
.form-group--float textarea:not(:placeholder-shown) + label {
    top: 8px;
    transform: none;
    font-size: 0.6875rem;
    color: #A5B4FC;
}

.ix-map-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.9;
    pointer-events: none;
}
.ix-chat-cta {
    display: inline-flex;
    margin-top: 4px;
    color: #A5B4FC;
    font-weight: 700;
    text-decoration: none;
}
.ix-chat-cta:hover { text-decoration: underline; }
.tm-flag { margin-right: 4px; }
.tm-company-logo {
    margin-top: 10px;
    max-height: 28px;
    width: auto;
    object-fit: contain;
    filter: grayscale(1) brightness(1.2);
    opacity: 0.85;
    transition: 0.3s;
}
.tm-card:hover .tm-company-logo {
    filter: none;
    opacity: 1;
}
:focus-visible {
    outline: 2px solid #818CF8;
    outline-offset: 3px;
}

/* Case study */
.case-hero {
    padding: calc(var(--nav-height) + 40px) 0 60px;
}
.case-hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: clamp(2rem, 5vw, 3.5rem);
    align-items: center;
}
.case-hero-media img {
    width: 100%;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}
.case-block { margin: clamp(2rem, 5vw, 3.5rem) 0; }
.case-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.case-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.case-gallery img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid var(--border);
}

@media (max-width: 900px) {
    .mega-menu { display: none !important; }
    .fx-slide,
    .case-hero-grid,
    .case-grid-2 { grid-template-columns: 1fr; }
    .ix-dock { right: 12px; bottom: 16px; }
    body:has(.ix-dock) .ix-chat-toggle { bottom: 280px; right: 12px; }
}

html.theme-animating,
html.theme-animating * {
    transition: background-color 0.45s ease, color 0.45s ease, border-color 0.45s ease, box-shadow 0.45s ease !important;
}

@media (prefers-reduced-motion: reduce) {
    .logo-track,
    .ix-pin,
    .page-loader .loader-scan { animation: none !important; }
}
