/* ============================================================
   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__head--select {
    gap: var(--space-4);
}

/* the in-ticket service picker drops the field's default bottom margin */
.pricing-ticket__service {
    margin-bottom: 0;
    max-width: 22rem;
}

.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 ------------------------------------------------------ */
.pricing-cta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-top: var(--space-7);
}

/* ============================================================
   TRANSPARENCY NOTE
   ============================================================ */

.pricing-note {
    max-width: var(--container-narrow);
    margin-top: var(--space-11);
}

.pricing-note__list {
    margin-top: var(--space-4);
    max-width: 62ch;
}

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

/* ============================================================
   PER-SERVICE INCLUSIONS — what each price covers
   ============================================================ */

.pricing-includes {
    margin-top: var(--space-11);
}

.pricing-includes__grid {
    margin-top: var(--space-6);
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
}

.pricing-includes__title {
    font-size: var(--fs-lead);
    font-weight: 600;
    color: var(--text);
}

.pricing-includes__basis {
    margin-top: var(--space-1);
    font-size: var(--fs-small);
    color: var(--text-muted);
}

.pricing-includes__service > .dd-dot-list {
    margin-top: var(--space-4);
}

.pricing-includes__service .dd-dot-list > li {
    font-size: var(--fs-body);
    line-height: var(--lh-body);
    color: var(--text-muted);
}

@media (min-width: 600px) {
    .pricing-includes__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-7) var(--space-8);
    }
}

@media (min-width: 1024px) {
    .pricing-includes__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================================
   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 {
        width: 100%;
    }
}

@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;
    }
}
