/* ============================================================
   Mandata Consulting Engineers - main stylesheet
   CI: navy/teal #294a59, gold accent #ac9217, Maven Pro
   ============================================================ */

:root {
    --navy: #294a59;
    --navy-dark: #1a303a;
    --navy-deep: #12222a;
    --gold: #ac9217;
    --gold-light: #c9ac2e;
    --light: #f5f7f8;
    --white: #ffffff;
    --text: #2b3138;
    --muted: #69727d;
    --border: #e2e7ea;
    --radius: 14px;
    --shadow: 0 18px 40px rgba(41, 74, 89, 0.12);
    --shadow-sm: 0 6px 18px rgba(41, 74, 89, 0.08);
    --maxw: 1160px;
    --header-h: 78px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Maven Pro", "Segoe UI", Calibri, sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: "Maven Pro", sans-serif; line-height: 1.2; color: var(--navy); }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--gold); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--gold-light); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}
.skip-link:focus {
    position: fixed; top: 10px; left: 10px; z-index: 9999;
    width: auto; height: auto; clip: auto;
    background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 6px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 13px 26px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: .3px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all .25s ease;
    text-align: center;
}
.btn-primary { background: var(--gold); color: #fff; border-color: var(--gold); }
.btn-primary:hover { background: var(--gold-light); border-color: var(--gold-light); color: #fff; transform: translateY(-2px); }
.btn-gold { background: var(--gold); color: #fff; border-color: var(--gold); }
.btn-gold:hover { background: #fff; color: var(--navy); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn-ghost:hover { background: #fff; color: var(--navy); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn-ghost-light:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ============================================================
   Header / Navigation
   ============================================================ */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 14px rgba(41, 74, 89, .07);
    transition: all .3s ease;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    transition: height .3s ease;
}
.site-header.is-scrolled .header-inner { height: 62px; }

.site-branding { display: flex; align-items: center; }
.brand-logo, .custom-logo { max-height: 48px; width: auto; transition: max-height .3s ease; }
.site-header.is-scrolled .brand-logo,
.site-header.is-scrolled .custom-logo { max-height: 40px; }

.primary-nav { display: flex; align-items: center; gap: 28px; }
.nav-menu {
    display: flex;
    align-items: center;
    gap: 26px;
    list-style: none;
    margin: 0; padding: 0;
}
.nav-menu a {
    color: var(--navy);
    font-weight: 600;
    font-size: 15px;
    padding: 6px 0;
    position: relative;
}
.nav-menu a::after {
    content: "";
    position: absolute; left: 0; bottom: 0;
    width: 0; height: 2px; background: var(--gold);
    transition: width .25s ease;
}
.nav-menu a:hover::after,
.nav-menu a.is-current::after { width: 100%; }
.nav-menu a:hover, .nav-menu a.is-current { color: var(--gold); }

/* Language switch */
.lang-switch {
    display: flex; align-items: center; gap: 6px;
    padding-left: 20px;
    border-left: 1px solid var(--border);
}
.lang-btn {
    background: none; border: none; cursor: pointer;
    font-family: inherit; font-weight: 700; font-size: 14px;
    color: var(--muted); padding: 4px 6px; border-radius: 4px;
    transition: color .2s ease;
}
.lang-btn:hover { color: var(--navy); }
.lang-btn.is-active { color: var(--gold); }
.lang-sep { color: var(--border); }

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px; height: 42px;
    background: none; border: none; cursor: pointer;
    padding: 8px;
}
.nav-toggle span {
    display: block; height: 2.5px; width: 100%;
    background: var(--navy); border-radius: 2px;
    transition: all .3s ease;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding: calc(var(--header-h) + 40px) 0 60px;
    background:
        linear-gradient(135deg, rgba(18,34,42,.92) 0%, rgba(41,74,89,.88) 55%, rgba(41,74,89,.8) 100%),
        radial-gradient(circle at 80% 20%, rgba(172,146,23,.25), transparent 45%),
        #12222a;
    color: #fff;
    overflow: hidden;
}
.hero-overlay {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 46px 46px;
    pointer-events: none;
}
.hero-inner { position: relative; max-width: 860px; }
.hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 14px;
    font-weight: 700;
    color: var(--gold-light);
    margin: 0 0 18px;
}
.hero-title {
    color: #fff;
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    font-weight: 800;
    margin: 0 0 20px;
    line-height: 1.08;
}
.hero-quote {
    font-size: clamp(1.05rem, 2.4vw, 1.4rem);
    font-style: italic;
    color: rgba(255,255,255,.9);
    margin: 0 0 16px;
    border-left: 3px solid var(--gold);
    padding-left: 18px;
}
.hero-sub {
    font-size: 1.08rem;
    color: rgba(255,255,255,.8);
    max-width: 640px;
    margin: 0 0 34px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 46px; }
.hero-pillars {
    display: flex; flex-wrap: wrap; gap: 14px;
    list-style: none; margin: 0; padding: 0;
}
.hero-pillars li {
    font-weight: 800;
    letter-spacing: 2px;
    font-size: 14px;
    color: #fff;
    padding: 8px 20px;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 40px;
}

/* ============================================================
   Section basics
   ============================================================ */
.section { padding: 96px 0; }
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-kicker {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    font-size: 13px;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 12px;
}
.section-title { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; margin: 0 0 16px; }
.section-lead { font-size: 1.1rem; color: var(--muted); margin: 0; }
.section-head--light .section-title,
.section-head--light .section-lead { color: #fff; }
.section-head--light .section-lead { color: rgba(255,255,255,.82); }

/* ============================================================
   Services grid
   ============================================================ */
.services { background: var(--light); }
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 34px 30px;
    box-shadow: var(--shadow-sm);
    transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
    border-color: var(--gold);
}
.card-icon {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 62px; height: 62px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--navy), var(--navy-dark));
    color: var(--gold-light);
    margin-bottom: 22px;
}
.card-title { font-size: 1.22rem; font-weight: 700; margin: 0 0 12px; }
.card-text { color: var(--muted); margin: 0; font-size: .98rem; }

/* ============================================================
   MINGRAI section  –  portalmind-style two-column layout
   ============================================================ */
.mingrai {
    background: linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 100%);
    color: #fff;
}

/* Two-column wrapper */
.mingrai-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

/* LEFT column */
.mingrai-eyebrow {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .16em;
    color: var(--gold-light);
    text-transform: uppercase;
    margin: 0 0 18px;
}
.mingrai-heading {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.12;
    color: #fff;
    margin: 0 0 28px;
}
.mingrai-text {
    color: rgba(255,255,255,.82);
    font-size: 1rem;
    line-height: 1.72;
    margin: 0 0 18px;
}
.mingrai-text:last-of-type { margin-bottom: 28px; }
.mingrai-text strong { color: #fff; font-weight: 700; }

.mingrai-statement {
    font-size: 1.22rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.35;
    margin: 0 0 32px;
}

.mingrai-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 36px;
}
.mingrai-chip {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 40px;
    font-size: .92rem;
    font-weight: 600;
    color: #fff;
    background: rgba(255,255,255,.06);
    backdrop-filter: blur(4px);
}
.mingrai-chip-sep {
    color: rgba(255,255,255,.45);
    font-size: 1.1rem;
    font-weight: 300;
}

/* Gold pill CTA button */
.btn-gold-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gold);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    padding: 14px 30px;
    border-radius: 40px;
    text-decoration: none;
    transition: background .2s ease, transform .15s ease;
}
.btn-gold-pill:hover {
    background: var(--gold-dark, #8a7410);
    transform: translateY(-2px);
    color: #fff;
}

/* RIGHT column — dark feature card */
.mingrai-right { display: flex; align-items: stretch; }
.mingrai-feature-card {
    background: rgba(10,20,30,.55);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 20px;
    padding: 40px 36px;
    backdrop-filter: blur(12px);
    width: 100%;
}
.mf-brand {
    font-size: 1.8rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: .04em;
    margin: 0 0 6px;
}
.mf-brand sup { font-size: .6em; vertical-align: super; }
.mf-tagline {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .18em;
    color: var(--gold-light);
    text-transform: uppercase;
    margin: 0 0 28px;
}
.mf-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.mf-list li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    color: rgba(255,255,255,.88);
    font-size: .97rem;
    line-height: 1.55;
}
.mf-icon {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--gold-light);
    display: flex;
}
.mf-list strong { color: #fff; font-weight: 700; }

/* Card badge for T&M card */
.card-badge {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--gold);
    border: 1px solid var(--gold);
    border-radius: 20px;
    padding: 3px 12px;
    margin-bottom: 12px;
}
.card--highlight {
    border-color: rgba(172,146,23,.35);
    background: linear-gradient(140deg, #fff 0%, #fffdf0 100%);
}

/* ============================================================
   Philosophy
   ============================================================ */
.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 52px;
}
.phil-item {
    padding: 32px 28px;
    border-radius: var(--radius);
    background: var(--light);
    border: 1px solid var(--border);
    position: relative;
}
.phil-num {
    display: inline-block;
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--gold);
    opacity: .35;
    line-height: 1;
    margin-bottom: 14px;
}
.phil-item h3 { font-size: 1.2rem; margin: 0 0 10px; }
.phil-item p { color: var(--muted); margin: 0; font-size: .98rem; }

.phil-quote {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    font-size: clamp(1.2rem, 3vw, 1.7rem);
    font-style: italic;
    font-weight: 500;
    color: var(--navy);
    padding: 30px 20px 0;
    border-top: 1px solid var(--border);
}

/* ============================================================
   Contact
   ============================================================ */
.contact { background: var(--light); }
.contact-inner {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 48px;
    align-items: start;
}
.contact-info .section-kicker { text-align: left; }
.contact-info .section-title { text-align: left; font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
.contact-meta { list-style: none; padding: 0; margin: 24px 0 0; }
.contact-meta li { margin-bottom: 8px; color: var(--text); }

.contact-form {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: var(--shadow-sm);
}
.field { margin-bottom: 20px; }
.field label {
    display: block;
    font-weight: 600;
    font-size: .95rem;
    color: var(--navy);
    margin-bottom: 8px;
}
.field input, .field textarea {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text);
    background: #fbfcfc;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus, .field textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(172,146,23,.15);
}
.field textarea { resize: vertical; }
.form-note { padding: 12px 16px; border-radius: 10px; font-weight: 600; margin-bottom: 20px; }
.form-ok { background: #e6f4ea; color: #1e7a3d; }
.form-err { background: #fdecec; color: #c0392b; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--navy); color: #fff; }
.footer-top {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1.2fr 1fr;
    gap: 40px;
    padding: 64px 24px 46px;
}
.footer-logo,
.footer-logo-wrap {
    display: inline-block;
    background: #fff;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 18px;
}
.footer-logo { max-height: 64px; width: auto; }
.footer-logo-wrap img { max-height: 44px; width: auto; display: block; }
.footer-logo-white {
    max-height: 58px;
    width: auto;
    margin-bottom: 20px;
    display: block;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.18));
}
.footer-brand p { color: rgba(255,255,255,.72); font-style: italic; margin: 0; max-width: 320px; }
.footer-widget-title { color: #fff; font-size: 1.05rem; margin: 0 0 16px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: var(--gold-light); font-weight: 500; word-break: break-word; }
.footer-links a:hover { color: #fff; }
.footer-note { color: rgba(255,255,255,.6); font-size: .85rem; margin: 16px 0 0; max-width: 260px; line-height: 1.5; }

.footer-bottom { background: var(--navy-deep); }
.footer-bottom-inner {
    display: flex; flex-wrap: wrap;
    align-items: center; justify-content: space-between;
    gap: 12px;
    padding: 20px 24px;
}
.footer-bottom .copyright { color: rgba(255,255,255,.7); margin: 0; font-size: .92rem; }
.footer-bottom-menu { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; }
.footer-bottom-menu a { color: var(--gold-light); font-size: .92rem; }

/* ============================================================
   Legal / generic pages
   ============================================================ */
.page-content { padding-top: calc(var(--header-h) + 60px); }
.legal-page { max-width: 860px; }
.legal-page .entry-content { text-align: left; }
.legal-page h2 { font-size: 1.35rem; margin: 32px 0 12px; }
.legal-hint {
    background: #fff8e1;
    border: 1px solid #f0e2b0;
    border-radius: 10px;
    padding: 14px 18px;
    color: #7a6410;
    font-size: .95rem;
}
.entry-title { padding-top: calc(var(--header-h) + 40px); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
    .mingrai-layout { grid-template-columns: 1fr; gap: 40px; }
    .philosophy-grid { grid-template-columns: 1fr; }
    .contact-inner { grid-template-columns: 1fr; }
    .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
    .nav-toggle { display: flex; }
    .primary-nav {
        position: fixed;
        top: var(--header-h);
        right: 0;
        width: min(320px, 84vw);
        height: calc(100vh - var(--header-h));
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        background: #fff;
        box-shadow: -8px 0 30px rgba(41,74,89,.14);
        padding: 26px 28px;
        transform: translateX(105%);
        transition: transform .3s ease;
        overflow-y: auto;
    }
    .primary-nav.is-open { transform: translateX(0); }
    .nav-menu { flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; }
    .nav-menu li { width: 100%; }
    .nav-menu a { display: block; padding: 12px 0; width: 100%; border-bottom: 1px solid var(--border); }
    .nav-menu a::after { display: none; }
    .lang-switch { padding: 18px 0 0; border-left: none; margin-top: 10px; }
}

@media (max-width: 620px) {
    .section { padding: 68px 0; }
    .cards-grid { grid-template-columns: 1fr; }
    .atlas-row { grid-template-columns: 1fr; }
    .footer-top { grid-template-columns: 1fr; }
    .hero-cta .btn { width: 100%; }
    .contact-form { padding: 26px 22px; }
}
