/* "Inside Wroke" showcase (resources/views/website/partials/interface.blade.php) */

.wk-showcase {
    --wk-ink: #1d2433;
    --wk-muted: #5b6475;
    --wk-line: rgb(15 105 57 / 12%);
    --wk-soft: rgb(15 105 57 / 6%);
    overflow: hidden;
}

.wk-showcase .sec_head h2 {
    text-transform: none;
}

/* ---- group tabs ---- */
.wk-showcase__tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 auto 40px;
}

.wk-showcase__tab {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid var(--wk-line);
    background: #fff;
    color: var(--wk-muted);
    font: 600 15px/1 'Inter', 'Almarai', sans-serif;
    cursor: pointer;
    transition: color .2s, background .2s, border-color .2s, box-shadow .2s, transform .2s;
    white-space: nowrap;
}

.wk-showcase__tab:hover {
    color: var(--main-color);
    border-color: rgb(15 105 57 / 35%);
}

.wk-showcase__tab.is-active {
    background: var(--main-color);
    border-color: var(--main-color);
    color: #fff;
    box-shadow: 0 8px 20px rgb(15 105 57 / 25%);
}

.wk-showcase__tab:focus-visible,
.wk-showcase__sub:focus-visible {
    outline: 3px solid rgb(15 105 57 / 35%);
    outline-offset: 2px;
}

.wk-showcase__tab-icon {
    display: inline-flex;
    font-size: 18px;
}

/* ---- body: text beside the screen ---- */
.wk-showcase__body {
    display: grid;
    grid-template-columns: minmax(0, 34%) minmax(0, 1fr);
    gap: 48px;
    align-items: center;
}

.wk-showcase__info {
    min-width: 0;
}

.wk-showcase__subs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.wk-showcase__subs:empty {
    display: none;
}

.wk-showcase__sub {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: var(--wk-soft);
    color: var(--wk-muted);
    font: 600 14px/1.2 'Inter', 'Almarai', sans-serif;
    cursor: pointer;
    transition: color .2s, background .2s, border-color .2s;
}

.wk-showcase__sub:hover {
    color: var(--main-color);
}

.wk-showcase__sub.is-active {
    background: #fff;
    border-color: rgb(15 105 57 / 40%);
    color: var(--main-color);
    box-shadow: 0 4px 12px rgb(15 105 57 / 10%);
}

.wk-showcase__item.is-active {
    animation: wkFadeUp .45s ease both;
}

.wk-showcase__item h3 {
    color: var(--wk-ink);
    font-size: 28px;
    line-height: 1.3;
    margin-bottom: 12px;
}

.wk-showcase__item p {
    color: var(--wk-muted);
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 20px;
}

.wk-showcase__item ul {
    display: grid;
    gap: 12px;
    margin-bottom: 28px;
}

.wk-showcase__item li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--wk-ink);
    font-size: 15px;
    line-height: 1.6;
}

.wk-showcase__item li svg {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    padding: 3px;
    border-radius: 50%;
    background: rgb(15 105 57 / 10%);
    color: var(--main-color);
    margin-top: 1px;
}

.wk-showcase__cta {
    display: inline-flex;
    height: 46px;
}

.wk-showcase__cta span {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wk-showcase__cta svg {
    transform: rotate(45deg);
}

/* ---- the screen ---- */
.wk-showcase__stage {
    position: relative;
    min-width: 0;
}

.wk-showcase__stage::before {
    content: "";
    position: absolute;
    inset: 8% -6% -8% 8%;
    background: radial-gradient(closest-side, rgb(15 105 57 / 16%), transparent);
    filter: blur(10px);
    z-index: -1;
}

.wk-showcase__frame {
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgb(29 36 51 / 8%);
    box-shadow: 0 30px 60px -20px rgb(29 36 51 / 28%), 0 12px 24px -12px rgb(29 36 51 / 12%);
}

.wk-showcase__bar {
    display: flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    padding: 0 14px;
    background: #f4f5f7;
    border-bottom: 1px solid rgb(29 36 51 / 6%);
    border-radius: 16px 16px 0 0;
    direction: ltr;
}

.wk-showcase__bar i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff5f57;
}

.wk-showcase__bar i:nth-child(2) { background: #febc2e; }
.wk-showcase__bar i:nth-child(3) { background: #28c840; }

.wk-showcase__bar span {
    margin: 0 auto;
    padding: 4px 40px;
    border-radius: 8px;
    background: #fff;
    color: #8a8fa0;
    font: 500 12px/1.2 'Inter', sans-serif;
}

.wk-showcase__screen {
    position: relative;
    aspect-ratio: 16 / 10;
    border-radius: 0 0 15px 15px;
    background: #f6f7f9;
    direction: ltr; /* hotspots are measured from the image's left edge in both languages */
}

.wk-showcase__screen.is-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 30%, rgb(255 255 255 / 70%) 50%, transparent 70%) #eef0f3;
    background-size: 200% 100%;
    animation: wkShimmer 1.2s linear infinite;
    border-radius: 0 0 15px 15px;
    z-index: 3;
}

.wk-showcase__shot {
    position: absolute;
    inset: 0;
    margin: 0;
    overflow: hidden; /* the screen does not clip: scene pieces lift out of it */
    border-radius: 0 0 15px 15px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .45s ease, visibility 0s linear .45s;
}

.wk-showcase__shot.is-active {
    opacity: 1;
    visibility: visible;
    transition: opacity .45s ease;
}

.wk-showcase__shot img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transform-origin: var(--wk-x, 50%) var(--wk-y, 50%);
    transition: transform 2.4s cubic-bezier(.22, .61, .36, 1);
}

.wk-showcase__shot.is-zoomed img {
    transform: scale(1.22);
}

.wk-showcase__progress {
    height: 3px;
    margin: 16px auto 0;
    width: 120px;
    border-radius: 3px;
    background: rgb(15 105 57 / 12%);
    overflow: hidden;
}

.wk-showcase__progress span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--main-color);
}

.wk-showcase.is-playing .wk-showcase__progress span {
    animation: wkProgress var(--wk-step, 7s) linear forwards;
}

.wk-showcase.is-stopped .wk-showcase__progress {
    visibility: hidden;
}

/* ---- scenes (showcase-scenes.js) ---- */
.wk-scene {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

.wk-scene__veil {
    position: absolute;
    inset: 0;
    border-radius: 0 0 15px 15px;
    background: rgb(246 248 250 / 46%);
    backdrop-filter: blur(1px);
    opacity: 0;
}

.wk-piece {
    position: absolute;
    will-change: left, top, width, filter;
}

.wk-piece__in {
    position: relative;
    container-type: inline-size;
}

.wk-piece__img,
.wk-piece__after {
    display: block;
    width: 100%;
    height: auto;
}

.wk-piece__after {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.wk-piece__count {
    position: absolute;
    line-height: 1.2;
    white-space: nowrap;
    direction: ltr;
    font-family: 'Inter', 'Almarai', sans-serif;
    font-variant-numeric: tabular-nums;
}

.wk-piece__burst {
    position: absolute;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 3px solid #16a34a;
    opacity: 0;
    transform: translate(-50%, -50%);
}

/* ---- simple animation layer ---- */
.wk-showcase__fx {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

.wk-fx-ring,
.wk-fx-cursor,
.wk-fx-label,
.wk-fx-toast {
    position: absolute;
    opacity: 0;
}

.wk-fx-ring {
    left: var(--wk-x);
    top: var(--wk-y);
    width: 46px;
    height: 46px;
    margin: -23px 0 0 -23px;
    border-radius: 50%;
    border: 3px solid var(--main-color);
    background: rgb(15 105 57 / 12%);
}

.wk-fx-cursor {
    left: var(--wk-x);
    top: var(--wk-y);
    width: 26px;
    height: 26px;
    margin: -3px 0 0 -5px;
    filter: drop-shadow(0 3px 4px rgb(0 0 0 / 25%));
    transform: translate(var(--wk-from-x, 120px), var(--wk-from-y, 90px));
    transition: transform 1.1s cubic-bezier(.45, 0, .2, 1), opacity .3s ease;
}

.wk-fx-cursor svg {
    width: 100%;
    height: 100%;
    transition: transform .15s ease;
}

.wk-fx-label {
    left: var(--wk-x);
    top: var(--wk-y);
    margin-top: var(--wk-label-top, 30px);
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--wk-ink);
    color: #fff;
    font: 600 13px/1.3 'Inter', 'Almarai', sans-serif;
    white-space: nowrap;
    transform: translate(var(--wk-label-shift, -50%), 6px);
    transition: opacity .3s ease, transform .3s ease;
    box-shadow: 0 8px 18px rgb(0 0 0 / 18%);
}

.wk-fx-toast {
    left: var(--wk-x);
    top: var(--wk-y);
    display: flex;
    align-items: center;
    gap: 10px;
    width: max-content;
    max-width: 330px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgb(29 36 51 / 8%);
    box-shadow: 0 18px 36px -12px rgb(29 36 51 / 35%);
    color: var(--wk-ink);
    font: 600 14px/1.4 'Inter', 'Almarai', sans-serif;
    transform: translate(var(--wk-toast-x, 24px), calc(var(--wk-toast-y, 24px) + 10px));
    transition: opacity .35s ease, transform .45s cubic-bezier(.2, .9, .3, 1.3);
}

.wk-fx-toast small {
    color: #8a8fa0;
    font-weight: 500;
    font-size: 12px;
    margin-inline-start: 6px;
}

.wk-fx-toast__icon {
    display: inline-flex;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgb(15 105 57 / 10%);
    color: var(--main-color);
}

.wk-fx-toast__icon svg {
    width: 18px;
    height: 18px;
}

/* states (set by showcase.js) */
.wk-showcase__fx.is-cursor .wk-fx-cursor { opacity: 1; }
.wk-showcase__fx.is-arrived .wk-fx-cursor { transform: translate(0, 0); }
.wk-showcase__fx.is-click .wk-fx-cursor svg { transform: scale(.85); }
.wk-showcase__fx.is-click .wk-fx-ring { animation: wkRipple 1s ease-out; }
.wk-showcase__fx.is-pulse .wk-fx-ring { animation: wkPulse 1.6s ease-out infinite; }
.wk-showcase__fx.is-label .wk-fx-label { opacity: 1; transform: translate(var(--wk-label-shift, -50%), 0); }
.wk-showcase__fx.is-toast .wk-fx-toast { opacity: 1; transform: translate(var(--wk-toast-x, 24px), var(--wk-toast-y, 24px)); }

[dir="rtl"] .wk-fx-label,
[dir="rtl"] .wk-fx-toast {
    direction: rtl;
}

@keyframes wkRipple {
    0% { opacity: .9; transform: scale(.4); }
    100% { opacity: 0; transform: scale(1.8); }
}

@keyframes wkPulse {
    0% { opacity: .8; transform: scale(.5); }
    70%, 100% { opacity: 0; transform: scale(1.6); }
}

@keyframes wkShimmer {
    to { background-position: -200% 0; }
}

@keyframes wkProgress {
    to { width: 100%; }
}

@keyframes wkFadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

/* ---- tablets and phones ---- */
@media (max-width: 991px) {
    .wk-showcase__body {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .wk-showcase__stage {
        order: -1;
    }

    .wk-showcase__item h3 {
        font-size: 24px;
    }
}

@media (max-width: 767px) {
    .wk-showcase .sec_head p {
        width: 100%;
    }

    .wk-showcase__tabs {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        scrollbar-width: none;
        margin: 0 -15px 12px;
        padding: 4px 15px 14px; /* room for the active tab's shadow */
        scroll-snap-type: x proximity;
    }

    .wk-showcase__tabs::-webkit-scrollbar {
        display: none;
    }

    .wk-showcase__tab {
        height: 42px;
        padding: 0 14px;
        font-size: 14px;
        scroll-snap-align: start;
    }

    .wk-showcase__frame {
        border-radius: 12px;
    }

    .wk-showcase__bar {
        height: 26px;
        padding: 0 10px;
    }

    .wk-showcase__bar i {
        width: 7px;
        height: 7px;
    }

    .wk-showcase__bar span {
        padding: 2px 24px;
        font-size: 10px;
    }

    /* The screenshot is small here: the label and toast would cover it. */
    .wk-fx-label,
    .wk-fx-toast {
        display: none;
    }

    .wk-showcase__item h3 {
        font-size: 22px;
    }
}

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

/* ---- hero stage (resources/views/website/home/hero.blade.php) ---- */
.wk-hero-stage {
    position: relative;
    max-width: 1120px;
    margin: 10px auto 0;
}

.wk-hero-stage::before {
    content: "";
    position: absolute;
    inset: 10% 4% -6%;
    background: radial-gradient(closest-side, rgb(15 105 57 / 20%), transparent);
    filter: blur(18px);
    z-index: -1;
}

/* A scene that played once keeps its pieces up, bobbing gently. */
.wk-scene.is-settled .wk-piece__in {
    animation: wkBob 4.4s ease-in-out infinite;
}

.wk-scene.is-settled .wk-piece:nth-child(odd) .wk-piece__in {
    animation-delay: -2.2s;
}

@keyframes wkBob {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -6px; }
}
