/* ============================================================
   pricing.css — the pricing page (redesign · P8)
   ------------------------------------------------------------
   Layout-only, token-driven. The interactive calculator is the
   centrepiece: a ticket-stub card (.dd-card--ticket from P2) with a
   dot stepper, a live breakdown, and a tear-off "total" stub that
   shows what you save. The tab UI is the shared process-tabs feature
   (sidebar "production" variant); the service picker is a .dd-select;
   the contact modal is the P2 dd-modal. No raw hex / px / shadows.
   ============================================================ */

/* The first section sits under the fixed navbar — offset it instead of
   the old inline spacer <div style="height:7em">. */
.pricing-section {
    padding-top: calc(var(--navbar-h) + var(--space-11));
}

/* ---- per-pane heading + lead ------------------------------------- */
.pricing-pane__title {
    margin-bottom: var(--space-2);
}

.pricing-pane__lead {
    font-size: var(--fs-lead);
    line-height: var(--lh-snug);
    color: var(--text-muted);
    max-width: 48ch;
    margin-bottom: var(--space-8);
}

/* ============================================================
   TICKET-STUB CALCULATOR
   ============================================================ */

.pricing-ticket {
    /* override the default .dd-card padding — body + stub pad themselves */
    padding: 0;
    /* keep the P2 ticket side-notches (::before/::after) visible */
    overflow: visible;
    display: flex;
    align-items: stretch;
    max-width: 680px;
    margin-block: var(--space-2) 0;
}

.pricing-ticket__body {
    flex: 1 1 60%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    padding: clamp(var(--space-6), 4vw, var(--space-8));
}

/* ---- head: base rate (or service select) ------------------------- */
.pricing-ticket__head {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.pricing-ticket__rate {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.pricing-ticket__amount {
    font-family: var(--font-display);
    font-size: var(--fs-h2);
    line-height: 1;
    color: var(--text);
}

.pricing-ticket__per {
    font-size: var(--fs-body);
    font-weight: 600;
    color: var(--text-muted);
}

/* ---- dot stepper -------------------------------------------------- */
.pricing-stepper {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    width: fit-content;
    padding: var(--space-2);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-sm);
}

.pricing-stepper__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border: none;
    border-radius: var(--radius-pill);
    background: var(--surface-tint);
    color: var(--accent-strong);
    cursor: pointer;
    transition: background var(--dur-base) var(--ease-soft),
                color var(--dur-base) var(--ease-soft),
                transform var(--dur-base) var(--ease-dreamy);
}

.pricing-stepper__btn:hover {
    background: var(--grad-coral);
    color: var(--text-on-coral);
    transform: translateY(-2px);
}

.pricing-stepper__btn:active {
    transform: translateY(0);
}

.pricing-stepper__btn:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.pricing-stepper__btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: var(--surface-tint);
    color: var(--text-muted);
    transform: none;
}

.pricing-stepper__value {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    min-width: 4.75rem;
    line-height: 1;
}

.pricing-stepper__count {
    font-family: var(--font-display);
    font-size: var(--fs-h3);
    color: var(--text);
}

.pricing-stepper__count-unit {
    margin-top: 0.4em;
    font-family: var(--font-mono);
    font-size: var(--fs-label);
    letter-spacing: var(--tracking-label);
    color: var(--text-muted);
}

/* ---- breakdown (rate · qty · discount) --------------------------- */
.pricing-breakdown {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.pricing-breakdown__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-4);
}

.pricing-breakdown__row dt {
    font-family: var(--font-mono);
    font-size: var(--fs-label);
    letter-spacing: var(--tracking-label);
    color: var(--text-muted);
}

.pricing-breakdown__row dd {
    margin: 0;
    font-size: var(--fs-body);
    font-weight: 600;
    color: var(--text);
}

.pricing-breakdown__row--discount dd {
    color: var(--accent-strong);
}

/* ---- stub: the tear-off total ------------------------------------ */
.pricing-ticket__stub {
    position: relative;
    flex: 0 0 38%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-2);
    padding: clamp(var(--space-6), 4vw, var(--space-8));
}

/* the perforation between body and stub */
.pricing-ticket__stub::before {
    content: "";
    position: absolute;
    left: 0;
    top: var(--space-6);
    bottom: var(--space-6);
    border-left: 2px dashed var(--coral-200);
}

.pricing-ticket__total {
    font-family: var(--font-display);
    font-size: var(--fs-h1);
    line-height: 1;
    color: var(--text);
}

.pricing-ticket__save {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    width: fit-content;
    margin-top: var(--space-1);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-pill);
    background: var(--coral-100);
    color: var(--coral-800);
    font-size: var(--fs-small);
    font-weight: 600;
}

/* the dot motif on the savings pill */
.pricing-ticket__save::before {
    content: "";
    width: 0.5em;
    height: 0.5em;
    border-radius: var(--radius-pill);
    background: var(--accent-strong);
    flex-shrink: 0;
}

/* ---- CTA row ------------------------------------------------------ */
/* Every pane shares the card's one grid cell, so each is as tall as the
   longest (tabs.css). As a column, a pane can put its way on at the card's
   foot: the buttons stay put when a tab switches, whatever each tab's list
   runs to. padding-top, not margin, keeps the gap in the longest pane, where
   the auto margin comes to nothing. */
.pricing-tabs .process-tab-pane {
    display: flex;
    flex-direction: column;
}

.pricing-cta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-top: auto;
    padding-top: var(--space-7);
}

/* ============================================================
   HOW IT WORKS — the three promises, under the subtitle
   ============================================================ */

.pricing-promises {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-7);
    max-width: var(--container-narrow);
    margin: var(--space-8) auto var(--space-10);
    text-align: center;
}

.pricing-promises > li {
    font-size: var(--fs-body);
    line-height: var(--lh-snug);
    color: var(--text-soft);
}

/* the brand dot leads each promise, on its first line */
.pricing-promises > li::before {
    content: "";
    display: inline-block;
    width: 0.45em;
    height: 0.45em;
    margin-right: 0.5em;
    vertical-align: 0.12em;
    border-radius: var(--radius-pill);
    background: var(--accent);
}

/* ============================================================
   THE OPEN CARD'S COLUMN — the card, then the budget note (#352)
   ============================================================ */

.pricing-tabs__main {
    flex: 1 1 78%;
    min-width: 0;
}

.pricing-tabs__main > .process-tabs-content.production {
    width: 100%;
}

/* ============================================================
   WHAT'S INCLUDED — inside each tab's card
   ============================================================ */

.pricing-included {
    max-width: 680px;
    margin-top: var(--space-7);
}

/* Outweighs .process-tab-pane p, which would set the kicker at body size. */
.pricing-included > .dd-kicker {
    margin-bottom: 0;
    font-size: var(--fs-label);
}

/* Outweighs .process-tab-pane ul / li: no indent, the dot list's own marker. */
.pricing-included .pricing-included__list {
    margin: var(--space-3) 0 0;
}

.pricing-included .pricing-included__list > li {
    font-size: var(--fs-body);
    line-height: var(--lh-snug);
    margin-bottom: var(--space-2);
}

/* The extras (#277) wear the included list's frame; the line under them says
   when they are picked. A running offer strikes the list price rather than
   hiding it. Outweighs .process-tab-pane p on size, like the kicker above. */
.pricing-extras .pricing-extras__note {
    margin: var(--space-3) 0 0;
    color: var(--text-muted);
    font-size: var(--fs-small);
    line-height: var(--lh-body);
}

.pricing-extras s {
    color: var(--text-muted);
}

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

/* The sidebar "production" tab variant (22% nav / 78% content) is cramped
   below desktop — collapse it to stacked top-tabs (mirrors service.css). */
@media (max-width: 1024px) {
    .process-tabs.production {
        flex-direction: column;
        gap: var(--space-6);
    }

    .process-tabs-nav.production {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .process-tabs-nav.production .process-tab {
        flex: 1 1 40%;
    }

    .process-tabs-content.production,
    .pricing-tabs__main {
        width: 100%;
    }

    /* stacked, the column is a row of the page, not a share of its width */
    .pricing-tabs__main {
        flex: none;
    }
}

@media (max-width: 768px) {
    .pricing-promises {
        grid-template-columns: 1fr;
        gap: var(--space-3);
        margin: var(--space-6) auto var(--space-8);
    }
}

@media (max-width: 640px) {
    /* Stack the ticket: body on top, stub below, perforation turns horizontal. */
    .pricing-ticket {
        flex-direction: column;
    }

    .pricing-ticket__stub::before {
        left: clamp(var(--space-6), 4vw, var(--space-8));
        right: clamp(var(--space-6), 4vw, var(--space-8));
        top: 0;
        bottom: auto;
        border-left: none;
        border-top: 2px dashed var(--coral-200);
    }

    /* full-width tap targets for the CTAs */
    .pricing-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .pricing-cta .dd-btn {
        width: 100%;
    }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .pricing-stepper__btn {
        transition: background var(--dur-base) var(--ease-soft),
                    color var(--dur-base) var(--ease-soft);
    }

    .pricing-stepper__btn:hover {
        transform: none;
    }
}
