/**
 * Dedicated pricing page (/pricing/).
 *
 * The plan cards themselves come from css/pricing.css, which is shared with
 * the Pricing section on the home page. This file is only the page around
 * them: hero, comparison table, FAQ, and the closing panel.
 *
 * Same rule as the cards: flat surfaces, hairline rules, no gradient fills.
 */

body.pricing-page {
    /* Must equal the page background that js/theme-boot-inline.js paints with
       !important, because the sticky table header is filled with it. Values
       come straight from that script's PAINT table. */
    --pp-bg: #0a0a1a;
    --pp-surface: #0d0e1f;
    --pp-ink: #eef1fb;
    --pp-muted: #99a1c4;
    --pp-faint: #6c749a;
    --pp-line: rgba(150, 170, 255, 0.16);
    --pp-line-strong: rgba(150, 170, 255, 0.28);
    --pp-row-hover: rgba(150, 170, 255, 0.05);
    --pp-grid: rgba(140, 150, 230, 0.07);
    --pp-accent: #7dd3fc;

    background: var(--pp-bg);
    color: var(--pp-ink);
    font-family: var(--font-body, 'Inter', system-ui, sans-serif);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

html[data-theme="light"] body.pricing-page {
    --pp-bg: #f0f0f5;
    --pp-surface: #ffffff;
    --pp-ink: #151932;
    --pp-muted: #5b6285;
    --pp-faint: #8189a8;
    --pp-line: rgba(40, 50, 120, 0.12);
    --pp-line-strong: rgba(40, 50, 120, 0.2);
    --pp-row-hover: rgba(40, 50, 120, 0.04);
    --pp-grid: rgba(60, 70, 160, 0.08);
    --pp-accent: #2563eb;
}


/* midnight and quantum define no section tokens anywhere on the site, so they
   inherit the dark set above. Only the painted page background differs, and the
   sticky header has to track it. */
html[data-theme="midnight"] body.pricing-page {
    --pp-bg: #0f172a;
}

html[data-theme="quantum"] body.pricing-page {
    --pp-bg: #1a0a25;
}

/* Note: the boot script wins over this with !important whenever JavaScript is
   on. It stands in for the no-script case. */
.pp-main {
    flex: 1 0 auto;
}

.pp-wrap {
    width: min(1180px, 100% - 48px);
    margin: 0 auto;
}

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

.pp-hero {
    position: relative;
    padding: 132px 0 40px;
    text-align: center;
    overflow: hidden;
}

/* The same faint drafting grid the home page sections use. */
.pp-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(var(--pp-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--pp-grid) 1px, transparent 1px);
    background-size: 54px 54px;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
}

.pp-hero .pp-wrap {
    position: relative;
}

.pp-eyebrow {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--pp-faint);
    margin-bottom: 14px;
}

.pp-title {
    font-family: var(--font-display, 'Khand', sans-serif);
    font-size: 3.4rem;
    font-weight: 600;
    line-height: 1.02;
    color: var(--pp-ink);
    margin: 0 0 14px;
}

.pp-lede {
    font-size: 1.02rem;
    line-height: 1.6;
    color: var(--pp-muted);
    max-width: 58ch;
    margin: 0 auto;
}

/* ── Section scaffolding ─────────────────────────────────────────────── */

.pp-section {
    padding: 52px 0;
    border-top: 1px solid var(--pp-line);
}

.pp-section:first-of-type {
    border-top: 0;
    padding-top: 8px;
}

.pp-section-head {
    margin-bottom: 30px;
}

.pp-h2 {
    font-family: var(--font-display, 'Khand', sans-serif);
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.1;
    color: var(--pp-ink);
    margin: 0 0 8px;
}

.pp-sub {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--pp-muted);
    max-width: 62ch;
    margin: 0;
}

/* ── Comparison table ────────────────────────────────────────────────── */

/* No overflow here on desktop. An overflow container becomes the scroll
   ancestor for position:sticky, which silently stops the sticky header below
   from working. Sideways scrolling is switched on only at the width where the
   table actually needs it, in the 991px block at the end of this file. */
.pp-table-scroll {
    -webkit-overflow-scrolling: touch;
}

.pp-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    font-size: 0.91rem;
}

.pp-table th,
.pp-table td {
    padding: 13px 16px;
    text-align: left;
    border-bottom: 1px solid var(--pp-line);
    vertical-align: middle;
}

/* Sticky so the plan names stay readable down a long table. The offset clears
   the fixed navbar, whose bottom edge sits at 76px in both its states. */
.pp-table thead th {
    position: sticky;
    top: 76px;
    z-index: 1;
    background: var(--pp-bg);
    border-bottom: 1px solid var(--pp-line-strong);
    font-family: var(--font-display, 'Khand', sans-serif);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--pp-ink);
    white-space: nowrap;
}

.pp-table thead th:first-child {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--pp-faint);
}

.pp-table th[scope="row"] {
    font-weight: 400;
    color: var(--pp-ink);
    width: 40%;
}

/* Plan columns share the remaining width evenly. */
.pp-table thead th:not(:first-child),
.pp-table tbody td {
    width: 20%;
    text-align: center;
}

.pp-table tbody tr:hover {
    background: var(--pp-row-hover);
}

/* Group heading rows break the list into readable runs. */
.pp-group th {
    padding-top: 26px;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--pp-faint);
    border-bottom: 1px solid var(--pp-line-strong);
}

.pp-group:hover {
    background: transparent;
}

.pp-yes,
.pp-no {
    display: inline-block;
    vertical-align: middle;
}

.pp-yes {
    width: 14px;
    height: 14px;
    background: var(--pp-accent);
    -webkit-mask: var(--pr-check) center / 14px 14px no-repeat;
    mask: var(--pr-check) center / 14px 14px no-repeat;
}

/* An en rule, drawn rather than typed, so it cannot pick up a font's quirks. */
.pp-no {
    width: 12px;
    height: 1px;
    background: var(--pp-faint);
    opacity: 0.7;
}

.pp-value {
    font-size: 0.86rem;
    color: var(--pp-muted);
}

/* ── FAQ ─────────────────────────────────────────────────────────────── */

.pp-faq {
    max-width: 860px;
}

/* <details> gives open and close behaviour, keyboard support, and find-in-page
   without a line of JavaScript. */
.pp-q {
    border-bottom: 1px solid var(--pp-line);
}

.pp-q summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 0;
    cursor: pointer;
    list-style: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--pp-ink);
    transition: color var(--transition-fast, 0.15s ease);
}

/* Chrome and Safari draw their own marker on top of the flex layout. */
.pp-q summary::-webkit-details-marker {
    display: none;
}

.pp-q summary:hover {
    color: var(--pp-accent);
}

.pp-q summary:focus-visible {
    outline: 2px solid var(--pp-accent);
    outline-offset: 3px;
}

/* Plus turning into a minus: two bars, one of which collapses when open. */
.pp-sign {
    position: relative;
    flex: 0 0 auto;
    width: 14px;
    height: 1.5rem;
}

.pp-sign::before,
.pp-sign::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 14px;
    height: 1.5px;
    background: var(--pp-muted);
    transition: transform 0.18s ease;
}

.pp-sign::before {
    transform: translateY(-50%);
}

.pp-sign::after {
    transform: translateY(-50%) rotate(90deg);
}

.pp-q[open] .pp-sign::after {
    transform: translateY(-50%) rotate(0deg);
}

.pp-q[open] summary {
    color: var(--pp-ink);
}

.pp-a {
    padding: 0 40px 20px 0;
    margin: 0;
    font-size: 0.93rem;
    line-height: 1.65;
    color: var(--pp-muted);
}

.pp-a + .pp-a {
    padding-top: 12px;
}

.pp-a a {
    color: var(--pp-accent);
}

/* ── Closing panel ───────────────────────────────────────────────────── */

.pp-cta {
    --pcut: 20px;
    padding: 1px;
    background: var(--pp-line-strong);
    clip-path: polygon(var(--pcut) 0, 100% 0, 100% calc(100% - var(--pcut)), calc(100% - var(--pcut)) 100%, 0 100%, 0 var(--pcut));
    margin-bottom: 56px;
}

.pp-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 26px 30px;
    background: var(--pp-surface);
    clip-path: polygon(var(--pcut) 0, 100% 0, 100% calc(100% - var(--pcut)), calc(100% - var(--pcut)) 100%, 0 100%, 0 var(--pcut));
}

.pp-cta-title {
    font-family: var(--font-display, 'Khand', sans-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--pp-ink);
    margin: 0 0 4px;
}

.pp-cta-text {
    font-size: 0.93rem;
    line-height: 1.55;
    color: var(--pp-muted);
    margin: 0;
}

.pp-cta-actions {
    flex: 0 0 auto;
    display: flex;
    gap: 10px;
}

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

.pricing-page .site-footer-pricing {
    padding: 24px 0;
    text-align: center;
    background: transparent;
    border-top: 1px solid var(--pp-line);
}

.pricing-page .site-footer-pricing p {
    margin: 0;
    font-size: 0.85em;
    color: var(--pp-faint);
}

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

@media (max-width: 991.98px) {

    /* Below this width the table is wider than the viewport, so it scrolls
       sideways. That makes this element the scroll ancestor, which disables the
       sticky header, so the header is released back to static here. */
    .pp-table-scroll {
        overflow-x: auto;
    }

    .pp-table thead th {
        position: static;
    }

    .pp-hero {
        padding: 112px 0 32px;
    }

    .pp-title {
        font-size: 2.8rem;
    }

    .pp-section {
        padding: 42px 0;
    }
}

@media (max-width: 767.98px) {
    .pp-wrap {
        width: calc(100% - 32px);
    }

    .pp-title {
        font-size: 2.3rem;
    }

    .pp-h2 {
        font-size: 1.7rem;
    }

    .pp-cta-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }

    .pp-cta-actions {
        width: 100%;
    }

    .pp-cta-actions .pr-btn {
        flex: 1 1 0;
    }

    .pp-a {
        padding-right: 0;
    }
}

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

    .pp-sign::before,
    .pp-sign::after {
        transition: none;
    }
}
