/* ── Shared section primitives (not in common.css) ───────────────── */
.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 11px;
    border-radius: 99px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    font-size: 12px;
    font-weight: 600;
    color: #dc2626;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.section-title {
    font-size: clamp(26px, 3.6vw, 44px);
    font-weight: 700;
    color: #111827;
    letter-spacing: -.035em;
    line-height: 1.12;
    margin-bottom: 14px;
}

.section-sub {
    font-size: 16.5px;
    color: #6b7280;
    line-height: 1.7;
}

.section-hdr {
    margin-bottom: 60px;
}

.section-hdr.center {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ── Page wrapper ────────────────────────────────────────────────── */
.sp-page {
    padding-top: 62px;
}

/* ── Hero ────────────────────────────────────────────────────────── */
.sp-hero {
    position: relative;
    padding: 96px 0 88px;
    background: linear-gradient(180deg, #fff6f5 0%, #fff 55%);
    overflow: hidden;
    text-align: center;
}

.sp-hero-glow {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 600px;
    background: radial-gradient(ellipse at 50% 20%, rgba(220, 38, 38, .09) 0%, rgba(220, 38, 38, .03) 50%, transparent 75%);
    pointer-events: none;
    animation: glow-breathe 5s ease-in-out infinite;
}

.sp-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 680px;
    margin: 0 auto;
    gap: 20px;
}

.sp-hero-title {
    font-size: clamp(34px, 5.5vw, 60px);
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.04em;
    line-height: 1.08;
    margin: 0;
}

.sp-hero-sub {
    font-size: 17px;
    color: #6b7280;
    line-height: 1.7;
    max-width: 520px;
    margin: 0;
}

/* ── Search bar ──────────────────────────────────────────────────── */
.sp-search-wrap {
    width: 100%;
    max-width: 560px;
    margin-top: 8px;
}

.sp-search-form {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 8px 8px 8px 16px;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
    transition: border-color .2s, box-shadow .2s;
}

.sp-search-form:focus-within {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, .08), 0 2px 8px rgba(0, 0, 0, .06);
}

.sp-search-icon {
    color: #9ca3af;
    flex-shrink: 0;
}

.sp-search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 15px;
    color: #111827;
    font-family: inherit;
    min-width: 0;
}

.sp-search-input::placeholder {
    color: #9ca3af;
}

.sp-search-btn {
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: 9px;
    padding: 9px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, transform .1s;
    white-space: nowrap;
    font-family: inherit;
    line-height: 1;
}

.sp-search-btn:hover {
    background: #b91c1c;
}

.sp-search-btn:active {
    transform: scale(.97);
}

/* ── Resources section ───────────────────────────────────────────── */
.sp-resources {
    padding: 88px 0;
    background: #fff;
}

.sp-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 48px;
}

.sp-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 28px 28px 24px;
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 18px;
    text-decoration: none;
    color: inherit;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.sp-card:hover {
    border-color: #fca5a5;
    box-shadow: 0 6px 24px rgba(220, 38, 38, .08);
    transform: translateY(-3px);
}

.sp-card-icon {
    width: 48px;
    height: 48px;
    background: #fef2f2;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dc2626;
    flex-shrink: 0;
    transition: background .2s;
}

.sp-card:hover .sp-card-icon {
    background: #fee2e2;
}

.sp-card-body {
    flex: 1;
}

.sp-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.sp-card-desc {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.65;
    margin: 0;
}

.sp-card-arrow {
    color: #dc2626;
    display: flex;
    align-items: center;
    align-self: flex-end;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity .2s, transform .2s;
}

.sp-card:hover .sp-card-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ── FAQ section ─────────────────────────────────────────────────── */
.sp-faq-section {
    padding: 88px 0;
    background: #fafafa;
    border-top: 1px solid #f3f4f6;
    border-bottom: 1px solid #f3f4f6;
}

.sp-faq-list {
    max-width: 720px;
    margin: 48px auto 0;
    border-top: 1px solid #e5e7eb;
}

/* ── FAQ accordion primitives (not in common.css) ────────────────── */
.sp-faq-list .faq-item {
    padding: 22px 0;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    background: none;
    border-radius: 0;
}

.faq-trigger {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.faq-q {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    letter-spacing: -.01em;
    line-height: 1.4;
}

.faq-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #6b7280;
    transition: transform .2s, background .2s, border-color .2s;
    margin-top: 1px;
}

.faq-item.open .faq-icon {
    background: #111827;
    color: #fff;
    border-color: #111827;
    transform: rotate(180deg);
}

.faq-answer {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.65;
    margin-top: 10px;
    display: none;
}

.faq-item.open .faq-answer {
    display: block;
}

.faq-answer a {
    color: #dc2626;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.faq-answer a:hover {
    color: #b91c1c;
}

/* ── Builder CTA section ─────────────────────────────────────────── */
.sp-builder-section {
    padding: 80px 0 96px;
    background: #fff;
}

.sp-builder-hdr {
    text-align: center;
    margin-bottom: 40px;
}

.sp-builder-hdr h2 {
    font-size: clamp(26px, 3.2vw, 40px);
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.04em;
    margin: 0 0 10px;
    line-height: 1.12;
}

.sp-builder-hdr p {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
}

/* ── Ask-the-docs widget: force light color scheme ──────────────── */
iframe[title="Ask the docs"] {
    color-scheme: light;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 960px) {
    .sp-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 680px) {
    .sp-hero {
        padding: 72px 0 72px;
    }

    .sp-hero-sub {
        font-size: 15px;
    }

    .sp-cards {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .sp-card {
        padding: 22px 20px 20px;
    }

    .sp-card-arrow {
        display: none;
    }

    .sp-resources,
    .sp-faq-section,
    .sp-builder-section {
        padding-top: 64px;
        padding-bottom: 64px;
    }

    .sp-faq-list {
        margin-top: 36px;
    }

    .sp-builder-section {
        padding-bottom: 72px;
    }

    .sp-search-form {
        border-radius: 12px;
    }
}

