/* ========================================================================
   Marketing / Landing Page
   ======================================================================== */

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

body.jebi-marketing {
    font-family: var(--font-family);
    color: #1e293b;
    background: #fff;
    line-height: 1.6;
}

.m-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.m-header {
    padding: 16px 0;
    border-bottom: 1px solid #f1f5f9;
}

.m-header .m-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.m-header__brand {
    font-size: 1.375rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--color-ink, #0E1116);
}
.m-brand-dot { color: var(--color-primary); }

.m-header__nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Buttons */
.m-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 22px;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s;
    cursor: pointer;
    border: none;
    font-family: var(--font-family);
}

.m-btn--primary {
    background: var(--color-primary);
    color: #fff;
}
.m-btn--primary:hover { background: var(--color-primary-hover); }

.m-btn--ghost {
    background: transparent;
    color: #475569;
}
.m-btn--ghost:hover { background: #f1f5f9; }

.m-btn--lg {
    padding: 14px 32px;
    font-size: 1.0625rem;
}

/* Hero */
.m-hero {
    padding: 100px 0 80px;
    text-align: center;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.m-hero__title {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    color: #0f172a;
    max-width: 720px;
    margin: 0 auto 20px;
    line-height: 1.15;
}

.m-hero__sub {
    font-size: 1.125rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

.m-hero__actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* Features */
.m-features {
    padding: 80px 0;
}

.m-features__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.m-feature-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 28px;
    transition: box-shadow 0.2s, transform 0.2s;
}

.m-feature-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

.m-feature-card h3 {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.m-feature-card p {
    font-size: 0.9375rem;
    color: #64748b;
    line-height: 1.6;
}

/* Sektsioonipõhise ehitaja üldelemendid */
.m-container--narrow { max-width: 760px; }

.m-section-title {
    font-size: clamp(1.5rem, 3.5vw, 2.125rem);
    font-weight: 800;
    color: #0f172a;
    text-align: center;
    margin-bottom: 12px;
}

.m-section-sub {
    font-size: 1.0625rem;
    color: #64748b;
    text-align: center;
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

/* Pricing */
.m-pricing { padding: 80px 0; background: #f8fafc; }

.m-pricing__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    max-width: 960px;
    margin: 0 auto;
    align-items: stretch;
}

.m-price-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.m-price-card--highlight {
    border: 2px solid var(--color-primary);
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

.m-price-card h3 {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
}

.m-price-card__price {
    font-size: 2.25rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 20px;
}

.m-price-card__price span {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #94a3b8;
}

.m-price-card ul {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    flex: 1;
}

.m-price-card li {
    font-size: 0.9375rem;
    color: #475569;
    padding: 6px 0;
    border-bottom: 1px solid #f1f5f9;
}

.m-price-card li:last-child { border-bottom: 0; }

/* Tekstiplokk */
.m-text { padding: 64px 0; }

.m-text__body {
    font-size: 1rem;
    color: #475569;
    line-height: 1.8;
}

.m-text__body p { margin-bottom: 1em; }

.m-text__body h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
    margin: 1.5em 0 0.5em;
}

/* KKK */
.m-faq { padding: 64px 0; }

.m-faq__item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 10px;
    background: #fff;
}

.m-faq__item summary {
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
}

.m-faq__item p {
    margin-top: 12px;
    color: #64748b;
    line-height: 1.7;
}

/* CTA riba */
.m-cta {
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

/* Mustandi eelvaate riba */
.m-preview-bar {
    background: #f59e0b;
    color: #fff;
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 8px;
}

/* Footer */
.m-footer {
    padding: 32px 0;
    border-top: 1px solid #f1f5f9;
    text-align: center;
    font-size: 0.8125rem;
    color: #94a3b8;
}

/* Responsive */
@media (max-width: 768px) {
    .m-features__grid {
        grid-template-columns: 1fr;
    }
    .m-hero {
        padding: 60px 0 40px;
    }
}

/* === #575: plokk-one-pager — kitsamad plokid, pildid, ankur-nav === */
html { scroll-behavior: smooth; }

/* Päise ankur-nupud */
.m-nav-link {
    color: #475569;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
}
.m-nav-link:hover { color: #0f172a; background: #f1f5f9; }

/* Kitsamate plokkide rida (w<4); täislaiuses plokid jäävad täisribadeks */
.m-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    /* Virgo 18.07: rea kaardid ON ühekõrgused — venitatakse pikima ploki
       järgi (stretch). Teadlik valik: ühtlane rida > sisu-kõrgus. */
    align-items: stretch;
    padding: 24px 0;
}
.m-cell--w1 { grid-column: span 1; }
.m-cell--w2 { grid-column: span 2; }
.m-cell--w3 { grid-column: span 3; }
.m-cell > section {
    height: 100%; /* rea kaardid ühekõrgused — venitus pikima ploki järgi */
    padding: 32px 24px;
    border: 1px solid #eef2f7;
    border-radius: 14px;
    background: #fff;
}
.m-cell .m-container { padding: 0; max-width: none; }
.m-cell .m-hero__title { font-size: clamp(1.4rem, 2.5vw, 2rem); }
.m-cell .m-features__grid, .m-cell .m-pricing__grid { grid-template-columns: 1fr; }

/* Ploki pilt (üleval / vasakul / paremal) */
.m-block-img { margin: 0 0 24px; }
.m-block-img img { max-width: 100%; height: auto; border-radius: 12px; display: block; margin: 0 auto; }
.m-media { display: flex; gap: 32px; align-items: center; }
.m-media--right { flex-direction: row-reverse; }
.m-media .m-block-img { flex: 0 0 40%; margin: 0; }
.m-media__body { flex: 1; min-width: 0; }

/* Ankruga plokk ei tohi kinnise päise alla jääda kerimisel */
section[id^="s-"] { scroll-margin-top: 24px; }

@media (max-width: 768px) {
    .m-row { grid-template-columns: 1fr; }
    .m-cell--w1, .m-cell--w2, .m-cell--w3 { grid-column: span 1; }
    .m-media, .m-media--right { flex-direction: column; }
    .m-media .m-block-img { flex: none; }
    .m-nav-link { display: none; } /* kitsal ekraanil jäävad ainult Logi sisse / Alusta */
}

/* Kitsas plokk (w1) näeb välja nagu omaduse-kaart: väiksem pealkiri, vaiksem sisu */
.m-cell--w1 .m-section-title { font-size: 1.0625rem; text-align: left; margin-bottom: 8px; }
.m-cell--w1 .m-text__body { font-size: 0.9375rem; color: #64748b; line-height: 1.6; }
.m-cell--w1 .m-hero__actions { justify-content: flex-start; }
.m-cell--w1 .m-hero__actions .m-btn { padding: 8px 14px; font-size: 0.875rem; }

/* #575: pildi-logo päises (Disain → Avalehed) */
.m-header__logo { height: 34px; width: auto; display: block; }

/* w=4 ploki cover-pilt: katab CONTENT-laiuse, kõrgus+fookus croppivad */
.m-block-img--cover { margin: 0 0 32px; }
.m-block-img--cover img {
    width: 100%;
    height: auto; /* vaikimisi PÄRIS pilt ilma cropita; inline-kõrgus croppib */
    object-fit: cover;
    display: block;
    border-radius: 12px; /* sama keel mis muudel piltidel */
    margin: 0;
    max-width: none;
}

/* Hinnastuse plokk kompaktseks (Virgo 18.07): 4+ plaani mahub ühte ritta,
   tekstid väiksemad, loetelud vasakule joondatud */
.m-pricing__grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    max-width: none; /* kogu konteineri laius — neli kaarti mahuvad kõrvuti */
    gap: 16px;
}
.m-price-card { padding: 20px 16px; }
.m-price-card h3 { font-size: 0.9375rem; margin-bottom: 6px; }
.m-price-card__price { font-size: 1.5rem; margin-bottom: 10px; }
.m-price-card__price span { font-size: 0.75rem; }
.m-price-card ul {
    font-size: 0.8125rem;
    line-height: 1.5;
    text-align: left;
    margin: 0 0 12px;
    padding-left: 0;
    list-style: none;
}
.m-price-card li { padding: 2px 0; }
.m-price-card .m-btn { font-size: 0.875rem; padding: 8px 12px; }
@media (max-width: 768px) {
    .m-pricing__grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}

/* Hinnakaardi moodulite read (failiruumi järel) — veel väiksem kiri */
.m-price-card li.m-price-mod { font-size: 0.75rem; color: #64748b; padding: 1px 0; }

/* Hinnakaart: eraldusjooned ridade vahelt ära (Virgo 18.07) */
.m-price-card li { border-bottom: 0; }

/* One-pageri "tagasi eelmisse kohta" ujuv nupp (ilmub ankru-hüppe järel) */
#m-backjump {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 900;
    display: none;
    box-shadow: 0 6px 20px rgba(0,0,0,.18);
    /* Virgo 19.07: lihtsalt ümmargune ikoon üles-noolega */
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
}
#m-backjump.is-visible { display: inline-flex; }

/* Ploki pildi suurvaade — klikk avab croppimata originaali (Virgo 19.07) */
.m-block-img img, .m-text__body img { cursor: zoom-in; }
#m-lightbox {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, .88);
    cursor: zoom-out;
}
#m-lightbox.is-open { display: flex; }
#m-lightbox img {
    max-width: 94vw;
    max-height: 92vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
#m-lightbox-close {
    position: absolute;
    top: 14px;
    right: 18px;
    border: 0;
    background: none;
    color: #fff;
    font-size: 2.2rem;
    line-height: 1;
    cursor: pointer;
    opacity: .85;
}
#m-lightbox-close:hover { opacity: 1; }

/* Hinnaplokk: vasak/parem-pildi alla vahe enne hinnakaarte (Virgo 19.07) */
.m-pricing .m-media .m-block-img { padding-bottom: 12px; }
