/*!
 * Per-OPD homepage identity — typography, fold chrome, modules, footer.
 * Driven by [data-opd-scene] + [data-opd-signature] on .opd-layout.
 * Display fonts load async via themes/partials/boot.blade.php (no @import chain).
 */

body.skin-magz[data-opd-theme] .opd-layout {
    --opd-font-display: "Manrope", "Segoe UI", sans-serif;
    --opd-font-body: "DM Sans", "Segoe UI", sans-serif;
    --opd-radius-mod: .9rem;
    --opd-mod-border: #e2e8f0;
    --opd-mod-head: var(--color-primary);
    --opd-footer-bg: #0f172a;
    --opd-cta-radius: .55rem;
}

/* Scene typography + chrome tokens */
body.skin-magz[data-opd-theme] .opd-layout[data-opd-scene="finance"],
body.skin-magz[data-opd-theme] .opd-layout[data-opd-scene="security"] {
    --opd-font-display: "IBM Plex Sans", "Segoe UI", sans-serif;
    --opd-font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
    --opd-radius-mod: .45rem;
    --opd-cta-radius: .4rem;
    --opd-footer-bg: #0b1c2c;
}
body.skin-magz[data-opd-theme] .opd-layout[data-opd-scene="health"],
body.skin-magz[data-opd-theme] .opd-layout[data-opd-scene="digital"] {
    --opd-font-display: "Manrope", "Segoe UI", sans-serif;
    --opd-font-body: "DM Sans", "Segoe UI", sans-serif;
    --opd-radius-mod: .85rem;
}
body.skin-magz[data-opd-theme] .opd-layout[data-opd-scene="forest"],
body.skin-magz[data-opd-theme] .opd-layout[data-opd-scene="agri"],
body.skin-magz[data-opd-theme] .opd-layout[data-opd-scene="culture"],
body.skin-magz[data-opd-theme] .opd-layout[data-opd-scene="sport"] {
    --opd-font-display: "Source Serif 4", Georgia, serif;
    --opd-font-body: "DM Sans", "Segoe UI", sans-serif;
    --opd-radius-mod: 1.15rem;
    --opd-cta-radius: 999px;
}
body.skin-magz[data-opd-theme] .opd-layout[data-opd-scene="emergency"] {
    --opd-font-display: "Manrope", "Segoe UI", sans-serif;
    --opd-radius-mod: .55rem;
    --opd-cta-radius: .45rem;
    --opd-footer-bg: #1a0f0c;
}
body.skin-magz[data-opd-theme] .opd-layout[data-opd-scene="civic"],
body.skin-magz[data-opd-theme] .opd-layout[data-opd-scene="education"],
body.skin-magz[data-opd-theme] .opd-layout[data-opd-scene="social"],
body.skin-magz[data-opd-theme] .opd-layout[data-opd-scene="identity"],
body.skin-magz[data-opd-theme] .opd-layout[data-opd-scene="infra"] {
    --opd-font-display: "Manrope", "Segoe UI", sans-serif;
}

body.skin-magz[data-opd-theme] .opd-layout .opd-fold-hero__title,
body.skin-magz[data-opd-theme] .opd-layout .opd-sig__title,
body.skin-magz[data-opd-theme] .opd-layout .opd-apps__head h2,
body.skin-magz[data-opd-theme] .opd-layout .opd-steps__head h2,
body.skin-magz[data-opd-theme] .opd-layout .opd-faq h2,
body.skin-magz[data-opd-theme] .opd-layout .opd-agenda h2,
body.skin-magz[data-opd-theme] .opd-layout .opd-gallery h2 {
    font-family: var(--opd-font-display);
}
body.skin-magz[data-opd-theme] .opd-layout .opd-fold-hero__lead,
body.skin-magz[data-opd-theme] .opd-layout .opd-apps,
body.skin-magz[data-opd-theme] .opd-layout .opd-steps,
body.skin-magz[data-opd-theme] .opd-layout .opd-faq {
    font-family: var(--opd-font-body);
}

/* Fold CTA buttons */
body.skin-magz[data-opd-theme] .opd-fold-cta {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-top: 1rem;
}
body.skin-magz[data-opd-theme] .opd-fold-cta__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .7rem 1.1rem;
    min-height: 44px;
    border-radius: var(--opd-cta-radius);
    font-weight: 800;
    font-size: .92rem;
    text-decoration: none;
    line-height: 1.2;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
body.skin-magz[data-opd-theme] .opd-fold-cta__btn:hover {
    transform: translateY(-1px);
}
body.skin-magz[data-opd-theme] .opd-fold-cta__btn--primary {
    background: #fff;
    color: var(--color-primary);
    box-shadow: 0 8px 18px rgba(15, 23, 42, .12);
}
body.skin-magz[data-opd-theme] .opd-fold-cta__btn--skm {
    background: var(--color-secondary);
    color: #111;
}
body.skin-magz[data-opd-theme] .opd-fold-cta__btn--secondary {
    background: rgba(255, 255, 255, .16);
    color: inherit;
    border: 1px solid rgba(255, 255, 255, .28);
}
body.skin-magz[data-opd-theme] .opd-fold-cta__btn--ghost {
    background: transparent;
    color: inherit;
    border: 1px solid rgba(255, 255, 255, .35);
}
body.skin-magz[data-opd-theme] .opd-layout--split .opd-fold-cta__btn--primary,
body.skin-magz[data-opd-theme] .opd-layout--organic .opd-fold-cta__btn--primary,
body.skin-magz[data-opd-theme] .opd-layout--induk .opd-fold-cta__btn--primary {
    background: var(--color-primary);
    color: #fff;
}
body.skin-magz[data-opd-theme] .opd-layout--split .opd-fold-cta__btn--secondary,
body.skin-magz[data-opd-theme] .opd-layout--organic .opd-fold-cta__btn--secondary,
body.skin-magz[data-opd-theme] .opd-layout--induk .opd-fold-cta__btn--secondary,
body.skin-magz[data-opd-theme] .opd-layout--split .opd-fold-cta__btn--ghost,
body.skin-magz[data-opd-theme] .opd-layout--organic .opd-fold-cta__btn--ghost,
body.skin-magz[data-opd-theme] .opd-layout--induk .opd-fold-cta__btn--ghost {
    background: color-mix(in srgb, var(--color-primary) 8%, #fff);
    color: var(--color-primary);
    border-color: color-mix(in srgb, var(--color-primary) 22%, #e2e8f0);
}
body.skin-magz[data-opd-theme] .opd-fold-cta__btn--profile {
    position: relative;
    z-index: 7;
    pointer-events: auto !important;
}
body.skin-magz[data-opd-theme] .opd-layout--service .opd-fold-cta__btn--profile,
body.skin-magz[data-opd-theme] .opd-layout--service .opd-fold-cta__btn--secondary {
    background: rgba(255, 255, 255, .2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .42);
}

/* Compact fold signature */
body.skin-magz[data-opd-theme] .opd-fold-sig {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: .85rem 0 .35rem;
    padding: .55rem .75rem;
    border-radius: var(--opd-cta-radius);
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .18);
    max-width: 36rem;
}
body.skin-magz[data-opd-theme] .opd-layout--split .opd-fold-sig,
body.skin-magz[data-opd-theme] .opd-layout--organic .opd-fold-sig,
body.skin-magz[data-opd-theme] .opd-layout--induk .opd-fold-sig {
    background: color-mix(in srgb, var(--opd-scene-surface, #f8fafc) 70%, #fff);
    border-color: color-mix(in srgb, var(--color-primary) 18%, #e2e8f0);
}
body.skin-magz[data-opd-theme] .opd-fold-sig__pulse {
    width: .65rem;
    height: .65rem;
    border-radius: 50%;
    background: var(--color-secondary, #FCA416);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-secondary, #FCA416) 28%, transparent);
    flex: 0 0 auto;
}
body.skin-magz[data-opd-theme] .opd-fold-sig--alert .opd-fold-sig__pulse {
    background: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, .25);
    animation: opd-pulse 1.4s ease infinite;
}
body.skin-magz[data-opd-theme] .opd-fold-sig--care .opd-fold-sig__pulse { background: #14b8a6; }
body.skin-magz[data-opd-theme] .opd-fold-sig--digital .opd-fold-sig__pulse { background: #38bdf8; }
body.skin-magz[data-opd-theme] .opd-fold-sig__kicker {
    margin: 0;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    opacity: .78;
}
body.skin-magz[data-opd-theme] .opd-fold-sig__title {
    display: block;
    font-size: .92rem;
    font-weight: 800;
    line-height: 1.25;
    font-family: var(--opd-font-display);
}
body.skin-magz[data-opd-theme] .opd-fold-sig__mark {
    margin-left: auto;
    opacity: .9;
}
@keyframes opd-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(239, 68, 68, .22); }
    50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, .08); }
}

/* Module chrome follows scene radius/surface */
body.skin-magz[data-opd-theme] .opd-apps,
body.skin-magz[data-opd-theme] .opd-steps,
body.skin-magz[data-opd-theme] .opd-faq,
body.skin-magz[data-opd-theme] .opd-agenda,
body.skin-magz[data-opd-theme] .opd-gallery,
body.skin-magz[data-opd-theme] .opd-info-rail__col {
    border-radius: var(--opd-radius-mod) !important;
    border-color: color-mix(in srgb, var(--opd-scene-accent, var(--color-secondary)) 18%, var(--opd-mod-border)) !important;
    background: color-mix(in srgb, var(--opd-scene-surface, #fff) 55%, #fff) !important;
}
body.skin-magz[data-opd-theme] .opd-layout[data-opd-scene="finance"] .opd-apps__card,
body.skin-magz[data-opd-theme] .opd-layout[data-opd-scene="finance"] .opd-steps__item {
    border-radius: .35rem;
}
body.skin-magz[data-opd-theme] .opd-layout[data-opd-scene="emergency"] .opd-apps__head h2,
body.skin-magz[data-opd-theme] .opd-layout[data-opd-scene="emergency"] .opd-steps__head h2 {
    letter-spacing: .02em;
    text-transform: uppercase;
    font-size: 1.05rem;
}

/* Hours variants */
body.skin-magz[data-opd-theme] .opd-layout[data-opd-scene="emergency"] .opd-hours {
    border-color: color-mix(in srgb, #ef4444 35%, transparent);
    background: color-mix(in srgb, #ef4444 12%, rgba(15, 23, 42, .35));
}
body.skin-magz[data-opd-theme] .opd-layout[data-opd-scene="digital"] .opd-hours {
    border-style: dashed;
}
body.skin-magz[data-opd-theme] .opd-layout[data-opd-scene="finance"] .opd-hours {
    border-radius: .35rem;
    letter-spacing: .01em;
}

/* Footer scene tint + mark */
body.skin-magz[data-opd-theme] .opd-footer {
    background: var(--opd-footer-bg) !important;
    position: relative;
    overflow: hidden;
}
body.skin-magz[data-opd-theme] .opd-footer::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, var(--color-secondary), var(--color-primary));
}
body.skin-magz[data-opd-theme] .opd-layout[data-opd-scene="forest"] .opd-footer,
body.skin-magz[data-opd-theme] .opd-layout[data-opd-scene="agri"] .opd-footer {
    background: #122016 !important;
}
body.skin-magz[data-opd-theme] .opd-layout[data-opd-scene="health"] .opd-footer {
    background: #0c1f1c !important;
}
body.skin-magz[data-opd-theme] .opd-layout[data-opd-scene="culture"] .opd-footer {
    background: #1c1218 !important;
}
body.skin-magz[data-opd-theme] .opd-footer__seal {
    margin-top: .85rem;
    opacity: .85;
}

/* Fold composition tweaks by signature */
body.skin-magz[data-opd-theme] .opd-layout[data-opd-signature="status-strip"] .opd-fold-sig,
body.skin-magz[data-opd-theme] .opd-layout[data-opd-signature="care-hotline"] .opd-fold-sig {
    order: -1;
}
body.skin-magz[data-opd-theme] .opd-layout[data-opd-signature="digital-stack"] .opd-app-feature {
    border-width: 2px;
}
body.skin-magz[data-opd-theme] .opd-layout[data-opd-signature="formal-ledger"] .opd-fold-hero__title,
body.skin-magz[data-opd-theme] .opd-layout[data-opd-signature="doc-rail"] .opd-fold-hero__title {
    letter-spacing: -.01em;
}

/* Personalized shared banner — full artwork visible (same fit as owned) */
body.skin-magz[data-opd-theme] .opd-hero-product--shared .opd-hero-product__grade {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--color-primary) 28%, transparent) 0%, transparent 28%),
        linear-gradient(180deg, transparent 55%, rgba(15, 23, 42, .62) 100%);
}
body.skin-magz[data-opd-theme] .opd-hero-product--shared .opd-hero-product__brandbar {
    position: absolute;
    top: .85rem;
    right: .85rem;
    z-index: 3;
    width: 48px;
    height: 48px;
    border-radius: .65rem;
    background: rgba(255, 255, 255, .92);
    display: grid;
    place-items: center;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .18);
}
body.skin-magz[data-opd-theme] .opd-hero-product--shared.opd-hero-product--fit-banner .opd-hero-product__img,
body.skin-magz[data-opd-theme] .opd-hero-product--owned.opd-hero-product--fit-banner .opd-hero-product__img {
    position: static !important;
    inset: auto !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center center !important;
}
body.skin-magz[data-opd-theme] .opd-hero-product--shared.opd-hero-product--fit-banner .opd-hero-product__media,
body.skin-magz[data-opd-theme] .opd-hero-product--owned.opd-hero-product--fit-banner .opd-hero-product__media {
    aspect-ratio: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    height: auto !important;
}
body.skin-magz[data-opd-theme] .opd-hero-product--composed .opd-hero-product__media {
    min-height: 260px;
}
body.skin-magz[data-opd-theme] .opd-hero-product__text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: min(42rem, 92%);
}
body.skin-magz[data-opd-theme] .opd-hero-product--fit-banner .opd-hero-product__caption {
    /* Overlay sits on image; keep readable without clipping body copy harshly */
    padding-right: 4.5rem;
}

/* KPI strip */
body.skin-magz[data-opd-theme] .opd-kpi-strip {
    position: relative;
    z-index: 1;
    padding: 1rem clamp(1rem, 3vw, 2rem);
    background: color-mix(in srgb, var(--opd-scene-surface, #f1f5f9) 88%, #fff);
    border-bottom: 1px solid color-mix(in srgb, var(--color-primary) 12%, #e2e8f0);
}
body.skin-magz[data-opd-theme] .opd-kpi-strip__inner {
    max-width: 1600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: .75rem;
}
body.skin-magz[data-opd-theme] .opd-kpi-strip__item {
    background: #fff;
    border: 1px solid color-mix(in srgb, var(--color-primary) 14%, #e2e8f0);
    border-radius: var(--opd-radius-mod, .75rem);
    padding: .95rem 1rem;
    text-align: center;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .04);
}
body.skin-magz[data-opd-theme] .opd-kpi-strip__value {
    display: block;
    font-size: clamp(1.25rem, 2.4vw, 1.75rem);
    font-weight: 800;
    color: var(--color-primary);
    font-family: var(--opd-font-display);
    line-height: 1.15;
}
body.skin-magz[data-opd-theme] .opd-kpi-strip__label {
    display: block;
    margin-top: .25rem;
    font-size: .82rem;
    color: #64748b;
    font-weight: 600;
}

/* Mobile fold triage — one job first */
@media (max-width: 900px) {
    body.skin-magz[data-opd-theme] .opd-fold-hero__secondary {
        display: grid;
        gap: .65rem;
    }
    body.skin-magz[data-opd-theme] .opd-fold-hero__secondary .opd-home-search,
    body.skin-magz[data-opd-theme] .opd-fold-hero__secondary .opd-app-feature {
        display: none;
    }
    body.skin-magz[data-opd-theme] .opd-fold-hero__lead {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    body.skin-magz[data-opd-theme] .opd-fold-cta__btn:nth-child(n+3) {
        display: none;
    }
}

/* Service card mark */
body.skin-magz[data-opd-theme] .opd-svc__icon--mark {
    background: color-mix(in srgb, var(--color-primary) 8%, #fff);
    border: 1px solid color-mix(in srgb, var(--color-primary) 16%, #e2e8f0);
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: .2rem;
}
body.skin-magz[data-opd-theme] .opd-svc__icon--mark .opd-mark {
    width: 100% !important;
    height: 100% !important;
}
