/* =========================================================================
   Khutwat Zakia — Product company site
   Palette from final logo: Navy · Teal · Gold
   ========================================================================= */

:root {
    --navy: #0B1F3A;
    --navy-deep: #071528;
    --teal: #0F766E;
    --teal-soft: #E6F4F2;
    --gold: #C9A227;
    --gold-soft: #F8F1D8;
    --bg: #F5F7FA;
    --surface: #FFFFFF;
    --text: #0B1F3A;
    --muted: #5B6B7C;
    --line: rgba(11, 31, 58, 0.10);
    --shadow: 0 14px 40px rgba(11, 31, 58, 0.08);
    --radius: 18px;
    --header-h: 78px;
    --font-ar: "Tajawal", "Segoe UI", Tahoma, sans-serif;
    --font-en: "Manrope", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--text);
    background: var(--surface);
    font-family: var(--font-ar);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    line-height: 1.7;
}
body.lang-en { font-family: var(--font-en); line-height: 1.65; }
html[lang="ar"],
body.lang-ar {
    font-family: var(--font-ar);
    line-height: 1.85;
    letter-spacing: 0;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
section[id] { scroll-margin-top: calc(var(--header-h) + 16px); }
.lang-ar { text-wrap: pretty; }
::selection { background: rgba(15, 118, 110, 0.22); color: var(--navy); }
:focus-visible {
    outline: 2px solid rgba(15, 118, 110, 0.55);
    outline-offset: 2px;
}

html[lang="en"] .lang-ar,
body.lang-en .lang-ar { display: none !important; }
html[lang="ar"] .lang-en,
body.lang-ar .lang-en { display: none !important; }

.container {
    width: min(1120px, calc(100% - 2rem));
    margin-inline: auto;
}

/* Buttons */
.btn-primary-cta,
.btn-ghost,
.btn-lang {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border-radius: 999px;
    font-weight: 700;
    border: 0;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn-primary-cta {
    background: linear-gradient(135deg, var(--navy) 0%, var(--teal) 100%);
    color: #fff;
    padding: 0.78rem 1.35rem;
    box-shadow: 0 10px 24px rgba(11, 31, 58, 0.22);
}
.btn-primary-cta:hover { transform: translateY(-2px); color: #fff; box-shadow: 0 14px 28px rgba(11, 31, 58, 0.28); }
.btn-ghost {
    background: transparent;
    color: var(--navy);
    border: 1.5px solid var(--line);
    padding: 0.72rem 1.3rem;
}
.btn-ghost:hover { background: var(--bg); border-color: rgba(15, 118, 110, 0.35); }
.btn-lang {
    background: var(--bg);
    color: var(--navy);
    border: 1px solid var(--line);
    padding: 0.55rem 0.95rem;
}
.btn-lang:hover { background: var(--teal-soft); border-color: rgba(15, 118, 110, 0.25); }
.btn-block { width: 100%; margin-top: 0.25rem; }

/* Header — solid white so logo stays readable */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.site-header.scrolled { box-shadow: 0 8px 24px rgba(11, 31, 58, 0.06); }
.header-inner {
    min-height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.navbar { padding: 0.35rem 0; }
.navbar-brand { margin: 0; padding: 0; }
.brand-logo {
    height: 72px;
    width: auto;
    max-width: min(320px, 68vw);
    object-fit: contain;
}
.nav-toggle {
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
}
.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--navy);
}
.site-nav {
    align-items: center;
    gap: 1rem;
}
.nav-links {
    align-items: center;
    gap: 0.1rem;
}
.nav-links .nav-link {
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--muted);
}
.nav-links .nav-link:hover,
.nav-links .nav-link:focus {
    color: var(--navy);
    background: var(--bg);
}
.nav-links .nav-link.is-active {
    color: var(--teal);
    background: var(--teal-soft);
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-inline-start: 0.35rem;
}

/* Hero */
.hero {
    position: relative;
    padding: 3.5rem 0 3rem;
    background:
        radial-gradient(40rem 24rem at 100% 0%, rgba(15, 118, 110, 0.12), transparent 60%),
        radial-gradient(34rem 22rem at 0% 20%, rgba(201, 162, 39, 0.12), transparent 55%),
        linear-gradient(180deg, #F7FAFC 0%, #FFFFFF 100%);
    overflow: hidden;
}
.hero-glow {
    position: absolute;
    inset: auto -10% -30% auto;
    width: 28rem;
    height: 28rem;
    background: radial-gradient(circle, rgba(15, 118, 110, 0.16), transparent 70%);
    pointer-events: none;
}
.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2.5rem;
    align-items: center;
}
.eyebrow {
    display: inline-block;
    margin: 0 0 0.85rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: var(--teal-soft);
    color: var(--teal);
    font-weight: 800;
    font-size: 0.82rem;
}
.hero h1 {
    margin: 0 0 1rem;
    font-size: clamp(1.85rem, 3.6vw, 2.85rem);
    line-height: 1.25;
    font-weight: 800;
    color: var(--navy);
}
.lead {
    margin: 0;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.8;
    max-width: 38rem;
}
.lead strong { color: var(--navy); }
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.6rem;
}
.hero-products {
    display: grid;
    gap: 0.85rem;
}
.hero-product-card {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    padding: 0.95rem 1.1rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: transform .2s ease, border-color .2s ease;
}
.hero-product-card:hover {
    transform: translateY(-3px);
    border-color: rgba(15, 118, 110, 0.35);
}
.hero-product-card img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    background: var(--bg);
    border-radius: 14px;
    padding: 7px;
    border: 1px solid var(--line);
}
.hero-product-card strong {
    display: block;
    font-size: 1.02rem;
    margin-bottom: 0.15rem;
}
.hero-product-card span { color: var(--muted); font-size: 0.92rem; }

/* Sections */
.section { padding: 4.5rem 0; }
.section-soft { background: var(--bg); }
.section-head { text-align: center; margin-bottom: 2.4rem; max-width: 720px; margin-inline: auto; }
.section-head h2 {
    margin: 0 0 0.65rem;
    font-size: clamp(1.55rem, 2.8vw, 2.2rem);
    font-weight: 800;
}
.section-head > p:not(.eyebrow) {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}
.section-head.light h2,
.section-head.light .lang-en,
.section-head.light .lang-ar { color: #fff; }
.section-head.light .eyebrow {
    background: rgba(255,255,255,0.12);
    color: #E0C35A;
}
.section-head.light p:not(.eyebrow) { color: rgba(255,255,255,0.72); }

.product-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
}
.product-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform .2s ease;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}
.product-card:hover { transform: translateY(-6px); }
.product-card-logo {
    height: 70px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    margin-bottom: 1.1rem;
    background: var(--bg);
    border-radius: 14px;
    padding: 8px 12px;
}
.product-card h3 {
    margin: 0 0 0.55rem;
    font-size: 1.25rem;
    font-weight: 800;
}
.product-card p {
    margin: 0 0 1rem;
    color: var(--muted);
    line-height: 1.7;
    flex: 1;
}
.card-link {
    font-weight: 800;
    color: var(--teal);
}
.tone-hire { border-top: 4px solid var(--navy); }
.tone-academic { border-top: 4px solid var(--teal); }
.tone-erp { border-top: 4px solid var(--gold); }

.product-intro {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 1.5rem;
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}
.product-intro-logo {
    width: 100%;
    max-height: 110px;
    object-fit: contain;
    background: var(--bg);
    border-radius: 14px;
    padding: 12px;
}
.product-intro h2 {
    margin: 0 0 0.65rem;
    font-size: clamp(1.35rem, 2.4vw, 1.9rem);
    font-weight: 800;
}
.product-intro p:not(.eyebrow) {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.feature-grid article {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1.15rem 1.2rem;
}
.feature-grid h4 {
    margin: 0 0 0.4rem;
    font-size: 1rem;
    font-weight: 800;
}
.feature-grid p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
    font-size: 0.95rem;
}
.product-cta-wrap {
    margin-top: 1.8rem;
    text-align: center;
}

.about-strip { background: linear-gradient(135deg, var(--navy-deep), var(--navy) 55%, #0F3A36); color: #fff; }
.about-strip-inner {
    display: grid;
    grid-template-columns: 1.3fr 0.9fr;
    gap: 2rem;
    align-items: center;
}
.about-strip .eyebrow {
    background: rgba(201, 162, 39, 0.18);
    color: #E0C35A;
}
.about-strip h2 { margin: 0 0 0.8rem; font-size: clamp(1.4rem, 2.5vw, 2rem); }
.about-strip p { color: rgba(255,255,255,0.78); line-height: 1.8; }
.about-points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.85rem;
}
.about-points li {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    padding: 0.95rem 1rem;
}
.about-points i { color: #3DBDAE; font-size: 1.2rem; margin-top: 0.1rem; }

/* Contact */
.contact-section {
    background: linear-gradient(160deg, var(--navy-deep), #0D2A2A 70%, var(--navy));
}
.contact-layout {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 1.2rem;
}
.contact-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem;
    margin-bottom: 1rem;
}
.form-grid .full { grid-column: 1 / -1; }
.form-grid label {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}
.form-grid input,
.form-grid select,
.form-grid textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
    font: inherit;
    background: #fff;
    color: var(--text);
}
.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
    outline: 2px solid rgba(15, 118, 110, 0.25);
    border-color: var(--teal);
}
.contact-aside { display: grid; gap: 0.8rem; align-content: start; }
.aside-link {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    padding: 1rem 1.1rem;
    color: #fff;
}
.aside-link i {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--teal);
    color: #fff;
    font-size: 1.15rem;
}
.aside-link .fab.fa-whatsapp { background: #25D366; }
.aside-link strong { display: block; font-size: 0.85rem; color: #E0C35A; }
.aside-link span span { display: block; font-weight: 600; }
.aside-link.static { cursor: default; }

/* Footer */
.site-footer {
    background: var(--navy-deep);
    color: rgba(255,255,255,0.78);
    padding: 3rem 0 1.5rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}
.footer-logo {
    height: 56px;
    width: auto;
    background: #fff;
    border-radius: 12px;
    padding: 6px 10px;
    margin-bottom: 0.9rem;
}
.footer-brand-col p { line-height: 1.75; color: rgba(255,255,255,0.68); }
.site-footer h3 {
    margin: 0 0 0.9rem;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
}
html[lang="ar"] .site-footer h3,
body.lang-ar .site-footer h3 {
    letter-spacing: 0;
    text-transform: none;
    font-size: 0.95rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.55rem; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.1rem;
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 0.92rem;
}

.whatsapp-float {
    position: fixed;
    inset-inline-end: 1.2rem;
    bottom: 1.2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 1.7rem;
    box-shadow: 0 10px 24px rgba(37, 211, 102, 0.35);
    z-index: 1050;
}
.whatsapp-float:hover { color: #fff; transform: scale(1.06); }
.back-to-top {
    position: fixed;
    inset-inline-end: 1.2rem;
    bottom: 5.2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--navy);
    display: grid;
    place-items: center;
    opacity: 0;
    visibility: hidden;
    transition: .2s ease;
    z-index: 1040;
    box-shadow: var(--shadow);
}
.back-to-top.is-visible { opacity: 1; visibility: visible; }

.alert {
    border-radius: 12px;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
}
.alert-success { background: #E8F8F1; color: #0B5E58; }
.alert-danger { background: #FDECEC; color: #9B1C1C; }

/* Tablet */
@media (max-width: 991.98px) {
    :root { --header-h: 70px; }
    .nav-toggle.navbar-toggler { display: inline-flex; }
    .site-nav {
        width: 100%;
        padding: 0.85rem 0 1rem;
        align-items: stretch;
    }
    .nav-links {
        width: 100%;
        gap: 0.2rem;
        padding-top: 0.35rem;
    }
    .nav-links .nav-link {
        padding: 0.7rem 0.85rem;
        font-size: 1rem;
        border-radius: 12px;
    }
    .nav-actions {
        width: 100%;
        flex-wrap: wrap;
        margin: 0.75rem 0 0;
        margin-inline-start: 0;
    }
    .nav-actions .btn-primary-cta,
    .nav-actions .btn-lang {
        flex: 1 1 calc(50% - 0.35rem);
        min-height: 46px;
        text-align: center;
    }
    .hero-grid,
    .about-strip-inner,
    .contact-layout,
    .footer-grid,
    .product-intro,
    .form-grid {
        grid-template-columns: 1fr;
    }
    .product-cards,
    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .product-intro { text-align: center; }
    .product-intro-logo { max-width: 160px; margin-inline: auto; }
    .hero-actions {
        gap: 0.65rem;
    }
    .hero-actions .btn-primary-cta,
    .hero-actions .btn-ghost {
        min-height: 46px;
    }
    .whatsapp-float {
        inset-inline-end: max(1rem, env(safe-area-inset-right));
        bottom: max(1rem, env(safe-area-inset-bottom));
    }
    .back-to-top {
        inset-inline-end: max(1rem, env(safe-area-inset-right));
        bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
    }
}

@media (min-width: 992px) {
    .nav-toggle.navbar-toggler { display: none !important; }
    .site-nav {
        display: flex !important;
        flex-direction: row;
        align-items: center;
    }
}

/* Phones */
@media (max-width: 767.98px) {
    .product-cards,
    .feature-grid {
        grid-template-columns: 1fr;
    }
    .hero-actions .btn-primary-cta,
    .hero-actions .btn-ghost,
    .product-cta-wrap .btn-primary-cta {
        width: 100%;
    }
    .nav-actions .btn-primary-cta,
    .nav-actions .btn-lang {
        flex: 1 1 100%;
    }
}

@media (max-width: 575.98px) {
    :root { --header-h: 64px; }
    .container { width: min(1120px, calc(100% - 1.25rem)); }
    .brand-logo {
        height: 46px;
        max-width: min(220px, 58vw);
    }
    .hero { padding: 1.5rem 0 2rem; }
    .hero h1 {
        font-size: clamp(1.55rem, 7vw, 2rem);
        line-height: 1.35;
    }
    html[lang="ar"] .hero h1,
    body.lang-ar .hero h1 { line-height: 1.45; }
    .lead { font-size: 1rem; max-width: none; }
    .section { padding: 2.75rem 0; }
    .section-head { margin-bottom: 1.75rem; }
    .section-head h2 { line-height: 1.4; }
    .product-card,
    .product-intro,
    .contact-card,
    .feature-grid article { padding: 1.15rem; }
    .hero-product-card {
        padding: 0.8rem 0.9rem;
        gap: 0.75rem;
    }
    .hero-product-card img { width: 52px; height: 52px; flex-shrink: 0; }
    .hero-product-card strong { font-size: 0.98rem; }
    .hero-product-card span { font-size: 0.88rem; }
    .product-card-logo { height: 60px; max-width: 170px; }
    .aside-link { padding: 0.9rem 1rem; }
    .form-grid input,
    .form-grid select,
    .form-grid textarea {
        font-size: 16px; /* prevents iOS zoom-on-focus */
        min-height: 46px;
    }
    .form-grid textarea { min-height: 120px; }
    .footer-logo { height: 48px; }
    .whatsapp-float {
        width: 52px;
        height: 52px;
        font-size: 1.55rem;
    }
}

@media (hover: none) and (pointer: coarse) {
    .btn-primary-cta:hover,
    .btn-ghost:hover,
    .product-card:hover,
    .hero-product-card:hover {
        transform: none;
    }
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
