@charset "utf-8";

/*
    Billing and payments - /features/billing.

    ? Four facts: invoices go out by email and text, cards get paid online or on a Moneris terminal,
    ? a saved card or a Stripe request covers the rest, and outstanding balances are tracked. The
    ? hero dramatizes the moment a payment lands and the balance goes to zero; the facts section
    ? below restates the four, not new ones.

    ? Same ground as the rest of the site (concrete, the brand's steel, red used the way a shop uses
    ? paint). Scoped under .billing-page so the shared components keep their look elsewhere.
*/

.billing-page {
    --bil-concrete: #e8ebee;
    --bil-paper: #f4f6f7;
    --bil-line: #cdd4da;
    --bil-ink: #151b21;
    --bil-steel: #1f272f;
    --bil-text: #36424d;
    --bil-muted: #55616c;
    --bil-red: #fb172b;
    --bil-red-dark: #d9101f;
    --bil-green: #1f9d55;

    font-family: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-stretch: 100%;
    color: var(--bil-text);
}

.billing-page .bil-hero-title,
.billing-page .bil-section-title,
.billing-page .fact-name {
    font-stretch: 76%;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
}

.billing-page a:focus-visible {
    outline: 3px solid var(--bil-ink);
    outline-offset: 3px;
}

/*-------------------------------------------------------------------------------------------------
    Hero - dark, so the invoice is the lightest thing on the first screen
-------------------------------------------------------------------------------------------------*/

.billing-page .bil-hero {
    position: relative;
    background-color: var(--bil-ink);
    color: #c3ccd5;
    padding: clamp(48px, 7vw, 88px) 0 clamp(56px, 7vw, 88px);
}

.billing-page .bil-hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background-image: repeating-linear-gradient(90deg, var(--bil-red) 0 28px, transparent 28px 48px);
}

.billing-page .bil-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(32px, 5vw, 72px);
    align-items: center;
}

.billing-page .bil-hero-eyebrow {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bil-red);
    margin: 0 0 14px;
}

.billing-page .bil-hero-title {
    margin: 0 0 24px;
    font-size: clamp(38px, 4.6vw, 62px);
    line-height: 1;
    color: #ffffff;
    max-width: 16ch;
    text-wrap: balance;
}

.billing-page .bil-hero-lede {
    margin: 0 0 32px;
    font-size: 18px;
    line-height: 1.6;
    color: #c3ccd5;
    max-width: 54ch;
}

.billing-page .bil-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.billing-page .btn-bil-ghost,
.billing-page .btn-bil-ghost:focus {
    background-color: transparent;
    border-color: rgba(255, 255, 255, 0.6);
    color: #ffffff;
}

.billing-page .btn-bil-ghost:hover {
    background-color: #ffffff;
    border-color: #ffffff;
    color: var(--bil-ink);
}

/*  The invoice ------------------------------------------------------------------------------------ */

.billing-page .invoice-card {
    margin: 0 0 0 auto;
    width: 100%;
    max-width: 440px;
    background-color: var(--bil-paper);
    border-radius: 14px;
    padding: 18px 20px 20px;
    box-shadow: 0 40px 60px -36px rgba(0, 0, 0, 0.7);
}

.billing-page .invoice-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--bil-line);
    font-size: 15px;
    font-weight: 700;
    color: var(--bil-ink);
}

.billing-page .invoice-card-live {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--bil-muted);
}

.billing-page .invoice-card-live::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--bil-green);
}

.billing-page .invoice-lines {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/*  ? The one thing on the page that moves by itself: the balance clears in order, once. */
.billing-page .invoice-line {
    margin: 0;
    animation: invoice-in 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    animation-delay: calc(0.5s + var(--i, 0) * 0.85s);
}

.billing-page .invoice-line-sent {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    background-color: #ffffff;
    border: 1px solid var(--bil-line);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--bil-ink);
}

.billing-page .invoice-line-sent i {
    color: var(--bil-red);
    font-size: 13px;
    margin-right: 6px;
}

.billing-page .invoice-amount {
    font-variant-numeric: tabular-nums;
    color: var(--bil-muted);
    font-weight: 600;
}

.billing-page .invoice-line-method {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background-color: #ffffff;
    border: 1px solid var(--bil-line);
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    color: var(--bil-ink);
}

.billing-page .invoice-line-method i {
    color: var(--bil-red);
    font-size: 13px;
}

.billing-page .invoice-line-note {
    display: flex;
    justify-content: center;
}

.billing-page .invoice-line-note span {
    padding: 5px 14px;
    background-color: #ffffff;
    border: 1.5px dashed var(--bil-red);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 700;
    color: var(--bil-red-dark);
}

.billing-page .invoice-line-balance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    background-color: var(--bil-steel);
    border-radius: 10px;
}

.billing-page .invoice-balance-value {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
}

.billing-page .invoice-balance-tag {
    flex: none;
    padding: 3px 10px;
    background-color: var(--bil-green);
    color: #ffffff;
    border-radius: 100px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.billing-page .invoice-card-caption {
    margin: 16px 0 0;
    font-size: 13px;
    color: var(--bil-muted);
}

@keyframes invoice-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {

    .billing-page .invoice-line {
        animation: none;
    }
}

/*-------------------------------------------------------------------------------------------------
    Shared section heading
-------------------------------------------------------------------------------------------------*/

.billing-page .bil-section-title {
    margin: 0 0 18px;
    font-size: clamp(34px, 4.2vw, 50px);
    color: var(--bil-ink);
    text-wrap: balance;
}

.billing-page .bil-section-lede {
    margin: 0;
    font-size: 18px;
    line-height: 1.55;
    color: var(--bil-muted);
    max-width: 46ch;
}

/*-------------------------------------------------------------------------------------------------
    How the money moves - the four facts
-------------------------------------------------------------------------------------------------*/

.billing-page .bil-facts {
    background-color: var(--bil-concrete);
    padding: clamp(56px, 8vw, 104px) 0;
}

.billing-page .bil-facts-inner {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: clamp(28px, 5vw, 80px);
    align-items: start;
}

.billing-page .bil-facts-head {
    position: sticky;
    top: 110px;
}

.billing-page .fact-rows {
    list-style: none;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid var(--bil-line);
}

.billing-page .fact-rows li {
    margin: 0;
    padding: 28px 0;
    border-top: 1px solid var(--bil-line);
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.billing-page .fact-number {
    font-size: 20px;
    font-weight: 800;
    color: var(--bil-red);
    line-height: 1.4;
}

.billing-page .fact-name {
    margin: 0 0 10px;
    font-size: clamp(22px, 2.3vw, 28px);
    color: var(--bil-ink);
}

.billing-page .fact-text {
    margin: 0;
    font-size: 16.5px;
    line-height: 1.6;
    color: var(--bil-text);
    max-width: 60ch;
}

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

@media (max-width: 991px) {

    .billing-page .bil-hero-inner,
    .billing-page .bil-facts-inner {
        grid-template-columns: minmax(0, 1fr);
    }

    .billing-page .bil-hero-title {
        max-width: 20ch;
    }

    .billing-page .invoice-card {
        margin-left: 0;
    }

    .billing-page .bil-facts-head {
        position: static;
    }

    .billing-page .bil-facts-inner {
        gap: 28px;
    }
}

@media (max-width: 767px) {

    .billing-page .bil-hero-actions .btn {
        width: 100%;
    }

    .billing-page .fact-rows li {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .billing-page .fact-number {
        display: none;
    }
}
