/* ═══════════════════════════════════════════════
   home.css — light theme for MateChess index page
   v=20260529-05
   ═══════════════════════════════════════════════ */

body.home-light {
    --hm-bg:        #f5f5f7;
    --hm-card:      #ffffff;
    --hm-border:    #e4e4e7;
    --hm-text:      #111111;
    --hm-muted:     #6b6b76;
    --hm-green:     #1b6b3a;
    --hm-green-bg:  #e8f4ee;
    --hm-green-h:   #155730;
    --hm-green-dk:  #0f3d22;   /* dark card background */
    --hm-shadow:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
    --hm-shadow-md: 0 4px 16px rgba(0,0,0,.10);
    --hm-radius:    12px;
    --hm-font:      -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html:has(body.home-light) { background: var(--hm-bg) !important; }

body.home-light {
    background: var(--hm-bg) !important;
    color: var(--hm-text) !important;
    font-family: var(--hm-font);
}

body.home-light .glass-panel,
body.home-light .glass-panel-soft {
    background: var(--hm-card) !important;
    border: 1px solid var(--hm-border) !important;
    backdrop-filter: none !important;
    box-shadow: var(--hm-shadow) !important;
}

/* ════════════════════════════════════════
   DESKTOP HOME
   ════════════════════════════════════════ */

body.home-light .desktop-only-home {
    background: var(--hm-bg) !important;
    padding: 0 !important;
    overflow: visible !important;
    height: auto !important;
    min-height: unset !important;
    animation: none !important;
}

body.home-light .hm-page {
    max-width: 1080px;
    margin: 0 auto;
    padding: 32px 24px 80px;
}

/* ── HERO ── */
body.home-light .hm-hero {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    min-height: 380px;
    display: flex;
    align-items: flex-start;   /* text at top-left per mockup */
    margin-bottom: 32px;
    background: #1a2a1e;
}

body.home-light .hm-hero-img-placeholder {
    position: absolute;
    inset: 0;
}

body.home-light .hm-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,.60) 0%, rgba(0,0,0,.20) 55%, transparent 100%);
    z-index: 1;
}

body.home-light .hm-hero-copy {
    position: relative;
    z-index: 2;
    padding: 44px 44px;
    max-width: 520px;
}

body.home-light .hm-hero-copy h1 {
    font-size: 34px !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    color: #fff !important;
    margin: 0 0 14px !important;
    letter-spacing: -0.5px;
    background: none !important;
    -webkit-text-fill-color: #fff !important;
}

body.home-light .hm-hero-copy p {
    font-size: 15px;
    color: rgba(255,255,255,.82) !important;
    margin: 0 0 28px;
    line-height: 1.55;
    -webkit-text-fill-color: rgba(255,255,255,.82) !important;
}

body.home-light .hm-hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

body.home-light .hm-btn-primary,
body.home-light .hm-btn-secondary {
    display: inline-flex !important;
    align-items: center !important;
    padding: 10px 22px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    text-decoration: none !important;
    min-height: unset !important;
    transition: background .15s, border-color .15s !important;
}

body.home-light .hm-btn-primary {
    background: var(--hm-green) !important;
    color: #fff !important;
    border: none !important;
}
body.home-light .hm-btn-primary:hover { background: var(--hm-green-h) !important; }

body.home-light .hm-btn-secondary {
    background: rgba(255,255,255,.12) !important;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,.45) !important;
    backdrop-filter: blur(4px);
}
body.home-light .hm-btn-secondary:hover { background: rgba(255,255,255,.22) !important; }

/* ── FEATURE CARDS ── */
body.home-light .hm-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 48px;
}

body.home-light .hm-feature-card {
    background: var(--hm-card) !important;
    border: 1px solid var(--hm-border) !important;
    border-radius: var(--hm-radius) !important;
    padding: 24px 22px !important;
    box-shadow: var(--hm-shadow) !important;
    color: var(--hm-text) !important;
}

body.home-light .hm-feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--hm-green-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--hm-green);
}

body.home-light .hm-feature-card h3 {
    font-size: 16px !important;
    font-weight: 700 !important;
    margin: 0 0 8px !important;
    color: var(--hm-text) !important;
    background: none !important;
    -webkit-text-fill-color: var(--hm-text) !important;
}

body.home-light .hm-feature-card p {
    font-size: 13px !important;
    color: var(--hm-muted) !important;
    line-height: 1.55;
    margin: 0 !important;
    -webkit-text-fill-color: var(--hm-muted) !important;
}

/* ── FEATURED EVENT ── */
body.home-light .hm-featured-label {
    text-align: center;
    margin-bottom: 16px;
}

body.home-light .hm-featured-chip {
    display: inline-block;
    background: var(--hm-green-bg);
    color: var(--hm-green);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid rgba(27,107,58,.2);
}

body.home-light .hm-featured-card {
    background: var(--hm-card) !important;
    border: 1px solid var(--hm-border) !important;
    border-radius: 16px !important;
    overflow: hidden;
    box-shadow: var(--hm-shadow-md) !important;
    display: grid;
    grid-template-columns: 300px 1fr;
}

body.home-light .hm-featured-img-wrap {
    position: relative;
    min-height: 260px;
    background: #2a3a2e;
    overflow: hidden;
}

body.home-light .hm-featured-img-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    opacity: .10;
    color: #fff;
}

body.home-light .hm-featured-body {
    padding: 36px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--hm-card);
    gap: 0;
}

/* ── spotlight content (injected by script.js into #next-event-card) ── */
body.home-light .hm-featured-body .spotlight-copy {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Date/meta rows (p.muted) */
body.home-light .hm-featured-body .spotlight-copy p.muted,
body.home-light .hm-featured-body .spotlight-copy p {
    font-size: 13px !important;
    color: var(--hm-muted) !important;
    -webkit-text-fill-color: var(--hm-muted) !important;
    margin: 3px 0 !important;
    background: none !important;
    line-height: 1.5;
}

/* Event title */
body.home-light .hm-featured-body .spotlight-copy h3 {
    font-size: 28px !important;
    font-weight: 800 !important;
    margin: 10px 0 12px !important;
    color: var(--hm-text) !important;
    letter-spacing: -0.4px;
    line-height: 1.2;
    background: none !important;
    -webkit-text-fill-color: var(--hm-text) !important;
}

/* Badge */
body.home-light .hm-featured-body .spotlight-copy .badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 4px 12px !important;
    border-radius: 20px !important;
    min-width: unset !important;
    min-height: unset !important;
    width: fit-content;
}
body.home-light .hm-featured-body .spotlight-copy .badge-success {
    background: var(--hm-green-bg) !important;
    color: var(--hm-green) !important;
    border: none !important;
}
body.home-light .hm-featured-body .spotlight-copy .badge-warning {
    background: #fff7e6 !important; color: #b45309 !important; border: none !important;
}
body.home-light .hm-featured-body .spotlight-copy .badge-info {
    background: #e8f0fe !important; color: #1a56db !important; border: none !important;
}

/* Register / Open Event button */
body.home-light .hm-featured-body .spotlight-actions {
    margin-top: 24px;
}

body.home-light .hm-featured-body .spotlight-actions .btn,
body.home-light .hm-featured-body .spotlight-actions .btn-primary {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--hm-green) !important;
    color: #fff !important;
    border: none !important;
    padding: 13px 28px !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    min-height: unset !important;
    text-decoration: none !important;
    -webkit-text-fill-color: #fff !important;
}
body.home-light .hm-featured-body .spotlight-actions .btn:hover,
body.home-light .hm-featured-body .spotlight-actions .btn-primary:hover {
    background: var(--hm-green-h) !important;
}

body.home-light .hm-loading {
    color: var(--hm-muted);
    font-size: 14px;
    padding: 32px;
    text-align: center;
}

@media (max-width: 900px) {
    body.home-light .hm-features { grid-template-columns: 1fr; gap: 12px; }
    body.home-light .hm-featured-card { grid-template-columns: 1fr; }
    body.home-light .hm-featured-img-wrap { min-height: 200px; }
    body.home-light .hm-featured-body { padding: 24px; }
    body.home-light .hm-hero-copy h1 { font-size: 26px !important; }
}

/* ════════════════════════════════════════
   MOBILE HOME (.mobile-home-page)
   ════════════════════════════════════════ */

/* Override mobile.css legacy 162px left padding — mobile only */
@media (max-width: 768px) {
    body.home-light .mobile-home-page,
    body.home-light.home-mobile-shell .mobile-home-page {
        background: var(--hm-bg) !important;
        min-height: 100dvh;
        padding: 60px 0 40px !important;
        display: block !important;
        gap: 0 !important;
        position: static !important;
        overflow-x: hidden !important;
    }
}

/* Kill dark mobile.css bleed-ins */
body.home-light .mobile-home-page .hero-section,
body.home-light .mobile-home-page .mobile-next-event-wrap,
body.home-light .mobile-home-page .events-section {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* ── Mobile hero ── */
body.home-light .hm-mobile-hero {
    padding: 20px 20px 24px;
}

body.home-light .hm-mobile-eyebrow {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--hm-muted);
    margin-bottom: 10px;
    display: block;
}

body.home-light .mobile-home-page h1 {
    font-size: 32px !important;
    font-weight: 800 !important;
    letter-spacing: -0.5px;
    line-height: 1.1 !important;
    color: var(--hm-text) !important;
    margin: 0 0 12px !important;
    background: none !important;
    -webkit-text-fill-color: var(--hm-text) !important;
}

body.home-light .hm-mobile-hero p {
    font-size: 14px !important;
    color: var(--hm-muted) !important;
    -webkit-text-fill-color: var(--hm-muted) !important;
    line-height: 1.55;
    margin: 0 0 20px !important;
}

body.home-light .hm-mobile-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

body.home-light .hm-mobile-btn-primary,
body.home-light .hm-mobile-btn-secondary {
    display: inline-flex !important;
    align-items: center !important;
    padding: 11px 22px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    min-height: unset !important;
    cursor: pointer !important;
    transition: background .15s !important;
}

body.home-light .hm-mobile-btn-primary {
    background: var(--hm-green) !important;
    color: #fff !important;
    border: none !important;
}

body.home-light .hm-mobile-btn-secondary {
    background: var(--hm-card) !important;
    color: var(--hm-text) !important;
    border: 1px solid var(--hm-border) !important;
}

/* ── Mobile feature cards ── */
body.home-light .hm-mobile-features {
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 32px;
}

body.home-light .hm-mobile-feature {
    background: var(--hm-card) !important;
    border: 1px solid var(--hm-border) !important;
    border-radius: 12px !important;
    padding: 16px !important;
    display: flex !important;
    gap: 14px;
    align-items: flex-start;
    box-shadow: var(--hm-shadow) !important;
}

body.home-light .hm-mobile-feat-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--hm-green-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--hm-green);
}

body.home-light .hm-mobile-feat-body .label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--hm-muted);
    margin-bottom: 3px;
}

body.home-light .hm-mobile-feat-body h3 {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--hm-text) !important;
    margin: 0 0 4px !important;
    background: none !important;
    -webkit-text-fill-color: var(--hm-text) !important;
}

body.home-light .hm-mobile-feat-body p {
    font-size: 13px !important;
    color: var(--hm-muted) !important;
    -webkit-text-fill-color: var(--hm-muted) !important;
    line-height: 1.5;
    margin: 0 !important;
}

/* ── Mobile next event section ── */
body.home-light .hm-mobile-next-section {
    padding: 0 16px 40px;
}

/* "— Next Event" header */
body.home-light .hm-mobile-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--hm-text);
    -webkit-text-fill-color: var(--hm-text);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}
/* remove old pseudo-element separators */
body.home-light .hm-mobile-section-title::before,
body.home-light .hm-mobile-section-title::after {
    display: none !important;
    content: none !important;
}

body.home-light .hm-mobile-next-desc {
    font-size: 13px;
    color: var(--hm-muted);
    -webkit-text-fill-color: var(--hm-muted);
    margin: 0 0 16px;
    line-height: 1.5;
}

/* ── Dark Next Event card ── */
body.home-light .hm-mobile-event-card {
    background: var(--hm-green-dk) !important;
    border: none !important;
    border-radius: 16px !important;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.18) !important;
    color: #fff !important;
    padding: 24px 20px 20px !important;
    position: relative;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Badge inside dark card */
body.home-light .mnev-badge {
    display: inline-block;
    background: rgba(255,255,255,.15);
    color: rgba(255,255,255,.9);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 20px;
    margin-bottom: 14px;
    width: fit-content;
}

/* Event title in dark card */
body.home-light .mnev-title {
    font-size: 24px !important;
    font-weight: 800 !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    line-height: 1.15;
    margin: 0 0 16px !important;
    background: none !important;
    letter-spacing: -0.3px;
}

/* Meta rows (date, location) */
body.home-light .mnev-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

body.home-light .mnev-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255,255,255,.75);
    -webkit-text-fill-color: rgba(255,255,255,.75);
}

body.home-light .mnev-row svg {
    flex-shrink: 0;
    opacity: .8;
}

/* Pawn icon button at bottom */
body.home-light .mnev-pawn {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--hm-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-top: auto;
    align-self: center;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
    border: none;
}

/* Loading / empty states in dark card */
body.home-light .mnev-loading {
    color: rgba(255,255,255,.6);
    font-size: 14px;
    text-align: center;
    padding: 20px 0;
    -webkit-text-fill-color: rgba(255,255,255,.6);
}
