/**
 * MERİVA Brand System V3 — Gold & Honey Badger
 * Presentation polish for navbar, home, and core chrome.
 * Tokens: meriva-tokens.css. No routing or backend changes.
 */

.m-lp {
    --lp-ink: var(--m-text);
    --lp-char: var(--m-surface);
    --lp-gold: var(--m-gold);
    --lp-gold-deep: var(--meriva-gold-dark, #A88418);
    --lp-ivory: var(--m-text);
    --lp-mute: var(--m-text-muted);
    --lp-line: var(--m-divider);
    color: var(--m-text);
    overflow-x: visible;
    gap: 0;
}

/* Theme re-enables blur after navbar.css — keep glass off. */
.m-app-header.m-navbar,
.m-app-header.m-navbar.m-premium-navbar {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(6, 6, 8, 0.96) !important;
}

.m-lp-hero {
    overflow: hidden;
}

.m-lp-hero h1 {
    letter-spacing: -0.04em;
    font-size: clamp(1.9rem, 7.2vw, 4.15rem);
    line-height: 1.02;
}

.m-lp-hero .m-lp-lead {
    max-width: 28rem;
    font-size: clamp(0.95rem, 1.4vw, 1.05rem);
    line-height: 1.55;
}

.m-lp-section h2,
.m-lp-esnaf-copy h2,
.m-lp-pillars strong,
.m-lp-final h2 {
    color: var(--m-text);
    max-width: 22ch;
}

.m-lp-lead {
    color: var(--m-text-muted);
}

.m-lp-section {
    padding: clamp(2.1rem, 4.8vw, 3.75rem) 0;
}

.m-lp-section--value {
    padding-top: clamp(1.75rem, 4vw, 3rem);
}

.m-lp-map {
    padding-top: clamp(2.4rem, 5.5vw, 4.25rem);
    padding-bottom: clamp(2.4rem, 5.5vw, 4.25rem);
}

.m-lp-map-frame .m-tr-map {
    max-height: min(52vh, 28rem);
}

.m-lp-map-panel,
.m-lp-today-side article,
.m-lp .m-home-empty {
    --lp-ink: var(--m-text);
    --lp-mute: var(--m-text-muted);
    color: var(--m-text);
    background: var(--m-surface-elevated);
    border: 1px solid rgba(247, 243, 236, 0.08);
    box-shadow: none;
}

.m-lp-map-panel strong,
.m-lp-esnaf-card h3,
.m-lp .m-home-empty h3,
.m-home-story-card h3,
.m-home-entry-card strong {
    color: var(--m-text) !important;
}

.m-lp-esnaf-meta .m-line-3,
.m-lp .m-home-empty p,
.m-home-entry-card span {
    color: var(--m-text-muted) !important;
}

.m-lp-map-panel {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 1rem 1.1rem;
    border-radius: var(--m-radius, 12px);
}

.m-lp-map-panel .m-btn {
    margin-top: 0.35rem;
    min-height: 44px;
}

/* Community = compact feature rail, not a card wall */
.m-home-entry {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin: 1.25rem 0 0.85rem;
    border-top: 1px solid rgba(247, 243, 236, 0.1);
}

@media (min-width: 768px) {
    .m-home-entry {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        border-top: 0;
        gap: 0;
        border-left: 1px solid rgba(247, 243, 236, 0.1);
    }
}

.m-home-entry-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.3rem;
    min-width: 0;
    min-height: 44px;
    padding: 1rem 0.15rem 1rem 0;
    border-radius: 0;
    border: 0;
    border-bottom: 1px solid rgba(247, 243, 236, 0.1);
    background: transparent;
    text-decoration: none;
}

@media (min-width: 768px) {
    .m-home-entry-card {
        padding: 0.35rem 1.15rem;
        border-bottom: 0;
        border-right: 1px solid rgba(247, 243, 236, 0.1);
        min-height: 5.5rem;
    }

    .m-home-entry-card:last-child {
        border-right: 0;
    }
}

.m-home-entry-card:hover,
.m-home-entry-card:focus-visible {
    border-color: rgba(247, 243, 236, 0.18);
    color: var(--m-text);
    background: rgba(247, 243, 236, 0.03);
}

/* Content = editorial, not a boxed clone of Esnaf */
.m-lp-section--stories .m-home-story-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    border-top: 1px solid rgba(247, 243, 236, 0.1);
}

@media (min-width: 768px) {
    .m-lp-section--stories .m-home-story-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 2rem;
    }
}

.m-home-story-card {
    min-width: 0;
    padding: 1.15rem 0 1.2rem;
    border-radius: 0;
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(247, 243, 236, 0.1);
}

.m-home-story-card h3 {
    margin: 0 0 0.45rem;
    font-size: 1.12rem;
    line-height: 1.35;
}

/* Esnaf stays a local-business photo card */
.m-lp-esnaf-card {
    background: var(--m-surface-elevated);
    border: 1px solid rgba(247, 243, 236, 0.1);
    box-shadow: none;
}

/* Opportunity stays reward/value with media */
.m-lp-section--reward .m-lp-today-hero {
    border: 1px solid rgba(247, 243, 236, 0.1);
    background: var(--m-surface-elevated);
    border-radius: var(--m-radius-lg, 16px);
    overflow: hidden;
}

.m-lp-section--reward .m-lp-today-meta {
    color: var(--m-gold);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.m-home-wallet-note {
    margin: 0.85rem 0 0;
    font-size: 0.88rem;
}

.m-home-wallet-note a {
    color: var(--m-text-muted);
    text-decoration: none;
}

.m-home-wallet-note a:hover,
.m-home-wallet-note a:focus-visible {
    color: var(--m-gold);
}

.m-lp-hero-cta .m-btn,
.m-lp-final .m-btn {
    min-height: 44px;
}

.m-lp-hero-cta .m-btn-ghost {
    min-height: 44px;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
    color: rgba(247, 243, 236, 0.82);
}

.m-navbar-auth .m-btn,
.m-navbar-logout {
    min-height: 44px;
}

.m-dock-link {
    min-height: 48px;
}

.m-dock-fab {
    min-width: 44px;
    min-height: 44px;
}

.m-navbar-links a:focus-visible,
.m-dock-link:focus-visible,
.m-dock-fab:focus-visible,
.m-navbar-icon:focus-visible,
.m-navbar-menu-btn:focus-visible,
.m-home-entry-card:focus-visible,
.m-sidebar-primary a:focus-visible,
.m-nav-item:focus-visible {
    outline: 2px solid var(--m-gold);
    outline-offset: 2px;
}

/* Desktop icon rail: secondary, muted — gold only on hover/active */
@media (min-width: 992px) {
    .m-layout-member .m-app-sidebar .m-nav-item:hover {
        background: rgba(247, 243, 236, 0.04) !important;
        box-shadow: none;
    }

    .m-layout-member .m-app-sidebar .m-nav-item-icon,
    .m-layout-member .m-app-sidebar .m-nav-item-icon.text-warning,
    .m-layout-member .m-app-sidebar .m-nav-item-icon.text-info,
    .m-layout-member .m-app-sidebar .m-nav-item-icon.text-success,
    .m-layout-member .m-app-sidebar .m-nav-item-icon.text-primary {
        color: rgba(247, 243, 236, 0.4) !important;
    }

    .m-layout-member .m-app-sidebar .m-nav-item:hover .m-nav-item-icon,
    .m-layout-member .m-app-sidebar .m-nav-item.active .m-nav-item-icon,
    .m-layout-member .m-app-sidebar .m-sidebar-primary a.is-active i {
        color: var(--m-gold) !important;
    }

    .m-layout-member .m-app-sidebar {
        border-right-color: rgba(247, 243, 236, 0.06) !important;
        box-shadow: none;
    }
}

@media (max-width: 767.98px) {
    .m-lp-hero {
        display: grid;
        min-height: min(72vh, 34rem);
        padding: 0;
        background-image: url("/images/hero-honey-badger.jpg");
        background-size: cover;
        background-position: 78% 52%;
    }

    .m-lp-hero-bg {
        position: absolute;
        inset: 0;
        z-index: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: 78% 52%;
    }

    .m-lp-hero::after {
        display: block;
        background:
            linear-gradient(180deg, rgba(6, 6, 8, 0.22) 0%, rgba(6, 6, 8, 0.55) 42%, rgba(6, 6, 8, 0.92) 100%);
    }

    .m-lp-hero-copy {
        position: relative;
        z-index: 2;
        align-self: end;
        padding: 1.2rem 1.05rem 1.3rem;
        max-width: none;
    }

    .m-lp-hero-cta {
        margin-top: 1.15rem;
        gap: 0.65rem;
    }

    .m-lp-map-frame .m-tr-map {
        max-height: 260px;
    }
}

@media (min-width: 1920px) {
    .m-lp {
        max-width: 76rem;
    }

    .m-lp-section {
        padding: 3.5rem 0;
    }
}

@media (max-width: 379.98px) {
    .m-dock-link span {
        font-size: 0.58rem;
        max-width: 4.6rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    .m-lp-reveal,
    .m-navbar-links a,
    .m-home-entry-card {
        transition: none;
    }
}
