/* ===================================================================
   /machines — machinery hub (2026-11-12)
   -------------------------------------------------------------------
   Direction: Swiss / minimal B2B (ui-ux-pro-max "minimalism-and-swiss-
   style"): grid-based, generous white space, one accent, clean 1px
   borders instead of heavy shadows, clear type hierarchy.

   Accessibility:
   - Small magenta text uses --brand-700 (#a81264, 7.5:1 on white);
     --brand itself is 4.36:1 and is kept for large/decorative use only.
   - Every link/button is >= 44px tall; focus rings are visible.
   - No data-aos: nothing here is hidden waiting for JavaScript.
   - Hover lifts are disabled under prefers-reduced-motion.
   Loaded only on /machines via $page['css'].
   =================================================================== */

.mh-eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    margin: 0 0 14px;
    font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    color: var(--brand-700);
}
.mh-eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--brand); }
.mh-eyebrow-light { color: var(--brand-tint-2); }

.mh-h1 {
    font-family: var(--font-display);
    font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3.5rem);
    line-height: 1.08; letter-spacing: -.01em;
    color: var(--ink); margin: 0 0 16px;
}
.mh-h2 {
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 1.25rem + 1.6vw, 2.5rem);
    line-height: 1.15; color: var(--ink); margin: 0 0 14px;
}
.mh-sub {
    font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); line-height: 1.5;
    color: var(--ink-800); margin: 0 0 18px; font-weight: 500;
}
.mh-lede { color: var(--ink-70); font-size: 1.05rem; line-height: 1.65; margin: 0; max-width: 62ch; }
.mh-head { max-width: 720px; margin-bottom: clamp(28px, 3vw, 44px); }

/* ---------- Hero ---------- */
.mh-hero {
    padding-block: clamp(12px, 2vw, 28px) clamp(36px, 4vw, 64px);
    background:
        radial-gradient(60% 70% at 85% 35%, var(--brand-tint) 0%, rgba(253,242,248,0) 70%),
        linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
    border-bottom: 1px solid var(--line);
}
.mh-hero .quick-answer {
    color: var(--ink-70); font-size: 1.02rem; line-height: 1.7;
    margin: 0 0 26px; max-width: 60ch;
    padding-left: 16px; border-left: 3px solid var(--brand-tint-2);
}
.mh-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 8px; }
.mh-btn { min-height: 48px; display: inline-flex; align-items: center; gap: 8px; padding-inline: 24px; }
.mh-btn-line {
    min-height: 48px; display: inline-flex; align-items: center; padding: 0 22px;
    border: 1.5px solid var(--line-strong); border-radius: 999px;
    color: var(--ink); font-weight: 600; font-size: .95rem; text-decoration: none; background: var(--surface);
    transition: border-color .2s ease, color .2s ease;
}
.mh-btn-line:hover { border-color: var(--ink); color: var(--ink); }
.mh-hero-figure { margin: 0; }
.mh-hero-figure img { display: block; width: 100%; height: auto; filter: drop-shadow(0 24px 40px rgba(8,8,8,.10)); }

.mh-facts {
    list-style: none; margin: clamp(28px, 3vw, 44px) 0 0; padding: 0;
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface);
    overflow: hidden;
}
.mh-facts li { padding: 20px 24px; border-left: 1px solid var(--line); }
.mh-facts li:first-child { border-left: 0; }
.mh-facts strong {
    display: block; font-family: var(--font-display); font-weight: 400;
    font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.2rem); line-height: 1.1; color: var(--ink);
}
.mh-facts span { display: block; margin-top: 4px; color: var(--ink-70); font-size: .92rem; }

/* ---------- Jump links ---------- */
.mh-jump { background: var(--surface); border-bottom: 1px solid var(--line); }
.mh-jump ul {
    list-style: none; margin: 0; padding: 14px 0;
    display: flex; flex-wrap: wrap; gap: 8px;
}
.mh-jump a {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
    border: 1px solid var(--line); border-radius: 999px;
    color: var(--ink-800); font-size: .92rem; font-weight: 600; text-decoration: none;
    background: var(--surface-2);
    transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}
.mh-jump a:hover { border-color: var(--brand); color: var(--brand-700); background: var(--brand-tint); }

/* ---------- By requirement ---------- */
.mh-need {
    height: 100%; display: flex; flex-direction: column;
    padding: 28px 24px 22px; background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--r-lg);
    border-top: 3px solid var(--brand);
}
.mh-need-ico {
    width: 52px; height: 52px; display: inline-grid; place-items: center;
    border-radius: 14px; background: var(--brand-tint); color: var(--brand-700); margin-bottom: 18px;
}
.mh-need-who { font-family: var(--font-heading); font-size: 1.22rem; line-height: 1.3; margin: 0 0 8px; color: var(--ink); }
.mh-need-text { color: var(--ink-70); font-size: .97rem; line-height: 1.6; margin: 0 0 16px; }
.mh-need-links { list-style: none; margin: auto 0 0; padding: 0; border-top: 1px solid var(--line); }
.mh-need-links li { border-bottom: 1px solid var(--line); }
.mh-need-links li:last-child { border-bottom: 0; }
.mh-need-links a {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    min-height: 46px; padding: 8px 0;
    color: var(--ink-800); font-weight: 600; font-size: .95rem; text-decoration: none;
}
.mh-need-links a svg { flex: 0 0 auto; color: var(--brand-700); transition: transform .2s ease; }
.mh-need-links a:hover { color: var(--brand-700); }
.mh-need-links a:hover svg { transform: translateX(3px); }

/* ---------- Flagship ---------- */
.mh-flagship { background: var(--surface-2); border-block: 1px solid var(--line); }
.mh-flag-figure { margin: 0; }
.mh-flag-figure img { display: block; width: 100%; max-width: 640px; height: auto; margin-inline: auto; }

.mh-model {
    position: relative; height: 100%; display: flex; flex-direction: column;
    padding: 18px 20px 20px; background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--r-lg);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.mh-model:hover { border-color: var(--line-strong); box-shadow: var(--sh-md); transform: translateY(-2px); }
.mh-model-photo { display: block; aspect-ratio: 1 / 1; margin: 0 0 14px; border-radius: var(--r); background: var(--surface); overflow: hidden; }
.mh-model-photo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.mh-model-series { margin: 0 0 4px; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-700); }
.mh-model-name { font-family: var(--font-heading); font-size: 1.35rem; margin: 0 0 12px; }
.mh-model-name a { color: var(--ink); text-decoration: none; }
/* The whole card is the link target for pointer users; the real <a>s stay
   for keyboard and screen readers. */
.mh-model-name a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.mh-model-specs { margin: 0 0 14px; display: grid; gap: 8px; }
.mh-model-specs div { padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.mh-model-specs dt { font-weight: 600; color: var(--ink-70); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.mh-model-specs dd { margin: 2px 0 0; font-weight: 700; color: var(--ink); font-size: .95rem; }
.mh-model-text { color: var(--ink-70); font-size: .93rem; line-height: 1.55; margin: 0 0 14px; }
.mh-model-link, .mh-cat-link {
    position: relative; z-index: 1;
    margin-top: auto; display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
    color: var(--brand-700); font-weight: 700; font-size: .93rem; text-decoration: none;
}
.mh-model-link svg, .mh-cat-link svg { transition: transform .2s ease; }
.mh-model-link:hover svg, .mh-cat-link:hover svg { transform: translateX(3px); }

/* ---------- Range in production order ---------- */
.mh-range-grid {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px;
}
.mh-cat {
    display: flex; flex-direction: column; padding: 24px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
    transition: border-color .2s ease, box-shadow .2s ease;
}
.mh-cat:hover { border-color: var(--line-strong); box-shadow: var(--sh-sm); }
.mh-cat-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.mh-cat-ico {
    width: 52px; height: 52px; display: inline-grid; place-items: center;
    border-radius: 14px; background: var(--ink-900); color: #fff;
}
.mh-cat-stage { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-70); text-align: right; }
.mh-cat-no { display: block; font-family: var(--font-display); font-size: 1.5rem; letter-spacing: 0; color: var(--ink-40); line-height: 1; margin-bottom: 4px; }
.mh-cat-name { font-family: var(--font-heading); font-size: 1.22rem; line-height: 1.3; margin: 0 0 8px; }
.mh-cat-name a { color: var(--ink); text-decoration: none; }
.mh-cat-name a:hover { color: var(--brand-700); }
.mh-cat-text { color: var(--ink-70); font-size: .95rem; line-height: 1.6; margin: 0 0 14px; }
.mh-cat-models { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.mh-cat-models a {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
    font-size: .8rem; font-weight: 600; color: var(--ink-800); text-decoration: none;
    background: var(--surface-3); border-radius: 8px;
}
.mh-cat-models a:hover { background: var(--brand-tint); color: var(--brand-700); }

/* ---------- Why ---------- */
.mh-why { background: var(--ink-900); color: #d9dce3; }
.mh-why .mh-h2 { color: #fff; }
.mh-why-h { font-family: var(--font-heading); font-size: 1.15rem; color: #fff; margin: 0 0 8px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.16); }
.mh-why p { margin: 0; line-height: 1.65; color: #d9dce3; }

/* ---------- FAQ ---------- */
.mh-faq .faq-item summary { padding: 20px 2px; min-height: 44px; }
.mh-faq .faq-answer p { color: var(--ink-70); line-height: 1.7; }

/* ---------- Focus ---------- */
.mh-jump a:focus-visible, .mh-need-links a:focus-visible, .mh-model-name a:focus-visible,
.mh-model-link:focus-visible, .mh-cat-link:focus-visible, .mh-cat-models a:focus-visible,
.mh-cat-name a:focus-visible, .mh-btn-line:focus-visible {
    outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .mh-range-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mh-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mh-facts li:nth-child(3) { border-left: 0; }
    .mh-facts li:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 575.98px) {
    .mh-range-grid { grid-template-columns: 1fr; }
    .mh-facts li { padding: 16px; }
    .mh-actions > a { width: 100%; justify-content: center; }
    .mh-jump ul { gap: 6px; }
    .mh-jump a { padding: 0 12px; font-size: .84rem; }
}

@media (prefers-reduced-motion: reduce) {
    .mh-model, .mh-model:hover { transform: none; transition: none; }
    .mh-need-links a svg, .mh-model-link svg, .mh-cat-link svg { transition: none; transform: none !important; }
}
