/* Homepage "One place instead of six tools" (resources/views/website/home/modules.blade.php). */

.wk-mods {
    --mods-ink: #14231b;
    --mods-muted: #5f6d66;
    --mods-line: #e6ece8;
    position: relative;
    padding: 96px 0 104px;
    background: #fff;
    overflow: hidden;
}

.wk-mods .sec_head {
    max-width: 760px;
    margin-bottom: 30px;
}

.wk-mods .sec_head h2 {
    font-size: 38px;
    letter-spacing: -.01em;
    text-wrap: balance;
}

.wk-mods .sec_head p {
    text-wrap: balance;
}

/* ---- "Instead of": the tools Wroke replaces, crossed out one by one ---- */
.wk-mods__instead {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 14px;
    margin: 0 auto 44px;
    max-width: 1080px;
}

.wk-mods__instead-label {
    color: var(--mods-muted);
    font-size: 14px;
    font-weight: 500;
}

.wk-mods__instead ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.wk-mods__instead li {
    padding: 7px 13px;
    border: 1px dashed #cfd8d3;
    border-radius: 999px;
    background: #fafbfa;
    color: #7b8781;
    font-size: 13.5px;
    line-height: 1.3;
    transition: opacity .4s ease calc(var(--i) * 120ms + 300ms), background .4s ease calc(var(--i) * 120ms + 300ms);
}

.wk-mods__instead s {
    position: relative;
    text-decoration: none;
}

/* the line that crosses a tool out, drawn when the section comes on screen */
.wk-mods__instead s::after {
    content: "";
    position: absolute;
    inset-inline: -3px;
    top: 52%;
    height: 1.6px;
    border-radius: 2px;
    background: #d1495b;
    transform: scaleX(0);
    transform-origin: inline-start;
    transition: transform .45s cubic-bezier(.6, 0, .3, 1) calc(var(--i) * 120ms + 150ms);
}

[dir="rtl"] .wk-mods__instead s::after {
    transform-origin: right center;
}

[dir="ltr"] .wk-mods__instead s::after {
    transform-origin: left center;
}

.wk-mods.is-in .wk-mods__instead s::after {
    transform: scaleX(1);
}

.wk-mods.is-in .wk-mods__instead li {
    opacity: .7;
}

.wk-mods__arrow svg {
    display: block;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: var(--main-color);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

[dir="rtl"] .wk-mods__arrow svg {
    transform: scaleX(-1);
}

.wk-mods__brand {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 0 0 1px rgb(15 105 57 / 22%), 0 10px 24px -12px rgb(15 105 57 / 45%);
    transition: transform .5s cubic-bezier(.3, 1.6, .5, 1) 1s, box-shadow .5s ease 1s;
}

.wk-mods__brand img {
    display: block;
    width: 78px;
    height: auto;
}

.wk-mods.is-in .wk-mods__brand {
    transform: scale(1.06);
    box-shadow: 0 0 0 1.5px rgb(15 105 57 / 45%), 0 14px 30px -12px rgb(15 105 57 / 55%);
}

/* ---- the grid: the assistant tall on the start side, nine parts beside it ---- */
.wk-mods__grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    grid-template-rows: repeat(3, auto);
    gap: 16px;
}

.wk-mods__card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px 20px 22px;
    border: 1px solid var(--mods-line);
    border-radius: 18px;
    background: #fff;
    opacity: 0;
    transform: translateY(14px);
    transition:
        opacity .5s ease calc(var(--i) * 55ms + 250ms),
        transform .6s cubic-bezier(.2, .8, .3, 1) calc(var(--i) * 55ms + 250ms),
        border-color .25s ease,
        box-shadow .25s ease;
}

.wk-mods.is-in .wk-mods__card {
    opacity: 1;
    transform: none;
}

.wk-mods__card:hover {
    border-color: color-mix(in srgb, var(--c) 38%, transparent);
    box-shadow: 0 18px 36px -22px color-mix(in srgb, var(--c) 60%, transparent);
}

.wk-mods.is-in .wk-mods__card:hover {
    transform: translateY(-3px);
    transition-delay: 0s;
}

.wk-mods__icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: var(--bg);
    color: var(--c);
}

.wk-mods__icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.wk-mods__card h3 {
    margin: 2px 0 6px;
    color: var(--mods-ink);
    font-size: 16.5px;
    font-weight: 700;
    line-height: 1.35;
}

.wk-mods__card p {
    margin: 0;
    color: var(--mods-muted);
    font-size: 14px;
    line-height: 1.7;
    text-wrap: pretty;
}

/* the assistant: a tall green card with a small real exchange */
.wk-mods__ai {
    grid-row: 1 / span 3;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 26px 24px 24px;
    border-radius: 22px;
    background:
        radial-gradient(120% 70% at 100% 0%, rgb(43 179 107 / 38%), transparent 60%),
        linear-gradient(160deg, #0f6939 0%, #0b4f2b 100%);
    color: #fff;
    overflow: hidden;
    isolation: isolate;
    box-shadow: 0 30px 60px -30px rgb(11 79 43 / 70%);
}

/* soft dots, like the hub's background */
.wk-mods__ai::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(rgb(255 255 255 / 14%) 1px, transparent 1.4px);
    background-size: 20px 20px;
    -webkit-mask-image: linear-gradient(180deg, #000, transparent 55%);
    mask-image: linear-gradient(180deg, #000, transparent 55%);
}

.wk-mods__ai .wk-mods__icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgb(255 255 255 / 14%);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 22%);
}

.wk-mods__ai h3 {
    margin: 18px 0 8px;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
}

.wk-mods__ai > p {
    margin: 0 0 22px;
    color: rgb(255 255 255 / 82%);
    font-size: 14.5px;
    line-height: 1.75;
    text-wrap: pretty;
}

.wk-mods__chat {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 13px;
    line-height: 1.6;
}

.wk-mods__q {
    align-self: flex-end;
    max-width: 88%;
    padding: 9px 13px;
    border-radius: 14px 14px 4px 14px;
    background: rgb(255 255 255 / 16%);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 16%);
}

[dir="rtl"] .wk-mods__q {
    border-radius: 14px 14px 14px 4px;
}

.wk-mods__a {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.wk-mods__a > i {
    flex: none;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: #fff;
    color: var(--main-color);
}

.wk-mods__a > i svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linejoin: round;
}

.wk-mods__a > div {
    flex: 1;
    padding: 10px 13px 11px;
    border-radius: 4px 14px 14px 14px;
    background: #fff;
    color: var(--mods-ink);
    box-shadow: 0 14px 30px -16px rgb(0 0 0 / 45%);
}

[dir="rtl"] .wk-mods__a > div {
    border-radius: 14px 4px 14px 14px;
}

.wk-mods__a p {
    margin: 0 0 9px;
}

.wk-mods__a p b {
    font-weight: 700;
    unicode-bidi: isolate;
}

/* the exchange plays once the section is on screen */
.wk-mods__q,
.wk-mods__a {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .45s ease, transform .5s cubic-bezier(.2, .8, .3, 1);
}

.wk-mods.is-in .wk-mods__q { opacity: 1; transform: none; transition-delay: .7s; }
.wk-mods.is-in .wk-mods__a { opacity: 1; transform: none; transition-delay: 1.1s; }

/* ---- smaller screens ---- */
@media (max-width: 1199px) {
    .wk-mods__grid { grid-template-columns: repeat(3, 1fr); }
    .wk-mods__ai { grid-row: auto; grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; align-items: start; }
    .wk-mods__ai .wk-mods__icon, .wk-mods__ai h3, .wk-mods__ai > p { grid-column: 1; }
    .wk-mods__ai .wk-mods__chat { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; align-self: center; }
}

@media (max-width: 991px) {
    .wk-mods { padding: 72px 0 80px; }
    .wk-mods .sec_head h2 { font-size: 30px; }
    .wk-mods__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
    .wk-mods { padding: 56px 0 64px; }
    .wk-mods .sec_head h2 { font-size: 26px; }
    .wk-mods__instead { gap: 8px; margin-bottom: 28px; }
    .wk-mods__instead-label { width: 100%; text-align: center; }
    .wk-mods__instead li { padding: 5px 10px; font-size: 12.5px; }
    .wk-mods__grid { grid-template-columns: 1fr; gap: 10px; }
    .wk-mods__ai { display: flex; padding: 22px 20px 20px; }
    .wk-mods__ai .wk-mods__chat { margin-top: 4px; }
    .wk-mods__card { padding: 16px; border-radius: 16px; }
    .wk-mods__card h3 { font-size: 15.5px; margin-bottom: 4px; }
    .wk-mods__card p { font-size: 13.5px; }
    .wk-mods__icon { width: 40px; height: 40px; border-radius: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .wk-mods *, .wk-mods *::before, .wk-mods *::after { transition: none !important; }
}

/* the site's headings use Title Case; these texts are written as sentences */
.wk-mods .sec_head > span,
.wk-mods .sec_head h2 {
    text-transform: none;
}

.wk-mods .sec_head p {
    width: auto;
    max-width: 620px;
    margin-inline: auto;
}

.wk-mods__instead {
    max-width: none;
    gap: 10px 12px;
}

@media (min-width: 681px) {
    .wk-mods__instead li { padding: 6px 11px; font-size: 13px; }
}

/* the arrow and Wroke never part */
.wk-mods__to {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

/* ---- the four agents ---- */
.wk-mods__agents {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
}

.wk-mods__agents li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px 7px 7px;
    border-radius: 12px;
    background: rgb(255 255 255 / 10%);
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 16%);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .4s ease calc(var(--i) * 90ms + 350ms), transform .5s cubic-bezier(.2, .8, .3, 1) calc(var(--i) * 90ms + 350ms);
}

[dir="rtl"] .wk-mods__agents li {
    padding: 7px 7px 7px 10px;
}

.wk-mods.is-in .wk-mods__agents li {
    opacity: 1;
    transform: none;
}

.wk-mods__agents i,
.wk-mods__steps b::before {
    flex: none;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: var(--bg);
    color: var(--c);
}

.wk-mods__agents i svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---- the agents' steps under the answer, ticked off one by one ---- */
.wk-mods__steps {
    margin: 0 0 10px;
    padding: 0 0 10px;
    list-style: none;
    border-bottom: 1px solid var(--mods-line);
    font-size: 12px;
    line-height: 1.5;
}

.wk-mods__steps li {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 3px 0;
    color: var(--mods-muted);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .35s ease, transform .4s ease;
    transition-delay: calc(var(--s) * 450ms + 1.4s);
}

.wk-mods.is-in .wk-mods__steps li {
    opacity: 1;
    transform: none;
}

.wk-mods__steps b {
    flex: none;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--bg);
    color: var(--c);
    font-size: 11px;
    font-weight: 700;
}

.wk-mods__steps b::before {
    content: none;
}

.wk-mods__steps span {
    min-width: 0;
}

/* the reply and the summary come after the steps */
.wk-mods__a p,
.wk-mods__summary {
    opacity: 0;
    transition: opacity .4s ease 2.9s;
}

.wk-mods.is-in .wk-mods__a p,
.wk-mods.is-in .wk-mods__summary {
    opacity: 1;
}

.wk-mods__summary {
    display: block;
    color: #7b8781;
    font-size: 11.5px;
}

@media (max-width: 1199px) {
    .wk-mods__ai .wk-mods__agents { grid-column: 1; }
    .wk-mods__ai .wk-mods__chat { grid-row: 1 / span 4; }
}

@media (max-width: 380px) {
    .wk-mods__agents { grid-template-columns: 1fr; }
}

/* every card opens its part's page */
a.wk-mods__card {
    position: relative;
    color: inherit;
    text-decoration: none;
}

.wk-mods__go {
    position: absolute;
    top: 18px;
    inset-inline-end: 16px;
    color: var(--c);
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity .25s ease, transform .25s ease;
}

[dir="rtl"] .wk-mods__go {
    transform: translateX(4px) scaleX(-1);
}

.wk-mods__go svg {
    display: block;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

a.wk-mods__card:hover .wk-mods__go,
a.wk-mods__card:focus-visible .wk-mods__go {
    opacity: 1;
    transform: none;
}

[dir="rtl"] a.wk-mods__card:hover .wk-mods__go,
[dir="rtl"] a.wk-mods__card:focus-visible .wk-mods__go {
    transform: scaleX(-1);
}

.wk-mods__ai h3 a {
    color: inherit;
    text-decoration: none;
}

.wk-mods__ai h3 a:hover {
    text-decoration: underline;
    text-underline-offset: 5px;
    text-decoration-thickness: 1.5px;
}

/* the same section as a page of its own (/features), under the fixed header */
.wk-overview .wk-mods {
    padding-top: 140px;
    background: radial-gradient(60% 40% at 50% 0%, rgb(15 105 57 / 7%), transparent 70%), #fff;
}

.wk-overview .wk-mods .sec_head h2 {
    font-size: 44px;
}

@media (max-width: 991px) {
    .wk-overview .wk-mods { padding-top: 110px; }
    .wk-overview .wk-mods .sec_head h2 { font-size: 32px; }
}
