/* Modular House — ECOVILLE Premium Page */
@import url('tokens.css');

:root {
    --mh-line: rgba(0, 0, 0, 0.09);
    --mh-sub: #444;
    --mh-muted: #777;
    --mh-soft: #fafafa;
    --mh-accent: #1a4d3e;
    --mh-y: clamp(4.5rem, 8vw, 6.25rem);
    --mh-media-ratio: 4 / 3;
    --mh-card-gap: clamp(1.25rem, 2.5vw, 1.75rem);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

html { scroll-behavior: smooth; }

body.mh-page {
    background: #fff;
    color: #111;
    font-size: 1.0625rem;
    line-height: 1.65;
    padding-top: var(--header-h);
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { display: block; width: 100%; height: auto; max-width: 100%; }

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-h);
    z-index: 1000;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--mh-line);
}

.header-inner {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--container-max);
    margin: 0 auto;
    padding-left: var(--container-pad);
    padding-right: var(--container-pad);
}

.logo-img { height: clamp(2.75rem, 8vw, 3.875rem); width: auto; object-fit: contain; }
.nav-links { display: flex; gap: clamp(1.5rem, 4vw, 3.125rem); }
.nav-links a {
    font-size: clamp(0.875rem, 1.5vw, 1rem);
    font-weight: 600;
    text-transform: uppercase;
    color: #333;
    letter-spacing: 0.3px;
}
.nav-links a:hover { color: #000; }
.mobile-menu-toggle { display: none; flex-direction: column; gap: 6px; cursor: pointer; }
.mobile-menu-toggle span { display: block; width: 28px; height: 2px; background: #000; }

.mh-kicker {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--mh-muted);
    margin-bottom: 0.875rem;
}

.mh-sec-title {
    font-family: 'DM Sans', 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(1.625rem, 3.4vw, 2.125rem);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.25;
    margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
}

.mh-sec-desc {
    font-size: 1.0625rem;
    color: var(--mh-sub);
    line-height: 1.75;
    max-width: 40rem;
}

.mh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1.75rem;
    padding: 0.875rem 1.75rem;
    background: #111;
    color: #fff;
    border: 1px solid #111;
    border-radius: 100px;
    font-size: 0.9375rem;
    font-weight: 600;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.mh-btn:hover {
    background: #fff;
    color: #111;
    transform: translateY(-2px);
}

/* ============================================================
   Hero — natural image ratio, text in top-left sky area
   ============================================================ */
.mh-hero {
    background: #fff;
    padding-top: 2rem;
}

.mh-hero-stage {
    position: relative;
    border-radius: 0;
    line-height: 0;
}

.mh-hero-stage .mh-hero-img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 0;
}

.mh-hero-copy {
    position: absolute;
    top: clamp(1.25rem, 3.5vw, 2.5rem);
    left: clamp(1rem, 4vw, 72px);
    z-index: 2;
    max-width: min(46%, 480px);
    text-align: left;
    line-height: normal;
}

.mh-hero-kicker {
    display: block;
    font-size: 0.6875rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #4b5563;
}

.mh-hero-copy h1 {
    margin-top: 0.625rem;
    font-family: 'DM Sans', 'Plus Jakarta Sans', sans-serif;
    font-size: 42px;
    line-height: 1.15;
    font-weight: 800;
    color: #1b1b1b;
}

.mh-hero-lead {
    margin-top: 0.875rem;
    font-size: 15px;
    line-height: 1.75;
    color: #444;
    max-width: 420px;
}

/* Hero CTA — below image, centered */
.mh-hero-cta {
    background: #fff;
}

.mh-hero-cta-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 2rem;
}

.mh-hero-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background: #f8c233;
    padding: 1.125rem 3rem;
    font-size: 1.0625rem;
    font-weight: 700;
    color: #111;
    border: 0;
    text-decoration: none;
    transition: background 0.2s ease;
}

.mh-hero-cta-btn:hover {
    background: #f2b700;
    color: #111;
}

.mh-hero-cta .cta-note {
    margin-bottom: 0;
}

/* ============================================================
   End Hero
   ============================================================ */

/* Products — reference card grid */
.mh-products {
    padding: var(--mh-y) 0;
}

.mh-products .mh-kicker {
    margin-bottom: 0.625rem;
}

.mh-product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--mh-card-gap);
}

.mh-product-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--mh-line);
    border-radius: 0.375rem;
    background: #fff;
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.mh-product-card:hover {
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.07);
    transform: translateY(-2px);
}

.mh-product-thumb {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: var(--mh-soft);
    cursor: pointer;
}

.mh-product-thumb:focus-visible {
    outline: 2px solid #111;
    outline-offset: -2px;
}

.mh-thumb-frame {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: var(--mh-media-ratio);
    padding: 1rem;
    overflow: hidden;
}

.mh-thumb-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.mh-play-badge {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--mh-line);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    pointer-events: none;
    display: none;
    align-items: center;
    justify-content: center;
}

.mh-play-badge::after {
    content: '';
    width: 0;
    height: 0;
    margin-left: 0.15rem;
    border-top: 0.35rem solid transparent;
    border-bottom: 0.35rem solid transparent;
    border-left: 0.55rem solid #111;
}

.mh-product-item--has-video .mh-play-badge {
    display: flex;
}

.mh-product-body {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    padding: clamp(1rem, 2vw, 1.25rem);
    flex: 1;
}

.mh-product-series {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--mh-muted);
}

.mh-product-name {
    font-family: 'DM Sans', 'Plus Jakarta Sans', sans-serif;
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.35;
}

.mh-product-desc {
    font-size: 0.9375rem;
    color: var(--mh-sub);
    line-height: 1.65;
    min-height: 3.1em;
}

.mh-detail-open {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: auto;
    padding: 0;
    border: 0;
    background: none;
    color: #111;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease;
}

.mh-detail-open::after {
    content: '›';
    font-size: 1.125rem;
    line-height: 1;
}

.mh-detail-open:hover {
    color: var(--mh-muted);
}

.mh-detail-open:focus-visible {
    outline: 2px solid #111;
    outline-offset: 3px;
}

/* Product detail modal */
.mh-detail-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 3vw, 2rem);
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.mh-detail-modal[hidden] { display: none; }

body.mh-detail-open { overflow: hidden; }

.mh-detail-dialog {
    position: relative;
    width: min(100%, 56rem);
    max-height: calc(100vh - 2rem);
    overflow: auto;
    border-radius: 0.5rem;
    background: #fff;
    border: 1px solid var(--mh-line);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18);
}

.mh-detail-close {
    position: absolute;
    top: 0.875rem;
    right: 0.875rem;
    z-index: 2;
    border: 0;
    background: rgba(255, 255, 255, 0.9);
    color: #111;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    border: 1px solid var(--mh-line);
}

.mh-detail-close:hover {
    background: var(--mh-soft);
}

.mh-detail-head {
    padding: clamp(1.25rem, 3vw, 1.75rem) clamp(1.25rem, 3vw, 1.75rem) 0;
    padding-right: 3.5rem;
}

.mh-detail-title {
    font-family: 'DM Sans', 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.mh-detail-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--mh-line);
}

.mh-detail-tab {
    margin-bottom: -1px;
    padding: 0.625rem 1rem;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--mh-muted);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}

.mh-detail-tab.is-active {
    color: #111;
    border-bottom-color: #111;
}

.mh-detail-tab:focus-visible {
    outline: 2px solid #111;
    outline-offset: 2px;
}

.mh-detail-panel {
    padding: clamp(1rem, 2.5vw, 1.5rem);
}

.mh-detail-panel[hidden] { display: none; }

.mh-detail-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: clamp(16rem, 50vh, 28rem);
    background: var(--mh-soft);
    border-radius: 0.25rem;
    overflow: hidden;
}

.mh-detail-img,
.mh-detail-video {
    max-width: 100%;
    max-height: clamp(16rem, 50vh, 28rem);
    width: auto;
    height: auto;
    object-fit: contain;
}

.mh-detail-video {
    width: min(100%, 48rem);
    background: #000;
}

.mh-detail-img[hidden],
.mh-detail-video[hidden] {
    display: none;
}

.mh-detail-prev,
.mh-detail-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: rgba(255, 255, 255, 0.92);
    color: #111;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    border: 1px solid var(--mh-line);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.mh-detail-prev { left: 0.75rem; }
.mh-detail-next { right: 0.75rem; }

.mh-detail-prev:disabled,
.mh-detail-next:disabled {
    opacity: 0.35;
    cursor: default;
}

.mh-detail-counter {
    margin-top: 0.75rem;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--mh-muted);
}

.mh-detail-pdf-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: clamp(18rem, 55vh, 32rem);
    padding: 0.75rem;
    background: var(--mh-soft);
    border-radius: 0.25rem;
}

.mh-detail-pdf {
    width: 100%;
    height: auto;
    max-height: clamp(18rem, 55vh, 32rem);
    object-fit: contain;
}

/* Process */
.mh-process {
    padding: var(--mh-y) 0;
    background: var(--mh-soft);
    border-top: 1px solid var(--mh-line);
    border-bottom: 1px solid var(--mh-line);
}

.mh-process-flow {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 0;
    margin-top: 2rem;
}

.mh-process-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 0 1 7.5rem;
    padding: 0 0.25rem;
}

.mh-process-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--mh-line);
    font-size: 1.375rem;
    margin-bottom: 0.75rem;
}

.mh-process-step strong {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #111;
    line-height: 1.4;
}

.mh-process-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 2rem;
    padding-top: 1rem;
    font-size: 1.125rem;
    color: var(--mh-muted);
    font-weight: 600;
}

/* Redesign */
.mh-redesign {
    padding: var(--mh-y) 0;
}

.mh-checklist {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem 2rem;
    margin-top: 1.75rem;
    max-width: 42rem;
}

.mh-checklist li {
    position: relative;
    padding-left: 1.5rem;
    font-size: 1.0625rem;
    color: var(--mh-sub);
    line-height: 1.6;
}

.mh-checklist li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--mh-accent);
    font-weight: 700;
}

/* Price — main highlight */
.mh-price {
    padding: clamp(4rem, 8vw, 6rem) 0;
    background: #111;
    color: #fff;
}

.mh-price .mh-sec-title {
    color: #fff;
    text-align: center;
    max-width: 36rem;
    margin-inline: auto;
    margin-bottom: 2.5rem;
}

.mh-compare {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.5rem;
    align-items: stretch;
    max-width: 52rem;
    margin: 0 auto 2.5rem;
}

.mh-compare-col {
    padding: clamp(1.5rem, 3vw, 2rem);
    border-radius: 0.5rem;
    text-align: center;
}

.mh-compare-col--general {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.mh-compare-col--ours {
    background: rgba(255, 255, 255, 0.14);
    border: 2px solid rgba(255, 255, 255, 0.35);
}

.mh-compare-col h3 {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.75rem;
}

.mh-compare-col p {
    font-size: clamp(1.0625rem, 2vw, 1.25rem);
    font-weight: 600;
    line-height: 1.5;
}

.mh-compare-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.5);
}

.mh-price-points {
    max-width: 40rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.mh-price-points li {
    position: relative;
    padding-left: 1.25rem;
    font-size: 1.0625rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.88);
}

.mh-price-points li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #fff;
}

/* Applications */
.mh-apps {
    padding: var(--mh-y) 0;
}

.mh-apps-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    margin-top: 1.75rem;
}

.mh-app-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 0.75rem;
    border: 1px solid var(--mh-line);
    background: #fff;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.mh-app-card:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.mh-app-icon {
    font-size: 1.75rem;
    line-height: 1;
    margin-bottom: 0.75rem;
}

.mh-app-card span {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #222;
}

/* CTA */
.mh-cta {
    padding: clamp(4rem, 8vw, 5.5rem) 0;
    background: var(--mh-soft);
    border-top: 1px solid var(--mh-line);
    text-align: center;
}

.mh-cta .mh-sec-title {
    margin-bottom: 0.75rem;
}

.mh-cta .mh-sec-desc {
    margin-inline: auto;
    text-align: center;
}

.mh-cta .mh-btn {
    margin-top: 1.5rem;
}

/* Footer */
footer {
    padding: 1.25rem 0 1.5rem;
    text-align: center;
    border-top: 1px solid var(--mh-line);
}

.footer-brand {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 0.25rem;
}

.footer-tagline {
    font-size: 0.8125rem;
    color: var(--mh-muted);
    margin-bottom: 0.5rem;
}

.footer-copy {
    font-size: 0.75rem;
    color: #999;
}

@media (max-width: 1023px) {
    .mh-hero-copy h1 { font-size: 34px; }
    .mh-hero-lead { font-size: 14px; max-width: 380px; }
    .mh-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mh-apps-grid { grid-template-columns: repeat(3, 1fr); }
    .mh-process-arrow { flex: 0 0 100%; padding: 0.25rem 0; transform: rotate(90deg); }
    .mh-process-flow { gap: 0.25rem; }
}

@media (max-width: 767px) {
    .nav-links { display: none; }
    .mobile-menu-toggle { display: flex; }
    header.menu-open nav {
        display: block;
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid var(--mh-line);
        padding: 1.25rem;
    }
    header.menu-open .nav-links {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    .mh-hero-copy {
        top: clamp(0.875rem, 3vw, 1.5rem);
        left: clamp(0.875rem, 3.5vw, 1.5rem);
        max-width: min(72%, 360px);
    }
    .mh-hero-copy h1 { font-size: 27px; }
    .mh-hero-lead { font-size: 13px; max-width: 100%; }
    .mh-hero-kicker { font-size: 0.625rem; letter-spacing: 2px; }
    .mh-hero-cta-btn {
        width: min(100%, 20rem);
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    .mh-product-grid { grid-template-columns: 1fr; }
    .mh-checklist { grid-template-columns: 1fr; }
    .mh-compare {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .mh-compare-vs { padding: 0.5rem 0; }
    .mh-apps-grid { grid-template-columns: repeat(2, 1fr); }
    .mh-process-step { flex: 0 1 calc(33% - 0.5rem); }
    .mh-process-arrow { display: none; }
}
