/* ==========================================================================
   MENASAAS GLOBALS — LTR
   Design tokens, typography, scrollbar, animations, buttons,
   and ALL shared page components used across every fragment.
   ========================================================================== */

/* --- DESIGN TOKENS ------------------------------------------------------ */
:root {
    /* Surface */
    --mnx-bg: #f8fafc;
    --mnx-surface: #ffffff;
    --mnx-border: #e2e8f0;
    --mnx-ink: #0f172a;
    --mnx-text: #334155;
    --mnx-text-l: #64748b;

    /* Accent */
    --mnx-blue: #198754;
    --mnx-blue-h: #1d4ed8;
    --mnx-green: #10b981;
    --mnx-danger: #ef4444;
    --background-mnx-ink: #1e293b;
    --white: #ffffff;
    --mist: #e2e8f0;

    /* Buttons */
    --btn-bg: #1B2A4A;
    --btn-bg-h: #0f172a;
    --btn-text: #ffffff;
    --btn-shadow: rgba(27, 42, 74, 0.2);
    --btn-shadow-h: rgba(27, 42, 74, 0.3);

    /* Layout */
    --mnx-rail: 60px;
    --mnx-drawer: 200px;
    --mnx-topbar: 60px;
    --mnx-footer: 60px;
    --mnx-ease: 0.4s cubic-bezier(0.16, 1, 0.3, 1);

    /* Page-level tokens (used inside fragments) */
    --pg-navy: #0f172a;
    --pg-green: #059669;
    --pg-green-neon: #07be87;
    --pg-blue: #2563eb;
    --pg-orange: #f59e0b;
    --pg-red: #ef4444;
    --pg-border: #e2e8f0;
    --pg-muted: #475569;
    --pg-radius: 8px;
    --pg-section-gap: clamp(80px, 12vh, 120px);
    --pg-card-pad: clamp(28px, 4vw, 50px);
}

/* --- RESET -------------------------------------------------------------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    background: var(--mnx-bg);
    color: var(--mnx-text);
    scroll-behavior: smooth;
}

a { text-decoration: none; color: inherit; }
button { outline: none; font-family: inherit; }

/* --- SCROLLBAR ---------------------------------------------------------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(15,23,42,.08); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(15,23,42,.15); }

/* --- GLOBAL ANIMATIONS -------------------------------------------------- */
@keyframes mnx-soft-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mni-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes mni-logo-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.mni-ri { animation: mni-rise .6s cubic-bezier(.22,1,.36,1) both; }
.mni-d1 { animation-delay: .06s; }
.mni-d2 { animation-delay: .12s; }
.mni-d3 { animation-delay: .18s; }
.mni-d4 { animation-delay: .24s; }
.mni-d5 { animation-delay: .30s; }

/* --- BUTTON SYSTEM ------------------------------------------------------ */
.mni-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 48px;
    padding: 0 32px;
    background: var(--btn-bg);
    color: var(--btn-text) !important;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: .25s;
    text-decoration: none;
    box-shadow: 0 4px 14px var(--btn-shadow);
    white-space: nowrap;
    line-height: 1;
}

.mni-btn:hover {
    background: var(--btn-bg-h);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px var(--btn-shadow-h);
    color: var(--btn-text);
}

.mni-btn i { font-size: 16px; font-weight: 800; color: inherit; }
.mni-btn--lg { height: 54px; padding: 0 40px; font-size: 17px; border-radius: 14px; }
.mni-btn--sm { height: 40px; padding: 0 24px; font-size: 13px; border-radius: 10px; }
.mni-btn--white { background: var(--white); color: var(--mnx-ink) !important; box-shadow: none; }
.mni-btn--white:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.18); color: var(--btn-text) !important; }
.mni-btn--ghost { background: transparent; color: var(--btn-text); box-shadow: none; border: 2px solid rgba(255,255,255,.2); }
.mni-btn--ghost:hover { border-color: var(--white); transform: translateY(-2px); }
.mni-btn--outline { background: var(--white); color: var(--mnx-ink) !important; box-shadow: none; border: 2px solid var(--mist); }
.mni-btn--outline:hover { border-color: var(--mnx-blue); transform: translateY(-2px); }

/* --- CLIENT LOGOS ------------------------------------------------------- */
.mnx-client-logos { width: 100%; overflow: hidden; position: relative; padding: 30px 0; background: transparent; }
.mnx-client-logos::before, .mnx-client-logos::after { content: ''; position: absolute; top: 0; width: 120px; height: 100%; z-index: 2; pointer-events: none; }
.mnx-client-logos::before { left: 0; background: linear-gradient(to right, var(--white) 0%, transparent 100%); }
.mnx-client-logos::after { right: 0; background: linear-gradient(to left, var(--white) 0%, transparent 100%); }
.mnx-logos-track { display: flex; align-items: center; width: max-content; animation: mni-logo-scroll 45s linear infinite; }
.mnx-logos-track:hover { animation-play-state: paused; }
.mnx-logos-track img { height: 50px; width: auto; margin: 0 35px; object-fit: contain; filter: grayscale(100%) opacity(0.5); transition: filter 0.3s ease; display: block; }
.mnx-logos-track img:hover { filter: grayscale(0%) opacity(1); }

.fas, .far, .fab, .fal, .fad, [class^="ri-"], [class*=" ri-"] { display: inline-block; min-width: 1em; }

/* ==========================================================================
   SHARED PAGE COMPONENTS — used inside every fragment
   ========================================================================== */

/* --- BLUEPRINT BACKGROUND ----------------------------------------------- */
.blueprint-bg {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(var(--pg-border) 1px, transparent 1px),
        linear-gradient(90deg, var(--pg-border) 1px, transparent 1px);
    background-size: 80px 80px;
    z-index: 0;
    opacity: .12;
    pointer-events: none;
    mask-image: radial-gradient(circle at center, black, transparent 95%);
    -webkit-mask-image: radial-gradient(circle at center, black, transparent 95%);
}

/* --- HERO --------------------------------------------------------------- */
.hero-section {
    padding: clamp(3rem, 6vh, 5rem) 0 0;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-weight: 700;
    font-size: clamp(2.2rem, 5vw, 4rem);
    letter-spacing: -0.04em;
    color: var(--pg-navy);
    line-height: 1.08;
    margin-bottom: 1.8rem;
}

.hero-title .tech-badge {
    display: block;
    color: var(--pg-green);
    font-weight: 800;
    font-size: clamp(0.8rem, 1.1vw, 1rem);
    text-transform: uppercase;
    letter-spacing: 0.35em;
    margin-bottom: 1.2rem;
}

.hero-subtitle {
    color: var(--pg-muted);
    font-size: clamp(1.05rem, 1.4vw, 1.35rem);
    max-width: 820px;
    margin: 0 auto;
    font-weight: 400;
    line-height: 1.65;
}

.hero-subtitle strong { color: var(--pg-navy); font-weight: 600; }

/* --- SPECS GRID --------------------------------------------------------- */
.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    background: var(--pg-border);
    gap: 1px;
    border: 1px solid var(--pg-border);
    margin-top: clamp(40px, 6vh, 70px);
    border-radius: var(--pg-radius);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.spec-box {
    background: #fff;
    padding: 32px 24px;
    transition: all .25s ease;
}

.spec-box:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.04); }
.spec-box span { display: block; font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.14em; color: var(--pg-green); margin-bottom: 10px; }
.spec-box p { font-weight: 600; margin: 0; font-size: 1.15rem; color: var(--pg-navy); letter-spacing: -0.01em; }

/* --- SECTION LABEL ------------------------------------------------------ */
.section-label {
    text-align: center;
    margin: var(--pg-section-gap) 0 48px;
    position: relative;
    z-index: 1;
}

.section-label h2 { font-size: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--pg-muted); margin-bottom: 6px; }
.section-label p { font-size: 0.95rem; color: var(--pg-muted); opacity: 0.65; margin-bottom: 0; }

/* --- MODULE BADGE ------------------------------------------------------- */
.module-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    padding: 6px 14px;
    border-radius: var(--pg-radius);
    text-transform: uppercase;
    margin-bottom: 16px;
    width: fit-content;
}

.module-badge.infrastructure { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.module-badge.security { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }

/* --- CARD INSTANCE ------------------------------------------------------ */
.card-instance {
    background: #fff;
    border: 1px solid var(--pg-border);
    padding: var(--pg-card-pad);
    height: 100%;
    transition: border-color .4s cubic-bezier(.19,1,.22,1), border-style .4s;
    display: flex;
    flex-direction: column;
    border-radius: var(--pg-radius);
    position: relative;
    z-index: 1;
}

.card-instance:hover { border-color: var(--pg-green); border-style: dashed; }
.card-instance h3 { font-weight: 700; font-size: clamp(1.4rem, 2.2vw, 2rem); margin-bottom: 16px; letter-spacing: -0.02em; }
.card-instance p { color: var(--pg-muted); font-size: clamp(0.95rem, 1.1vw, 1.1rem); margin-bottom: 0; flex-grow: 1; line-height: 1.65; }
.card-instance p + p, .card-instance p + div, .card-instance p + .row { margin-top: 20px; }

/* --- INSTANCE LINK ------------------------------------------------------ */
.instance-link {
    font-weight: 700;
    color: var(--pg-navy);
    text-decoration: none;
    font-size: 0.82rem;
    letter-spacing: 0.13em;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: color .25s;
    text-transform: uppercase;
}

.instance-link:hover { color: var(--pg-green); }

/* --- CTA CONTAINER ------------------------------------------------------ */
.cta-container {
    text-align: center;
    padding: var(--pg-section-gap) 0;
    max-width: 760px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* --- CONTACT GRID ------------------------------------------------------- */
.contact-grid { display: flex; justify-content: center; gap: 16px; margin-top: 40px; }

.contact-item {
    background: #fff;
    border: 1px solid var(--pg-border);
    padding: 28px 22px;
    flex: 1;
    text-decoration: none;
    border-radius: var(--pg-radius);
    transition: .35s cubic-bezier(.19,1,.22,1);
    position: relative;
    cursor: pointer;
}

.contact-item:hover { border-color: var(--pg-green); border-style: dashed; }
.contact-item span { display: block; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; color: var(--pg-green); letter-spacing: 0.2em; margin-bottom: 12px; }
.contact-item p { margin: 0; font-weight: 600; font-size: 1.1rem; color: var(--pg-navy); }

/* --- EMAIL COPY TRIGGER ------------------------------------------------- */
#email-copy-trigger { cursor: copy !important; }
#email-copy-trigger::after { content: "Copy"; font-family: inherit; font-size: 0.8rem; position: absolute; right: 18px; top: 50%; opacity: 0; transform: translateY(-50%) translateX(8px); transition: .25s ease; color: var(--pg-green); font-weight: 700; }
#email-copy-trigger:hover { background: #f8fafc; padding-right: 60px; }
#email-copy-trigger:hover::after { opacity: 1; transform: translateY(-50%) translateX(0); }

/* --- WHITEPAPER DARK BAR ------------------------------------------------ */
.whitepaper-bar {
    background: var(--pg-navy);
    color: #fff;
    padding: clamp(36px, 5vw, 70px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: var(--pg-radius);
    gap: 30px;
}

.whitepaper-bar h3, .whitepaper-bar h4 { color: #fff; }
.whitepaper-bar p { color: rgba(255,255,255,.75); }

.btn-ghost {
    border: 1px solid rgba(255,255,255,0.3);
    padding: 14px 36px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.82rem;
    border-radius: var(--pg-radius);
    transition: 0.4s cubic-bezier(0.19,1,0.22,1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-ghost:hover {
    background: var(--pg-green-neon);
    color: var(--pg-navy) !important;
    border-color: var(--pg-green-neon);
}

/* --- RESPONSIVE (page components) --------------------------------------- */
@media (max-width: 991px) {
    .whitepaper-bar { flex-direction: column; text-align: center; }
}

@media (max-width: 768px) {
    .contact-grid { flex-direction: column; }
    .hero-title { line-height: 1.18; }
    .specs-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .specs-grid { grid-template-columns: 1fr; }
}

/* Content wrapper - narrower than bootstrap container */
.mnx-content-wrap {
    max-width: 1060px;
    margin: 0 auto;
    padding: 2rem 24px 4rem;
    position: relative;
}

@media (max-width: 768px) {
    .mnx-content-wrap {
        padding: 1.5rem 16px 3rem;
    }
}
