/* ======================================
   FAQ PAGE (dark cinematic section: giant FAQ title + pill questions, pinned scroll sequence)
   used by faq.html - every rule is scoped under .faq
====================================== */

.faq {
    position: relative;
    padding: 0;                 /* the theme gives every <section> 110px of padding */
    overflow: hidden;
    isolation: isolate;
    color: #ffffff;
    font-family: "DM Sans", sans-serif;
    background: linear-gradient(180deg, #000000 0%, #0a0a0c 52%, #000000 100%);
}

.faq *,
.faq *::before,
.faq *::after {
    box-sizing: border-box;
}

/* ---- soft coloured lighting (plain radial gradients, moved with transforms only) ---- */
.faq-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

/* detective desk photo, black and white (case board, desk lamp), under a dark shade so the text stays readable */
.faq-photo {
    position: absolute;
    inset: -4%;
    background: url("../images/faq-bg.jpg") center 58% / cover no-repeat;
    opacity: 0.9;
    will-change: transform;
}

.faq-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 48%, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0) 58%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0.22) 46%, rgba(0, 0, 0, 0.7) 100%);
}

.faq-glow {
    position: absolute;
    border-radius: 50%;
    will-change: transform;
}

.faq-glow.g1 {
    left: -20vw;
    top: -28vw;
    width: 64vw;
    height: 64vw;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.025) 38%, transparent 68%);
}

.faq-glow.g2 {
    left: 18vw;
    top: 4vh;
    width: 72vw;
    height: 72vw;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0.015) 40%, transparent 68%);
}

.faq-glow.g3 {
    right: -26vw;
    bottom: -32vw;
    width: 68vw;
    height: 68vw;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 40%, transparent 68%);
}

/* ---- stage: heading + hint + the question list ---- */
.faq-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: clamp(48px, 9vw, 110px) clamp(16px, 4vw, 48px) clamp(64px, 9vw, 110px);
}

.faq-title {
    margin: 0;
    font-family: "DM Sans", sans-serif;
    font-size: clamp(84px, 26vw, 150px);
    font-weight: 800;
    line-height: 0.9;
    letter-spacing: -0.04em;
    text-align: center;
    text-transform: uppercase;
    color: #ffffff;
}

/* the big "FAQ" is the page's H1; this small line inside it carries the search phrase */
.faq-title-kicker {
    display: block;
    margin-bottom: clamp(8px, 1.4vh, 14px);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.16em;
    color: #ff6b6b;
}

.faq-hint {
    margin: clamp(10px, 2vw, 18px) 0 clamp(26px, 5vw, 44px);
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-align: center;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.62);
}

.faq-window {
    position: relative;
    width: 100%;
    max-width: 920px;
}

.faq-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(9px, 1.5vh, 14px);
    margin: 0;
    padding: 0;
    list-style: none;
}

.faq-item {
    --o: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 0;
    opacity: var(--o);
    transform-origin: 50% 50%;
}

.faq-q {
    margin: 0;
    max-width: 100%;
    font: inherit;
    letter-spacing: normal;
    text-transform: none;
    color: inherit;
}

/* ---- the pill ---- */
.faq-pill {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    max-width: min(780px, 100%);
    margin: 0;
    padding: 15px clamp(24px, 3vw, 42px);
    border: 0;
    border-radius: 999px;
    background:
        linear-gradient(rgba(238, 57, 57, clamp(0, calc((var(--k, 0) - 0.72) * 3.6), 1)), rgba(238, 57, 57, clamp(0, calc((var(--k, 0) - 0.72) * 3.6), 1))),
        rgba(255, 255, 255, calc(0.07 + var(--k, 0) * 0.08));
    color: rgba(255, 255, 255, calc(0.6 + var(--k, 0) * 0.4));
    font: 500 clamp(15px, 1.5vw, 20px) / 1.3 "DM Sans", sans-serif;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.faq-pill:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.faq-pill:focus {
    outline: none;
}

.faq-pill:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 4px;
}

.faq-item.is-open .faq-pill {
    background: #ee3939;
    color: #ffffff;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 12px 32px rgba(238, 57, 57, 0.24);
}

/* ---- the answer, opens under its own pill ---- */
.faq-answer {
    width: min(720px, 100%);
    overflow: hidden;
}

.faq-answer-in {
    margin-top: 10px;
    padding: 22px clamp(20px, 3vw, 34px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.94);
    font-size: clamp(14.5px, 1.2vw, 17px);
    line-height: 1.7;
    text-align: left;
}

.faq-answer-in p {
    margin: 0 0 12px;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}

.faq-answer-in p:last-child {
    margin-bottom: 0;
}

/* links to the service and city pages inside the answers */
.faq-answer-in a {
    color: #ffffff;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: #ee3939;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.faq-answer-in a:hover,
.faq-answer-in a:focus {
    color: #ff8a8a;
}

/* ======================================
   PINNED MODE (large screens): the section stays on screen and the list moves through a focus line
====================================== */

.faq.is-pinned {
    height: 100vh;
    min-height: 560px;
}

.faq.is-pinned .faq-stage {
    height: 100%;
    padding: clamp(14px, 3.8vh, 48px) 24px clamp(8px, 1.6vh, 20px);
}

.faq.is-pinned .faq-title {
    font-size: clamp(64px, min(17vh, 20vw), 190px);
}

.faq.is-pinned .faq-hint {
    margin: clamp(6px, 1.2vh, 14px) 0 clamp(4px, 1vh, 12px);
}

.faq.is-pinned .faq-window {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    overflow: clip;      /* cannot be scrolled by the browser when a pill gets keyboard focus */
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 8%, #000 86%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 8%, #000 86%, transparent 100%);
}

.faq.is-pinned .faq-list {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    will-change: transform;
}

.faq.is-pinned .faq-item {
    will-change: transform, opacity;
}

.faq.is-pinned .faq-item:hover,
.faq.is-pinned .faq-item:focus-within {
    opacity: max(var(--o), 0.92);
    filter: none !important;
}

.faq.is-pinned .faq-pill {
    padding: clamp(10px, 1.9vh, 15px) clamp(22px, 3vw, 42px);
    font-size: clamp(14px, min(1.5vw, 2.4vh), 20px);
    transition: box-shadow 0.3s ease;
}

/* text scales with the window height so an answer always fits under its pill */
.faq.is-pinned .faq-answer-in {
    padding: clamp(12px, 2.4vh, 22px) clamp(20px, 3vw, 34px);
    font-size: clamp(13px, min(1.2vw, 1.95vh), 17px);
    line-height: 1.6;
}

/* ======================================
   SIMPLE MODE (phones, very short screens): normal scrolling, the question near the middle of the screen is lit
====================================== */

.faq.is-simple .faq-item {
    opacity: 0.55;
    transition: opacity 0.4s ease;
}

.faq.is-simple .faq-item.is-focus,
.faq.is-simple .faq-item.is-open {
    opacity: 1;
}

.faq.is-simple .faq-item.is-focus .faq-pill {
    --k: 1;
}

/* ======================================
   RESPONSIVE
====================================== */

@media (max-width: 991px) {
    .faq-window {
        max-width: 720px;
    }
}

@media (max-width: 767px) {
    .faq-stage {
        padding: 56px 16px 72px;
    }

    .faq-hint {
        margin-bottom: 30px;
        font-size: 11.5px;
    }

    .faq-q {
        width: 100%;
    }

    .faq-pill {
        width: 100%;
        padding: 15px 22px;
        font-size: 16px;
    }

    .faq-answer-in {
        padding: 18px 20px;
        border-radius: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .faq-pill,
    .faq-item {
        transition: none;
    }
}
