/**
 * Landing FAQ accordion — glass and border like .landing-surface-tile (landing-sections).
 * Tokens: --landing-glass-* / --landing-text from .landing-main.
 */

.landing-motion-faq {
    --landing-faq-gap: var(--spacing-sm, 8px);
    --landing-faq-spring: cubic-bezier(0.34, 1.28, 0.64, 1);
    --landing-faq-surface: color-mix(in srgb, var(--landing-text, #eeeeee) 3.5%, var(--landing-canvas, #020203));
    --landing-faq-surface-open: color-mix(in srgb, var(--landing-text, #eeeeee) 5.5%, var(--landing-canvas, #020203));
    --landing-faq-item-border: color-mix(in srgb, var(--landing-text, #eeeeee) 7%, transparent);
    --landing-faq-item-border-open: color-mix(in srgb, var(--landing-text, #eeeeee) 12%, transparent);
    width: 100%;
}

.landing-motion-faq__stack {
    display: flex;
    flex-direction: column;
    gap: var(--landing-faq-gap);
    padding: var(--spacing-md, 12px);
    border-radius: var(--radius-xl, 24px);
    background: var(--landing-glass-bg, color-mix(in srgb, #020203 72%, transparent));
    border: 1px solid var(--landing-glass-border, rgba(238, 238, 238, 0.1));
    border-top-color: transparent;
    box-shadow:
        inset 0 1px 0 color-mix(in srgb, var(--landing-text, #eeeeee) 6%, transparent),
        var(--shadow-lg, 0 8px 24px rgba(0, 0, 0, 0.2));
    -webkit-backdrop-filter: blur(14px) saturate(1.05);
    backdrop-filter: blur(14px) saturate(1.05);
    position: relative;
}

.landing-motion-faq__stack::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: calc(100% - 1.5rem);
    height: 1px;
    transform: translateX(-50%);
    pointer-events: none;
    background: linear-gradient(
        90deg,
        transparent 0%,
        color-mix(in srgb, var(--landing-text, #eeeeee) 7%, transparent) 12%,
        color-mix(in srgb, var(--landing-text, #eeeeee) 16%, transparent) 30%,
        color-mix(in srgb, var(--landing-text, #eeeeee) 16%, transparent) 70%,
        color-mix(in srgb, var(--landing-text, #eeeeee) 7%, transparent) 88%,
        transparent 100%
    );
}

.landing-motion-faq__item {
    overflow: hidden;
    border-radius: var(--radius-lg, 20px);
    background: var(--landing-faq-surface);
    color: var(--landing-text, var(--foreground, #eeeeee));
    border: 1px solid var(--landing-faq-item-border);
    border-top-color: transparent;
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--landing-text, #eeeeee) 4%, transparent);
    transform: none;
    position: relative;
    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.landing-motion-faq__item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 1rem;
    right: 1rem;
    height: 1px;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        transparent 0%,
        color-mix(in srgb, var(--landing-text, #eeeeee) 8%, transparent) 16%,
        color-mix(in srgb, var(--landing-text, #eeeeee) 20%, transparent) 50%,
        color-mix(in srgb, var(--landing-text, #eeeeee) 8%, transparent) 84%,
        transparent 100%
    );
}

.landing-motion-faq__item.is-open {
    background: var(--landing-faq-surface-open);
    border-color: var(--landing-faq-item-border-open);
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--landing-text, #eeeeee) 6%, transparent);
}

.landing-motion-faq__trigger {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-lg, 16px);
    padding: var(--spacing-xl, 20px) var(--spacing-2xl, 28px);
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    text-align: left;
    font: inherit;
    -webkit-tap-highlight-color: transparent;
}

.landing-motion-faq__trigger:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--landing-text, #eeeeee) 35%, transparent);
    outline-offset: 3px;
}

.landing-motion-faq__question {
    font-size: clamp(var(--font-size-md, 14px), 1.6vw, var(--font-size-xl, 18px));
    font-weight: var(--font-weight-medium, 500);
    line-height: var(--line-height-normal, 1.4);
    letter-spacing: -0.012em;
}

.landing-motion-faq__icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-full);
    color: color-mix(in srgb, var(--landing-text, #eeeeee) 70%, transparent);
    background: color-mix(in srgb, var(--landing-text, #eeeeee) 4%, transparent);
    border: 1px solid color-mix(in srgb, var(--landing-text, #eeeeee) 8%, transparent);
    transition:
        transform 0.38s var(--landing-faq-spring),
        color 0.2s ease,
        border-color 0.2s ease;
}

.landing-motion-faq__item.is-open .landing-motion-faq__icon {
    transform: none;
    color: var(--landing-text, #eeeeee);
    border-color: color-mix(in srgb, var(--landing-text, #eeeeee) 14%, transparent);
}

.landing-motion-faq__icon-plus,
.landing-motion-faq__icon-minus {
    display: block;
}

.landing-motion-faq__icon-minus {
    display: none;
}

.landing-motion-faq__item.is-open .landing-motion-faq__icon-plus {
    display: none;
}

.landing-motion-faq__item.is-open .landing-motion-faq__icon-minus {
    display: block;
}

.landing-motion-faq__panel {
    overflow: hidden;
    height: 0;
    opacity: 0;
    transition:
        height 0.42s var(--landing-faq-spring),
        opacity 0.2s ease-out;
}

.landing-motion-faq__item.is-open .landing-motion-faq__panel {
    opacity: 1;
}

.landing-motion-faq__content {
    padding: 0 var(--spacing-2xl, 28px) var(--spacing-2xl, 28px);
    transform: translateY(-6px);
    transition: transform 0.38s var(--landing-faq-spring);
}

.landing-motion-faq__item.is-open .landing-motion-faq__content {
    transform: translateY(0);
}

.landing-motion-faq__answer {
    margin: 0;
    font-size: var(--font-size-md, 14px);
    line-height: var(--line-height-relaxed, 1.6);
    color: var(--landing-text-muted, color-mix(in srgb, var(--foreground, #eeeeee) 70%, transparent));
}

.landing-motion-faq__answer strong {
    font-weight: var(--font-weight-medium, 500);
    color: var(--landing-text, var(--foreground, #eeeeee));
}

@media (prefers-reduced-motion: reduce) {
    .landing-motion-faq__item,
    .landing-motion-faq__panel,
    .landing-motion-faq__content,
    .landing-motion-faq__icon {
        transition: none !important;
    }

    .landing-motion-faq__content {
        transform: none;
    }
}
