/* ==========================================================================
   Front Page — Immersive Full-Width Design
   ========================================================================== */

/* ===== HERO ===== */
.mm-fp-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}
.mm-fp-hero__bg { position: absolute; inset: 0; z-index: 1; }
.mm-fp-hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.mm-fp-hero__overlay {
    position: absolute; inset: 0; z-index: 2;
    background:
        linear-gradient(180deg, rgba(var(--mm-dark-rgb),.3) 0%, rgba(var(--mm-dark-rgb),.15) 40%, rgba(var(--mm-dark-rgb),.75) 100%),
        linear-gradient(90deg, rgba(var(--mm-dark-rgb),.6) 0%, transparent 60%);
}
.mm-fp-hero__content { position: relative; z-index: 5; width: 100%; padding-top: 88px; padding-bottom: 80px; }
.mm-fp-hero__content .mm-container { max-width: 1440px; padding: 0 20px; }
.mm-fp-hero__inner { max-width: 640px; }
.mm-fp-hero__label { color: rgba(255,255,255,.45); }
.mm-fp-hero__title {
    font-size: clamp(2.5rem, 5.5vw, 4.25rem);
    font-weight: 800; color: #fff; line-height: 1.08;
    margin-bottom: 24px; letter-spacing: -0.02em;
}
.mm-fp-hero__title em {
    font-style: normal;
    background: linear-gradient(135deg, #5bb8f5, var(--mm-light-blue));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.mm-fp-hero__text { font-size: 1.0625rem; color: rgba(255,255,255,.65); line-height: 1.8; margin-bottom: 36px; max-width: 480px; }
.mm-fp-hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ===== STATS SECTION ===== */
.mm-fp-stats-section {
    background: #fff;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}
.mm-fp-stats-bar__inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    max-width: 1320px;
    margin: 0 auto;
}
.mm-fp-stat {
    display: flex; align-items: center; gap: 16px;
    padding: 32px 40px;
    border-right: 1px solid #e5e7eb;
    transition: background .3s ease;
}
.mm-fp-stat:last-child { border-right: none; }
.mm-fp-stat:hover { background: #f7f8fa; }

.mm-fp-stat__icon { width: 40px; height: 40px; flex-shrink: 0; color: var(--mm-light-blue); }
.mm-fp-stat__icon svg { width: 100%; height: 100%; }

/* SVG draw animations */
.mm-fp-stat__circle { stroke-dasharray: 107; stroke-dashoffset: 107; animation: svgDraw 1.2s 1s forwards ease-out; }
.mm-fp-stat__check  { stroke-dasharray: 20; stroke-dashoffset: 20; animation: svgDraw .5s 1.8s forwards ease-out; }
.mm-fp-stat__rect   { stroke-dasharray: 112; stroke-dashoffset: 112; animation: svgDraw 1s 1.1s forwards ease-out; }
.mm-fp-stat__line   { stroke-dasharray: 32; stroke-dashoffset: 32; animation: svgDraw .4s 1.8s forwards ease-out; }
.mm-fp-stat__dot    { opacity: 0; }
.mm-fp-stat__dot--1 { animation: popIn .3s 2s forwards; }
.mm-fp-stat__dot--2 { animation: popIn .3s 2.15s forwards; }
.mm-fp-stat__dot--3 { animation: popIn .3s 2.3s forwards; }
.mm-fp-stat__house  { stroke-dasharray: 90; stroke-dashoffset: 90; animation: svgDraw 1s 1.2s forwards ease-out; }
.mm-fp-stat__door   { stroke-dasharray: 30; stroke-dashoffset: 30; animation: svgDraw .5s 1.9s forwards ease-out; }
.mm-fp-stat__gear   { stroke-dasharray: 38; stroke-dashoffset: 38; animation: svgDraw .8s 1.3s forwards ease-out; transform-origin: 20px 20px; }
.mm-fp-stat__rays   { stroke-dasharray: 60; stroke-dashoffset: 60; animation: svgDraw .6s 1.8s forwards ease-out; transform-origin: 20px 20px; }
.mm-fp-stat:nth-child(4):hover .mm-fp-stat__rays { animation: svgDraw .6s forwards, spinIcon 4s .6s linear infinite; }

@keyframes svgDraw { to { stroke-dashoffset: 0; } }
@keyframes popIn   { to { opacity: 1; } }
@keyframes spinIcon { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.mm-fp-stat__text strong {
    display: block; font-family: 'Montserrat', sans-serif;
    font-size: 1.75rem; font-weight: 800; color: var(--mm-dark);
    line-height: 1; margin-bottom: 2px;
}
.mm-fp-stat__text span { font-size: .75rem; color: #888; letter-spacing: .3px; }

/* ===== ABOUT SPLIT ===== */
.mm-fp-split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 72px; align-items: center; }
.mm-fp-split__text h2 { margin-bottom: 20px; line-height: 1.2; }
.mm-fp-split__text p { color: #555; line-height: 1.85; font-size: 1rem; }
.mm-fp-split__text p + p { margin-top: 16px; }
.mm-fp-split__text .mm-btn { margin-top: 24px; }
.mm-fp-split__media { position: relative; }
.mm-fp-split__img-wrap { border-radius: 0; overflow: hidden; box-shadow: 0 24px 64px rgba(0,0,0,.08); }
.mm-fp-split__img-wrap img { width: 100%; height: 440px; object-fit: cover; }
.mm-fp-split__badge {
    position: absolute; bottom: -24px; left: -32px;
    background: var(--mm-gradient); color: #fff;
    padding: 24px 28px; border-radius: 0;
    box-shadow: 0 12px 40px rgba(var(--mm-light-blue-rgb),.3); text-align: center;
}
.mm-fp-split__badge strong { display: block; font-family: 'Montserrat', sans-serif; font-size: 2rem; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.mm-fp-split__badge span { font-size: .6875rem; text-transform: uppercase; letter-spacing: 1px; opacity: .85; }

/* ===== PRODUCTS SECTION ===== */
.mm-fp-products-section {
    padding: 100px 0 48px;
    background: #fff;
}

/* ===== PRODUCT CARDS — full-width horizontal slider ===== */
.mm-products-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.mm-products-wrap::-webkit-scrollbar { display: none; }

.mm-products {
    display: flex;
    width: max-content;
}

.mm-product-card {
    background: #fff;
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    width: calc(100vw / 4);
    min-width: 280px;
    flex-shrink: 0;
    border-right: 1px solid #e5e7eb;
    transition: background .3s ease;
}

.mm-product-card:last-child { border-right: none; }

.mm-product-card:hover {
    background: #f7f8fa;
}

.mm-product-card__img {
    position: relative;
    aspect-ratio: 4 / 3;
    background: linear-gradient(145deg, #edf0f4 0%, #f8f9fb 50%, #e8ebf0 100%);
    overflow: hidden;
    border-bottom: 1px solid #e5e7eb;
}

.mm-product-card__img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 24px;
    transition: transform .5s ease;
}

.mm-product-card:hover .mm-product-card__img img {
    transform: scale(1.08);
}

.mm-product-card__tag {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
    background: var(--mm-gradient);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: .625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 6px 14px;
    border-radius: 0;
}

.mm-product-card__body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.mm-product-card__body h3 {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--mm-dark);
    margin-bottom: 8px;
}

.mm-product-card__body p {
    font-size: .8125rem;
    color: #777;
    line-height: 1.65;
    flex: 1;
}

.mm-product-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.mm-product-card__dim {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .75rem;
    color: #999;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
}

.mm-product-card__dim .mm-icon { width: 14px; height: 14px; color: #bbb; }

.mm-product-card__more {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: 'Montserrat', sans-serif;
    font-size: .75rem;
    font-weight: 600;
    color: var(--mm-light-blue);
    transition: gap .25s ease;
}

.mm-product-card:hover .mm-product-card__more { gap: 8px; }
.mm-product-card__more .mm-icon { width: 14px; height: 14px; }

/* Drag cursor */
.mm-products-wrap {
    cursor: grab;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}
.mm-products-wrap.mm-dragging { cursor: grabbing; }
.mm-products-wrap.mm-dragging .mm-product-card { pointer-events: none; }

/* Slider controls */
.mm-slider-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 36px 0 0;
    max-width: 320px;
    margin: 0 auto;
}

/* Progress: segmented dots */
.mm-slider-progress {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.mm-slider-progress__dot {
    width: 24px;
    height: 3px;
    border-radius: 0;
    background: #ddd;
    transition: all .3s ease;
}

.mm-slider-progress__dot--active {
    width: 40px;
    background: var(--mm-light-blue);
}

/* Arrows centered below */
.mm-slider-arrows {
    display: flex;
    gap: 8px;
}

.mm-slider-arrow {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid #d5d7db;
    background: #fff;
    color: var(--mm-dark);
    cursor: pointer;
    transition: all .25s ease;
}

.mm-slider-arrow:hover {
    background: var(--mm-dark);
    border-color: var(--mm-dark);
    color: #fff;
}

.mm-slider-arrow:disabled {
    opacity: .3;
    cursor: default;
    pointer-events: none;
}

/* ===== FEATURES ===== */
.mm-fp-features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

.mm-fp-feat {
    position: relative; padding: 36px 28px;
    border-radius: 0; border: 1px solid #eee;
    transition: all .35s ease; overflow: hidden;
}
.mm-fp-feat:hover {
    border-color: var(--mm-light-blue);
    box-shadow: 0 12px 40px rgba(var(--mm-light-blue-rgb),.08);
    transform: translateY(-4px);
}
.mm-fp-feat__num {
    position: absolute; top: 20px; right: 20px;
    font-family: 'Montserrat', sans-serif; font-size: 3rem; font-weight: 800;
    color: rgba(var(--mm-light-blue-rgb),.06); line-height: 1;
}
.mm-fp-feat__icon {
    width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
    border-radius: 0; background: rgba(var(--mm-light-blue-rgb),.06);
    color: var(--mm-light-blue); margin-bottom: 20px;
}
.mm-fp-feat__icon .mm-icon { width: 22px; height: 22px; }
.mm-fp-feat h3 { font-size: .9375rem; margin-bottom: 8px; }
.mm-fp-feat p { font-size: .8125rem; color: #777; line-height: 1.7; }

/* ===== PROCESS ===== */
.mm-fp-process { position: relative; padding: 120px 0; overflow: hidden; }
.mm-fp-process__bg { position: absolute; inset: 0; z-index: 1; }
.mm-fp-process__bg img { width: 100%; height: 100%; object-fit: cover; }
.mm-fp-process__overlay { position: absolute; inset: 0; z-index: 2; background: rgba(var(--mm-dark-rgb),.88); }
.mm-fp-process__inner { position: relative; z-index: 3; }
.mm-fp-process__header { margin-bottom: 56px; }
.mm-fp-process__header h2 { color: #fff; }
.mm-fp-process__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.mm-fp-process__step {
    padding: 32px 28px; background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.06); border-radius: 0;
    transition: all .35s ease;
}
.mm-fp-process__step:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); transform: translateY(-4px); }
.mm-fp-process__step > span {
    display: block; font-family: 'Montserrat', sans-serif; font-size: 2.5rem; font-weight: 800;
    background: linear-gradient(135deg, var(--mm-light-blue), #5bb8f5);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    line-height: 1; margin-bottom: 16px;
}
.mm-fp-process__step h4 { color: #fff; font-size: 1rem; margin-bottom: 8px; }
.mm-fp-process__step p { color: rgba(255,255,255,.5); font-size: .8125rem; line-height: 1.65; }

/* ===== GALLERY — horizontal scroll ===== */
.mm-fp-gallery-section { padding-top: 100px; }
.mm-fp-gallery {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    cursor: grab;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}
.mm-fp-gallery::-webkit-scrollbar { display: none; }
.mm-fp-gallery.mm-dragging { cursor: grabbing; }
.mm-fp-gallery.mm-dragging .mm-fp-gallery__item { pointer-events: none; }
.mm-fp-gallery__item {
    flex-shrink: 0;
    height: 450px;
    width: 43vw;
    overflow: hidden;
    border-right: 1px solid #e5e7eb;
}
.mm-fp-gallery__item:last-child { border-right: none; }
.mm-fp-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}
.mm-fp-gallery__item:hover img {
    transform: scale(1.04);
}

/* FAQ styles moved to global.css (.mm-faq-* now used across templates). */

/* ===== DESIGN TEASER — split ===== */
.mm-fp-design { overflow: hidden; }
.mm-fp-design__split {
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.mm-fp-design__image {
    position: relative;
    min-height: 640px;
}
.mm-fp-design__image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.mm-fp-design__content {
    background: var(--mm-dark);
    padding: 80px 72px;
    display: flex;
    align-items: center;
}
.mm-fp-design__content-inner { max-width: 520px; }
.mm-fp-design__content h2 { color: #fff; margin-bottom: 16px; }
.mm-fp-design__desc {
    color: rgba(255,255,255,.55);
    font-size: 1rem;
    line-height: 1.85;
    margin-bottom: 40px;
}
.mm-fp-design__steps {
    margin-bottom: 40px;
    border-top: 1px solid rgba(255,255,255,.08);
}
.mm-fp-design__step {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 18px 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.mm-fp-design__step-num {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--mm-light-blue);
    min-width: 32px;
    line-height: 1.4;
}
.mm-fp-design__step h4 { color: #fff; font-size: .875rem; margin-bottom: 4px; }
.mm-fp-design__step p { color: rgba(255,255,255,.4); font-size: .8125rem; line-height: 1.5; }

/* ===== PREMIUM EFFECTS ===== */

/* Film grain on dark sections */
.mm-fp-hero::after,
.mm-fp-process::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;
    opacity: .03;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Gradient accent under section headings */
.mm-section__header--center h2::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: var(--mm-gradient);
    border-radius: 0;
    margin: 20px auto 0;
}

/* Enhanced button glow */
.mm-btn--primary:hover {
    box-shadow: 0 8px 32px rgba(var(--mm-light-blue-rgb), .35), 0 0 60px rgba(var(--mm-light-blue-rgb), .12);
}

/* Feature card premium hover */
.mm-fp-feat:hover {
    border-color: rgba(var(--mm-light-blue-rgb), .25);
    box-shadow: 0 24px 64px rgba(var(--mm-light-blue-rgb), .1), 0 0 0 1px rgba(var(--mm-light-blue-rgb), .08);
    transform: translateY(-6px);
}

/* Process step number glow */
.mm-fp-process__step > span {
    filter: drop-shadow(0 0 24px rgba(var(--mm-light-blue-rgb), .2));
}

/* About image hover parallax */
.mm-fp-split__img-wrap img {
    transition: transform .8s cubic-bezier(.4, 0, .2, 1) !important;
}
.mm-fp-split:hover .mm-fp-split__img-wrap img {
    transform: scale(1.04);
}
.mm-fp-split:hover .mm-fp-split__img-wrap {
    box-shadow: 0 32px 80px rgba(0, 0, 0, .12);
}

/* Decorative glow on about media */
.mm-fp-split__media::after {
    content: '';
    position: absolute;
    width: 240px;
    height: 240px;
    top: -40px;
    right: -20px;
    border-radius: 0;
    background: radial-gradient(circle, rgba(var(--mm-light-blue-rgb), .07), transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* Prevent horizontal overflow on all sections */
.mm-section,
.mm-fp-stats-section,
.mm-fp-products-section,
.mm-fp-gallery-section,
.mm-fp-design { overflow: hidden; }
.mm-fp-gallery { overflow-x: auto; overflow-y: hidden; }
.mm-products-wrap { overflow-x: auto; overflow-y: hidden; }


/* Hero + Process parallax-ready */
.mm-fp-hero__bg img { will-change: transform; transform: scale(1.08); }
.mm-fp-process__bg img { will-change: transform; transform: scale(1.15); }

/* Stagger: feature cards */
.mm-fp-features.mm-reveal--visible .mm-fp-feat {
    opacity: 0;
    animation: staggerFadeUp .6s ease forwards;
}
.mm-fp-features.mm-reveal--visible .mm-fp-feat:nth-child(1) { animation-delay: .05s; }
.mm-fp-features.mm-reveal--visible .mm-fp-feat:nth-child(2) { animation-delay: .15s; }
.mm-fp-features.mm-reveal--visible .mm-fp-feat:nth-child(3) { animation-delay: .25s; }
.mm-fp-features.mm-reveal--visible .mm-fp-feat:nth-child(4) { animation-delay: .35s; }

/* Stagger: process steps */
.mm-fp-process__inner.mm-reveal--visible .mm-fp-process__step {
    opacity: 0;
    animation: staggerFadeUp .6s ease forwards;
}
.mm-fp-process__inner.mm-reveal--visible .mm-fp-process__step:nth-child(1) { animation-delay: .1s; }
.mm-fp-process__inner.mm-reveal--visible .mm-fp-process__step:nth-child(2) { animation-delay: .2s; }
.mm-fp-process__inner.mm-reveal--visible .mm-fp-process__step:nth-child(3) { animation-delay: .3s; }
.mm-fp-process__inner.mm-reveal--visible .mm-fp-process__step:nth-child(4) { animation-delay: .4s; }

@keyframes staggerFadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Product card hover body gradient */
.mm-product-card:hover .mm-product-card__body {
    background: linear-gradient(180deg, #f8f9fb, #fff);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .mm-fp-stat { padding: 24px 20px; }
    .mm-fp-stat__text strong { font-size: 1.25rem; }
    .mm-fp-split { grid-template-columns: 1fr; gap: 40px; }
    .mm-fp-split__badge { left: auto; right: 20px; bottom: -20px; }
    .mm-fp-split__media { order: -1; }
    .mm-product-card { width: calc(100vw / 3); }
    .mm-fp-features { grid-template-columns: repeat(2, 1fr); }
    .mm-fp-process__grid { grid-template-columns: repeat(2, 1fr); }
    .mm-fp-design__split { grid-template-columns: 1fr; }
    .mm-fp-design__image { min-height: 400px; }
    .mm-fp-design__content { padding: 64px 40px; }
}

@media (max-width: 640px) {
    .mm-fp-hero { min-height: 100vh; }
    .mm-fp-hero__content { padding-bottom: 48px; }
    .mm-fp-hero__title { font-size: 8vw; }
    .mm-fp-hero__text { font-size: .9375rem; line-height: 1.55; margin-bottom: 28px; }
    .mm-fp-hero__actions { flex-direction: column; }
    .mm-fp-hero__actions .mm-btn { justify-content: center; text-align: center; }
    /* Stats: 2x2 */
    .mm-fp-stats-bar__inner { grid-template-columns: repeat(2, 1fr); }
    .mm-fp-stat { padding: 20px 18px; gap: 10px; border-right: none; border-bottom: 1px solid #e5e7eb; }
    .mm-fp-stat:nth-child(odd) { border-right: 1px solid #e5e7eb; }
    .mm-fp-stat:nth-child(n+3) { border-bottom: none; }
    .mm-fp-stat__icon { width: 32px; height: 32px; }
    .mm-fp-stat__text strong { font-size: 1.25rem; }
    .mm-fp-stat__text span { font-size: .65rem; }

    .mm-fp-split__text p { line-height: 1.5; font-size: .9375rem; }
    .mm-fp-split__img-wrap img { height: 280px; }
    .mm-fp-split__badge { display: none; }
    .mm-product-card { width: calc(100vw / 1.5); }
    .mm-fp-features { grid-template-columns: 1fr; }
    .mm-fp-process { padding: 80px 0; }
    .mm-fp-process__grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .mm-fp-gallery-section { padding-top: 64px; }
    .mm-fp-gallery__item { height: 280px; width: 75vw; }
    .mm-fp-gallery__item img { width: 100%; height: 100%; object-fit: cover; }
    .mm-fp-hero__bg img,
    .mm-fp-process__bg img { transform: none !important; will-change: auto; }
    .mm-fp-design__image { min-height: 280px; }
    .mm-fp-design__content { padding: 48px 24px; }
}
