/* ================================================================
   PRICING PAGE STYLES — 51 Insights
   Reworked for pixel-perfect alignment (blink.new reference)
   ================================================================ */

/* ================================================================
   LIGHT MODE OVERRIDES
   ================================================================ */
[data-theme="light"] .pricing-hero-glow {
    background: radial-gradient(ellipse, rgba(10,6,229,0.06) 0%, transparent 70%);
}
[data-theme="light"] .pricing-card {
    background: #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
}
[data-theme="light"] .pricing-card:hover {
    box-shadow: 0 0 0 1px rgba(0,0,0,0.12), 0 4px 16px rgba(0,0,0,0.06);
}
[data-theme="light"] .pricing-card--featured {
    box-shadow: 0 0 0 1.5px rgba(0,0,0,0.12), 0 8px 32px rgba(0,0,0,0.08);
}
[data-theme="light"] .pricing-card--featured::before {
    background: linear-gradient(135deg, #0A06E5, #58C7F7);
}
[data-theme="light"] .pricing-card--featured:hover {
    box-shadow: 0 0 0 1.5px rgba(0,0,0,0.18), 0 8px 32px rgba(0,0,0,0.12);
}
[data-theme="light"] .pricing-toggle-track {
    background: var(--elevated);
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}
[data-theme="light"] .pricing-toggle-option.is-active {
    color: var(--text-primary);
}
[data-theme="light"] .pricing-faq-item {
    border-color: rgba(0,0,0,0.06);
}
[data-theme="light"] .pricing-faq-btn:hover {
    background: rgba(0,0,0,0.02);
}
[data-theme="light"] .pricing-feature-icon--check {
    color: #16a34a;
}
[data-theme="light"] .pricing-feature-icon--dash {
    color: #9ca3af;
}
[data-theme="light"] .pricing-feature-icon--teaser {
    color: #d97706;
}
[data-theme="light"] .pricing-divider {
    background: rgba(0,0,0,0.06);
}

/* ================================================================
   HERO
   ================================================================ */
.pricing-hero {
    padding: 140px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.pricing-hero-glow {
    position: absolute;
    top: 30%;
    left: 50%;
    width: 900px;
    height: 600px;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse, rgba(10,6,229,0.18) 0%, rgba(88,199,247,0.04) 50%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    transition: top 0.3s ease-out, left 0.3s ease-out;
}
.pricing-hero-content {
    position: relative;
    z-index: 1;
}
.pricing-hero h1 {
    font-size: clamp(36px, 5vw, 60px);
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.04em;
}
.pricing-hero-desc {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

/* ================================================================
   BILLING TOGGLE
   ================================================================ */
.pricing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 48px;
}
.pricing-toggle-track {
    display: flex;
    align-items: center;
    background: var(--elevated);
    border-radius: var(--radius-pill);
    padding: 3px;
    box-shadow: inset 0 0 0 1px var(--border-subtle);
}
.pricing-toggle-option {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    padding: 7px 18px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    user-select: none;
    border: none;
    background: none;
}
.pricing-toggle-option:hover {
    color: var(--text-secondary);
}
.pricing-toggle-option.is-active {
    background: var(--bg);
    color: var(--text-primary);
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.pricing-toggle-save {
    display: inline-flex;
    align-items: center;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 6px;
    border-radius: var(--radius-pill);
    background: rgba(22,163,74,0.12);
    color: #16a34a;
    margin-left: 6px;
    vertical-align: middle;
}

/* ================================================================
   PRICING GRID — 4-column layout
   ================================================================ */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 960px;
    margin: 0 auto;
    align-items: stretch;
}

/* ================================================================
   PRICING CARD — Structured slot layout for alignment
   Each card uses the same vertical slot structure:
   1. Badge row (fixed 28px)
   2. Tier name
   3. Description (fixed 40px)
   4. Price row (fixed 48px)
   5. Price sub-text (fixed 20px)
   6. CTA button
   7. Divider
   8. Features heading
   9. Features list (flex-grow)
   ================================================================ */
.pricing-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 32px 28px 36px;
    box-shadow: inset 0 0 0 1px var(--border-subtle);
    position: relative;
    transition: box-shadow 0.25s var(--ease-out), transform 0.25s var(--ease-out);
    display: flex;
    flex-direction: column;
    text-align: left;
}
.pricing-card:hover {
    transform: translateY(-2px);
}

/* Featured / Pro card */
.pricing-card--featured {
    box-shadow: 0 0 0 1.5px rgba(255,255,255,0.18), 0 8px 32px rgba(0,0,0,0.20);
    overflow: hidden;
}
.pricing-card--featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #0A06E5, #58C7F7);
    z-index: 1;
}

/* ----------------------------------------------------------------
   Slot 1: Badge row — fixed height for horizontal alignment
   ---------------------------------------------------------------- */
.pricing-card-badge-row {
    height: 28px;
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
}
.pricing-badge {
    display: inline-flex;
    align-items: center;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    background: rgba(10,6,229,0.12);
    color: var(--brand-light);
    line-height: 1;
}
.pricing-badge--terminal {
    background: linear-gradient(135deg, rgba(10,6,229,0.12), rgba(88,199,247,0.12));
    border: 1px solid rgba(10,6,229,0.15);
}

/* ----------------------------------------------------------------
   Slot 2: Tier name
   ---------------------------------------------------------------- */
.pricing-tier-name {
    font-family: 'Sora', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 4px;
    line-height: 1.2;
}

/* ----------------------------------------------------------------
   Slot 3: Description — fixed height
   ---------------------------------------------------------------- */
.pricing-tier-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 16px;
    min-height: 20px;
}

/* ----------------------------------------------------------------
   Slot 4: Price row — SAME height across all cards
   All price displays use the same font-size/weight for visual parity.
   "Free", "$79", "Invite only", "Custom" all at 36px/700.
   ---------------------------------------------------------------- */
.pricing-price-row {
    height: 48px;
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    margin-bottom: 4px;
}
.pricing-price-row--hidden {
    height: 0;
    margin-bottom: 0;
    overflow: hidden;
}
.pricing-price-strikethrough {
    font-family: 'Sora', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-muted, rgba(255,255,255,0.4));
    text-decoration: line-through;
    letter-spacing: -0.01em;
    margin-bottom: 4px;
}
.pricing-price-value {
    font-family: 'Sora', sans-serif;
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1;
}
.pricing-price-value--text {
    font-weight: 700;
    font-size: 28px;
    letter-spacing: -0.02em;
}
.pricing-currency {
    font-size: 20px;
    font-weight: 600;
    vertical-align: baseline;
    position: relative;
    top: -2px;
    margin-right: 1px;
}
.pricing-period {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 3px;
}

/* ----------------------------------------------------------------
   Slot 5: Price sub-text — consistent position under price
   ---------------------------------------------------------------- */
.pricing-price-sub {
    font-size: 14px;
    color: var(--text-muted);
    height: 20px;
    line-height: 20px;
    margin-bottom: 16px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    letter-spacing: -0.01em;
}
.pricing-price-sub--hidden {
    height: 0;
    margin-bottom: 0;
    overflow: hidden;
}

/* ----------------------------------------------------------------
   Slot 6: CTA button — full-width, pushed to card bottom
   ---------------------------------------------------------------- */
.pricing-cta {
    margin-top: auto;
    padding-top: 24px;
}
.pricing-cta .btn {
    width: 100%;
}

/* ----------------------------------------------------------------
   Slot 7: Divider
   ---------------------------------------------------------------- */
.pricing-divider {
    height: 1px;
    background: var(--border-subtle);
    margin-bottom: 20px;
}

/* ----------------------------------------------------------------
   Slot 8: Features heading
   ---------------------------------------------------------------- */
.pricing-features-heading {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-faint);
    margin-bottom: 14px;
}

/* ----------------------------------------------------------------
   Slot 9: Features list — grows to fill remaining space
   ---------------------------------------------------------------- */
.pricing-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}
.pricing-feature {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}
.pricing-feature-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 2px;
}
.pricing-feature-icon--check {
    color: var(--brand-green);
}
.pricing-feature-icon--dash {
    color: var(--text-faint);
}
.pricing-feature--preview {
    color: var(--text-muted);
}
.pricing-feature-icon--teaser {
    color: #f59e0b;
}
.pricing-feature-badge {
    display: inline-flex;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 1px 6px;
    border-radius: var(--radius-pill);
    background: rgba(245,158,11,0.12);
    color: #f59e0b;
    margin-left: 4px;
    vertical-align: middle;
}

/* ================================================================
   TRUST BAR — matches index/terminal (shared classes)
   ================================================================ */
.hero-trust {
    padding: 56px 0 0;
    position: relative;
    z-index: 2;
}
.trust-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: center;
    margin-bottom: 28px;
}
.trust-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex-wrap: nowrap;
    overflow: hidden;
}
.trust-logos-track {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex-wrap: nowrap;
}
.trust-logos-track .trust-logo[aria-hidden="true"] {
    display: none;
}
@keyframes trust-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.trust-logo {
    font-family: 'Sora', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-faint);
    letter-spacing: -0.01em;
    transition: color 0.2s ease, opacity 0.2s ease;
    white-space: nowrap;
}
img.trust-logo {
    height: auto;
    width: auto;
    max-height: 28px;
    filter: grayscale(1) brightness(0) invert(1);
    opacity: 0.5;
    transition: opacity 0.3s ease, filter 0.3s ease;
}
img.trust-logo:hover {
    opacity: 0.85;
}
[data-theme="light"] img.trust-logo {
    filter: grayscale(1) brightness(0);
    opacity: 0.4;
}
[data-theme="light"] img.trust-logo:hover {
    filter: grayscale(1) brightness(0);
    opacity: 0.65;
}
@media (max-width: 768px) {
    .trust-logos {
        -webkit-mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
        mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
    }
    .trust-logos-track {
        flex-wrap: nowrap;
        justify-content: flex-start;
        animation: trust-scroll 30s linear infinite;
    }
    .trust-logos-track .trust-logo[aria-hidden="true"] {
        display: inline;
    }
    .trust-logo { font-size: 14px; flex-shrink: 0; }
    img.trust-logo { max-height: 24px; }
    .trust-label { font-size: 10px; margin-bottom: 20px; }
}

/* ================================================================
   FAQ SECTION
   ================================================================ */
.pricing-faq {
    padding: 80px 0;
}
.pricing-faq-header {
    text-align: center;
    margin-bottom: 40px;
}
.pricing-faq-header h2 {
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 700;
    margin-bottom: 8px;
}
.pricing-faq-list {
    max-width: 720px;
    margin: 0 auto;
}
.pricing-faq-item {
    border-bottom: 1px solid var(--border-subtle);
}
.pricing-faq-item:first-child {
    border-top: 1px solid var(--border-subtle);
}
.pricing-faq-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 18px 0;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    text-align: left;
    gap: 16px;
    transition: color 0.2s var(--ease-out);
}
.pricing-faq-btn:hover {
    color: var(--text-primary);
}
.pricing-faq-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--text-faint);
    transition: transform 0.3s var(--ease-out);
}
.pricing-faq-item.is-open .pricing-faq-icon {
    transform: rotate(45deg);
}
.pricing-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s var(--ease-out), padding 0.35s var(--ease-out);
}
.pricing-faq-item.is-open .pricing-faq-answer {
    max-height: 500px;
}
.pricing-faq-answer p {
    padding-bottom: 18px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* ================================================================
   FINAL CTA — matches index/terminal
   ================================================================ */
.final-cta {
    padding: 120px 0;
    position: relative;
}
.final-cta-content {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 3;
}
.final-cta h2 {
    font-size: clamp(32px, 4vw, 52px);
    margin-bottom: 16px;
}
.final-cta-sub {
    font-size: 17px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.65;
}
.final-cta-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.final-cta-note {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: var(--text-faint);
}
.final-cta-glow {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 700px; height: 500px;
    background: radial-gradient(ellipse, rgba(10,6,229,0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

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

/* Tablet 2-column */
@media (max-width: 1100px) and (min-width: 901px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 680px;
    }
}

/* Single column */
@media (max-width: 900px) {
    .pricing-hero {
        padding: 120px 0 48px;
    }
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 440px;
        gap: 14px;
    }
    .pricing-card--featured {
        order: -1;
    }
    /* Remove fixed-height alignment constraints in single column */
    .pricing-card-badge-row {
        height: auto;
        margin-bottom: 4px;
    }
    .pricing-card-badge-row:empty {
        display: none;
    }
    .pricing-price-row {
        height: auto;
    }
    .pricing-price-sub {
        height: auto;
    }
    .hero-trust {
        padding: 40px 0 0;
    }
    .pricing-faq {
        padding: 64px 0;
    }
    .final-cta {
        padding: 80px 0;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .pricing-hero {
        padding: 100px 0 36px;
    }
    .pricing-hero h1 {
        font-size: clamp(26px, 6vw, 40px);
    }
    .pricing-hero-desc {
        font-size: 15px;
    }
    .pricing-card {
        padding: 24px 20px 28px;
    }
    .pricing-tier-name {
        font-size: 16px;
    }
    .pricing-price-value {
        font-size: 32px;
    }
    .pricing-price-value--text {
        font-size: 24px;
    }
    .pricing-feature {
        font-size: 12px;
    }
    .pricing-features-heading {
        font-size: 9px;
    }
    .final-cta { padding: 72px 0; }
    .final-cta h2 {
        font-size: clamp(24px, 5vw, 40px);
    }
    .final-cta-sub {
        font-size: 15px;
    }
    .final-cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    .final-cta-buttons .btn {
        width: 100%;
    }
    .pricing-faq-btn {
        font-size: 14px;
    }
    .pricing-faq {
        padding: 56px 0;
    }
    .trust-logo { font-size: 13px; }
    img.trust-logo { max-height: 20px; }
}

/* iPhone SE */
@media (max-width: 375px) {
    .pricing-hero h1 {
        font-size: 28px;
    }
    .pricing-hero-desc {
        font-size: 14px;
    }
    .pricing-card {
        padding: 20px 16px 24px;
    }
    .pricing-tier-name {
        font-size: 15px;
    }
    .pricing-price-value {
        font-size: 28px;
    }
    .pricing-price-value--text {
        font-size: 22px;
    }
    .pricing-toggle-option {
        font-size: 12px;
        padding: 6px 14px;
    }
    .pricing-toggle-save {
        font-size: 8px;
    }
    .final-cta h2 {
        font-size: 24px;
    }
    .final-cta-sub {
        font-size: 14px;
    }
    .trust-logo { font-size: 12px; }
    img.trust-logo { max-height: 18px; }
    .pricing-faq-btn {
        font-size: 13px;
        padding: 14px 0;
    }
    .pricing-faq-answer p {
        font-size: 13px;
    }
}

/* Minimum width */
@media (max-width: 320px) {
    .pricing-hero {
        padding: 88px 0 28px;
    }
    .pricing-hero h1 {
        font-size: 24px;
    }
    .pricing-hero-desc {
        font-size: 13px;
    }
    .pricing-card {
        padding: 18px 14px 22px;
    }
    .pricing-tier-name {
        font-size: 14px;
    }
    .pricing-price-value {
        font-size: 24px;
    }
    .pricing-price-value--text {
        font-size: 20px;
    }
    .pricing-feature {
        font-size: 11px;
    }
    .final-cta h2 {
        font-size: 22px;
    }
    .pricing-faq-btn {
        font-size: 12px;
    }
}

/* ================================================================
   REDUCED MOTION
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
    .trust-logos-track { animation: none !important; }
    .pricing-hero-glow { transition: none; }
    .pricing-card { transition: none; }
    .pricing-faq-answer { transition: none; }
}
