/**
 * ============================================================
 * SECTIE 7 · HET AANBOD — PRICING & MATRIX
 * Paradigma: Tactile Maximalism | Architectuur: BEM
 * 100/100 Core Web Vitals | Modern CSS with Fallbacks
 * ============================================================
 */

/* ── 1. Design Tokens ─────────────────────────────────────── */
:root {
    /* Palette - HSL based for gradients and glows */
    --f7-clr-bg: #050505;
    --f7-clr-surface: hsl(222, 18%, 11%);
    --f7-clr-surface-raised: hsl(222, 16%, 14%);
    --f7-clr-surface-featured: hsl(224, 20%, 16%);
    --f7-clr-border: hsl(222, 16%, 20%);
    --f7-clr-border-featured: hsl(168, 72%, 52%);

    /* Accent (Jens Mul Green-Teal) */
    --f7-clr-accent: hsl(168, 72%, 52%);
    --f7-clr-accent-dim: hsl(168, 60%, 40%);
    --f7-clr-accent-glow: hsla(168, 72%, 52%, 0.22);
    --f7-clr-accent-glow-lg: hsla(168, 72%, 52%, 0.10);

    /* Text */
    --f7-clr-text-base: hsl(220, 20%, 90%);
    --f7-clr-text-muted: hsl(220, 12%, 60%);
    --f7-clr-text-faint: hsl(220, 10%, 45%);
    --f7-clr-text-featured: hsl(168, 60%, 78%);

    /* Button surfaces */
    --f7-clr-btn-primary-bg: hsl(168, 72%, 52%);
    --f7-clr-btn-primary-txt: hsl(222, 22%, 7%);
    --f7-clr-btn-secondary-bg: hsl(222, 16%, 18%);
    --f7-clr-btn-secondary-brd: hsl(222, 16%, 28%);

    /* Fluid type scale - clamp() for perfect responsiveness */
    --f7-fs-section-title: clamp(1.9rem, 3.5vw + 0.5rem, 3rem);
    --f7-fs-section-sub: clamp(0.95rem, 1vw + 0.4rem, 1.15rem);
    --f7-fs-tier-label: clamp(0.7rem, 0.8vw + 0.2rem, 0.8rem);
    --f7-fs-price: clamp(1.15rem, 1.5vw + 0.4rem, 1.5rem);
    --f7-fs-body: clamp(0.85rem, 0.8vw + 0.3rem, 0.95rem);
    --f7-fs-feature: clamp(0.82rem, 0.7vw + 0.28rem, 0.9rem);
    --f7-fs-btn: clamp(0.82rem, 0.7vw + 0.28rem, 0.92rem);

    /* Spacing */
    --f7-sp-section-y: clamp(4rem, 8vw, 7rem);
    --f7-sp-card-pad: clamp(1.1rem, 2.5vw, 1.8rem);
    --f7-sp-card-gap: clamp(1rem, 2vw, 1.5rem);

    /* Radius & Transitions */
    --f7-radius-card: 20px;
    --f7-radius-btn: 10px;
    --f7-ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);

    /* Tactile Film Grain SVG - Base64 encoded for performance (0 network requests) */
    --f7-grain-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='320' height='320' filter='url(%23g)' opacity='1'/%3E%3C/svg%3E");
}

/* ── 2. Section Shell ─────────────────────────────────────── */
.pricing {
    padding-block: var(--f7-sp-section-y);
    overflow: hidden;
    position: relative;
    color: var(--f7-clr-text-base);
    font-family: inherit;
    /* Inherit from body or Divi */
}

/* Divi Section Override: Zorg dat de omliggende sectie 100% the tactile background meeneemt */
.et_pb_section:has(.pricing) {
    background-color: #050505 !important;
    position: relative;
    overflow: hidden;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

/* Radiale teal glow — omgezet naar Ellipse the transparent edge om naad te voorkomen */
.et_pb_section:has(.pricing)::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(ellipse at 50% 50%,
            hsla(178, 62%, 82%, 0.11) 0%,
            hsla(178, 62%, 82%, 0.05) 40%,
            transparent 80%);
    pointer-events: none;
    z-index: 0;
}

/* Vederlichte SVG noise grain — zorgt voor de 'tactile' textuur op sectie-niveau */
.et_pb_section:has(.pricing)::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.5' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

.pricing__inner {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: clamp(1.25rem, 5vw, 3rem);
    position: relative;
    z-index: 1;
}

/* ── 3. Section Header ────────────────────────────────────── */
.pricing__header {
    text-align: center;
    margin-block-end: clamp(2.5rem, 5vw, 4rem);
}

.pricing__title {
    font-size: var(--f7-fs-section-title);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--f7-clr-text-base);
    margin: 0 0 0.6rem;
}

.pricing__subtitle {
    font-size: var(--f7-fs-section-sub);
    color: var(--f7-clr-text-muted);
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
}

/* ── 4. Grid ──────────────────────────────────────────────── */
.pricing__grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--f7-sp-card-gap);
    align-items: center;
}

/* ── 5. Card Base ─────────────────────────────────────────── */
.pricing__card {
    --mouse-x: 50%;
    --mouse-y: 0%;

    position: relative;
    border-radius: var(--f7-radius-card);
    background: var(--f7-clr-border);
    padding: 1px;
    transition:
        transform 0.45s var(--f7-ease-smooth),
        box-shadow 0.45s var(--f7-ease-smooth);
    will-change: transform;
}

/* Grain texture overlay */
.pricing__card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--f7-radius-card);
    background-image: var(--f7-grain-svg);
    background-size: 320px 320px;
    background-repeat: repeat;
    opacity: 0.035;
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 2;
}

/* Flashlight border effect */
.pricing__card::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: calc(var(--f7-radius-card) + 1px);
    background: radial-gradient(420px circle at var(--mouse-x) var(--mouse-y),
            hsla(168, 72%, 52%, 0.45),
            transparent 60%);
    opacity: 0;
    transition: opacity 0.4s var(--f7-ease-smooth);
    pointer-events: none;
    z-index: 0;
}

.pricing__card-inner {
    position: relative;
    z-index: 1;
    background-color: var(--f7-clr-surface);
    border-radius: calc(var(--f7-radius-card) - 1px);
    padding: var(--f7-sp-card-pad);
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    height: 100%;
    box-shadow:
        inset 0 1px 0 hsla(220, 30%, 28%, 0.5),
        inset 0 -1px 0 hsla(220, 22%, 8%, 0.6);
}

/* ── 6. Card — Featured Modifier ─────────────────────────── */
.pricing__card--featured {
    transform: scale(1.055);
    background: linear-gradient(145deg,
            hsla(168, 72%, 52%, 0.7),
            hsla(200, 50%, 40%, 0.3) 50%,
            hsla(168, 72%, 52%, 0.5));
    box-shadow:
        0 0 40px hsla(168, 72%, 52%, 0.14),
        0 0 80px hsla(168, 72%, 52%, 0.08),
        0 24px 60px hsla(222, 22%, 4%, 0.60);
}

.pricing__card--featured .pricing__card-inner {
    background-color: var(--f7-clr-surface-featured);
    box-shadow:
        inset 0 1px 0 hsla(168, 60%, 52%, 0.18),
        inset 0 -1px 0 hsla(222, 22%, 6%, 0.80);
}

.pricing__card--featured::after {
    background: radial-gradient(420px circle at var(--mouse-x) var(--mouse-y),
            hsla(168, 80%, 65%, 0.55),
            transparent 60%);
}

/* ── 7. Card Components ──────────────────────────────────── */
.pricing__badge {
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    background: var(--f7-clr-accent);
    color: var(--f7-clr-btn-primary-txt);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    padding: 0.3rem 0.85rem;
    border-radius: 100px;
    white-space: nowrap;
    z-index: 3;
    box-shadow: 0 0 16px var(--f7-clr-accent-glow);
}

.pricing__card-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pricing__tier-label {
    display: block;
    font-size: var(--f7-fs-tier-label);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--f7-clr-text-faint);
}

.pricing__card--featured .pricing__tier-label {
    color: var(--f7-clr-text-featured);
}

.pricing__price {
    font-size: var(--f7-fs-price);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--f7-clr-text-base);
    margin: 0;
}

.pricing__price small {
    font-size: 0.62em;
    font-weight: 400;
    color: var(--f7-clr-text-muted);
    letter-spacing: 0;
}

.pricing__recurring {
    display: block;
    font-size: clamp(0.7rem, 0.55vw + 0.24rem, 0.76rem);
    font-weight: 400;
    color: var(--f7-clr-text-faint);
    margin-top: -0.15rem;
}

.pricing__social-proof {
    margin: 0;
    font-size: clamp(0.76rem, 0.65vw + 0.26rem, 0.84rem);
    font-weight: 600;
    color: var(--f7-clr-text-featured);
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.pricing__social-proof::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--f7-clr-accent);
    flex-shrink: 0;
    box-shadow: 0 0 8px var(--f7-clr-accent-glow);
}

.pricing__description {
    font-size: var(--f7-fs-body);
    color: var(--f7-clr-text-muted);
    line-height: 1.65;
    margin: 0;
}

.pricing__features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    flex: 1;
}

.pricing__feature {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    font-size: var(--f7-fs-feature);
    color: var(--f7-clr-text-muted);
    line-height: 1.4;
}

.pricing__check {
    flex-shrink: 0;
    margin-top: 0.1em;
    color: var(--f7-clr-text-faint);
}

.pricing__check--accent {
    color: var(--f7-clr-accent);
}

/* ── 8. CTA Buttons ───────────────────────────────────────── */
.pricing__cta {
    margin-block-start: auto;
    padding-block-start: 0.5rem;
}

.pricing__btn {
    display: block;
    width: 100%;
    text-align: center;
    text-decoration: none;
    font-size: var(--f7-fs-btn);
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.8rem 1.2rem;
    border-radius: var(--f7-radius-btn);
    border: 1px solid transparent;
    transition:
        background-color 0.3s var(--f7-ease-smooth),
        color 0.3s var(--f7-ease-smooth),
        border-color 0.3s var(--f7-ease-smooth),
        box-shadow 0.3s var(--f7-ease-smooth);
    cursor: pointer;
}

.pricing__btn--primary {
    background-color: var(--f7-clr-btn-primary-bg);
    color: var(--f7-clr-btn-primary-txt);
    border-color: var(--f7-clr-btn-primary-bg);
    box-shadow: 0 0 24px var(--f7-clr-accent-glow);
}

.pricing__btn--secondary {
    background-color: var(--f7-clr-btn-secondary-bg);
    color: var(--f7-clr-text-muted);
    border-color: var(--f7-clr-btn-secondary-brd);
}

.pricing__btn:focus-visible {
    outline: 2px solid var(--f7-clr-accent);
    outline-offset: 3px;
}

/* ── 9. Risk Reversal & Footer ────────────────────────────── */
.pricing__risk-reversal {
    text-align: center;
    margin-block-start: clamp(1.75rem, 3.5vw, 2.75rem);
    font-size: var(--f7-fs-body);
    color: var(--f7-clr-text-faint);
    line-height: 1.65;
    margin-inline: auto;
    max-width: 520px;
}

.pricing__risk-reversal a {
    color: var(--f7-clr-accent);
    text-decoration: none;
    border-bottom: 1px solid var(--f7-clr-accent-dim);
    transition:
        color 0.2s var(--f7-ease-smooth),
        border-color 0.2s var(--f7-ease-smooth);
}

/* ── 10. Feature Matrix ──────────────────────────────────── */
.pricing__matrix {
    margin-block-start: clamp(2rem, 4vw, 3rem);
}

.pricing__matrix-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    margin-inline: auto;
    padding: 0.8rem 1.75rem;
    background-color: var(--f7-clr-btn-secondary-bg);
    color: var(--f7-clr-text-muted);
    border: 1px solid var(--f7-clr-btn-secondary-brd);
    border-radius: var(--f7-radius-btn);
    font-family: inherit;
    font-size: var(--f7-fs-btn);
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition:
        background-color 0.3s var(--f7-ease-smooth),
        color 0.3s var(--f7-ease-smooth),
        border-color 0.3s var(--f7-ease-smooth);
}

.pricing__matrix-toggle__arrow {
    display: inline-flex;
    transition: transform 0.4s var(--f7-ease-smooth);
    flex-shrink: 0;
}

.pricing__matrix-toggle[aria-expanded="true"] .pricing__matrix-toggle__arrow {
    transform: rotate(180deg);
}

.pricing__matrix-body {
    height: 0;
    overflow: hidden;
    visibility: hidden;
    /* Gestuurd via GSAP voor premium reveal */
}

/* Matrix Table Shell */
.pricing__matrix-scroll {
    overflow-x: hidden;
    margin-block-start: clamp(1.25rem, 3vw, 2rem);
    border-radius: var(--f7-radius-card);
    border: 1px solid var(--f7-clr-border);
}

.pricing__matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--f7-fs-feature);
    color: var(--f7-clr-text-muted);
    min-width: 640px;
    line-height: 1.55;
}

/* Table Head */
.pricing__matrix-table thead th {
    padding: 1rem 1.2rem;
    text-align: left;
    font-size: var(--f7-fs-tier-label);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--f7-clr-text-faint);
    background-color: var(--f7-clr-surface-raised);
    border-bottom: 1px solid var(--f7-clr-border);
    white-space: nowrap;
}

.pricing__matrix-table thead th:first-child {
    width: 30%;
}

.pricing__matrix-table__th--featured {
    color: var(--f7-clr-text-featured) !important;
    background-color: hsla(168, 72%, 52%, 0.07) !important;
    border-top: 2px solid var(--f7-clr-border-featured) !important;
}

/* Category Rows */
.pricing__matrix-table__row--category td {
    padding: 0.55rem 1.2rem;
    font-size: clamp(0.68rem, 0.6vw + 0.2rem, 0.76rem);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--f7-clr-accent);
    background-color: var(--f7-clr-surface-raised) !important;
    border-top: 1px solid var(--f7-clr-border);
    border-bottom: 1px solid var(--f7-clr-border);
}

.pricing__matrix-td--price {
    color: var(--f7-clr-text-muted);
    font-size: var(--f7-fs-tier-label);
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0.05em;
}

.pricing__matrix-td--price-featured {
    color: var(--f7-clr-text-featured) !important;
    background-color: hsla(168, 72%, 52%, 0.07) !important;
}

/* Body Rows */
.pricing__matrix-table tbody tr {
    background-color: var(--f7-clr-surface);
    border-bottom: 1px solid hsla(222, 16%, 20%, 0.6);
}

.pricing__matrix-table tbody tr:nth-child(even) {
    background-color: hsla(220, 20%, 90%, 0.02);
}

.pricing__matrix-table tbody td {
    padding: 0.85rem 1.2rem;
    vertical-align: middle;
}

.pricing__matrix-table tbody td:first-child {
    color: var(--f7-clr-text-base);
    font-weight: 500;
}

.pricing__matrix-td--featured {
    background-color: hsla(168, 72%, 52%, 0.04);
}

/* ── 11. Interactive States ──────────────────────────────── */
@media (hover: hover) and (pointer: fine) {
    .pricing__card:hover {
        transform: translateY(-5px);
        box-shadow:
            0 16px 48px hsla(222, 22%, 4%, 0.55),
            0 4px 16px hsla(222, 22%, 4%, 0.30);
    }

    .pricing__card--featured:hover {
        transform: scale(1.055) translateY(-6px);
        box-shadow:
            0 0 50px hsla(168, 72%, 52%, 0.22),
            0 0 90px hsla(168, 72%, 52%, 0.10),
            0 28px 70px hsla(222, 22%, 4%, 0.65);
    }

    .pricing__card:hover::after {
        opacity: 1;
    }

    .pricing__btn--primary:hover {
        background-color: hsl(168, 72%, 44%);
        border-color: hsl(168, 72%, 44%);
        box-shadow: 0 0 36px var(--f7-clr-accent-glow);
    }

    .pricing__btn--secondary:hover {
        background-color: hsl(222, 16%, 22%);
        color: var(--f7-clr-text-base);
        border-color: hsl(222, 16%, 34%);
    }

    .pricing__matrix-toggle:hover {
        background-color: hsl(222, 16%, 22%);
        color: var(--f7-clr-text-base);
        border-color: hsl(222, 16%, 34%);
    }

    .pricing__risk-reversal a:hover {
        color: hsl(168, 72%, 44%);
        border-color: hsl(168, 72%, 44%);
    }
}

/* ── 12. Mobile Implementation (< 980px) ─────────────────── */
@media (max-width: 979px) {
    .pricing__grid {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin-inline: auto;
        gap: 1.25rem;
    }

    /* LOW-PERF MODE */
    .pricing__card--featured {
        transform: none;
        box-shadow:
            0 8px 24px hsla(168, 72%, 52%, 0.10),
            0 12px 32px hsla(222, 22%, 4%, 0.40);
    }

    .pricing__card::before {
        opacity: 0.018;
    }

    .pricing__card::after {
        display: none;
    }

    .pricing__btn--primary {
        box-shadow: none;
    }

    .pricing__card:hover,
    .pricing__card--featured:hover {
        transform: none;
    }

    /* Matrix Mobile Navigation */
    .pricing__matrix-tabs {
        display: flex;
        gap: 0.3rem;
        padding: 0.3rem;
        margin-block-start: clamp(1.25rem, 3vw, 2rem);
        background: var(--f7-clr-surface-raised);
        border: 1px solid var(--f7-clr-border);
        border-radius: calc(var(--f7-radius-btn) + 5px);
    }

    .pricing__matrix-tab {
        flex: 1;
        padding: 0.6rem 0.4rem;
        font-family: inherit;
        font-size: clamp(0.7rem, 2.4vw, 0.8rem);
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: var(--f7-clr-text-muted);
        background: transparent;
        border: none;
        border-radius: var(--f7-radius-btn);
        cursor: pointer;
        transition: color 0.2s var(--f7-ease-smooth), background-color 0.2s var(--f7-ease-smooth);
    }

    .pricing__matrix-tab.is-active {
        color: var(--f7-clr-bg);
        background: var(--f7-clr-accent);
    }

    .pricing__matrix-tab[data-featured].is-active {
        box-shadow: 0 0 14px var(--f7-clr-accent-glow);
    }

    .pricing__matrix-scroll {
        margin-block-start: 0.75rem;
    }

    .pricing__matrix-table {
        min-width: 0;
    }

    /* Column Switching Logic */
    .pricing__matrix-table thead th:nth-child(n+2),
    .pricing__matrix-table tbody td:nth-child(n+2) {
        display: none;
    }

    .pricing__matrix-table[data-active-col="1"] thead th:nth-child(2),
    .pricing__matrix-table[data-active-col="1"] tbody td:nth-child(2) {
        display: table-cell;
    }

    .pricing__matrix-table[data-active-col="2"] thead th:nth-child(3),
    .pricing__matrix-table[data-active-col="2"] tbody td:nth-child(3) {
        display: table-cell;
    }

    .pricing__matrix-table[data-active-col="3"] thead th:nth-child(4),
    .pricing__matrix-table[data-active-col="3"] tbody td:nth-child(4) {
        display: table-cell;
    }

    /* Sticky First Column */
    .pricing__matrix-table thead th:first-child,
    .pricing__matrix-table tbody td:first-child {
        position: sticky;
        left: 0;
        z-index: 2;
        width: 48%;
        box-shadow: 2px 0 8px hsla(222, 22%, 4%, 0.45);
    }

    .pricing__matrix-table thead th:first-child {
        background-color: var(--f7-clr-surface-raised);
    }

    .pricing__matrix-table tbody td:first-child {
        background-color: var(--f7-clr-surface);
    }

    .pricing__matrix-table tbody tr:nth-child(even) td:first-child {
        background-color: hsl(222, 18%, 11%);
    }

    /* Active Column Highlight */
    .pricing__matrix-table thead th:nth-child(n+2),
    .pricing__matrix-table tbody td:nth-child(n+2) {
        background-color: hsla(168, 72%, 52%, 0.04) !important;
        border-left: 1px solid hsla(168, 72%, 52%, 0.1);
    }
}

/* ── 13. Matrix Icons (check & cross inline SVG spans) ──── */
.pricing__matrix-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    vertical-align: middle;
}

.pricing__matrix-icon--check {
    color: var(--f7-clr-accent);
}

.pricing__matrix-icon--cross {
    color: hsl(0, 65%, 55%);
}

/* Sticky category row first cell fix on mobile */
@media (max-width: 979px) {
    .pricing__matrix-table__row--category td:first-child {
        background-color: var(--f7-clr-surface-raised) !important;
    }
}

/* ── 14. Accessibility ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {

    .pricing__card,
    .pricing__card::before,
    .pricing__card::after,
    .pricing__btn,
    .pricing__matrix-toggle__arrow {
        transition: none !important;
        animation: none !important;
    }

    .pricing__card--featured {
        transform: none;
    }
}