/* ============================================================
   Z-ARC STUDIO — AMBIENT STUDIO BRAND
   Cool silver-mist / soft-slate accents that sit quietly with the
   fine dust field. One slow sheen pass, no neon, stars or badges.
   Loaded by every HTML page after its base stylesheet.
   ============================================================ */

:root {
    --zarc-brand-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Remove older sci-fi layers; the emblem ::after is reused below
   as a restrained light-sheen pass. */
.sidebar-header::before,
.sidebar-header::after,
.studio-brand::before,
.studio-brand::after,
.studio-brand-emblem::before {
    display: none !important;
}

/* ---------- Sidebar / tool pages ---------- */

.studio-brand {
    /* !important keeps studio.css :hover glow from returning */
    background: linear-gradient(135deg, rgba(216, 228, 234, 0.05), rgba(174, 191, 202, 0.02)), #12191d !important;
    border: 1px solid rgba(216, 228, 234, 0.16) !important;
    border-radius: 13px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 6px 18px rgba(0, 0, 0, 0.3) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    transition:
        background 0.7s var(--zarc-brand-ease),
        border-color 0.7s var(--zarc-brand-ease),
        box-shadow 0.7s var(--zarc-brand-ease) !important;
}

.studio-brand-emblem {
    position: relative;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    overflow: hidden;
    border-radius: 10px;
    background:
        radial-gradient(120% 120% at 18% 8%, rgba(216, 228, 234, 0.07), transparent 56%),
        linear-gradient(145deg, #1a2227, #12191d) !important;
    border: 1px solid rgba(216, 228, 234, 0.2) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.26) !important;
    transition:
        background 0.7s var(--zarc-brand-ease),
        border-color 0.7s var(--zarc-brand-ease),
        box-shadow 0.7s var(--zarc-brand-ease),
        transform 0.7s var(--zarc-brand-ease) !important;
}

/* Slow, single light-sheen pass on hover. */
.studio-brand-emblem::after {
    content: '';
    position: absolute;
    top: -40%;
    bottom: -40%;
    left: -75%;
    width: 55%;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(
        100deg,
        transparent,
        rgba(216, 228, 234, 0.16) 46%,
        rgba(174, 191, 202, 0.08) 58%,
        transparent
    );
    opacity: 0;
    transform: translateX(0) skewX(-18deg);
    animation: none !important;
    transition:
        opacity 0.6s var(--zarc-brand-ease),
        transform 1s var(--zarc-brand-ease) !important;
}

.studio-brand-emblem svg {
    position: relative;
    z-index: 1;
    width: 82%;
    height: 82%;
    opacity: 0.94;
    filter: none !important;
    animation: none !important;
    transition:
        opacity 0.7s var(--zarc-brand-ease),
        filter 0.7s var(--zarc-brand-ease) !important;
}

.studio-brand-name {
    color: #e4edf1;
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.1;
}

@media (hover: hover) {
    .studio-brand:hover {
        background: linear-gradient(135deg, rgba(216, 228, 234, 0.08), rgba(174, 191, 202, 0.035)), #161f24 !important;
        border-color: rgba(216, 228, 234, 0.3) !important;
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.07),
            0 8px 22px rgba(0, 0, 0, 0.34) !important;
    }

    .studio-brand:hover .studio-brand-emblem {
        background:
            radial-gradient(120% 120% at 18% 8%, rgba(216, 228, 234, 0.1), transparent 56%),
            linear-gradient(145deg, #222d33, #171f24) !important;
        border-color: rgba(216, 228, 234, 0.36) !important;
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.12),
            0 3px 10px rgba(0, 0, 0, 0.28) !important;
        transform: translateY(-1px) !important;
    }

    .studio-brand:hover .studio-brand-emblem::after {
        opacity: 0.9;
        transform: translateX(320%) skewX(-18deg);
    }

    .studio-brand:hover .studio-brand-emblem svg {
        opacity: 1;
        filter: drop-shadow(0 0 2px rgba(174, 191, 202, 0.22));
    }
}

/* ---------- Legal / blog pages ---------- */

.brand {
    color: #e4edf1;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: color 0.7s var(--zarc-brand-ease);
}

.brand .brand-mark {
    position: relative;
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    overflow: hidden;
    border-radius: 7px;
    background:
        radial-gradient(120% 120% at 18% 8%, rgba(216, 228, 234, 0.07), transparent 56%),
        linear-gradient(145deg, #1a2227, #12191d);
    border: 1px solid rgba(216, 228, 234, 0.2);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.26);
    transition:
        background 0.7s var(--zarc-brand-ease),
        border-color 0.7s var(--zarc-brand-ease),
        box-shadow 0.7s var(--zarc-brand-ease);
}

.brand .brand-mark::after {
    content: '';
    position: absolute;
    top: -40%;
    bottom: -40%;
    left: -75%;
    width: 55%;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(
        100deg,
        transparent,
        rgba(216, 228, 234, 0.16) 46%,
        rgba(174, 191, 202, 0.08) 58%,
        transparent
    );
    opacity: 0;
    transform: translateX(0) skewX(-18deg);
    transition:
        opacity 0.6s var(--zarc-brand-ease),
        transform 1s var(--zarc-brand-ease);
}

.brand .brand-mark svg {
    position: relative;
    z-index: 1;
    width: 16px;
    height: 16px;
    opacity: 0.94;
    transition:
        opacity 0.7s var(--zarc-brand-ease),
        filter 0.7s var(--zarc-brand-ease);
}

@media (hover: hover) {
    .brand:hover {
        color: #f0f6f8;
    }

    .brand:hover .brand-mark {
        background:
            radial-gradient(120% 120% at 18% 8%, rgba(216, 228, 234, 0.1), transparent 56%),
            linear-gradient(145deg, #222d33, #171f24);
        border-color: rgba(216, 228, 234, 0.36);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.12),
            0 3px 10px rgba(0, 0, 0, 0.28);
    }

    .brand:hover .brand-mark::after {
        opacity: 0.9;
        transform: translateX(320%) skewX(-18deg);
    }

    .brand:hover .brand-mark svg {
        opacity: 1;
        filter: drop-shadow(0 0 2px rgba(174, 191, 202, 0.22));
    }
}

/* ---------- Chrome-only selection / drag lock ----------
   Sidebar labels and the brand block stay clickable and hoverable,
   but cannot be highlighted or drag-copied. Main content is untouched. */

.sidebar,
.sidebar *,
.studio-brand,
.studio-brand *,
.page-header .brand,
.page-header .brand *,
.header-nav,
.header-nav a {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* ---------- Early Access sections ----------
   Arc Library, Blogs and Sponsors & Ads keep their normal sidebar positions
   by default. Turning Early Access Mode on hides their nav items and links
   across the site. The pre-paint attribute comes from site-config.js on
   every page, so there is no tab flash. */

html[data-early-access="1"] [data-tab="library"],
html[data-early-access="1"] [data-tab="blogs"],
html[data-early-access="1"] [data-tab="sponsors"],
html[data-early-access="1"] .footer-links a[href="library.html"],
html[data-early-access="1"] .footer-links a[href="blogs.html"],
html[data-early-access="1"] .footer-links a[href="sponsors.html"],
html[data-early-access="1"] .header-nav a[href="library.html"],
html[data-early-access="1"] .header-nav a[href="blogs.html"],
html[data-early-access="1"] .header-nav a[href="sponsors.html"] {
    display: none;
}

/* ---------- Ads preference ----------
   The Ads toggle writes zarc_ads_enabled and site-config.js mirrors it into
   data-ads-enabled before paint. Removing the whole slot keeps layouts tight
   with no reserved gap when advertising is switched off. */

html[data-ads-enabled="0"] .ad-slot {
    display: none !important;
}

/* ---------- Reduced motion ---------- */

html.reduce-motion .studio-brand,
html.reduce-motion .studio-brand-emblem,
html.reduce-motion .studio-brand-emblem::after,
html.reduce-motion .studio-brand-emblem svg,
html.reduce-motion .brand,
html.reduce-motion .brand .brand-mark,
html.reduce-motion .brand .brand-mark::after,
html.reduce-motion .brand .brand-mark svg {
    transition: none !important;
}

html.reduce-motion .studio-brand:hover .studio-brand-emblem,
html.reduce-motion .brand:hover .brand-mark {
    transform: none !important;
}

html.reduce-motion .studio-brand-emblem::after,
html.reduce-motion .brand .brand-mark::after {
    display: none !important;
}

/* ---------- Shared Instagram prompt dialog ---------- */
.arc-social-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    pointer-events: auto;
    background: rgba(3, 5, 8, 0.62);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    transform: none;
    transition: opacity 0.28s var(--zarc-brand-ease);
}

.arc-social-modal[hidden] {
    display: none;
}

.arc-social-modal.is-visible {
    opacity: 1;
    transform: none;
}

.arc-social-card {
    position: relative;
    pointer-events: auto;
    width: min(430px, 100%);
    max-width: 430px;
    padding: 26px 26px 22px;
    transform: translateY(12px) scale(0.985);
    transition: transform 0.28s var(--zarc-brand-ease);
    border: 1px solid rgba(216, 228, 234, 0.16);
    border-radius: 16px;
    background: linear-gradient(160deg, rgba(24, 31, 37, 0.97), rgba(9, 11, 15, 0.98));
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    color: #f5f7fa;
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

.arc-social-modal.is-visible .arc-social-card {
    transform: translateY(0) scale(1);
}

.arc-social-card::before {
    content: "";
    position: absolute;
    left: 20px;
    right: 20px;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(147, 197, 253, 0.5), transparent);
}

.arc-social-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.65);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
}

.arc-social-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.09);
}

.arc-social-mark {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(147, 197, 253, 0.2);
    color: #93c5fd;
}

.arc-social-mark svg {
    width: 20px;
    height: 20px;
}

.arc-social-kicker {
    margin: 12px 0 4px;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #93c5fd;
}

.arc-social-title {
    margin: 0;
    font-size: 1.18rem;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: #fff;
}

.arc-social-message {
    margin: 10px 0 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.68);
}

.arc-social-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.arc-social-follow,
.arc-social-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s var(--zarc-brand-ease), border-color 0.2s var(--zarc-brand-ease), color 0.2s var(--zarc-brand-ease);
}

.arc-social-follow {
    border: 1px solid rgba(59, 130, 246, 0.45);
    background: rgba(59, 130, 246, 0.18);
    color: #dbeafe;
}

.arc-social-follow:hover {
    background: rgba(59, 130, 246, 0.28);
}

.arc-social-secondary {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.78);
    font-family: inherit;
}

.arc-social-secondary:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #fff;
}

.arc-social-secondary[hidden] {
    display: none;
}

.arc-social-follow:focus-visible,
.arc-social-secondary:focus-visible,
.arc-social-close:focus-visible {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
}

@media (max-width: 520px) {
    .arc-social-modal {
        padding: 14px;
    }

    .arc-social-card {
        padding: 18px 16px 16px;
    }
}

html.reduce-motion .arc-social-modal {
    transition: none;
}

html.reduce-motion .arc-social-card {
    transform: none;
    transition: none;
}
