/* ==========================================================================
   MINGYI Equipment — main stylesheet
   ========================================================================== */

:root {
    --ink: #0d1620;
    --ink-2: #16222e;
    --steel: #64748b;
    --line: #e3e8ee;
    --soft: #f4f6f8;
    --white: #ffffff;
    --accent: #f5a524;
    --accent-dark: #d98a06;
    --radius: 2px;
    --shadow: 0 18px 40px rgba(13, 22, 32, 0.08);
    --wrap: 1220px;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
    margin: 0 0 .5em;
    line-height: 1.12;
    letter-spacing: -0.025em;
    font-weight: 800;
}

h1 { font-size: clamp(2.35rem, 4.6vw, 3.9rem); }
h2 { font-size: clamp(1.7rem, 2.8vw, 2.5rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }

.mg-wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 28px;
}

.screen-reader-text {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
}

/* ---------------------------------------------------------------- buttons */
.mg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 26px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: .95rem;
    letter-spacing: .01em;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.mg-btn:hover { transform: translateY(-1px); }
.mg-btn--accent { background: var(--accent); color: #1a1200; }
.mg-btn--accent:hover { background: var(--accent-dark); }
.mg-btn--dark { background: var(--ink); color: #fff; }
.mg-btn--dark:hover { background: var(--ink-2); }
.mg-btn--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.mg-btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }
.mg-btn--sm { padding: 10px 18px; font-size: .85rem; }

/* ---------------------------------------------------------------- top bar */
.mg-topbar {
    background: var(--ink);
    color: #c8d2dc;
    font-size: .78rem;
    letter-spacing: .02em;
}
.mg-topbar__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    min-height: 38px;
}
.mg-topbar__contact { display: flex; gap: 22px; }
.mg-topbar a:hover { color: var(--accent); }

/* ----------------------------------------------------------------- header */
.mg-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, .97);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(8px);
}
.mg-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 76px;
}

.mg-logo { display: inline-flex; align-items: center; gap: 12px; }
.mg-logo__mark {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    background: var(--accent);
    color: #1a1200;
    font-weight: 800;
    font-size: 1.25rem;
    border-radius: var(--radius);
}
.mg-logo__text { display: flex; flex-direction: column; line-height: 1.05; }
.mg-logo__text strong { font-size: 1.18rem; letter-spacing: .06em; font-weight: 800; }
.mg-logo__text small { font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: var(--steel); }
.mg-logo--light .mg-logo__text small { color: #93a3b3; }

.mg-nav { display: flex; align-items: center; gap: 28px; }
.mg-nav__list {
    display: flex;
    gap: 26px;
    list-style: none;
    margin: 0; padding: 0;
    font-size: .92rem;
    font-weight: 600;
}
.mg-nav__list > li { position: relative; }
.mg-nav__list > li > a { padding: 8px 0; display: inline-block; }
.mg-nav__list > li > a:hover { color: var(--accent-dark); }
.mg-nav__list .sub-menu {
    position: absolute;
    top: 100%; left: -16px;
    min-width: 240px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    list-style: none;
    padding: 10px;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: all .16s ease;
}
.mg-nav__list > li:hover .sub-menu { opacity: 1; visibility: visible; transform: none; }
.mg-nav__list .sub-menu a { display: block; padding: 8px 10px; font-weight: 500; }
.mg-nav__list .sub-menu a:hover { background: var(--soft); }

.mg-nav-toggle {
    display: none;
    background: none; border: 0; padding: 10px; cursor: pointer;
    flex-direction: column; gap: 5px;
}
.mg-nav-toggle span:not(.screen-reader-text) {
    width: 24px; height: 2px; background: var(--ink); display: block;
}

/* ------------------------------------------------------------------- hero */
.mg-hero {
    position: relative;
    min-height: 74vh;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 90px 0 60px;
}
.mg-hero__overlay {
    position: absolute; inset: 0;
    background: linear-gradient(100deg, rgba(9, 14, 20, .94) 0%, rgba(9, 14, 20, .72) 48%, rgba(9, 14, 20, .25) 100%);
}
.mg-hero__inner { position: relative; max-width: 720px; }
.mg-hero h1 { color: #fff; }
.mg-hero__lead {
    font-size: 1.1rem;
    color: #ccd6e0;
    max-width: 560px;
    margin-bottom: 2em;
}
.mg-hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

.mg-kicker {
    font-size: .76rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 1em;
}

.mg-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin: 54px 0 0;
    padding: 26px 0 0;
    border-top: 1px solid rgba(255, 255, 255, .18);
}
.mg-stats dt { font-size: 1.7rem; font-weight: 800; color: #fff; }
.mg-stats dd { margin: 0; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: #9fb0c0; }

/* ---------------------------------------------------------------- section */
.mg-section { padding: 84px 0; }
.mg-section--soft { background: var(--soft); }
.mg-section--dark { background: var(--ink); color: #dbe3ea; }
.mg-section--dark h2, .mg-section--dark h3 { color: #fff; }
.mg-section__head { max-width: 720px; margin-bottom: 46px; }
.mg-section__head p:last-child { color: var(--steel); }
.mg-center { text-align: center; margin-top: 40px; }

/* ------------------------------------------------------------- split cards */
.mg-split { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.mg-split__card {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--ink);
    border-radius: var(--radius);
    color: #fff;
}
.mg-split__card img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    opacity: .82;
    transition: transform .5s ease, opacity .3s ease;
}
.mg-split__card:hover img { transform: scale(1.04); opacity: .95; }
.mg-split__body {
    position: absolute;
    inset: auto 0 0 0;
    padding: 30px;
    background: linear-gradient(to top, rgba(9, 14, 20, .95), rgba(9, 14, 20, 0));
}
.mg-split__body h2 { font-size: 1.5rem; margin-bottom: .35em; }
.mg-split__body p { color: #c3ceda; font-size: .95rem; margin-bottom: .9em; }
.mg-link { font-weight: 700; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }

/* ------------------------------------------------------------- card grid */
.mg-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
}
.mg-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.mg-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: #cfd8e2; }
.mg-card__media { background: #eef1f4; display: block; }
.mg-card__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.mg-card__body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.mg-card__title { font-size: 1.06rem; margin: 0; line-height: 1.3; }
.mg-card__title a:hover { color: var(--accent-dark); }
.mg-card__specs { list-style: none; margin: 0; padding: 0; font-size: .85rem; }
.mg-card__specs li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px dashed var(--line);
}
.mg-card__specs span { color: var(--steel); }
.mg-card__specs strong { font-weight: 600; }
.mg-card__link {
    margin-top: auto;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ink);
}
.mg-card__link:hover { color: var(--accent-dark); }

.mg-chip {
    align-self: flex-start;
    background: var(--ink);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .1em;
    padding: 4px 10px;
    border-radius: var(--radius);
}

/* --------------------------------------------------------------- features */
.mg-features {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
}
.mg-feature { border-top: 2px solid var(--ink); padding-top: 20px; }
.mg-feature__num {
    display: block;
    font-size: .8rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: .1em;
    margin-bottom: 14px;
}
.mg-feature h3 { font-size: 1.02rem; }
.mg-feature p { color: var(--steel); font-size: .92rem; margin: 0; }

/* ------------------------------------------------------------------ steps */
.mg-steps {
    list-style: none;
    margin: 0; padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
    counter-reset: step;
}
.mg-steps li { border-top: 1px solid rgba(255, 255, 255, .18); padding-top: 22px; }
.mg-steps span {
    display: inline-grid;
    place-items: center;
    width: 34px; height: 34px;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-weight: 800;
    font-size: .85rem;
    margin-bottom: 16px;
}
.mg-steps h3 { font-size: 1rem; }
.mg-steps p { color: #9fb0c0; font-size: .9rem; margin: 0; }

/* -------------------------------------------------------------------- cta */
.mg-cta { background: var(--accent); color: #1a1200; padding: 62px 0; }
.mg-cta__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}
.mg-cta h2 { margin: 0 0 .3em; font-size: clamp(1.5rem, 2.4vw, 2.1rem); }
.mg-cta p { margin: 0; max-width: 520px; font-weight: 500; }
.mg-cta__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.mg-cta .mg-btn--ghost { color: #1a1200; border-color: rgba(26, 18, 0, .35); }
.mg-cta .mg-btn--ghost:hover { background: rgba(26, 18, 0, .08); border-color: #1a1200; }

/* ----------------------------------------------------------------- footer */
.mg-footer { background: var(--ink); color: #9fb0c0; padding: 66px 0 26px; font-size: .9rem; }
.mg-footer__grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 44px;
}
.mg-footer h3 {
    color: #fff;
    font-size: .78rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin-bottom: 18px;
}
.mg-footer ul { list-style: none; margin: 0; padding: 0; }
.mg-footer li { margin-bottom: 10px; }
.mg-footer a:hover { color: var(--accent); }
.mg-footer__brand p { margin-top: 18px; max-width: 320px; }
.mg-footer__bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    border-top: 1px solid rgba(255, 255, 255, .1);
    padding-top: 22px;
    font-size: .8rem;
    color: #7a8b9c;
}

/* ------------------------------------------------------------------ forms */
.mg-form { background: #fff; border: 1px solid var(--line); padding: 30px; border-radius: var(--radius); }
.mg-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.mg-form label { display: block; font-size: .8rem; font-weight: 700; letter-spacing: .03em; color: var(--ink-2); }
.mg-form__full { grid-column: 1 / -1; }
.mg-form input[type="text"],
.mg-form input[type="email"],
.mg-form textarea {
    width: 100%;
    margin-top: 7px;
    padding: 12px 14px;
    border: 1px solid #cfd8e2;
    border-radius: var(--radius);
    font: inherit;
    font-size: .95rem;
    color: var(--ink);
    background: #fbfcfd;
    transition: border-color .15s ease, background .15s ease;
}
.mg-form input:focus,
.mg-form textarea:focus {
    outline: none;
    border-color: var(--ink);
    background: #fff;
}
.mg-form__small { font-size: .78rem; color: var(--steel); margin: 14px 0 0; }
.mg-form__notice {
    padding: 13px 16px;
    border-left: 3px solid var(--accent);
    background: #fff8e8;
    font-size: .9rem;
    margin-bottom: 20px;
}
.mg-form__notice--err { background: #fdeeee; border-color: #d64545; }
.mg-hp { position: absolute; left: -9999px; opacity: 0; height: 0; }

/* --------------------------------------------------------- product detail */
.mg-breadcrumb { font-size: .8rem; color: var(--steel); padding: 18px 0; }
.mg-breadcrumb a:hover { color: var(--ink); }

.mg-product { padding: 10px 0 70px; }
.mg-product__top {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 48px;
    align-items: start;
}
.mg-product__media { background: var(--soft); border: 1px solid var(--line); }
.mg-product__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.mg-product__tagline { color: var(--accent-dark); font-weight: 700; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
.mg-product h1 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.mg-product__lead { color: var(--steel); }
.mg-spec-table { width: 100%; border-collapse: collapse; margin: 26px 0; font-size: .9rem; }
.mg-spec-table th,
.mg-spec-table td { text-align: left; padding: 11px 0; border-bottom: 1px solid var(--line); }
.mg-spec-table th { font-weight: 500; color: var(--steel); width: 45%; }
.mg-spec-table td { font-weight: 600; }
.mg-product__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.mg-product__body { margin-top: 60px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: start; }
.mg-product__body h2 { font-size: 1.5rem; }
.mg-product__aside { position: sticky; top: 100px; }

/* ------------------------------------------------------------------ pages */
.mg-page-hero { background: var(--ink); color: #fff; padding: 68px 0; }
.mg-page-hero h1 { margin-bottom: .3em; }
.mg-page-hero p { color: #b4c1cd; max-width: 620px; margin: 0; }
.mg-content { padding: 64px 0; }
.mg-content__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: start; }
.mg-content h2 { font-size: 1.6rem; margin-top: 1.4em; }
.mg-content h2:first-child { margin-top: 0; }
.mg-content p, .mg-content li { color: #33414f; }
.mg-content ul { padding-left: 20px; }

.mg-about-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 34px 0; }
.mg-about-stats div { border-left: 2px solid var(--accent); padding-left: 16px; }
.mg-about-stats strong { display: block; font-size: 1.7rem; font-weight: 800; }
.mg-about-stats span { font-size: .8rem; color: var(--steel); text-transform: uppercase; letter-spacing: .06em; }

/* --------------------------------------------------------------- archive */
.mg-archive-head { padding: 56px 0 30px; }
.mg-archive-head h1 { margin-bottom: .25em; }
.mg-archive-head p { color: var(--steel); max-width: 640px; }
.mg-filters { display: flex; gap: 10px; flex-wrap: wrap; margin: 26px 0 40px; }
.mg-filters a {
    padding: 9px 16px;
    border: 1px solid var(--line);
    font-size: .82rem;
    font-weight: 600;
    border-radius: 999px;
    color: var(--ink-2);
    background: #fff;
}
.mg-filters a:hover,
.mg-filters a.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ------------------------------------------------------------- responsive */
@media (max-width: 1024px) {
    .mg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mg-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mg-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mg-product__top,
    .mg-product__body,
    .mg-content__grid { grid-template-columns: 1fr; gap: 34px; }
    .mg-product__aside { position: static; }
    .mg-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
    .mg-wrap { padding: 0 18px; }
    .mg-topbar__item { display: none; }
    .mg-topbar__inner { justify-content: center; }
    .mg-section { padding: 58px 0; }
    .mg-hero { min-height: 0; padding: 70px 0 46px; }
    .mg-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
    .mg-split,
    .mg-grid,
    .mg-features,
    .mg-steps { grid-template-columns: 1fr; }
    .mg-split__card img { height: 280px; }
    .mg-form { padding: 22px; }
    .mg-form__grid { grid-template-columns: 1fr; }
    .mg-nav-toggle { display: flex; }
    .mg-nav {
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: #fff;
        border-bottom: 1px solid var(--line);
        flex-direction: column;
        align-items: stretch;
        padding: 18px 24px 24px;
        gap: 18px;
        display: none;
        box-shadow: var(--shadow);
    }
    .mg-nav.is-open { display: flex; }
    .mg-nav__list { flex-direction: column; gap: 14px; }
    .mg-nav__list .sub-menu {
        position: static;
        opacity: 1; visibility: visible; transform: none;
        border: 0; box-shadow: none; padding: 6px 0 0 12px;
    }
    .mg-cta__inner { flex-direction: column; align-items: flex-start; }
    .mg-footer__grid { grid-template-columns: 1fr; gap: 30px; }
    .mg-about-stats { grid-template-columns: 1fr; }
}
