/* =====================================================
   LabSpy — Pricing page
   Mobile-first. Bootstrap-first; custom CSS only where
   Bootstrap can't help (gradients, billing toggle,
   highlighted card halo, comparison sticky col, etc).
   ===================================================== */

:root {
    --ls-primary: #2563eb;
    --ls-primary-dark: #1e40af;
    --ls-primary-darker: #1e3a8a;
    --ls-primary-light: #eff6ff;
    --ls-primary-tint: #dbeafe;
    --ls-text-dark: #0f172a;
    --ls-text-muted: #64748b;
    --ls-border: #e2e8f0;
    --ls-surface: #f8fafc;
}

.gradient-bg {
    background: linear-gradient(180deg, #dbeafe 0%, #ffffff 100%);
}

/* ── Pricing hero ─────────────────────────────────── */
.pricing-hero {
    padding: 7rem 0 2.5rem;
    position: relative;
    overflow: hidden;
}

.pricing-hero::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37,99,235,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.pricing-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: var(--ls-primary);
    border: 1px solid rgba(37,99,235,0.2);
    border-radius: 999px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.pricing-eyebrow .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ls-primary);
}

.pricing-headline {
    font-family: 'Alice', Georgia, serif;
    font-weight: 400;
    font-size: clamp(2rem, 5.5vw, 3.5rem);
    line-height: 1.15;
    color: var(--ls-text-dark);
    letter-spacing: -0.01em;
}

.pricing-subhead {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--ls-text-muted);
    line-height: 1.65;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Billing toggle ──────────────────────────────── */
.billing-toggle {
    display: inline-flex;
    background: white;
    border: 1px solid var(--ls-border);
    border-radius: 999px;
    padding: 4px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
    position: relative;
}

.billing-toggle button {
    border: 0;
    background: transparent;
    color: var(--ls-text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.billing-toggle button.active {
    background: var(--ls-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(37,99,235,0.25);
}

.billing-toggle .save-pill {
    background: #d1fae5;
    color: #047857;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

.billing-toggle button.active .save-pill {
    background: rgba(255,255,255,0.25);
    color: white;
}

/* ── Plan cards ──────────────────────────────────── */
.plans-section {
    padding: 0 0 4rem;
}

.plan-card {
    background: white;
    border: 1.5px solid var(--ls-border);
    border-radius: 20px;
    padding: 2rem 1.75rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

.plan-card:hover {
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.plan-card.is-featured {
    border-color: var(--ls-primary);
    box-shadow: 0 0 0 1px var(--ls-primary), 0 20px 50px rgba(37, 99, 235, 0.18);
    transform: translateY(-6px);
}

.plan-card.is-featured:hover {
    box-shadow: 0 0 0 1px var(--ls-primary), 0 28px 60px rgba(37, 99, 235, 0.25);
}

.plan-ribbon {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ls-primary);
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
    white-space: nowrap;
}

.plan-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--ls-primary-light);
    color: var(--ls-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.plan-card.is-featured .plan-icon {
    background: var(--ls-primary);
    color: white;
}

.plan-name {
    font-family: 'Alice', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--ls-text-dark);
    margin-bottom: 0.25rem;
}

.plan-tagline {
    font-size: 0.875rem;
    color: var(--ls-text-muted);
    line-height: 1.45;
    margin-bottom: 1.5rem;
    min-height: 2.6em;
}

.plan-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.25rem;
}

.plan-price .amount {
    font-family: 'Alice', Georgia, serif;
    font-size: 2.75rem;
    font-weight: 400;
    line-height: 1;
    color: var(--ls-text-dark);
    letter-spacing: -0.02em;
}

.plan-price .period {
    font-size: 0.95rem;
    color: var(--ls-text-muted);
}

.plan-price-note {
    font-size: 0.8rem;
    color: var(--ls-text-muted);
    min-height: 1.2em;
    margin-bottom: 1.5rem;
}

.plan-price-note strong {
    color: #047857;
    font-weight: 600;
}

.plan-cta {
    display: block;
    width: 100%;
    text-align: center;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1.5px solid var(--ls-primary);
    color: var(--ls-primary);
    background: white;
    margin-bottom: 1.5rem;
}

.plan-cta:hover {
    background: var(--ls-primary-light);
    color: var(--ls-primary-dark);
    border-color: var(--ls-primary-dark);
}

.plan-card.is-featured .plan-cta {
    background: var(--ls-primary);
    color: white;
}

.plan-card.is-featured .plan-cta:hover {
    background: var(--ls-primary-dark);
    border-color: var(--ls-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.3);
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--ls-text-dark);
}

.plan-features li i {
    color: var(--ls-primary);
    font-size: 1rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.plan-features li.muted {
    color: #94a3b8;
}

.plan-features li.muted i {
    color: #cbd5e1;
}

.plan-features-heading {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ls-text-muted);
    margin-bottom: 0.85rem;
}

/* ── No-per-user banner ──────────────────────────── */
.fairness-banner {
    background: var(--ls-text-dark);
    color: white;
    border-radius: 20px;
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.fairness-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 0%, rgba(37,99,235,0.35) 0%, transparent 45%),
        radial-gradient(circle at 90% 110%, rgba(59,130,246,0.25) 0%, transparent 50%);
    pointer-events: none;
}

.fairness-banner > * {
    position: relative;
    z-index: 1;
}

.fairness-banner h3 {
    font-family: 'Alice', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1.4rem, 3vw, 2rem);
    margin-bottom: 0.5rem;
    line-height: 1.25;
}

.fairness-banner p {
    color: rgba(255,255,255,0.75);
    max-width: 620px;
    margin: 0 auto;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ── Comparison table ────────────────────────────── */
.compare-section {
    padding: 4rem 0;
    background: var(--ls-surface);
}

.compare-title {
    font-family: 'Alice', Georgia, serif;
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    color: var(--ls-text-dark);
    text-align: center;
    margin-bottom: 0.5rem;
}

.compare-sub {
    text-align: center;
    color: var(--ls-text-muted);
    margin-bottom: 2rem;
}

.compare-table-wrap {
    background: white;
    border: 1px solid var(--ls-border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.05);
}

/* Mobile: scroll horizontally if needed */
.compare-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.compare-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.compare-table thead th {
    background: var(--ls-surface);
    color: var(--ls-text-dark);
    font-weight: 600;
    text-align: center;
    padding: 1rem 0.85rem;
    border-bottom: 1px solid var(--ls-border);
    white-space: nowrap;
}

.compare-table thead th.feature-head {
    text-align: left;
    color: var(--ls-text-muted);
    font-weight: 500;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.compare-table thead th.is-featured {
    background: var(--ls-primary);
    color: white;
    position: relative;
}

.compare-table thead th.is-featured::after {
    content: '';
    position: absolute;
    inset: auto 0 -1px;
    height: 3px;
    background: var(--ls-primary-darker);
}

.compare-table thead th .price-line {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--ls-text-muted);
    margin-top: 0.15rem;
}

.compare-table thead th.is-featured .price-line {
    color: rgba(255,255,255,0.85);
}

.compare-table tbody tr {
    border-bottom: 1px solid var(--ls-border);
}

.compare-table tbody tr:last-child {
    border-bottom: none;
}

.compare-table tbody tr.section-row td {
    background: var(--ls-primary-light);
    color: var(--ls-primary-dark);
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.6rem 1rem;
}

.compare-table td {
    padding: 0.85rem 1rem;
    text-align: center;
    color: var(--ls-text-dark);
    vertical-align: middle;
}

.compare-table td.feature-cell {
    text-align: left;
    font-weight: 500;
    color: var(--ls-text-dark);
    min-width: 200px;
}

.compare-table td.feature-cell small {
    display: block;
    color: var(--ls-text-muted);
    font-weight: 400;
    font-size: 0.78rem;
    margin-top: 0.1rem;
}

.compare-table td.is-featured-col {
    background: rgba(37, 99, 235, 0.04);
}

.compare-table .check {
    color: var(--ls-primary);
    font-size: 1.1rem;
}

.compare-table .cross {
    color: #cbd5e1;
    font-size: 1.05rem;
}

/* ── FAQ ─────────────────────────────────────────── */
.faq-section {
    padding: 4rem 0;
    background: white;
}

.faq-title {
    font-family: 'Alice', Georgia, serif;
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    color: var(--ls-text-dark);
    text-align: center;
    margin-bottom: 2rem;
}

.faq-accordion .accordion-item {
    border: 1px solid var(--ls-border);
    border-radius: 14px !important;
    margin-bottom: 0.75rem;
    overflow: hidden;
    background: white;
}

.faq-accordion .accordion-button {
    font-weight: 600;
    font-size: 1rem;
    color: var(--ls-text-dark);
    padding: 1rem 1.25rem;
    background: white;
    box-shadow: none;
}

.faq-accordion .accordion-button:not(.collapsed) {
    background: var(--ls-primary-light);
    color: var(--ls-primary-dark);
}

.faq-accordion .accordion-button:focus {
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
    border-color: transparent;
}

.faq-accordion .accordion-body {
    padding: 0 1.25rem 1.25rem;
    color: var(--ls-text-muted);
    font-size: 0.95rem;
    line-height: 1.65;
}

/* ── Final CTA ───────────────────────────────────── */
.pricing-final-cta {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--ls-primary-darker) 0%, var(--ls-primary) 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.pricing-final-cta::before {
    content: '';
    position: absolute;
    top: -150px;
    right: -100px;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
    pointer-events: none;
}

.pricing-final-cta h2 {
    font-family: 'Alice', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.pricing-final-cta p {
    color: rgba(255,255,255,0.85);
    font-size: 1.05rem;
    max-width: 580px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.btn-cta-white {
    background: white;
    color: var(--ls-primary);
    font-weight: 600;
    padding: 0.9rem 2rem;
    border-radius: 10px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
    border: 0;
}

.btn-cta-white:hover {
    background: var(--ls-primary-light);
    color: var(--ls-primary-darker);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.btn-cta-ghost {
    background: transparent;
    color: white;
    font-weight: 600;
    padding: 0.9rem 2rem;
    border-radius: 10px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
    border: 1.5px solid rgba(255,255,255,0.45);
}

.btn-cta-ghost:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    border-color: white;
}

/* ── Trust strip (re-uses landing pattern) ──────── */
.pricing-trust {
    background: white;
    border-top: 1px solid var(--ls-border);
    border-bottom: 1px solid var(--ls-border);
    padding: 1.5rem 0;
}

.pricing-trust .trust-logo {
    height: clamp(34px, 4vw, 50px);
    width: auto;
    opacity: 0.65;
    transition: opacity 0.2s ease;
}

.pricing-trust .trust-logo:hover {
    opacity: 1;
}

/* =====================================================
   RESPONSIVE — mobile first; we add features as
   the screen gets larger.
   ===================================================== */

/* Small phones — tighten spacing */
@media (max-width: 575.98px) {
    .pricing-hero {
        padding: 6rem 0 1.5rem;
    }

    .plan-card {
        padding: 1.75rem 1.25rem;
    }

    .plan-card.is-featured {
        transform: none; /* don't lift on small screens; ribbon handles emphasis */
    }

    .billing-toggle button {
        padding: 0.5rem 0.85rem;
        font-size: 0.85rem;
    }

    .fairness-banner {
        padding: 1.5rem 1.25rem;
    }
}

/* Tablet+ */
@media (min-width: 768px) {
    .pricing-hero {
        padding: 8rem 0 3.5rem;
    }

    .plans-section {
        padding-bottom: 5rem;
    }

    .compare-table {
        font-size: 0.95rem;
    }

    .fairness-banner {
        padding: 2.5rem 2rem;
    }
}

/* Desktop — make plans sit in a row, give the
   featured card extra prominence. */
@media (min-width: 992px) {
    .plan-card {
        padding: 2.25rem 2rem;
    }

    .compare-table {
        min-width: 0;
    }

    .compare-scroll {
        overflow: visible;
    }

    .pricing-final-cta {
        padding: 5rem 0;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .plan-card,
    .plan-card.is-featured,
    .btn-cta-white,
    .billing-toggle button.active {
        transition: none;
    }

    .plan-card:hover,
    .plan-card.is-featured:hover,
    .btn-cta-white:hover {
        transform: none;
    }
}
