/* =========================================================
   Codon Tech: the demo platform's home page.
   Loaded after index-mk.css (the template's design): its colours become
   Codon's navy / blue, plus the portfolio and the closing call to action.
   ========================================================= */
:root {
    --mk-night: #050b1c;
    --mk-navy: #0b1d45;
    --mk-navy-soft: #132a5e;
    --mk-teal: #0ea5e9;
    --mk-teal-soft: #7dd3fc;
    --mk-amber: #38bdf8;
    --mk-orange: #6366f1;
    --mk-red: #2563eb;
    --mk-sky: #2563eb;
    --mk-cream: #f4f7fd;
    --mk-paper: #e3e9f5;
    --mk-wood: #0b1d45;
    --mk-ink: #0f172a;
    --mk-muted: #5b6478;
}

.mk-hero {
    background:
        radial-gradient(60% 55% at 12% 92%, rgba(37, 99, 235, 0.45) 0%, transparent 70%),
        radial-gradient(45% 45% at 88% 8%, rgba(56, 189, 248, 0.28) 0%, transparent 70%),
        radial-gradient(40% 40% at 55% 45%, rgba(99, 102, 241, 0.16) 0%, transparent 70%),
        linear-gradient(160deg, var(--mk-night) 0%, var(--mk-navy) 58%, #081430 100%);
}

.mk-title-name {
    background: linear-gradient(100deg, #fff 0%, #bae6fd 40%, #38bdf8 70%, #818cf8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cd-title-en {
    direction: ltr;
    display: inline-block;
    letter-spacing: 0.02em;
}

.mk-btn-primary,
.mk-btn-primary:hover {
    color: #fff;
}

.mk-btn-primary {
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.4);
}

.mk-btn-primary:hover {
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.55);
}

.cd-btn-wa {
    border-color: rgba(37, 211, 102, 0.6);
}

.cd-btn-wa:hover {
    background: rgba(37, 211, 102, 0.16);
    border-color: #25d366;
}

/* ---------- Facts band ("أرقام من شغلنا") ---------- */
.cd-facts {
    padding: 2.4rem 2.4rem 2.6rem;
    isolation: isolate;
}

.cd-facts::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(ellipse at 70% 30%, #000 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 20%, transparent 75%);
}

.cd-facts-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.4rem 1.5rem;
    margin-bottom: 1.6rem;
}

.cd-facts-head .mk-facts-title {
    margin: 0;
    font-size: 1.35rem;
}

.cd-facts-head p {
    margin: 0;
    color: rgba(203, 213, 225, 0.8);
    font-size: 0.95rem;
}

.cd-facts-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.1rem;
    margin: 0;
}

.cd-fact {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.6rem 1rem 1.4rem;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(148, 163, 184, 0.16);
    transition: transform 0.4s var(--mk-ease), border-color 0.4s ease, box-shadow 0.4s ease;
}

.cd-fact::after {
    content: '';
    position: absolute;
    top: 0;
    left: 22%;
    right: 22%;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, #38bdf8, transparent);
    opacity: 0.7;
}

.cd-fact:hover {
    transform: translateY(-5px);
    border-color: rgba(56, 189, 248, 0.55);
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.25);
}

.cd-fact-ic {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 0.9rem;
    border-radius: 14px;
    font-size: 1.2rem;
    color: #7dd3fc;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.25);
}

.cd-fact .cd-num {
    margin: 0 0 0.35rem;
    direction: ltr;
    line-height: 1.1;
    font-weight: 900;
    font-size: clamp(2.1rem, 3.4vw, 2.8rem);
    font-variant-numeric: tabular-nums;
    background: linear-gradient(100deg, #e0f2fe 0%, #38bdf8 55%, #818cf8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cd-fact .cd-num b {
    font-weight: inherit;
}

.cd-fact .cd-num span {
    font-size: 0.7em;
    margin: 0 2px;
}

.cd-fact .cd-lbl {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.6;
    color: rgba(226, 235, 248, 0.85);
}

.cd-os {
    display: flex;
    justify-content: center;
    gap: 0.7rem;
    margin-top: 0.4rem;
    font-size: 1.05rem;
    color: #93c5fd;
}

@media (max-width: 991.98px) {
    .cd-facts { padding: 1.8rem 1.2rem; }
    .cd-facts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
    .cd-facts-head { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 380px) {
    .cd-fact { padding: 1.2rem 0.6rem; }
    .cd-fact .cd-lbl { font-size: 0.85rem; }
}

/* ---------- Portfolio ---------- */
.cd-pf-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.cd-site {
    display: block;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--mk-paper);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    color: var(--mk-ink);
    text-decoration: none;
    transition: transform 0.35s var(--mk-ease), box-shadow 0.35s ease;
}

.cd-site:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 44px rgba(37, 99, 235, 0.18);
    color: var(--mk-ink);
}

.cd-site-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 12px;
    background: #eef2f8;
}

.cd-site-bar i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #cbd5e1;
}

.cd-site-bar em {
    margin-inline-start: auto;
    font-style: normal;
    font-size: 0.75rem;
    color: var(--mk-muted);
    direction: ltr;
}

.cd-site img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 880 / 550;
    object-fit: cover;
    object-position: top;
}

.cd-site-cap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    font-weight: 800;
    font-size: 0.95rem;
}

.cd-site-cap span {
    direction: ltr;
    color: var(--mk-sky);
}

.cd-site-cap i {
    color: var(--mk-muted);
    font-size: 0.85rem;
}

/* ---------- Closing call to action ---------- */
.cd-cta-wrap {
    padding-top: 0;
}

.cd-cta {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    padding: 2.25rem 2.5rem;
    border-radius: 24px;
    color: #fff;
    background:
        radial-gradient(60% 90% at 0% 100%, rgba(37, 99, 235, 0.45), transparent 70%),
        linear-gradient(135deg, var(--mk-navy), var(--mk-night));
    box-shadow: 0 24px 50px rgba(11, 29, 69, 0.35);
}

.cd-cta img {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    flex: none;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.35), 0 0 30px rgba(37, 99, 235, 0.55);
}

.cd-cta-text {
    flex: 1;
}

.cd-cta-text h2 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    margin: 0 0 0.4rem;
    color: #fff;
}

.cd-cta-text h2 em {
    font-style: normal;
    color: var(--mk-teal-soft);
}

.cd-cta-text p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.8;
}

.cd-cta-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

@media (max-width: 991.98px) {
    .cd-pf-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cd-cta {
        flex-direction: column;
        text-align: center;
    }

    .cd-cta-btns {
        justify-content: center;
    }
}

@media (max-width: 575.98px) {
    .cd-pf-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
    }

    .cd-cta {
        padding: 1.75rem 1.25rem;
    }
}

/* dark mode (the platform's switch) */
html[data-theme="dark"] .cd-site {
    background: #17212b;
    border-color: #253241;
    color: #e5e7eb;
}

html[data-theme="dark"] .cd-site-bar {
    background: #0f1720;
}

html[data-theme="dark"] .cd-site-cap span {
    color: #60a5fa;
}
