/* ============================================================
   CloudTech Oman — Site Chrome (header + footer)
   "Ion" dark system: floating glass pill navbar, black footer.
   Shared by every page; namespaced ct- classes / --ct-* vars
   so it never collides with page styles.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:ital,wght@0,100..900;1,100..900&family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&display=swap');

:root {
    --ct-void: #020308;
    --ct-white: #ffffff;
    --ct-fg: #eef1f8;
    --ct-fg-soft: rgba(238, 241, 248, 0.66);
    --ct-fg-mute: rgba(238, 241, 248, 0.44);
    --ct-line: rgba(255, 255, 255, 0.08);
    --ct-line-2: rgba(255, 255, 255, 0.14);
    --ct-ion: #2e6bff;
    --ct-ion-bright: #5d93ff;
    --ct-ion-deep: #0a36c4;

    --ct-sans: 'Hanken Grotesk', 'IBM Plex Sans Arabic', system-ui, sans-serif;
    --ct-gutter: clamp(20px, 4vw, 56px);
    --ct-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[dir="rtl"] {
    --ct-sans: 'IBM Plex Sans Arabic', 'Hanken Grotesk', system-ui, sans-serif;
}

/* ============================================================
   HEADER — floating glass pill
   ============================================================ */
.ct-header {
    position: fixed;
    inset-block-start: 0;
    inset-inline: 0;
    z-index: 100;
    padding-block-start: 14px;
    padding-inline: var(--ct-gutter);
    font-family: var(--ct-sans);
    pointer-events: none; /* re-enabled on the bar itself */
}

.ct-header-inner {
    pointer-events: auto;
    max-width: 1120px;
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 9px 10px;
    padding-inline-start: 20px;
    background: rgba(8, 11, 22, 0.55);
    border: 1px solid var(--ct-line);
    border-radius: 999px;
    -webkit-backdrop-filter: blur(18px) saturate(1.3);
    backdrop-filter: blur(18px) saturate(1.3);
    transition: background 0.4s var(--ct-ease), border-color 0.4s var(--ct-ease),
                box-shadow 0.4s var(--ct-ease);
}

.ct-header.scrolled .ct-header-inner {
    background: rgba(6, 9, 18, 0.82);
    border-color: var(--ct-line-2);
    box-shadow: 0 14px 44px -18px rgba(0, 0, 0, 0.8);
}

.ct-brand { display: inline-flex; align-items: center; }
.ct-brand-logo { display: block; height: 34px; width: auto; }

.ct-nav {
    display: flex;
    align-items: center;
    gap: clamp(10px, 1.6vw, 22px);
}

.ct-nav-link {
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    color: var(--ct-fg-soft);
    padding: 8px 10px;
    border-radius: 999px;
    transition: color 0.3s var(--ct-ease), background 0.3s var(--ct-ease);
}

.ct-nav-link:hover {
    color: var(--ct-white);
    background: rgba(255, 255, 255, 0.06);
}

/* desktop: hide the numeric indices — mobile overlay shows them */
.ct-nav-index { display: none; }

.ct-nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    color: #05070f;
    background: var(--ct-white);
    border-radius: 999px;
    padding: 11px 20px;
    transition: transform 0.35s var(--ct-ease), box-shadow 0.35s var(--ct-ease);
}

.ct-nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 30px -8px rgba(255, 255, 255, 0.4);
}

.ct-nav-cta-star {
    color: var(--ct-ion);
    font-size: 11px;
    transition: transform 0.45s var(--ct-ease);
}

.ct-nav-cta:hover .ct-nav-cta-star { transform: rotate(180deg); }

.ct-lang {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 500;
    border: 1px solid var(--ct-line);
    border-radius: 999px;
    padding: 7px 13px;
}

.ct-lang-btn { text-decoration: none; color: var(--ct-fg-mute); transition: color 0.3s; }
.ct-lang-btn:hover { color: var(--ct-ion-bright); }
.ct-lang-btn.active { color: var(--ct-ion-bright); font-weight: 700; }
.ct-lang-sep { color: var(--ct-line-2); }

/* Burger */
.ct-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--ct-line-2);
    border-radius: 999px;
    cursor: pointer;
    transition: border-color 0.3s var(--ct-ease);
}

.ct-burger-line {
    display: block;
    width: 15px;
    height: 1.6px;
    background: var(--ct-fg);
    transition: transform 0.35s var(--ct-ease);
}

.ct-burger:hover { border-color: var(--ct-ion-bright); }
.ct-burger[aria-expanded="true"] .ct-burger-line:first-child { transform: translateY(3.8px) rotate(45deg); }
.ct-burger[aria-expanded="true"] .ct-burger-line:last-child { transform: translateY(-3.8px) rotate(-45deg); }

/* ============================================================
   FOOTER
   ============================================================ */
.ct-footer {
    background: var(--ct-void);
    color: var(--ct-fg-soft);
    font-family: var(--ct-sans);
    border-block-start: 1px solid var(--ct-line);
    padding-block-start: clamp(60px, 9vh, 100px);
    position: relative;
    overflow: hidden;
}

/* soft blue floor glow */
.ct-footer::before {
    content: '';
    position: absolute;
    inset-block-end: -55%;
    inset-inline-start: 50%;
    transform: translateX(-50%);
    width: 120vw;
    height: 80%;
    background: radial-gradient(50% 60% at 50% 100%, rgba(46, 107, 255, 0.16), transparent 70%);
    pointer-events: none;
}

.ct-footer-inner {
    max-width: 1280px;
    margin-inline: auto;
    padding-inline: var(--ct-gutter);
    position: relative;
}

.ct-footer-wordmark {
    font-size: clamp(2rem, 5vw, 4.2rem);
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 1.1;
    color: var(--ct-white);
    margin-block-end: clamp(40px, 6vh, 64px);
    text-wrap: balance;
}

[dir="rtl"] .ct-footer-wordmark { letter-spacing: 0; line-height: 1.45; font-weight: 700; }

.ct-footer-wordmark em {
    font-style: normal;
    background: linear-gradient(100deg, #a8c6ff, var(--ct-ion-bright) 50%, #57b6ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.ct-footer-star {
    display: inline-block;
    font-size: 0.35em;
    color: var(--ct-ion-bright);
    vertical-align: super;
    margin-inline-start: 0.5em;
    text-shadow: 0 0 14px rgba(93, 147, 255, 0.9);
}

.ct-footer-grid {
    display: grid;
    grid-template-columns: 1.6fr repeat(4, 1fr);
    gap: clamp(28px, 3.4vw, 52px);
    padding-block-start: clamp(34px, 5vh, 52px);
    border-block-start: 1px solid var(--ct-line);
}

.ct-footer-logo {
    display: block;
    height: 38px;
    width: auto;
    margin-block-end: 18px;
    filter: brightness(0) invert(1);
    opacity: 0.92;
}

.ct-footer-desc {
    font-size: 0.9rem;
    line-height: 1.75;
    color: var(--ct-fg-mute);
    max-width: 36ch;
    margin: 0;
}

.ct-footer-col h4 {
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ct-ion-bright);
    margin: 0 0 16px;
}

[dir="rtl"] .ct-footer-col h4 { letter-spacing: 0; font-size: 13px; }

.ct-footer-col ul { list-style: none; margin: 0; padding: 0; }
.ct-footer-col li { margin-block-end: 10px; }

.ct-footer-col a {
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--ct-fg-mute);
    transition: color 0.3s, padding-inline-start 0.3s;
}

.ct-footer-col a:hover { color: var(--ct-white); padding-inline-start: 4px; }

.ct-footer-channels li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: var(--ct-fg-mute);
}

.ct-footer-channels svg { flex-shrink: 0; color: var(--ct-ion-bright); }

.ct-footer-social { margin-block-start: 20px; }

.ct-footer-social-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ct-fg-mute);
    margin-block-end: 12px;
}

[dir="rtl"] .ct-footer-social-label { letter-spacing: 0; font-size: 12px; }

.ct-footer-social-icons { display: flex; gap: 10px; }

.ct-footer-social-icons a {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--ct-line);
    border-radius: 50%;
    color: var(--ct-fg-soft);
    transition: all 0.35s var(--ct-ease);
}

.ct-footer-social-icons a:hover {
    background: linear-gradient(140deg, var(--ct-ion-bright), var(--ct-ion-deep));
    border-color: rgba(150, 195, 255, 0.5);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 0 22px -4px rgba(46, 107, 255, 0.8);
}

.ct-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-block-start: clamp(40px, 6vh, 60px);
    padding-block: 24px;
    border-block-start: 1px solid var(--ct-line);
    font-size: 12.5px;
    color: var(--ct-fg-mute);
}

.ct-footer-bottom-sep {
    color: var(--ct-ion-bright);
    font-size: 8px;
}

/* ============================================================
   RESPONSIVE — mobile nav overlay
   ============================================================ */
@media (max-width: 1100px) {
    .ct-footer-grid { grid-template-columns: repeat(2, 1fr); }
    .ct-footer-id { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
    /* backdrop-filter would make the bar the containing block for the
       fixed-position nav overlay — use a solid background instead */
    .ct-header-inner,
    .ct-header.scrolled .ct-header-inner {
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        background: rgba(6, 9, 18, 0.92);
    }

    .ct-burger { display: inline-flex; position: relative; z-index: 102; }

    .ct-nav {
        position: fixed;
        inset: 0;
        z-index: 101;
        flex-direction: column;
        /* "safe center": centre when it fits, fall back to top (no clipping)
           on short screens; scroll if the list is taller than the viewport */
        justify-content: safe center;
        align-items: flex-start;
        gap: 6px;
        padding: 96px var(--ct-gutter) 48px;
        overflow-y: auto;
        /* near-solid so page content never bleeds through even where
           backdrop-filter is unsupported; blur is a progressive enhancement */
        background: rgba(3, 5, 12, 0.985);
        -webkit-backdrop-filter: blur(24px);
        backdrop-filter: blur(24px);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-12px);
        transition: opacity 0.45s var(--ct-ease), transform 0.45s var(--ct-ease), visibility 0.45s;
    }

    /* blue floor glow inside the overlay */
    .ct-nav::after {
        content: '';
        position: absolute;
        inset-block-end: -30%;
        inset-inline: -20%;
        height: 55%;
        background: radial-gradient(50% 60% at 50% 100%, rgba(46, 107, 255, 0.30), transparent 70%);
        pointer-events: none;
        z-index: -1;
    }

    .ct-nav.mobile-active { opacity: 1; visibility: visible; transform: none; }

    .ct-nav-link {
        font-size: clamp(1.9rem, 7.6vw, 2.6rem);
        font-weight: 600;
        letter-spacing: -0.02em;
        color: var(--ct-fg);
        padding: 6px 0;
        border-radius: 0;
    }

    [dir="rtl"] .ct-nav-link { letter-spacing: 0; font-weight: 700; }

    .ct-nav-link:hover { background: none; color: var(--ct-ion-bright); }

    .ct-nav-index {
        display: inline;
        font-size: 0.8rem;
        font-weight: 600;
        color: var(--ct-ion-bright);
        vertical-align: super;
        margin-inline-end: 6px;
    }

    .ct-nav-cta { margin-block-start: 20px; padding: 14px 26px; }
    .ct-lang { margin-block-start: 20px; }
}

@media (max-width: 620px) {
    .ct-footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .ct-header-inner, .ct-nav, .ct-nav-link, .ct-nav-cta, .ct-nav-cta-star,
    .ct-burger-line, .ct-footer-col a, .ct-footer-social-icons a {
        transition: none !important;
    }
}
