/* ===========================================================
   KMT Services Privé — site vitrine (RTL / arabe)
   Palette navy + or · Cairo/Tajawal
   =========================================================== */

:root {
    --navy-900: #0e1b33;
    --navy-800: #143059;
    --navy-600: #2d385d;
    --gold: #f7c051;
    --gold-700: #a17120;
    --paper: #f6f7fb;
    --card: #ffffff;
    --ink: #101a30;
    --muted: #5b6478;
    --line: #e6e9f2;
    --wa: #25d366;
    --radius: 20px;
    --container: 1200px;
    --shadow-sm: 0 6px 20px -10px rgba(20, 48, 89, 0.25);
    --shadow-lg: 0 30px 60px -30px rgba(20, 48, 89, 0.45);
    --font-body: 'Tajawal', system-ui, sans-serif;
    --font-head: 'Cairo', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.8;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.25; margin: 0; font-weight: 800; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 8px; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: clamp(18px, 5vw, 40px); }
.text-gold { color: var(--gold); }

/* ===== Scroll progress ===== */
.scroll-progress {
    position: fixed; inset-block-start: 0; inset-inline-start: 0;
    height: 3px; width: 0%;
    background: linear-gradient(90deg, var(--gold), var(--gold-700));
    z-index: 200;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: var(--font-head); font-weight: 700; font-size: 1rem;
    padding: 0.7em 1.4em; border: 0; border-radius: 999px; cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}
.btn .ico { width: 1.15em; height: 1.15em; flex: none; }
.btn--gold { background: linear-gradient(180deg, var(--gold), #eab038); color: var(--navy-900); box-shadow: 0 14px 30px -12px rgba(161, 113, 32, 0.7); }
.btn--gold:hover { transform: translateY(-2px); box-shadow: 0 20px 36px -14px rgba(161, 113, 32, 0.85); }
.btn--ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.6px rgba(255, 255, 255, 0.5); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1.6px var(--gold); color: var(--gold); }
.btn--sm { padding: 0.55em 1.1em; font-size: 0.9rem; }
.btn--lg { padding: 0.85em 1.7em; font-size: 1.08rem; }
.btn--block { width: 100%; }

/* ===== Eyebrow / section heads ===== */
.eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--font-head); font-weight: 700; font-size: 0.82rem;
    letter-spacing: 0.12em; color: var(--gold-700); text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: linear-gradient(90deg, var(--gold-700), var(--gold)); }
.eyebrow--light { color: var(--gold); }
.section { padding-block: clamp(64px, 9vw, 120px); }
.section--tint { background: linear-gradient(180deg, #eef1f8, var(--paper)); }
.section--dark { background: radial-gradient(120% 100% at 15% 0%, var(--navy-600), var(--navy-800) 55%, var(--navy-900)); color: #fff; }
.section__head { max-width: 640px; margin-inline: auto; text-align: center; margin-bottom: clamp(40px, 6vw, 64px); }
.section__title { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 900; color: var(--navy-900); }
.section__title--light { color: #fff; }
.section__lead { margin-top: 16px; color: var(--muted); font-size: 1.08rem; }
.section__lead--light { color: rgba(255, 255, 255, 0.75); }

/* ===== Nav ===== */
.nav {
    position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 100;
    padding-block: 18px; transition: all 0.35s ease;
}
.nav.scrolled { padding-block: 10px; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); box-shadow: 0 10px 30px -18px rgba(20, 48, 89, 0.35); }
.nav__inner { display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand__logo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35); }
.brand__text { font-family: var(--font-head); font-weight: 900; font-size: 1.2rem; line-height: 1; color: #fff; }
.brand__text small { display: block; font-size: 0.6rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin-top: 3px; }
.nav.scrolled .brand__text { color: var(--navy-900); }
.nav.scrolled .brand__logo { box-shadow: 0 0 0 2px var(--line); }
.nav__links { margin-inline-start: auto; display: flex; align-items: center; gap: 26px; }
.nav__links > a:not(.btn) { font-family: var(--font-head); font-weight: 700; font-size: 0.98rem; color: rgba(255, 255, 255, 0.9); position: relative; padding-block: 6px; }
.nav__links > a:not(.btn)::after { content: ""; position: absolute; inset-inline: 0; inset-block-end: 0; height: 2px; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-700)); transition: width 0.28s ease; }
.nav__links > a:not(.btn):hover::after { width: 100%; }
.nav.scrolled .nav__links > a:not(.btn) { color: var(--navy-800); }
.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { width: 26px; height: 2.5px; background: #fff; border-radius: 2px; transition: 0.3s; }
.nav.scrolled .nav__toggle span { background: var(--navy-900); }

/* ===== Hero ===== */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; color: #fff; isolation: isolate; }
.hero__bg { position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 110% at 80% 10%, var(--navy-600), var(--navy-800) 45%, var(--navy-900)); }
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.5; }
.orb--1 { width: 480px; height: 480px; background: rgba(247, 192, 81, 0.4); inset-block-start: -120px; inset-inline-end: -80px; }
.orb--2 { width: 420px; height: 420px; background: rgba(45, 56, 93, 0.9); inset-block-end: -140px; inset-inline-start: -100px; }
.grid-overlay { position: absolute; inset: 0; opacity: 0.5; 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: 46px 46px; -webkit-mask-image: radial-gradient(100% 100% at 50% 0%, #000, transparent 75%); mask-image: radial-gradient(100% 100% at 50% 0%, #000, transparent 75%); }
.hero__arc { position: absolute; inset-block-start: 0; inset-inline-end: -4%; height: 100%; width: 60%; opacity: 0.35; z-index: -1; }
html[dir="rtl"] .hero__arc { transform: scaleX(-1); inset-inline-start: -4%; inset-inline-end: auto; }
.hero__content { padding-block: 120px 90px; max-width: 760px; }
.hero__title { font-size: clamp(2.6rem, 6.5vw, 5rem); font-weight: 900; margin-top: 20px; letter-spacing: -0.01em; }
.hero__sub { margin-top: 22px; font-size: clamp(1.05rem, 1.7vw, 1.3rem); color: rgba(255, 255, 255, 0.82); max-width: 52ch; }
.hero__cta { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 16px; }
.scroll-cue { position: absolute; inset-block-end: 26px; inset-inline-start: 50%; transform: translateX(50%); width: 24px; height: 40px; border: 2px solid rgba(255, 255, 255, 0.4); border-radius: 14px; }
html[dir="rtl"] .scroll-cue { transform: translateX(-50%); }
.scroll-cue span { position: absolute; inset-block-start: 8px; inset-inline-start: 50%; transform: translateX(-50%); width: 3px; height: 8px; border-radius: 2px; background: var(--gold); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0%, 100% { opacity: 0.3; transform: translate(-50%, 0); } 50% { opacity: 1; transform: translate(-50%, 10px); } }

/* ===== Stats ===== */
.stats { position: relative; z-index: 5; margin-block-start: -70px; }
.stats__grid { background: var(--card); border-radius: 26px; box-shadow: var(--shadow-lg); display: grid; grid-template-columns: repeat(4, 1fr); overflow: hidden; }
.stat { padding: clamp(24px, 4vw, 40px) 18px; text-align: center; position: relative; }
.stat + .stat::before { content: ""; position: absolute; inset-block: 24%; inset-inline-start: 0; width: 1px; background: var(--line); }
.stat__num { font-family: var(--font-head); font-weight: 900; font-size: clamp(2rem, 4vw, 2.9rem); color: var(--navy-800); }
.stat__label { margin-top: 6px; color: var(--muted); font-weight: 500; }

/* ===== Cards (services) ===== */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.card::before { content: ""; position: absolute; inset-inline: 0; inset-block-start: 0; height: 4px; background: linear-gradient(90deg, var(--gold), var(--gold-700)); transform: scaleX(0); transform-origin: inline-start; transition: transform 0.35s ease; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card:hover::before { transform: scaleX(1); }
.card__icon { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(160deg, var(--navy-600), var(--navy-800)); color: var(--gold); margin-bottom: 20px; }
.card__icon svg { width: 28px; height: 28px; }
.card__title { font-size: 1.3rem; color: var(--navy-900); }
.card__text { margin-top: 12px; color: var(--muted); }
.card__link { display: inline-block; margin-top: 18px; font-family: var(--font-head); font-weight: 700; color: var(--gold-700); }
.card__link:hover { color: var(--navy-800); }

/* ===== Why ===== */
.why { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(30px, 5vw, 64px); align-items: center; }
.why__media { display: flex; justify-content: center; }
.why__badge { background: radial-gradient(120% 120% at 30% 0%, var(--navy-600), var(--navy-900)); border-radius: 28px; padding: 48px; text-align: center; box-shadow: var(--shadow-lg); width: 100%; max-width: 360px; }
.why__badge img { width: 120px; height: 120px; border-radius: 50%; margin-inline: auto; box-shadow: 0 0 0 3px rgba(247, 192, 81, 0.4); }
.why__slogan { margin-top: 20px; font-family: var(--font-head); font-weight: 800; font-size: 1.5rem; color: var(--gold); }
.why__list { display: flex; flex-direction: column; gap: 20px; margin-top: 28px; }
.why__list li { display: flex; gap: 14px; }
.why__ic { flex: none; width: 30px; height: 30px; border-radius: 50%; background: rgba(247, 192, 81, 0.18); color: var(--gold-700); display: grid; place-items: center; font-weight: 900; }
.why__list strong { font-family: var(--font-head); color: var(--navy-900); font-size: 1.1rem; }
.why__list p { color: var(--muted); margin-top: 2px; }

/* ===== Process ===== */
.steps { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.step-line { position: absolute; inset-block-start: 28px; inset-inline: 40px; height: 2px; background: linear-gradient(90deg, rgba(247, 192, 81, 0.6), rgba(247, 192, 81, 0.15)); }
.step { position: relative; text-align: center; }
.step__num { width: 58px; height: 58px; margin-inline: auto; border-radius: 50%; background: var(--navy-900); color: var(--gold); display: grid; place-items: center; font-family: var(--font-head); font-weight: 900; font-size: 1.4rem; position: relative; z-index: 1; box-shadow: 0 12px 24px -12px rgba(20, 48, 89, 0.6); }
.step h3 { margin-top: 18px; color: var(--navy-900); font-size: 1.15rem; }
.step p { margin-top: 8px; color: var(--muted); font-size: 0.97rem; }

/* ===== Work ===== */
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.work-card { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--navy-800); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; min-height: 300px; }
.work-card img { width: 100%; height: 210px; object-fit: cover; transition: transform 0.6s ease; }
.work-card:hover img { transform: scale(1.07); }
.work-card__body { padding: 22px; color: #fff; }
.work-card__body h3 { font-size: 1.25rem; margin-top: 6px; }
.work-card__body p { color: rgba(255, 255, 255, 0.72); margin-top: 8px; font-size: 0.95rem; }
.tag { display: inline-block; font-family: var(--font-head); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.08em; color: var(--gold); background: rgba(247, 192, 81, 0.14); padding: 4px 12px; border-radius: 999px; }
.work-card--cta { background: linear-gradient(160deg, var(--gold), var(--gold-700)); color: var(--navy-900); align-items: flex-start; justify-content: center; }
.work-card--cta .work-card__body { color: var(--navy-900); }
.work-card--cta h3 { color: var(--navy-900); font-size: 1.5rem; }
.work-card--cta p { color: rgba(16, 26, 48, 0.8); margin-block: 8px 18px; }

/* ===== Quotes ===== */
.quote { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm); position: relative; }
.quote::before { content: "\201D"; font-family: Georgia, serif; font-size: 4rem; line-height: 1; color: var(--gold); position: absolute; inset-block-start: 10px; inset-inline-end: 22px; opacity: 0.5; }
.quote p { color: var(--ink); font-size: 1.05rem; }
.quote footer { margin-top: 16px; font-family: var(--font-head); font-weight: 700; color: var(--gold-700); }

/* ===== CTA band ===== */
.cta-band { background: linear-gradient(120deg, var(--navy-800), var(--navy-600)); color: #fff; }
.cta-band__inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding-block: clamp(48px, 7vw, 80px); flex-wrap: wrap; }
.cta-band h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 900; }
.cta-band p { margin-top: 10px; color: rgba(255, 255, 255, 0.82); max-width: 46ch; }

/* ===== Contact ===== */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(30px, 5vw, 60px); align-items: start; }
.contact__list { display: flex; flex-direction: column; gap: 18px; margin-top: 30px; }
.contact__list li, .contact__list li a { display: flex; align-items: center; gap: 14px; color: var(--ink); }
.contact__ic { flex: none; width: 46px; height: 46px; border-radius: 14px; background: #fff; box-shadow: var(--shadow-sm); display: grid; place-items: center; font-size: 1.3rem; }
.contact__list small { display: block; color: var(--muted); font-size: 0.8rem; }
.contact__list span { font-family: var(--font-head); font-weight: 700; }
.contact__list a:hover span { color: var(--gold-700); }
.contact__form-wrap { display: grid; gap: 20px; }
.contact__form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.contact__form h3 { color: var(--navy-900); margin-bottom: 18px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-family: var(--font-head); font-weight: 700; font-size: 0.9rem; color: var(--navy-900); margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; font-family: var(--font-body); font-size: 1rem; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); transition: border-color 0.2s; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.contact__map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.contact__map iframe { width: 100%; height: 260px; border: 0; display: block; }

/* ===== Footer ===== */
.footer { background: var(--navy-900); color: rgba(255, 255, 255, 0.72); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 36px; padding-block: 56px; }
.brand--light .brand__text { color: #fff; }
.footer__slogan { margin-top: 16px; font-family: var(--font-head); color: var(--gold); font-weight: 700; }
.footer__links { display: flex; flex-direction: column; gap: 12px; }
.footer__links a:hover { color: var(--gold); }
.footer__contact { display: flex; flex-direction: column; gap: 12px; }
.footer__contact a:hover { color: var(--gold); }
.footer__bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); padding-block: 20px; font-size: 0.88rem; color: rgba(255, 255, 255, 0.5); }

/* ===== Floating WhatsApp + to-top ===== */
.fab-wa { position: fixed; inset-block-end: 22px; inset-inline-start: 22px; width: 58px; height: 58px; border-radius: 50%; background: var(--wa); color: #fff; display: grid; place-items: center; box-shadow: 0 14px 30px -8px rgba(37, 211, 102, 0.6); z-index: 120; transition: transform 0.25s; }
.fab-wa svg { width: 32px; height: 32px; }
.fab-wa:hover { transform: scale(1.08); }
.fab-wa::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); } 70% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); } 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); } }
.to-top { position: fixed; inset-block-end: 22px; inset-inline-end: 22px; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--navy-800); color: #fff; font-size: 1.3rem; cursor: pointer; opacity: 0; pointer-events: none; transform: translateY(12px); transition: all 0.3s; z-index: 120; }
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
    .scroll-cue span, .fab-wa::after { animation: none; }
    * { scroll-behavior: auto !important; }
}

/* ===== Responsive ===== */
@media (max-width: 980px) {
    .why { grid-template-columns: 1fr; }
    .why__media { order: -1; }
    .contact { grid-template-columns: 1fr; }
    .work-grid { grid-template-columns: repeat(2, 1fr); }
    .cards--3 { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
    .nav__links {
        position: fixed; inset-block-start: 0; inset-inline-end: 0; height: 100dvh; width: min(80%, 320px);
        flex-direction: column; align-items: flex-start; justify-content: center; gap: 22px;
        background: var(--navy-900); padding: 40px; transform: translateX(100%);
        transition: transform 0.35s ease; box-shadow: -20px 0 60px -20px rgba(0, 0, 0, 0.5);
    }
    html[dir="rtl"] .nav__links { inset-inline-end: auto; inset-inline-start: 0; transform: translateX(-100%); }
    .nav__links.open { transform: translateX(0); }
    .nav__links > a:not(.btn) { color: #fff; font-size: 1.15rem; }
    .nav.scrolled .nav__links > a:not(.btn) { color: #fff; }
    .nav__toggle { display: flex; margin-inline-start: auto; }
    .stats__grid { grid-template-columns: repeat(2, 1fr); }
    .stat:nth-child(2)::before, .stat:nth-child(4)::before { display: none; }
    .cards { grid-template-columns: 1fr; }
    .steps { grid-template-columns: repeat(2, 1fr); gap: 34px; }
    .step-line { display: none; }
    .cta-band__inner { flex-direction: column; text-align: center; align-items: center; }
}
@media (max-width: 560px) {
    body { font-size: 16px; }
    .work-grid { grid-template-columns: 1fr; }
    .stats { margin-block-start: -40px; }
    .hero__cta .btn { flex: 1 1 auto; }
}
