/* Hero "live hub" (resources/views/website/home/hero_hub.blade.php, web/js/hero-hub.js). */

.section_home--hub {
    padding-top: 120px;
    padding-bottom: 10px;
}

.section_home--hub .home-txt {
    margin-bottom: 0;
}

.section_home--hub .home-txt p {
    margin-bottom: 22px;
}

.thumb-hero--hub {
    width: 100%;
}

.wk-hub {
    --hub-ink: #14231b;
    --hub-muted: #6b7a72;
    --hub-line: #e9eeeb;
    --hub-w: min(1360px, calc(100vw - 48px));
    position: relative;
    width: var(--hub-w);
    height: 690px;
    margin-inline: calc((100% - var(--hub-w)) / 2);
    isolation: isolate;
    user-select: none;
}

.wk-hub__glow {
    position: absolute;
    inset: 0 14% 6%;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgb(15 105 57 / 15%), rgb(15 105 57 / 5%) 55%, transparent 80%);
    z-index: -1;
}

.wk-hub__dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgb(15 105 57 / 20%) 1px, transparent 1.4px);
    background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(ellipse 55% 50% at 50% 45%, #000 25%, transparent 72%);
    mask-image: radial-gradient(ellipse 55% 50% at 50% 45%, #000 25%, transparent 72%);
    z-index: -1;
}

.wk-hub__lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.wk-hub__rings path {
    fill: none;
    stroke: rgb(15 105 57 / 18%);
    stroke-width: 1.2;
    stroke-dasharray: 3 7;
}

.wk-hub__rings path + path {
    stroke: rgb(15 105 57 / 9%);
    stroke-dasharray: none;
}

.wk-hub__flows path {
    fill: none;
    stroke: var(--c);
    stroke-width: 1.6;
    stroke-linecap: round;
    opacity: .55;
}

.wk-hub__flows circle {
    fill: var(--c);
    filter: drop-shadow(0 0 6px var(--c));
}

/* Modules on the orbit */
.wk-hub__node {
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    will-change: transform, opacity;
    z-index: 2;
}

.wk-hub__icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    border-radius: 19px;
    background: #fff;
    box-shadow: 0 12px 28px -10px rgb(16 40 28 / 28%), 0 0 0 1px rgb(16 40 28 / 6%);
    transition: transform .35s cubic-bezier(.3, 1.6, .5, 1), box-shadow .35s;
}

.wk-hub__icon i {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: var(--bg);
    color: var(--c);
}

.wk-hub svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.wk-hub__icon svg {
    width: 22px;
    height: 22px;
}

.wk-hub__node.is-ai .wk-hub__icon i {
    background: linear-gradient(135deg, #0f6939, #2bb36b);
    color: #fff;
}

.wk-hub__icon::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    border: 2px solid var(--c);
    opacity: 0;
}

.wk-hub__node.is-on .wk-hub__icon {
    transform: scale(1.12);
    box-shadow: 0 16px 36px -10px color-mix(in srgb, var(--c) 55%, transparent), 0 0 0 1px color-mix(in srgb, var(--c) 30%, transparent);
}

.wk-hub__node.is-on .wk-hub__icon::after {
    animation: wkHubRing 1.1s ease-out 2;
}

@keyframes wkHubRing {
    from { opacity: .7; transform: scale(1); }
    to { opacity: 0; transform: scale(1.6); }
}

.wk-hub__node b {
    font-size: 13px;
    font-weight: 600;
    color: var(--hub-ink);
    white-space: nowrap;
    padding: 2px 10px;
    border-radius: 20px;
    background: rgb(255 255 255 / 85%);
    box-shadow: 0 0 0 1px rgb(16 40 28 / 5%);
}

/* The dashboard in the middle */
.wk-hub__core {
    position: absolute;
    left: 50%;
    top: 56px;
    width: 720px;
    transform: translateX(-50%);
    padding: 16px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 50px 100px -34px rgb(12 70 40 / 40%), 0 14px 34px -14px rgb(16 40 28 / 16%), 0 0 0 1px rgb(16 40 28 / 7%);
    z-index: 3;
    text-align: start;
}

.wk-hub.is-ready .wk-hub__core {
    animation: wkHubCore .9s cubic-bezier(.2, .9, .3, 1) both;
}

@keyframes wkHubCore {
    from { opacity: 0; transform: translate(-50%, 40px) scale(.95); }
}

/* A thin light that runs around the dashboard: it is live. */
@property --hub-a {
    syntax: "<angle>";
    inherits: false;
    initial-value: 0deg;
}

.wk-hub__core::before {
    content: "";
    position: absolute;
    inset: -1.5px;
    border-radius: 25.5px;
    padding: 1.5px;
    background: conic-gradient(from var(--hub-a), transparent 0 62%, rgb(43 179 107 / 0%) 64%, #2bb36b 80%, #0f6939 86%, transparent 90%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    animation: wkHubSpin 6s linear infinite;
    pointer-events: none;
}

@keyframes wkHubSpin {
    to { --hub-a: 360deg; }
}

.wk-hub__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 4px 14px;
}

.wk-hub__head img {
    height: 22px;
    width: auto;
}

.wk-hub__title {
    font-size: 13.5px;
    color: var(--hub-muted);
    padding-inline-start: 12px;
    border-inline-start: 1px solid var(--hub-line);
}

.wk-hub__team {
    display: flex;
    margin-inline-start: auto;
    padding-inline-end: 7px;
}

.wk-hub__team i,
.wk-hub__av {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-style: normal;
    font-size: 9.5px;
    font-weight: 700;
    color: #fff;
    background: hsl(var(--h) 55% 46%);
    border: 2px solid #fff;
    flex: none;
}

.wk-hub__team i {
    margin-inline-end: -7px;
}

.wk-hub__live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #0f6939;
    background: #e9f5ee;
    padding: 3px 10px;
    border-radius: 20px;
}

.wk-hub__live i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #16a34a;
    box-shadow: 0 0 0 0 rgb(22 163 74 / 50%);
    animation: wkHubLive 1.8s infinite;
}

@keyframes wkHubLive {
    70% { box-shadow: 0 0 0 7px rgb(22 163 74 / 0%); }
    100% { box-shadow: 0 0 0 0 rgb(22 163 74 / 0%); }
}

/* Numbers */
.wk-hub__kpis {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1.35fr;
    gap: 10px;
}

.wk-hub__kpi {
    position: relative;
    padding: 11px 12px 10px;
    border-radius: 14px;
    border: 1px solid var(--hub-line);
    background: #fff;
    min-width: 0;
    transition: box-shadow .4s, border-color .4s;
}

.wk-hub__kpi.is-bump {
    border-color: color-mix(in srgb, var(--c) 45%, transparent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 12%, transparent);
}

.wk-hub__kpi small {
    display: block;
    font-size: 11.5px;
    color: var(--hub-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-inline-end: 30px;
}

.wk-hub__kpi strong {
    display: block;
    margin: 3px 0 2px;
    font-size: 22px;
    font-weight: 700;
    color: var(--hub-ink);
    line-height: 1.2;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.wk-hub__kpi strong em {
    font-style: normal;
    font-size: 11px;
    font-weight: 600;
    color: var(--hub-muted);
}

.wk-hub__kpi.is-bump strong bdi {
    color: var(--c);
}

.wk-hub__note {
    display: block;
    font-size: 11px;
    color: var(--hub-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wk-hub__kpi .wk-hub__dot {
    position: absolute;
    top: 10px;
    inset-inline-end: 10px;
    width: 26px;
    height: 26px;
    border-radius: 8px;
}

.wk-hub__kpi .wk-hub__dot svg {
    width: 15px;
    height: 15px;
}

/* Tasks, projects, activity */
.wk-hub__body {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.wk-hub__col {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.wk-hub__box {
    padding: 10px 12px 6px;
    border-radius: 14px;
    border: 1px solid var(--hub-line);
    background: #fbfcfb;
    min-width: 0;
}

.wk-hub__box h4 {
    margin: 0 0 4px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--hub-ink);
}

.wk-hub ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wk-hub__tasks li {
    display: flex;
    align-items: center;
    gap: 9px;
    height: 42px;
    border-top: 1px solid var(--hub-line);
}

.wk-hub__tasks li:first-child {
    border-top: 0;
}

.wk-hub__check {
    flex: none;
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.6px solid #c4cfc8;
    color: #fff;
    transition: background .3s, border-color .3s;
}

.wk-hub__check svg {
    width: 12px;
    height: 12px;
    stroke-width: 3;
    stroke-dasharray: 20;
    stroke-dashoffset: 20;
    transition: stroke-dashoffset .4s .15s;
}

.wk-hub__tasks li.is-done .wk-hub__check {
    background: #16a34a;
    border-color: #16a34a;
}

.wk-hub__tasks li.is-done .wk-hub__check svg {
    stroke-dashoffset: 0;
}

.wk-hub__tasks p,
.wk-hub__projects p {
    flex: 1;
    min-width: 0;
    margin: 0;
    line-height: 1.25;
}

.wk-hub__tasks b,
.wk-hub__projects b {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--hub-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color .3s;
}

.wk-hub__tasks small {
    display: block;
    font-size: 11px;
    color: var(--hub-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wk-hub__tasks li.is-done b {
    color: var(--hub-muted);
    text-decoration: line-through;
}

.wk-hub__av {
    width: 24px;
    height: 24px;
    font-size: 9px;
    border: 0;
}

.wk-hub__status {
    flex: none;
    font-style: normal;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    color: var(--s);
    background: color-mix(in srgb, var(--s) 11%, #fff);
    white-space: nowrap;
}

.wk-hub__tasks li.is-done .wk-hub__status {
    --s: #16a34a;
}

.wk-hub__projects li {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 40px;
    border-top: 1px solid var(--hub-line);
}

.wk-hub__projects li:first-child {
    border-top: 0;
}

.wk-hub__bar {
    display: block;
    height: 6px;
    margin-top: 5px;
    border-radius: 6px;
    background: #edf1ee;
    overflow: hidden;
}

.wk-hub__bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--s);
    transition: width 1s cubic-bezier(.2, .8, .3, 1);
}

.wk-hub__projects strong {
    flex: none;
    min-width: 34px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--hub-ink);
    text-align: end;
    font-variant-numeric: tabular-nums;
}

.wk-hub__box--feed {
    overflow: hidden;
}

.wk-hub__feed li {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 46px;
    border-top: 1px solid var(--hub-line);
    overflow: hidden;
}

.wk-hub__feed li:first-child {
    border-top: 0;
}

.wk-hub__dot {
    flex: none;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: var(--bg);
    color: var(--c);
}

.wk-hub__dot svg {
    width: 16px;
    height: 16px;
}

.wk-hub__feed p {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 12.5px;
    color: #3d4a43;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wk-hub__feed p b {
    color: var(--hub-ink);
    font-weight: 600;
}

.wk-hub__feed time {
    flex: none;
    font-size: 11px;
    color: #98a49d;
}

.wk-hub__feed li.is-new time {
    color: #0f6939;
    font-weight: 600;
}

/* An event on its way to the dashboard */
.wk-hub__card {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 10px;
    width: max-content;
    max-width: 290px;
    padding: 10px 12px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 22px 44px -14px rgb(16 40 28 / 34%), 0 0 0 1px color-mix(in srgb, var(--c) 22%, transparent);
    text-align: start;
    pointer-events: none;
    will-change: transform, opacity;
}

.wk-hub__card .wk-hub__dot {
    width: 36px;
    height: 36px;
    border-radius: 11px;
}

.wk-hub__card .wk-hub__dot svg {
    width: 20px;
    height: 20px;
}

.wk-hub__card div {
    min-width: 0;
}

.wk-hub__card b {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--hub-ink);
    white-space: nowrap;
}

.wk-hub__card small {
    display: block;
    font-size: 12px;
    color: var(--hub-muted);
    line-height: 1.4;
    min-height: 17px;
}

.wk-hub__card em {
    align-self: flex-start;
    font-style: normal;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    padding: 2px 9px;
    border-radius: 20px;
    color: var(--c);
    background: var(--bg);
}

.wk-hub__typing {
    display: inline-flex;
    gap: 3px;
    padding-top: 6px;
}

.wk-hub__typing i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    animation: wkHubType 1s infinite;
}

.wk-hub__typing i:nth-child(2) { animation-delay: .15s; }
.wk-hub__typing i:nth-child(3) { animation-delay: .3s; }

@keyframes wkHubType {
    0%, 60%, 100% { opacity: .25; transform: none; }
    30% { opacity: 1; transform: translateY(-2px); }
}

/* Smaller desktops and tablets */
@media (max-width: 1199px) {
    .wk-hub__core { width: 640px; }
    .wk-hub__icon { width: 52px; height: 52px; border-radius: 16px; }
    .wk-hub__icon i { width: 36px; height: 36px; border-radius: 11px; }
    .wk-hub__node b { font-size: 12px; }
    .wk-hub__kpi strong { font-size: 19px; }
}

@media (max-width: 900px) {
    .wk-hub__core { top: 190px; width: calc(100% - 40px); max-width: 600px; }
    .wk-hub__node b { display: none; }
    .wk-hub__title { display: none; }
    .wk-hub__kpis { grid-template-columns: 1fr 1fr; }
    .wk-hub__body { grid-template-columns: 1fr; }
    .wk-hub__box--projects { display: none; }
    .wk-hub__feed li:nth-child(n+4) { display: none; }
}

/* Phones: the modules sit on an arc above the dashboard */
@media (max-width: 680px) {
    .section_home--hub { padding-top: 100px; }
    .wk-hub { --hub-w: calc(100vw - 16px); height: 760px; }
    .wk-hub__icon { width: 44px; height: 44px; border-radius: 14px; }
    .wk-hub__icon i { width: 32px; height: 32px; border-radius: 10px; }
    .wk-hub__icon svg { width: 18px; height: 18px; }
    .wk-hub__core {
        top: 200px;
        width: 100%;
        max-width: 440px;
        padding: 12px;
        border-radius: 20px;
    }
    .wk-hub__core::before { border-radius: 21.5px; }
    .wk-hub__team i:nth-child(n+4) { display: none; }
    .wk-hub__kpis { gap: 8px; }
    .wk-hub__kpi { padding: 9px 10px 8px; }
    .wk-hub__kpi strong { font-size: 17px; }
    .wk-hub__kpi small { font-size: 10.5px; }
    .wk-hub__status { display: none; }
    .wk-hub__card { max-width: calc(100vw - 40px); }
}

@media (prefers-reduced-motion: reduce) {
    .wk-hub *, .wk-hub *::before, .wk-hub *::after { animation: none !important; transition: none !important; }
}
