/* ═══════════════════════════════════════════════════════════
   EWI Pricing Page
   ═══════════════════════════════════════════════════════════ */

.ewi-pricing {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

/* ── Hero ─────────────────────────────────────────────────────────────────────── */

.ewi-pricing__hero {
    text-align: center;
    margin-bottom: 56px;
}

.ewi-pricing__title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 12px;
    letter-spacing: -0.02em;
}

.ewi-pricing__subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin: 0;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* ── Section headings above each promo row ───────────────────────────────────── */

.ewi-pricing__section-heading {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 24px;
}

.ewi-pricing__section-heading h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 6px;
}

.ewi-pricing__section-heading p {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin: 0;
}

/* ── Active Promotion ─────────────────────────────────────────────────────────── */

.ewi-pricing__promo {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 48px;
    padding: 28px 32px;
    border: 1px solid rgba(77, 163, 255, 0.3);
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(77, 163, 255, 0.08) 0%, var(--bg-alt, #111) 70%);
}

.ewi-pricing__promo-eyebrow {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent, #4da3ff);
    margin-bottom: 10px;
}

.ewi-pricing__promo-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 18px;
}

.ewi-pricing__promo-cta {
    display: inline-flex;
    align-items: center;
    padding: 11px 24px;
    border-radius: 8px;
    background: var(--accent, #4da3ff);
    color: #000;
    font-weight: 700;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: filter 0.15s;
}

.ewi-pricing__promo-cta:hover {
    filter: brightness(1.1);
}

/* ── Promo row — both offers side by side when both are active ───────────── */
.ewi-pricing__promos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto 48px;
    align-items: stretch;
}

.ewi-pricing__promos .ewi-pricing__promo {
    max-width: none;
    margin: 0;
}

.ewi-pricing__promo-details {
    text-align: left;
    margin: 16px 0;
}

.ewi-pricing__promo-detail-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-faint, #555);
    margin: 0 0 6px;
}

.ewi-pricing__promo-detail-label:not(:first-child) {
    margin-top: 14px;
}

.ewi-pricing__promo-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.ewi-pricing__promo-chip {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg, #0f0f0f);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 7px;
    white-space: nowrap;
}

.ewi-pricing__promo-chip--ea {
    border-color: rgba(77, 163, 255, 0.25);
    color: rgba(77, 163, 255, 0.85);
    background: rgba(77, 163, 255, 0.06);
}

.ewi-pricing__promo-chip--soon {
    border-color: var(--border);
    color: var(--text-faint, #555);
    background: transparent;
}

.ewi-pricing__promo-disclosure {
    max-width: 1000px;
    margin: 0 auto;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--text-muted, #888);
}

/* ── Sections ─────────────────────────────────────────────────────────────────── */

.ewi-pricing__section {
    margin-bottom: 60px;
}

.ewi-pricing__section--addons {
    padding-top: 48px;
    border-top: 1px solid var(--border);
}

.ewi-pricing__section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ewi-pricing__section-note {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-alt, #111);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 3px 10px;
}

/* ── Period tabs ──────────────────────────────────────────────────────────────── */

.ewi-pricing__period-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0 auto 32px;
}

.ewi-pricing__period-tab {
    padding: 9px 18px;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--bg-alt, #111);
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.ewi-pricing__period-tab:hover {
    color: var(--text);
    border-color: rgba(77, 163, 255, 0.4);
}

.ewi-pricing__period-tab.is-active {
    color: #000;
    background: var(--accent, #4da3ff);
    border-color: var(--accent, #4da3ff);
}

/* ── Grid ─────────────────────────────────────────────────────────────────────── */

.ewi-pricing__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    align-items: start;
}

/* Author `display: grid` above beats the browser's default
   `[hidden] { display: none }` UA rule at equal specificity (author
   origin always wins ties over user-agent origin) — this element sets
   its own `hidden` via JS, so it needs an explicit override. */
.ewi-pricing__grid[hidden] {
    display: none;
}

/* ── Card ─────────────────────────────────────────────────────────────────────── */

.pricing-card {
    background: var(--bg-alt, #111);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    transition: border-color 0.15s;
    /* Grid items default to min-width:auto, which lets a card's content
       (e.g. long CTA text) force it wider than its grid track instead of
       wrapping — this is what breaks the 3-column layout. */
    min-width: 0;
}

.pricing-card:hover {
    border-color: rgba(77, 163, 255, 0.25);
}

/* Featured — Full Package */

.pricing-card--featured {
    border-color: rgba(77, 163, 255, 0.5);
    background: linear-gradient(
        145deg,
        rgba(77, 163, 255, 0.06) 0%,
        var(--bg-alt, #111) 60%
    );
    box-shadow: 0 0 0 1px rgba(77, 163, 255, 0.15), 0 8px 32px rgba(0, 0, 0, 0.3);
}

.pricing-card--featured:hover {
    border-color: rgba(77, 163, 255, 0.7);
}

/* ── Badge ────────────────────────────────────────────────────────────────────── */

.pricing-card__badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent, #4da3ff);
    color: #000;
    font-size: 0.6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

/* ── Header ───────────────────────────────────────────────────────────────────── */

.pricing-card__header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* Bleeds to the card's own edges/corners so the tinted background and
       border-bottom below visually separate the hero (name + price) from
       the body (assets/EAs/CTA), without needing a separate wrapper. */
    margin: -24px -24px 0;
    padding: 24px;
    background: var(--bg, #0f0f0f);
    border-bottom: 1px solid var(--border);
    border-radius: 10px 10px 0 0;
}

.pricing-card__name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.pricing-card--featured .pricing-card__name {
    color: var(--accent, #4da3ff);
}

.pricing-card--featured .pricing-card__header {
    text-align: center;
    align-items: center;
}

.pricing-card__price {
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.pricing-card__currency {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-muted);
    align-self: flex-start;
    margin-top: 4px;
}

.pricing-card__amount {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
    letter-spacing: -0.03em;
}

.pricing-card__period {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-left: 2px;
}

.pricing-card__requires {
    font-size: 0.7rem;
    color: var(--text-faint, #555);
    margin: 0;
}

.pricing-card__price--discounted {
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
}

.pricing-card__price-col--was {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pricing-card__price-col--now {
    display: flex;
    align-items: baseline;
    gap: 2px;
    white-space: nowrap;
}

.pricing-card__price-was {
    font-size: 0.9375rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.pricing-card__price-note {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.pricing-card__promo-code {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin: 8px 0 0;
    overflow-wrap: break-word;
}

.pricing-card__promo-code strong {
    color: #7cf0c4;
    font-family: monospace;
}

/* ── Assets ───────────────────────────────────────────────────────────────────── */

.pricing-card__assets {
    flex: 1;
}

.pricing-card__asset-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 10px;
}

.pricing-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.pricing-card__chip {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg, #0f0f0f);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 7px;
    white-space: nowrap;
}

.pricing-card__asset-group {
    margin-bottom: 14px;
}

.pricing-card__asset-group:last-child {
    margin-bottom: 0;
}

.pricing-card__asset-group-label {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-faint, #555);
    margin: 0 0 6px;
}

.pricing-card--featured .pricing-card__chip {
    border-color: rgba(77, 163, 255, 0.2);
    color: rgba(77, 163, 255, 0.8);
    background: rgba(77, 163, 255, 0.05);
}

/* ── EAs Included ─────────────────────────────────────────────────────────────── */

.pricing-card__eas {
    margin-top: 14px;
}

.pricing-card__eas-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 8px;
}

.pricing-card__chip--ea {
    border-color: rgba(77, 163, 255, 0.25);
    color: rgba(77, 163, 255, 0.85);
    background: rgba(77, 163, 255, 0.06);
}

.pricing-card__chip--soon {
    border-color: var(--border);
    color: var(--text-faint, #555);
    background: transparent;
}

.pricing-card__chip--soon em {
    font-style: normal;
    opacity: 0.8;
}

.pricing-card__eas-none {
    font-size: 0.75rem;
    font-style: italic;
    color: var(--text-faint, #555);
    margin: 0;
}

/* ── Footer / CTA ─────────────────────────────────────────────────────────────── */

.pricing-card__footer {
    margin-top: auto;
}

.pricing-card__cta {
    display: block;
    width: 100%;
    /* Without this, width:100% + this padding renders 32px wider than the
       card's content box (default content-box sizing adds padding on top
       of the specified width) — the actual source of the button
       overflowing the card. */
    box-sizing: border-box;
    padding: 11px 16px;
    font-size: 0.875rem;
    font-weight: 700;
    text-align: center;
    border-radius: 7px;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: opacity 0.15s, background 0.15s;
    background: var(--accent, #4da3ff);
    color: #000;
}

.pricing-card__cta:hover {
    opacity: 0.88;
}

.pricing-card__cta--secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.pricing-card__cta--secondary:hover {
    border-color: var(--accent, #4da3ff);
    color: var(--accent, #4da3ff);
    opacity: 1;
}

.pricing-card__cta--soon {
    /* Was background: var(--bg) + color: var(--text-faint) — --bg is the
       page background, not a surface meant to sit under text, and
       --text-faint is the site's dimmest text tone; paired together on
       a button they're nearly indistinguishable in dark mode and give
       ~2:1 contrast in light mode (light gray #aaa text on near-white
       #f7f7f7), unreadable. --bg-hover/--text-muted is the same pairing
       already used for disabled-but-legible UI elsewhere on the site
       and holds solid contrast in both themes. */
    background: var(--bg-hover, #1a1a1a);
    border: 1px solid var(--border);
    color: var(--text-muted, #a8a8a8);
    cursor: not-allowed;
    opacity: 1;
}

.pricing-card__cta:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Responsive ───────────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
    .ewi-pricing__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


@media (max-width: 600px) {
    .ewi-pricing {
        padding: 32px 16px 60px;
    }

    .ewi-pricing__title {
        font-size: 1.5rem;
    }

    .ewi-pricing__grid {
        grid-template-columns: 1fr;
    }

    .ewi-pricing__promos {
        grid-template-columns: 1fr;
    }

    .ewi-pricing__section-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}
