/* =========================================================
   Pricing (redesigned)
   Loaded after home.css. Uses its own .plans / .plan-* classes,
   so the old .pricing-* rules in home.css can be deleted.
   Colors come from --af-* variables defined in theme.css.
========================================================= */

.plans {
    padding: 112px 0;
    --plan-border: var(--af-border, rgba(15, 23, 42, 0.14));
    --plan-accent: var(--af-accent, #2563eb);
    --plan-feat-bg: #0f172a;
    --plan-feat-text: #ffffff;
    --plan-feat-muted: rgba(255, 255, 255, 0.72);
    --plan-feat-line: rgba(255, 255, 255, 0.18);
    --plan-feat-btn-bg: #ffffff;
    --plan-feat-btn-text: #0f172a;
}

html[data-theme="dark"] .plans {
    --plan-feat-bg: #1d2431;
    --plan-feat-text: #f1f3f5;
    --plan-feat-muted: #b4bcc8;
    --plan-feat-line: rgba(255, 255, 255, 0.16);
    --plan-feat-btn-bg: #60a5fa;
    --plan-feat-btn-text: #0b0c0e;
}

.plans-header {
    max-width: 680px;
}

.plans-header .section-description {
    margin-top: 16px;
}

/* ---------- One joined panel, three plans ---------- */

.plans-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 56px;
    border: 1px solid var(--plan-border);
    border-radius: 24px;
    overflow: hidden;
}

.plans .plan {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 44px 36px 40px;
    border-left: 1px solid var(--plan-border);
}

.plans .plan:first-child {
    border-left: 0;
}

.plans .plan-name {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
}

.plans .plan-tagline {
    min-height: 3.2em;
    margin: 8px 0 28px;
    line-height: 1.6;
    opacity: 0.75;
}

.plans .plan-price {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    margin: 0;
    font-size: 3.5rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.02em;
}

.plans .plan-currency {
    margin-top: 6px;
    font-size: 1.5rem;
    font-weight: 500;
}

.plans .plan-period {
    margin: 10px 0 28px;
    font-size: 0.9375rem;
    opacity: 0.7;
}

/* ---------- Button ---------- */

.plans .plan-button {
    display: block;
    padding: 14px 20px;
    border: 1px solid currentColor;
    border-radius: 999px;
    color: inherit;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: opacity 0.15s ease;
}

.plans .plan-button:hover,
.plans .plan-button:focus-visible {
    opacity: 0.75;
}

.plans .plan-button:focus-visible {
    outline: 2px solid var(--plan-accent);
    outline-offset: 3px;
}

/* ---------- Features ---------- */

.plans .plan-includes {
    margin: 32px 0 14px;
    padding-top: 28px;
    border-top: 1px solid var(--plan-border);
    font-size: 0.875rem;
    font-weight: 600;
    opacity: 0.75;
}

.plans .plan-features {
    margin: 0;
    padding: 0;
    list-style: none;
}

.plans .plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    line-height: 1.5;
}

.plans .plan-features svg {
    flex: none;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    color: var(--plan-accent);
}

/* ---------- Featured plan ---------- */

.plans .plan-featured {
    background: var(--plan-feat-bg);
    border-left-color: transparent;
}

.plans .plan-featured + .plan {
    border-left-color: transparent;
}

.plans .plan-featured :is(h3, p, li, span) {
    color: var(--plan-feat-text);
}

.plans .plan-featured .plan-tagline,
.plans .plan-featured .plan-period,
.plans .plan-featured .plan-includes,
.plans .plan-featured .plan-features li {
    color: var(--plan-feat-muted);
    opacity: 1;
}

.plans .plan-featured .plan-includes {
    border-top-color: var(--plan-feat-line);
}

.plans .plan-featured .plan-features svg {
    color: var(--plan-feat-text);
}

.plans .plan-featured .plan-button {
    background: var(--plan-feat-btn-bg);
    border-color: var(--plan-feat-btn-bg);
    color: var(--plan-feat-btn-text);
}

.plans .plan-badge {
    position: absolute;
    top: 24px;
    right: 24px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--plan-accent);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
}

html[data-theme="dark"] .plans .plan-badge {
    color: #0b0c0e;
}

/* ---------- Note ---------- */

.plans-note {
    margin: 24px 0 0;
    font-size: 0.9375rem;
    opacity: 0.75;
}

.plans-note a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
    .plans {
        padding: 72px 0;
    }

    .plans-grid {
        grid-template-columns: 1fr;
        margin-top: 40px;
    }

    .plans .plan,
    .plans .plan:first-child {
        padding: 36px 28px;
        border-left: 0;
        border-top: 1px solid var(--plan-border);
    }

    .plans .plan:first-child {
        border-top: 0;
    }

    .plans .plan-featured,
    .plans .plan-featured + .plan {
        border-top-color: transparent;
    }

    .plans .plan-tagline {
        min-height: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .plans .plan-button {
        transition: none;
    }
}
