/* Naharland v2.38 — public homepage/group-order contrast guard.
   Scope: public homepage and public group-order pages only.
   Purpose: prevent dark/low-contrast text from older landing layers on dark or mixed backgrounds.
   No order/payment/cart/backend logic changes. */
:root{
  --nl238-ink:#24161d;
  --nl238-muted:#5f4d55;
  --nl238-brand:#74141f;
  --nl238-brand-deep:#4b0a13;
  --nl238-line:#eadbd5;
  --nl238-soft:#fff7f2;
  --nl238-white:#ffffff;
  --nl238-cream:#fffaf6;
  --nl238-dark:#101722;
  --nl238-dark-text:#f9fafb;
  --nl238-dark-muted:#e7d6d0;
  --nl238-dark-accent:#ffd089;
}

body.public-homepage-v238,
body.public-group-order-page.public-contrast-v238{
  color:var(--nl238-ink)!important;
  background:linear-gradient(180deg,#fff 0%,var(--nl238-cream) 58%,#fff 100%)!important;
}

/* Default public text must stay readable on light cards, even when older layers use inherited colors. */
body.public-homepage-v238 :is(p,span,small,li,label,div),
body.public-group-order-page.public-contrast-v238 :is(p,span,small,li,label,div){
  color:inherit;
}
body.public-homepage-v238 :is(.hero p,.section-title p,.trust-line,.food-body small,.notice,.contract-strip p,.public-trust-seal-copy p,.enamad-fallback span,.enamad-fallback small),
body.public-group-order-page.public-contrast-v238 :is(.hero-lead,.nl-section-sub,.food-desc,.food-remain,.addon-hint,.form-note,.note-box,.rule span,.lead-card p,.nl-field label,.summary-box p){
  color:var(--nl238-muted)!important;
}
body.public-homepage-v238 :is(h1,h2,h3,h4,.brand b,.section-title h2,.food-body h3,.contract-strip h2,.price,.mini-btn,.eyebrow),
body.public-group-order-page.public-contrast-v238 :is(h1,h2,h3,h4,.nl-section-title,.food-name,.food-price,.summary-mini strong,.rule b,.lead-card h3,.nl-brand b){
  color:var(--nl238-brand)!important;
}

/* Light panels/cards: explicitly light background + dark readable text. */
body.public-homepage-v238 :is(.hero-copy,.float-card,.food-card,.contract-strip,.public-trust-seal-card,.enamad-box,.enamad-official-html,.poster-card,.notice,.msg),
body.public-group-order-page.public-contrast-v238 :is(.nl-card,.group-copy,.order-card,.order-form-card,.summary-box,.food-card,.addon-card,.addon-panel,.lead-card,.rule,.note-box,.summary-mini .mini,.nl-field input,.nl-field textarea,.nl-field select){
  color:var(--nl238-ink)!important;
}
body.public-homepage-v238 :is(.hero-copy,.float-card,.food-card,.contract-strip,.public-trust-seal-card,.enamad-box,.enamad-official-html,.poster-card,.msg),
body.public-group-order-page.public-contrast-v238 :is(.nl-card,.group-copy,.order-card,.order-form-card,.summary-box,.food-card,.addon-card,.addon-panel,.lead-card,.summary-mini .mini,.nl-field input,.nl-field textarea,.nl-field select){
  background-color:var(--nl238-white)!important;
}
body.public-group-order-page.public-contrast-v238 .addon-panel summary{
  background:var(--nl238-soft)!important;
  color:var(--nl238-ink)!important;
}

/* Brand/dark blocks: everything inside must be readable, including generic spans created by templates. */
body.public-homepage-v238 :is(.min-card,.footer,.footer-grid),
body.public-group-order-page.public-contrast-v238 :is(.dark-band,.footer-shell,.nl-footer .footer-shell,.luxury-index,.premium-content-rail,.event-choice-suite,.landing-cta-wall,.sticky-mobile-cta,.journey-visual,.luxury-map-note){
  color:var(--nl238-dark-text)!important;
}
body.public-homepage-v238 :is(.min-card,.footer,.footer-grid) :is(h1,h2,h3,h4,b,strong,p,span,small,a,div,em),
body.public-group-order-page.public-contrast-v238 :is(.dark-band,.footer-shell,.nl-footer .footer-shell,.luxury-index,.premium-content-rail,.event-choice-suite,.landing-cta-wall,.sticky-mobile-cta,.journey-visual,.luxury-map-note) :is(h1,h2,h3,h4,b,strong,p,span,small,a,div,em){
  color:var(--nl238-dark-text)!important;
}
body.public-homepage-v238 :is(.min-card,.footer,.footer-grid) :is(small,.muted),
body.public-group-order-page.public-contrast-v238 :is(.dark-band,.footer-shell,.nl-footer .footer-shell,.luxury-index,.premium-content-rail,.event-choice-suite,.landing-cta-wall,.sticky-mobile-cta,.journey-visual,.luxury-map-note) :is(small,.nl-section-sub,.content-rail-grid a){
  color:var(--nl238-dark-muted)!important;
}
body.public-homepage-v238 .min-card strong,
body.public-group-order-page.public-contrast-v238 :is(.dark-band,.footer-shell,.luxury-index,.premium-content-rail,.event-choice-suite,.landing-cta-wall,.luxury-map-note) :is(.nl-pill,b,strong,em){
  color:var(--nl238-dark-accent)!important;
}

/* Buttons and status chips keep their own contrast. */
body.public-homepage-v238 :is(.btn-primary,.mini-btn:not(.disabled)),
body.public-group-order-page.public-contrast-v238 :is(.nl-btn.primary,.nl-action-confirm,.sticky-mobile-cta a){
  color:#fff!important;
}
body.public-homepage-v238 .btn-light,
body.public-group-order-page.public-contrast-v238 :is(.nl-btn.light,.nl-action-neutral){
  color:var(--nl238-brand)!important;
  background:#fff!important;
}
body.public-group-order-page.public-contrast-v238 :is(.food-badge.main,.nl-pill){
  color:var(--nl238-brand)!important;
  background:#fff2eb!important;
}
body.public-group-order-page.public-contrast-v238 .food-badge.addon,
body.public-group-order-page.public-contrast-v238 .nl-pill.blue{
  color:#1d4ed8!important;
  background:#eff6ff!important;
}
body.public-group-order-page.public-contrast-v238 .nl-pill.green{
  color:#166534!important;
  background:#ecfdf5!important;
}

/* Hero image overlays: keep the text card light and readable over photos. */
body.public-homepage-v238 .hero-photo:after{
  background:linear-gradient(90deg,rgba(255,250,246,.82),rgba(255,250,246,.18) 52%,rgba(255,250,246,.04))!important;
}
body.public-homepage-v238 .float-card{
  background:rgba(255,255,255,.96)!important;
  border-color:rgba(234,219,213,.94)!important;
}
body.public-homepage-v238 .float-card b{color:var(--nl238-brand)!important;}
body.public-homepage-v238 .float-card span{color:var(--nl238-muted)!important;}

/* Footer in homepage had nested dark surfaces; keep all child text bright. */
body.public-homepage-v238 .footer{
  background:linear-gradient(135deg,var(--nl238-brand-deep),var(--nl238-brand))!important;
}
body.public-homepage-v238 .footer-grid{
  background:transparent!important;
}

/* Mobile: keep compact public header readable and prevent dark inherited text in horizontal menus. */
@media(max-width:760px){
  body.public-homepage-v238 .menu a,
  body.public-group-order-page.public-contrast-v238 .nl-nav a{
    color:var(--nl238-ink)!important;
    background:#fff!important;
    border:1px solid var(--nl238-line)!important;
  }
  body.public-homepage-v238 .menu a.active,
  body.public-group-order-page.public-contrast-v238 .nl-nav a.active{
    color:var(--nl238-brand)!important;
    background:#fff2eb!important;
  }
}
