/* ========================================================================== */
/* VICE HORIZON 2.2 — command navbar, editorial header and hover palms         */
/* ========================================================================== */

/* Segmented floating command center */
#navbar.ui.secondary.menu,
body.dark #navbar.ui.secondary.menu:not(.inverted) {
    top: 1rem;
    width: min(1380px, calc(100% - 2rem));
    min-height: 5.15rem;
    padding: .5rem;
    border: 0;
    border-radius: 2rem;
    background: rgba(8, 6, 13, .88);
    box-shadow:
        0 28px 70px rgba(0,0,0,.5),
        0 0 0 1px rgba(255,255,255,.13),
        0 0 45px rgba(255,42,138,.1),
        inset 0 1px rgba(255,255,255,.08);
    isolation: isolate;
    backdrop-filter: blur(26px) saturate(170%);
    -webkit-backdrop-filter: blur(26px) saturate(170%);
}

#navbar::before {
    content: "";
    position: absolute;
    inset: -2px;
    z-index: -2;
    padding: 2px;
    border-radius: inherit;
    background: linear-gradient(105deg, rgba(255,207,64,.9), rgba(255,42,138,.75) 38%, rgba(146,60,255,.5) 67%, rgba(37,233,255,.7));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

#navbar::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -3;
    border-radius: inherit;
    background: var(--vice-gradient);
    filter: blur(26px);
    opacity: .12;
    pointer-events: none;
}

.vice-nav-glow {
    position: absolute;
    left: 18%;
    right: 18%;
    bottom: -1px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--vice-pink), var(--vice-yellow), var(--vice-cyan), transparent);
    box-shadow: 0 0 18px rgba(255,42,138,.5);
    pointer-events: none;
}

#navbar .vice-brand {
    min-width: 220px;
    margin: 0 .55rem 0 0;
    padding: .25rem 1.15rem .25rem .25rem;
    background: transparent;
}

.vice-brand-mark {
    width: 3.3rem;
    height: 3.3rem;
    margin: -.15rem .15rem -.15rem -.05rem;
    border: 2px solid rgba(255,255,255,.85);
    border-radius: 1rem .35rem 1rem .35rem;
    background: var(--vice-gradient);
    box-shadow: 5px 5px 0 #25102c, 0 0 30px rgba(255,42,138,.38);
    transform: rotate(-5deg);
}

.vice-brand-mark b {
    font-size: 1.55rem;
    transform: rotate(5deg) skew(-7deg);
}

.vice-brand-copy strong { font-size: 1.08rem; }
.vice-brand-copy small { margin-top: .4rem; }

.vice-nav-links {
    display: flex;
    align-items: center;
    gap: .2rem;
    padding: .32rem;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.025));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06), inset 0 -10px 25px rgba(0,0,0,.08);
}

#navbar.ui.menu .vice-nav-links > .item {
    min-height: 2.85rem;
    margin: 0;
    padding: .8rem 1rem;
    border-radius: 999px;
    color: rgba(255,255,255,.7) !important;
    background: transparent;
    white-space: nowrap;
}

#navbar.ui.menu .vice-nav-links > .item:hover {
    color: #fff !important;
    background: rgba(255,42,138,.14);
    box-shadow: inset 0 0 0 1px rgba(255,42,138,.2);
    transform: translateY(-1px);
}

#navbar.ui.menu .vice-nav-links > .active.item {
    color: #130811 !important;
    background: var(--vice-yellow);
    box-shadow: 0 5px 0 var(--vice-pink), 0 9px 22px rgba(255,42,138,.22);
    transform: translateY(-2px);
}

#navbar.ui.menu .vice-nav-links > .active.item::after { display: none; }

#navbar .right.menu {
    align-items: center;
    gap: .25rem;
    margin-left: auto;
    padding: .32rem;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 999px;
    background: linear-gradient(115deg, rgba(255,42,138,.24), rgba(146,60,255,.18));
    box-shadow: inset 0 1px rgba(255,255,255,.08);
}

#navbar .right.menu .ui.button,
#navbar .right.menu .ui.label {
    min-height: 2.72rem;
    margin: 0;
    border: 0;
    color: #fff;
    background: rgba(5,3,10,.5);
    box-shadow: none;
}

#navbar .right.menu .ui.primary.button {
    color: #130811;
    background: var(--vice-yellow);
    box-shadow: none;
}

/* Editorial chapter header */
.vice-section-heading {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-height: 18rem;
    margin: 0 0 3.2rem;
    padding: 3.2rem clamp(2rem, 5vw, 5rem);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.12);
    background:
        radial-gradient(circle at 80% 30%, rgba(255,207,64,.14), transparent 20rem),
        linear-gradient(115deg, rgba(255,42,138,.19), transparent 38%),
        linear-gradient(145deg, #18101f, #0c0911 68%);
    box-shadow: 14px 16px 0 rgba(255,42,138,.08), 0 30px 80px rgba(0,0,0,.3);
    clip-path: polygon(0 0, calc(100% - 2.2rem) 0, 100% 2.2rem, 100% 100%, 2.2rem 100%, 0 calc(100% - 2.2rem));
    isolation: isolate;
}

.vice-section-heading::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    z-index: 1;
    width: .55rem;
    background: var(--vice-gradient);
    box-shadow: 0 0 30px rgba(255,42,138,.45);
}

.vice-section-heading::after {
    content: "";
    position: absolute;
    right: -8rem;
    bottom: -12rem;
    z-index: 0;
    width: 30rem;
    height: 30rem;
    border: 4rem solid rgba(255,42,138,.07);
    border-radius: 50%;
    box-shadow: 0 0 0 2rem rgba(255,207,64,.025), 0 0 0 6rem rgba(146,60,255,.025);
}

.vice-section-grid {
    position: absolute !important;
    inset: 0;
    z-index: 0 !important;
    opacity: .32;
    background-image:
        linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: linear-gradient(90deg, #000, transparent 72%);
    pointer-events: none;
}

.vice-section-orbit {
    position: absolute !important;
    right: 13rem;
    top: -6rem;
    z-index: 0 !important;
    width: 17rem;
    height: 17rem;
    border: 1px solid rgba(37,233,255,.2);
    border-radius: 50%;
    box-shadow: 0 0 0 2rem rgba(37,233,255,.025), 0 0 50px rgba(37,233,255,.05);
}

.vice-section-copy {
    position: relative;
    z-index: 4;
    max-width: 58rem;
}

.vice-section-heading .vice-kicker {
    box-shadow: 6px 6px 0 #4d174d;
}

.vice-section-heading h2 {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: .05em .28em;
    margin: 1.15rem 0 .8rem;
    font-size: clamp(3.4rem, 6.5vw, 7rem);
    line-height: .78;
}

.vice-section-heading h2 span {
    color: var(--vice-paper);
    text-shadow: 6px 7px 0 rgba(255,42,138,.17);
}

.vice-section-heading h2 em {
    display: inline-block;
    margin: 0;
    padding: 0 .05em .07em;
    color: transparent;
    font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    font-size: .68em;
    font-style: italic;
    font-weight: 900;
    line-height: .92;
    letter-spacing: -.025em;
    text-transform: uppercase;
    background: linear-gradient(100deg, var(--vice-yellow), var(--vice-coral) 40%, var(--vice-pink) 78%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 0;
    filter: drop-shadow(4px 5px 0 rgba(84,19,78,.85));
    transform: skew(-8deg);
}

.vice-section-copy > p {
    max-width: 44rem;
    margin: 1.5rem 0 0;
    color: rgba(255,255,255,.62);
    font-size: 1rem;
    line-height: 1.65;
}

.vice-section-stamp {
    position: relative;
    z-index: 3;
    display: grid;
    place-items: center;
    width: clamp(8rem, 13vw, 12rem);
    aspect-ratio: 1;
    margin-left: 2rem;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,42,138,.2), rgba(9,7,13,.75) 66%);
    box-shadow: 0 0 0 .7rem rgba(255,255,255,.025), 0 0 70px rgba(255,42,138,.18);
    transform: rotate(8deg);
}

.vice-section-stamp::before,
.vice-section-stamp::after {
    content: "";
    position: absolute;
    inset: .85rem;
    border: 1px dashed rgba(255,207,64,.55);
    border-radius: 50%;
}

.vice-section-stamp::after {
    inset: -.55rem;
    border-color: rgba(37,233,255,.16);
}

.vice-section-stamp b {
    color: transparent;
    font: italic 1000 clamp(4.5rem, 8vw, 7.5rem)/1 Impact, sans-serif;
    letter-spacing: -.12em;
    -webkit-text-stroke: 2px var(--vice-pink);
    filter: drop-shadow(4px 5px 0 rgba(255,207,64,.2));
    transform: translateX(-.06em);
}

.vice-section-stamp i {
    position: absolute;
    right: .6rem;
    top: 48%;
    width: .8rem;
    height: .8rem;
    border-radius: 50%;
    background: var(--vice-cyan);
    box-shadow: 0 0 18px var(--vice-cyan);
}

.vice-section-line {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 5;
    height: .45rem;
    margin: 0;
    background: var(--vice-gradient);
}

/* Palm silhouettes slide in from both sides on interactive panels. */
.vice-palm-hover {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.vice-palm-hover > :not(.vice-palm) {
    position: relative;
    z-index: 2;
}

.vice-palm {
    position: absolute;
    bottom: -18%;
    z-index: 1;
    width: clamp(7rem, 14vw, 11rem);
    height: 115%;
    min-height: 10rem;
    opacity: 0;
    background: url('../assets/images/vice-palm.svg') bottom center / contain no-repeat;
    filter: saturate(1.18) drop-shadow(0 0 22px rgba(255,42,138,.3));
    pointer-events: none;
    transition: opacity .38s ease, transform .55s cubic-bezier(.18,.8,.25,1);
}

.vice-palm-left {
    left: -3.5rem;
    transform: translateX(-75%) rotate(-13deg);
    transform-origin: bottom center;
}

.vice-palm-right {
    right: -3.5rem;
    transform: translateX(75%) scaleX(-1) rotate(-13deg);
    transform-origin: bottom center;
}

.vice-palm-hover:hover > .vice-palm-left,
.vice-palm-hover:focus-within > .vice-palm-left {
    opacity: .3;
    transform: translateX(0) rotate(-7deg);
}

.vice-palm-hover:hover > .vice-palm-right,
.vice-palm-hover:focus-within > .vice-palm-right {
    opacity: .3;
    transform: translateX(0) scaleX(-1) rotate(-7deg);
}

.vice-section-heading > .vice-palm {
    z-index: 1;
    width: clamp(13rem, 20vw, 20rem);
    height: 125%;
    opacity: .12;
}

.vice-section-heading:hover > .vice-palm,
.vice-section-heading:focus-within > .vice-palm { opacity: .48; }

#news-post:hover,
.ui.segment.vice-palm-hover:hover,
.ui.vertical.menu.vice-palm-hover:hover {
    border-color: rgba(255,42,138,.38);
}

@media (max-width: 1200px) {
    #navbar .vice-brand { min-width: 0; padding-right: .35rem; }
    #navbar .vice-brand-copy { display: none; }
    #navbar.ui.menu .vice-nav-links > .item { padding-right: .8rem; padding-left: .8rem; }
}

@media (max-width: 1000px) {
    #navbar .vice-nav-links { display: none; }
    #navbar.ui.secondary.menu .toc.item {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 3rem;
        height: 3rem;
        margin-left: .35rem;
        border-radius: 1rem;
        color: #130811 !important;
        background: var(--vice-yellow);
        box-shadow: 4px 4px 0 var(--vice-pink);
    }
}

@media (max-width: 768px) {
    #navbar.ui.secondary.menu,
    body.dark #navbar.ui.secondary.menu:not(.inverted) {
        top: .6rem;
        min-height: 4.15rem;
        border-radius: 1.45rem;
    }

    .vice-brand-mark {
        width: 2.85rem;
        height: 2.85rem;
        margin: 0;
        border-radius: .85rem .3rem .85rem .3rem;
    }

    .vice-section-heading {
        display: block;
        min-height: 23rem;
        padding: 2.5rem 1.7rem 6rem;
        clip-path: polygon(0 0, calc(100% - 1.4rem) 0, 100% 1.4rem, 100% 100%, 1.4rem 100%, 0 calc(100% - 1.4rem));
    }

    .vice-section-heading h2 { display: block; font-size: clamp(3.2rem, 15vw, 5.2rem); }
    .vice-section-heading h2 em { display: block; width: max-content; max-width: 100%; margin-top: .18em; font-size: .72em; }
    .vice-section-copy > p { padding-right: 4rem; font-size: .9rem; }
    .vice-section-stamp { position: absolute; right: 1.2rem; bottom: 1.5rem; width: 6rem; margin: 0; opacity: .74; }
    .vice-section-stamp b { font-size: 4rem; }
    .vice-section-orbit { right: -5rem; }
    .vice-palm { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .vice-palm { transition: none; }
}

.ui.masthead .connect-server .ui.header {
    margin: 0;
    color: #fff;
}
