/*
 * Homepage closing band: use cases (the testimonials slot), FAQ, and the
 * closing CTA (partials/home/testimonials.leaf, faq.leaf, footer.leaf).
 *
 * Linked directly from testimonials.leaf. Not part of the Tailwind build, so
 * `npm run build` does not touch it. Colours come from the --fk-* tokens in
 * Resources/css/tokens.css.
 */

.fk-roles,
.fk-faq {
    scroll-margin-top: 5rem;
}

.fk-closing-wrap {
    width: min(var(--fk-container), 100%);
    margin-inline: auto;
    padding-inline: var(--fk-gutter);
}

.fk-eyebrow {
    margin: 0 0 var(--fk-space-sm);
    color: var(--fk-ink-soft);
    font-size: var(--fk-font-eyebrow);
    font-weight: 600;
    letter-spacing: var(--fk-tracking-eyebrow);
    text-transform: uppercase;
}

.fk-roles h2,
.fk-faq h2,
.fk-cta h2 {
    margin: 0;
    color: var(--fk-ink);
    font-size: var(--fk-font-h1);
    font-weight: 700;
    letter-spacing: var(--fk-tracking-tight);
    line-height: var(--fk-leading-tight);
}

.fk-lead {
    max-width: 42rem;
    margin: var(--fk-space-md) 0 0;
    color: var(--fk-ink-soft);
    font-size: var(--fk-font-lead);
    line-height: var(--fk-leading-body);
}

.fk-lead a,
.fk-faq__answer a {
    color: var(--fk-ink);
    /* Underlined: colour alone does not set a link apart from body text. */
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.fk-lead a:hover,
.fk-faq__answer a:hover {
    text-decoration-thickness: 2px;
}

/* ---------- Use cases (testimonials slot) ---------- */

/*
 * A static grid, not a marquee: every card is in the HTML once, readable with
 * JS off, and `grid-auto-rows: 1fr` gives every card in the grid the height
 * of the tallest one at every breakpoint (one, two or three columns).
 */
.fk-roles {
    display: grid;
    gap: var(--fk-space-xl);
    padding-top: var(--fk-space-section);
    padding-bottom: var(--fk-space-section);
    background: var(--fk-surface);
    color: var(--fk-ink);
}

.fk-roles__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: 1fr;
    gap: var(--fk-space-md);
    margin: 0;
    padding: 0;
    list-style: none;
}

.fk-role {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    height: 100%;
    margin: 0;
    padding: var(--fk-space-lg);
    background: var(--fk-surface-raised);
    border: 1px solid var(--fk-hairline);
    border-radius: var(--fk-radius-lg);
    box-shadow: 0 12px 28px -20px rgba(15, 23, 42, 0.35);
}

.fk-role__label {
    margin: 0;
    color: var(--fk-primary-text);
    font-size: var(--fk-font-eyebrow);
    font-weight: 600;
    letter-spacing: var(--fk-tracking-eyebrow);
    text-transform: uppercase;
}

.fk-role__title {
    margin: var(--fk-space-sm) 0 0;
    color: var(--fk-ink);
    font-size: var(--fk-font-h3);
    font-weight: 700;
    line-height: var(--fk-leading-snug);
}

.fk-role__body {
    margin: var(--fk-space-sm) 0 0;
    color: var(--fk-ink-soft);
    font-size: var(--fk-font-body);
    line-height: var(--fk-leading-body);
}

@media (min-width: 640px) {
    .fk-roles__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .fk-roles__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: var(--fk-space-lg);
    }
}

/* ---------- FAQ ---------- */

.fk-faq {
    padding-block: var(--fk-space-section);
    background: var(--fk-surface-alt);
    color: var(--fk-ink);
}

.fk-faq__layout {
    display: grid;
    gap: var(--fk-space-xl);
    align-items: start;
}

.fk-faq__list {
    border-top: 1px solid var(--fk-hairline);
}

.fk-faq__item {
    border-bottom: 1px solid var(--fk-hairline);
}

.fk-faq__item summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--fk-space-md);
    padding-block: var(--fk-space-lg);
    color: var(--fk-ink);
    font-size: var(--fk-font-h3);
    font-weight: 600;
    line-height: var(--fk-leading-snug);
    cursor: pointer;
    list-style: none;
}

.fk-faq__item summary::-webkit-details-marker {
    display: none;
}

.fk-faq__item summary::after {
    content: "";
    flex: none;
    width: 0.55rem;
    height: 0.55rem;
    margin-top: 0.45rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
}

.fk-faq__item[open] summary::after {
    transform: rotate(225deg);
    margin-top: 0.65rem;
}

.fk-faq__answer {
    max-width: 68ch;
    padding-bottom: var(--fk-space-lg);
    color: var(--fk-ink-soft);
    font-size: var(--fk-font-body);
    line-height: var(--fk-leading-body);
}

.fk-faq__answer p {
    margin: 0;
}

.fk-faq__item summary:focus-visible {
    outline: 2px solid var(--fk-ink);
    outline-offset: 4px;
    border-radius: var(--fk-radius-sm);
}

/* ---------- Closing CTA ---------- */

.fk-cta {
    position: relative;
    overflow: hidden;
    padding-block: var(--fk-space-section);
    background: var(--fk-surface-inverse);
    color: var(--fk-text-inverse);
}

.fk-cta__glow {
    position: absolute;
    inset-inline-end: 0;
    bottom: -12rem;
    width: min(36rem, 80%);
    height: min(36rem, 80vw);
    background: var(--fk-accent-glow);
    pointer-events: none;
}

.fk-cta__inner {
    position: relative;
    max-width: 54rem;
}

.fk-cta h2 {
    color: var(--fk-text-inverse);
    font-size: var(--fk-font-display);
}

/* --fk-ink-soft is the page ink, not the inverse ink, so on this band it
 * disappears (about 1.8:1). Follow the inverse text colour instead. */
.fk-cta .fk-eyebrow {
    color: var(--fk-text-inverse);
    opacity: 0.72;
}

.fk-cta .fk-lead {
    color: var(--fk-text-inverse);
    opacity: 0.82;
}

/*
 * Label is a fixed near-black, not --fk-ink. --fk-ink flips to near-white in
 * dark mode, and near-white on the #E85D04 end of the brand gradient is below
 * 4.5:1. #0b1220 on #E85D04 is about 5.4:1, and higher on the lighter stops.
 */
.fk-cta__button {
    display: inline-block;
    margin-top: var(--fk-space-xl);
    padding: 0.95rem 1.7rem;
    color: #0b1220;
    background-image: var(--fk-accent-gradient);
    border-radius: var(--fk-radius-pill);
    font-size: var(--fk-font-body);
    font-weight: 700;
    text-decoration: none;
}

.fk-cta__button:hover {
    text-decoration: none;
}

.fk-cta__button:focus-visible {
    outline: 2px solid var(--fk-text-inverse);
    outline-offset: 4px;
}

/* The site footer (.fk-site-footer) is shared by every public page: see /css/site.css. */

@media (min-width: 900px) {
    .fk-faq__layout {
        grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
        gap: var(--fk-space-2xl);
    }
}

@media (prefers-reduced-motion: no-preference) {
    .fk-faq__item summary::after,
    .fk-cta__button {
        transition: transform var(--fk-duration-base) var(--fk-ease-out);
    }

    .fk-cta__button:hover {
        transform: scale(1.03);
    }
}

@media (prefers-reduced-motion: reduce) {
    .fk-faq__item summary::after,
    .fk-cta__button {
        transition: none;
    }
}
