/*
 * The split FAQ ("שאלות ותשובות מפוצל", from Taster's FaqSplit, licensed design
 * taster.co.il/license, delivery 55114bf7-0e3d-4307-9f32-809c3816d36e), ported to
 * the static site: same structure, motion and phone layout, the site's own
 * tokens (css/home.css) for colour and font, so it follows the light and dark
 * themes. Markup in scripts/build-121-page.mjs, behaviour in js/faq-split.js.
 * Without the script every answer stays open (.faqs only collapses once
 * js/faq-split.js marks it .is-ready).
 */
.faqs {
    --fq-accent: var(--accent-fill);
    --fq-ink: var(--ink);
    --fq-soft: var(--muted);
    --fq-panel: var(--surface);
    --fq-card: var(--card);
    --fq-line: var(--line);
    --fq-ease: cubic-bezier(0.23, 1, 0.32, 1);

    container-type: inline-size;
    color: var(--fq-ink);
}
:root[data-theme="dark"] .faqs { --fq-panel: var(--surface-2); }

.faqs :is(p, h2, h3) { text-wrap: pretty; }
.faqs .faqs__title { text-wrap: balance; }

.faqs__inner {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: clamp(32px, 6cqi, 96px);
    width: min(1200px, calc(100% - 40px));
    margin-inline: auto;
    padding-block: clamp(70px, 9cqi, 120px);
}

.faqs__side {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.faqs__title {
    margin: 0;
    font-size: clamp(32px, 4.2cqi, 52px);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.faqs__description {
    margin: 14px 0 0;
    font-size: 16px;
    line-height: 1.6;
    color: var(--fq-soft);
}

.faqs__help {
    display: grid;
    justify-items: start;
    gap: 6px;
    width: 100%;
    max-width: 400px;
    margin-top: auto;
    padding: 26px;
    border-radius: 26px;
    background: var(--fq-panel);
}

.faqs__faces {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.faqs__faces i {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    margin-inline-end: -10px;
    border-radius: 50%;
    background: linear-gradient(160deg, #ff8a95, var(--accent-fill));
    box-shadow: 0 0 0 3px var(--fq-panel);
    color: #fff;
    font-size: 14px;
    font-style: normal;
}
.faqs__faces i:nth-child(2) { background: linear-gradient(160deg, #7c9bff, #1b43e4); }
.faqs__faces i:nth-child(3) { background: linear-gradient(160deg, #6b7bb8, #0b1340); }

.faqs__faces b {
    margin-inline-start: 22px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--fq-accent);
    color: #fff;
    font-size: 12.5px;
    font-weight: 500;
}

.faqs__help strong { font-size: 19px; font-weight: 500; }

.faqs__help p {
    margin: 0;
    font-size: 14.5px;
    color: var(--fq-soft);
}

.faqs__help a {
    --dir: -1;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    height: 46px;
    margin-top: 14px;
    padding-inline: 20px 5px;
    border-radius: 999px;
    background: var(--fq-ink);
    box-shadow:
        0 0 0 5px color-mix(in srgb, var(--fq-card) 70%, transparent),
        0 14px 26px -12px rgb(10 20 40 / 0.6);
    color: var(--bg);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: transform 0.16s var(--fq-ease);
}
.faqs__help a:dir(ltr) { --dir: 1; }

.faqs__help a span {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg);
    color: var(--fq-ink);
    transition: transform 0.45s var(--fq-ease);
}

.faqs__help a svg {
    grid-area: 1 / 1;
    width: 15px;
    height: 15px;
    transition: transform 0.45s var(--fq-ease);
}
.faqs__help a span svg + svg { transform: translateX(calc(var(--dir) * -150%)); }

/* a light sweeps across the button on hover */
.faqs__help a::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--bg) 22%, transparent) 50%, transparent 70%);
    transform: translateX(calc(var(--dir) * -120%));
    pointer-events: none;
}

.faqs__help a:focus-visible {
    outline: 2px solid var(--fq-accent);
    outline-offset: 7px;
}
.faqs__help a:active { transform: scale(0.97); }

@media (hover: hover) and (pointer: fine) {
    .faqs__help a:hover::after {
        transform: translateX(calc(var(--dir) * 120%));
        transition: transform 0.8s var(--fq-ease);
    }
    .faqs__help a:hover span { transform: translateX(calc(var(--dir) * 3px)); }
    .faqs__help a:hover span svg:first-child { transform: translateX(calc(var(--dir) * 150%)); }
    .faqs__help a:hover span svg + svg { transform: translateX(0); }
}

/* ---------- the questions ---------- */

.faqs__list {
    display: grid;
    align-content: start;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.faqs__list li {
    border-radius: 22px;
    background: var(--fq-card);
    box-shadow: inset 0 0 0 1px var(--fq-line);
    transition: background-color 0.35s ease, box-shadow 0.35s ease;
}

.faqs__list li[data-open] {
    background: var(--fq-panel);
    box-shadow: inset 0 0 0 1px transparent;
}

.faqs__list h3 {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
}

.faqs__list button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    padding: 22px 24px;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    font-size: 17px;
    text-align: start;
    cursor: pointer;
}

.faqs__list button:focus-visible {
    outline: 2px solid var(--fq-accent);
    outline-offset: -2px;
    border-radius: 22px;
}

/* A plus that turns into a minus on a dark disc. */
.faqs__sign {
    position: relative;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--fq-panel);
    transition: background-color 0.3s ease;
}

.faqs__sign i {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 1.8px;
    margin: -0.9px 0 0 -6px;
    border-radius: 2px;
    background: var(--fq-ink);
    transition: rotate 0.35s var(--fq-ease), background-color 0.3s ease;
}
.faqs__sign i + i { rotate: 90deg; }

.faqs__list li[data-open] .faqs__sign { background: var(--fq-ink); }
.faqs__list li[data-open] .faqs__sign i { background: var(--bg); }
.faqs__list li[data-open] .faqs__sign i + i { rotate: 0deg; }

.faqs__answer {
    display: grid;
    grid-template-rows: 1fr;
    transition: grid-template-rows 0.4s var(--fq-ease);
}
.faqs.is-ready .faqs__list li:not([data-open]) .faqs__answer { grid-template-rows: 0fr; }

.faqs__answer > div { overflow: hidden; }

.faqs__answer p {
    max-width: 60ch;
    margin: 0;
    padding: 0 24px 22px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--fq-soft);
}

@media (hover: hover) and (pointer: fine) {
    .faqs__list li:not([data-open]):hover {
        box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fq-ink) 22%, transparent);
    }
}

/* Phones: title, the questions, then the card that points to a person. */
@container (max-width: 820px) {
    .faqs__inner {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .faqs__side { display: contents; }
    .faqs__list {
        order: 2;
        margin-top: 32px;
    }
    .faqs__help {
        order: 3;
        max-width: none;
        margin-top: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .faqs__answer,
    .faqs__sign i,
    .faqs__help a,
    .faqs__help a span,
    .faqs__help a svg,
    .faqs__help a::after { transition: none !important; }
}
