/*!
 * IDDS MOTIF — per-dinas artistic watermarks (admin soft-UI language)
 * Subtle, elegant, never noisy. Load after portal-sync.
 */
@keyframes nx-motif-drift {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
    50% { transform: translate3d(8px, -12px, 0) rotate(2deg); }
}
@keyframes nx-motif-pulse {
    0%, 100% { opacity: .12; transform: scale(1); }
    50% { opacity: .2; transform: scale(1.04); }
}
@keyframes nx-motif-spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

body.skin-magz .home--nexus .nx-motif {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    color: var(--idds-primary, #1a365d);
}
body.skin-magz .home--nexus .nx-motif__bloom {
    position: absolute;
    border-radius: 50%;
    filter: blur(64px);
    opacity: .28;
}
body.skin-magz .home--nexus .nx-motif__bloom--a {
    width: min(420px, 55vw);
    height: min(420px, 55vw);
    top: -8%;
    right: -6%;
    background: color-mix(in srgb, var(--idds-primary, #1a365d) 35%, transparent);
    animation: nx-motif-pulse 10s ease-in-out infinite;
}
body.skin-magz .home--nexus .nx-motif__bloom--b {
    width: min(340px, 48vw);
    height: min(340px, 48vw);
    bottom: 12%;
    left: -8%;
    background: color-mix(in srgb, var(--idds-accent, #a67c2a) 32%, transparent);
    animation: nx-motif-pulse 12s ease-in-out infinite 1.5s;
}
body.skin-magz .home--nexus .nx-motif__ring {
    position: absolute;
    width: min(520px, 70vw);
    height: min(520px, 70vw);
    top: 18%;
    right: -18%;
    border: 1px solid color-mix(in srgb, var(--idds-primary) 14%, transparent);
    border-radius: 40% 60% 55% 45%;
    opacity: .5;
    animation: nx-motif-drift 18s ease-in-out infinite;
}
body.skin-magz .home--nexus .nx-motif__mesh {
    position: absolute;
    inset: 0;
    opacity: .035;
    background-image:
        radial-gradient(circle at 1px 1px, var(--idds-primary) 1px, transparent 0);
    background-size: 22px 22px;
    mask-image: linear-gradient(180deg, #000 0%, transparent 75%);
}

body.skin-magz .home--nexus .nx-motif__art {
    position: absolute;
    color: var(--idds-primary, #1a365d);
    opacity: .11;
    filter: drop-shadow(0 12px 28px rgba(21, 32, 51, .06));
}
body.skin-magz .home--nexus .nx-motif__art .nx-motif-svg {
    display: block;
    width: 100%;
    height: 100%;
}
body.skin-magz .home--nexus .nx-motif__art--hero {
    width: min(340px, 42vw);
    height: min(340px, 42vw);
    top: 6%;
    right: 2%;
    opacity: .13;
    animation: nx-motif-drift 16s ease-in-out infinite;
}
body.skin-magz .home--nexus .nx-motif__art--mid {
    width: min(200px, 28vw);
    height: min(200px, 28vw);
    top: 48%;
    left: 1%;
    opacity: .09;
    animation: nx-motif-drift 20s ease-in-out infinite reverse;
}
body.skin-magz .home--nexus .nx-motif__art--float {
    width: min(140px, 20vw);
    height: min(140px, 20vw);
    bottom: 8%;
    right: 18%;
    opacity: .1;
    animation: nx-motif-drift 14s ease-in-out infinite 2s;
}

/* Panel corner seal — small motif chip like admin metric ico */
body.skin-magz .home--nexus .nx-panel {
    position: relative;
}
body.skin-magz .home--nexus .nx-panel__seal {
    position: absolute;
    top: .85rem;
    right: .95rem;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--idds-primary, #1a365d) 9%, #fff);
    border: 1px solid color-mix(in srgb, var(--idds-primary) 14%, var(--idds-a-border, #dde3ec));
    color: var(--idds-primary, #1a365d);
    opacity: .9;
    z-index: 2;
    pointer-events: none;
}
body.skin-magz .home--nexus .nx-panel__seal .nx-motif-svg {
    width: 26px;
    height: 26px;
}
body.skin-magz .home--nexus .nx-panel--news .nx-panel__seal,
body.skin-magz .home--nexus .nx-panel--dock .nx-panel__seal {
    top: 1.1rem;
}

/* Identity motif label */
body.skin-magz .home--nexus .nx-identity__motif {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-left: .15rem;
    padding: .22rem .55rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--idds-accent, #a67c2a) 12%, #fff);
    border: 1px solid color-mix(in srgb, var(--idds-accent) 22%, #e2e8f0);
    color: var(--idds-a-text, #152033);
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}
body.skin-magz .home--nexus .nx-identity__motif-ico {
    width: 14px;
    height: 14px;
    color: var(--idds-primary);
}
body.skin-magz .home--nexus .nx-identity__motif-ico .nx-motif-svg {
    width: 100%;
    height: 100%;
}

/* Motifs inherit dinas brand — never fight primary/accent */
body.skin-magz .home--nexus [class*="nx-motif--"] {
    color: var(--idds-primary, #1a365d);
}
body.skin-magz .home--nexus [class*="nx-motif--"] .nx-motif__bloom--a {
    background: color-mix(in srgb, var(--idds-primary, #1a365d) 32%, transparent);
}
body.skin-magz .home--nexus [class*="nx-motif--"] .nx-motif__bloom--b {
    background: color-mix(in srgb, var(--idds-accent, #a67c2a) 28%, transparent);
}
body.skin-magz .home--nexus .nx-motif--digital .nx-motif__ring {
    border-radius: 50%;
    animation: nx-motif-spin-slow 48s linear infinite;
}
body.skin-magz .home--nexus .nx-motif--finance,
body.skin-magz .home--nexus .nx-motif--trade {
    color: var(--idds-accent, #a67c2a);
}

/* Hero badge gets tiny motif accent */
body.skin-magz .home--nexus .nx-hero__badge .nx-motif-svg {
    width: 16px;
    height: 16px;
    opacity: .9;
}

@media (max-width: 767.98px) {
    body.skin-magz .home--nexus .nx-motif__art--mid,
    body.skin-magz .home--nexus .nx-motif__art--float { display: none; }
    body.skin-magz .home--nexus .nx-motif__art--hero {
        width: 220px; height: 220px; opacity: .09; right: -4%;
    }
    body.skin-magz .home--nexus .nx-panel__seal { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    body.skin-magz .home--nexus .nx-motif__art,
    body.skin-magz .home--nexus .nx-motif__bloom,
    body.skin-magz .home--nexus .nx-motif__ring {
        animation: none !important;
    }
}
