/*
 * Marketing site stylesheet for the Bulk Price Editor home + supporting pages.
 *
 * Editorial SaaS aesthetic: Inter (body) + Instrument Serif (display headlines),
 * white/off-white dominant, hairline borders, asymmetric layouts, accent gradients only.
 *
 * Depends on design-tokens.css for CSS custom properties.
 */

/* ---------- Reset + base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body.bpe-marketing {
    margin: 0;
    padding: 0;
    font-family: var(--bpe-font-sans);
    font-size: var(--bpe-text-base);
    line-height: var(--bpe-leading-normal);
    color: var(--bpe-color-text);
    background-color: var(--bpe-color-bg);
    font-feature-settings: "ss01", "cv11";
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

/* ---------- Typography ---------- */

.bpe-display {
    font-family: 'Instrument Serif', Georgia, 'Times New Roman', serif;
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.05;
    text-wrap: balance;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
}

.bpe-display-italic {
    font-family: 'Instrument Serif', Georgia, 'Times New Roman', serif;
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.bpe-eyebrow {
    font-family: var(--bpe-font-mono);
    font-size: var(--bpe-text-xs);
    font-weight: var(--bpe-weight-medium);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--bpe-color-text-muted);
}

.bpe-section-marker {
    display: inline-flex;
    align-items: baseline;
    gap: 0.5rem;
    font-family: var(--bpe-font-mono);
    font-size: var(--bpe-text-xs);
    font-weight: var(--bpe-weight-medium);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--bpe-color-primary);
    margin-bottom: var(--bpe-space-6);
}

.bpe-section-marker::before {
    content: "";
    display: inline-block;
    width: 32px;
    height: 1px;
    background: var(--bpe-color-primary);
    transform: translateY(-4px);
}

.bpe-gradient-text {
    background: var(--bpe-gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.bpe-h1 { font-size: clamp(2rem, 4.5vw + 1rem, 4.5rem); }
.bpe-h2 { font-size: clamp(1.75rem, 3vw + 1rem, 3.25rem); }
.bpe-h3 { font-size: clamp(1.5rem, 1.5vw + 1rem, 2rem); }
.bpe-h4 { font-size: var(--bpe-text-xl); font-weight: var(--bpe-weight-semibold); line-height: var(--bpe-leading-snug); }

.bpe-lede {
    font-size: var(--bpe-text-lg);
    line-height: var(--bpe-leading-relaxed);
    color: var(--bpe-color-text-muted);
    max-width: 56ch;
}

.bpe-text-muted { color: var(--bpe-color-text-muted); }
.bpe-text-subtle { color: var(--bpe-color-text-subtle); }
.bpe-tabular { font-variant-numeric: tabular-nums; }

/* ---------- Layout primitives ---------- */

.bpe-container {
    width: 100%;
    max-width: var(--bpe-container-max);
    margin-inline: auto;
    padding-inline: var(--bpe-space-6);
}
.bpe-container-wide { max-width: var(--bpe-container-wide); }

.bpe-section {
    padding-block: clamp(4rem, 8vw, 7rem);
    position: relative;
}
.bpe-section-tight { padding-block: clamp(3rem, 5vw, 4.5rem); }
.bpe-section-soft  { background-color: var(--bpe-color-bg-soft); }
.bpe-section-dark  { background: var(--bpe-color-gray-900); color: var(--bpe-color-gray-100); }

.bpe-divider-hairline {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--bpe-color-border) 20%, var(--bpe-color-border) 80%, transparent);
    border: 0;
    margin: 0;
}

.bpe-grid { display: grid; gap: var(--bpe-space-6); }
.bpe-grid-2 { grid-template-columns: 1fr; }
.bpe-grid-3 { grid-template-columns: 1fr; }
.bpe-grid-4 { grid-template-columns: 1fr; }

@media (min-width: 640px) {
    .bpe-grid-2 { grid-template-columns: repeat(2, 1fr); }
    .bpe-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .bpe-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
    .bpe-grid-3 { grid-template-columns: repeat(3, 1fr); }
    .bpe-grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.bpe-stack > * + * { margin-top: var(--bpe-space-4); }
.bpe-stack-lg > * + * { margin-top: var(--bpe-space-6); }
.bpe-stack-xl > * + * { margin-top: var(--bpe-space-8); }

/* ---------- Buttons ---------- */

.bpe-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-family: var(--bpe-font-sans);
    font-size: var(--bpe-text-base);
    font-weight: var(--bpe-weight-semibold);
    line-height: 1;
    border-radius: var(--bpe-radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease, color 200ms ease, border-color 200ms ease;
    text-decoration: none;
    white-space: nowrap;
}
.bpe-btn:hover { transform: translateY(-1px); }
.bpe-btn:active { transform: translateY(0); }

.bpe-btn-primary {
    background: var(--bpe-color-cta);
    color: var(--bpe-color-white);
    box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 8px 24px -8px rgb(16 185 129 / 0.45);
}
.bpe-btn-primary:hover {
    background: var(--bpe-color-cta-hover);
    box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 12px 32px -8px rgb(16 185 129 / 0.55);
}

.bpe-btn-secondary {
    background: var(--bpe-color-white);
    color: var(--bpe-color-text);
    border-color: var(--bpe-color-border);
}
.bpe-btn-secondary:hover {
    border-color: var(--bpe-color-gray-400);
    background: var(--bpe-color-gray-50);
}

.bpe-btn-ghost {
    background: transparent;
    color: var(--bpe-color-primary);
    padding-inline: 0;
}
.bpe-btn-ghost::after {
    content: "→";
    transition: transform 200ms ease;
    margin-left: 0.25rem;
}
.bpe-btn-ghost:hover::after { transform: translateX(4px); }

.bpe-btn-lg { padding: 1rem 1.75rem; font-size: var(--bpe-text-lg); }

/* ---------- Cards ---------- */

.bpe-card {
    background: var(--bpe-color-white);
    border: 1px solid var(--bpe-color-border);
    border-radius: var(--bpe-radius-xl);
    padding: var(--bpe-space-8);
    transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}
.bpe-card:hover {
    border-color: var(--bpe-color-indigo-200);
    transform: translateY(-2px);
    box-shadow: var(--bpe-shadow-lg);
}

.bpe-card-flat {
    background: var(--bpe-color-white);
    border: 1px solid var(--bpe-color-border);
    border-radius: var(--bpe-radius-lg);
    padding: var(--bpe-space-6);
}

.bpe-card-stat {
    background: var(--bpe-color-white);
    border: 1px solid var(--bpe-color-border);
    border-radius: var(--bpe-radius-lg);
    padding: var(--bpe-space-6) var(--bpe-space-8);
    text-align: center;
}

/* ---------- Badge / chip ---------- */

.bpe-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.7rem;
    font-family: var(--bpe-font-sans);
    font-size: var(--bpe-text-xs);
    font-weight: var(--bpe-weight-semibold);
    letter-spacing: 0.04em;
    border-radius: var(--bpe-radius-full);
    background: var(--bpe-color-indigo-50);
    color: var(--bpe-color-indigo-700);
    border: 1px solid var(--bpe-color-indigo-100);
}
.bpe-chip-emerald {
    background: rgb(16 185 129 / 0.08);
    color: var(--bpe-color-emerald-600);
    border-color: rgb(16 185 129 / 0.18);
}
.bpe-chip-amber {
    background: rgb(245 158 11 / 0.10);
    color: #b45309;
    border-color: rgb(245 158 11 / 0.20);
}

.bpe-chip-dot::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
}

/* ---------- Tables ---------- */

.bpe-table {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}
.bpe-table th,
.bpe-table td {
    text-align: left;
    padding: var(--bpe-space-4) var(--bpe-space-4);
    border-bottom: 1px solid var(--bpe-color-border);
}
.bpe-table th {
    font-size: var(--bpe-text-xs);
    font-weight: var(--bpe-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--bpe-color-text-muted);
}
.bpe-table tbody tr:hover { background: var(--bpe-color-gray-50); }

.bpe-table-feature td:first-child {
    font-weight: var(--bpe-weight-medium);
}
.bpe-cell-yes { color: var(--bpe-color-emerald-600); font-weight: var(--bpe-weight-semibold); }
.bpe-cell-no  { color: var(--bpe-color-gray-400); }

.bpe-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--bpe-color-border);
    border-radius: var(--bpe-radius-lg);
    background: var(--bpe-color-white);
}
.bpe-table-scroll table { margin: 0; min-width: 640px; }
.bpe-table-scroll th, .bpe-table-scroll td { border-bottom: 1px solid var(--bpe-color-border); padding-inline: var(--bpe-space-5); }
.bpe-table-scroll tr:last-child td { border-bottom: 0; }

/* ---------- Hero ---------- */

.bpe-hero {
    position: relative;
    overflow: hidden;
    padding-top: clamp(3rem, 6vw, 6rem);
    padding-bottom: clamp(3rem, 6vw, 6rem);
}
.bpe-hero::before {
    content: "";
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, rgba(168, 85, 247, 0.08) 35%, transparent 70%);
    filter: blur(40px);
    z-index: 0;
    pointer-events: none;
}
.bpe-hero > * { position: relative; z-index: 1; }

.bpe-hero-grid {
    display: grid;
    gap: clamp(2rem, 4vw, 4rem);
    grid-template-columns: 1fr;
    align-items: center;
}
@media (min-width: 960px) {
    .bpe-hero-grid {
        grid-template-columns: 1.05fr 0.95fr;
    }
}

.bpe-hero-screenshot {
    position: relative;
    border-radius: var(--bpe-radius-xl);
    overflow: hidden;
    box-shadow:
        0 32px 64px -16px rgb(31 41 55 / 0.25),
        0 16px 24px -8px rgb(31 41 55 / 0.10),
        0 0 0 1px var(--bpe-color-border);
    background: var(--bpe-color-white);
}
.bpe-hero-screenshot img { display: block; width: 100%; height: auto; }
@media (min-width: 960px) {
    .bpe-hero-screenshot { transform: perspective(1200px) rotateY(-3deg) rotateX(2deg); }
}

/* ---------- Trust strip ---------- */

.bpe-trust-strip {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    border-top: 1px solid var(--bpe-color-border);
    border-bottom: 1px solid var(--bpe-color-border);
    margin-top: clamp(3rem, 6vw, 5rem);
}
@media (min-width: 720px) {
    .bpe-trust-strip { grid-template-columns: repeat(4, 1fr); }
}
.bpe-trust-item {
    text-align: center;
    padding: var(--bpe-space-6) var(--bpe-space-4);
    border-right: 1px solid var(--bpe-color-border);
}
.bpe-trust-item:last-child { border-right: 0; }
@media (max-width: 719px) {
    .bpe-trust-item:nth-child(2n) { border-right: 0; }
    .bpe-trust-item:nth-child(-n+2) { border-bottom: 1px solid var(--bpe-color-border); }
}
.bpe-trust-num {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(2.25rem, 3.5vw, 3rem);
    font-weight: 400;
    line-height: 1;
    color: var(--bpe-color-text);
    font-variant-numeric: tabular-nums;
}
.bpe-trust-label {
    font-size: var(--bpe-text-sm);
    color: var(--bpe-color-text-muted);
    margin-top: var(--bpe-space-2);
    letter-spacing: 0.02em;
}

/* ---------- Pillar cards ---------- */

.bpe-pillar {
    position: relative;
    padding: var(--bpe-space-8);
    background: var(--bpe-color-white);
    border: 1px solid var(--bpe-color-border);
    border-radius: var(--bpe-radius-xl);
    height: 100%;
    transition: border-color 200ms ease, transform 200ms ease;
}
.bpe-pillar:hover {
    border-color: var(--bpe-color-indigo-300);
    transform: translateY(-3px);
}
.bpe-pillar-num {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-size: var(--bpe-text-3xl);
    color: var(--bpe-color-primary);
    line-height: 1;
    margin-bottom: var(--bpe-space-4);
}
.bpe-pillar-num::after {
    content: "/";
    font-style: normal;
    color: var(--bpe-color-gray-300);
    margin-left: 0.25rem;
}
.bpe-pillar h3 {
    font-family: var(--bpe-font-sans);
    font-size: var(--bpe-text-xl);
    font-weight: var(--bpe-weight-semibold);
    margin: 0 0 var(--bpe-space-3);
    color: var(--bpe-color-text);
}
.bpe-pillar p { color: var(--bpe-color-text-muted); margin: 0 0 var(--bpe-space-4); }
.bpe-pillar-list { list-style: none; padding: 0; margin: 0; }
.bpe-pillar-list li {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    padding: 0.4rem 0;
    font-size: var(--bpe-text-sm);
    color: var(--bpe-color-text);
    border-top: 1px dashed var(--bpe-color-gray-200);
}
.bpe-pillar-list li::before {
    content: "→";
    color: var(--bpe-color-primary);
    flex-shrink: 0;
    font-weight: var(--bpe-weight-bold);
}

/* ---------- Feature deep-dive ---------- */

.bpe-feature-block {
    display: grid;
    gap: clamp(1.5rem, 3vw, 3rem);
    grid-template-columns: 1fr;
    align-items: center;
    padding-block: clamp(2rem, 4vw, 4rem);
}
@media (min-width: 880px) {
    .bpe-feature-block { grid-template-columns: 1fr 1fr; }
    .bpe-feature-block.is-reversed > :first-child { order: 2; }
}
.bpe-feature-shot {
    border: 1px solid var(--bpe-color-border);
    border-radius: var(--bpe-radius-lg);
    overflow: hidden;
    box-shadow: var(--bpe-shadow-lg);
    background: var(--bpe-color-white);
}
.bpe-feature-shot img { display: block; width: 100%; }

.bpe-action-grid {
    display: grid;
    gap: var(--bpe-space-2);
    grid-template-columns: 1fr;
}
@media (min-width: 720px) {
    .bpe-action-grid { grid-template-columns: repeat(2, 1fr); }
}
.bpe-action-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--bpe-space-3);
    align-items: baseline;
    padding: var(--bpe-space-3) 0;
    border-bottom: 1px dashed var(--bpe-color-gray-200);
    font-size: var(--bpe-text-sm);
}
.bpe-action-row code {
    font-family: var(--bpe-font-mono);
    font-size: var(--bpe-text-xs);
    color: var(--bpe-color-primary);
    background: var(--bpe-color-indigo-50);
    padding: 0.15rem 0.45rem;
    border-radius: var(--bpe-radius-sm);
    white-space: nowrap;
}

/* ---------- Use cases ---------- */

.bpe-usecase {
    position: relative;
    padding: var(--bpe-space-6);
    background: var(--bpe-color-white);
    border: 1px solid var(--bpe-color-border);
    border-radius: var(--bpe-radius-lg);
    transition: all 200ms ease;
}
.bpe-usecase:hover {
    border-color: var(--bpe-color-indigo-200);
    background: linear-gradient(180deg, var(--bpe-color-white) 0%, var(--bpe-color-indigo-50) 200%);
}
.bpe-usecase-tag {
    display: inline-block;
    font-family: var(--bpe-font-mono);
    font-size: var(--bpe-text-xs);
    letter-spacing: 0.1em;
    color: var(--bpe-color-purple-600);
    text-transform: uppercase;
    margin-bottom: var(--bpe-space-3);
}
.bpe-usecase h4 {
    font-size: var(--bpe-text-lg);
    font-weight: var(--bpe-weight-semibold);
    margin: 0 0 var(--bpe-space-2);
}
.bpe-usecase p {
    color: var(--bpe-color-text-muted);
    font-size: var(--bpe-text-sm);
    margin: 0;
}

/* ---------- FAQ ---------- */

.bpe-faq-item {
    border-bottom: 1px solid var(--bpe-color-border);
}
.bpe-faq-item summary {
    cursor: pointer;
    list-style: none;
    padding: var(--bpe-space-5) 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--bpe-space-4);
    font-size: var(--bpe-text-lg);
    font-weight: var(--bpe-weight-medium);
    color: var(--bpe-color-text);
}
.bpe-faq-item summary::-webkit-details-marker { display: none; }
.bpe-faq-item summary::after {
    content: "+";
    font-family: 'Instrument Serif', serif;
    font-size: var(--bpe-text-2xl);
    color: var(--bpe-color-primary);
    line-height: 1;
    transition: transform 200ms ease;
}
.bpe-faq-item[open] summary::after { transform: rotate(45deg); }
.bpe-faq-item .bpe-faq-answer {
    color: var(--bpe-color-text-muted);
    padding: 0 0 var(--bpe-space-5);
    max-width: 70ch;
    line-height: var(--bpe-leading-relaxed);
}

/* ---------- Pricing teaser ---------- */

.bpe-pricing-teaser {
    background: var(--bpe-color-white);
    border: 1px solid var(--bpe-color-border);
    border-radius: var(--bpe-radius-2xl);
    padding: clamp(2rem, 4vw, 3.5rem);
    position: relative;
    overflow: hidden;
}
.bpe-pricing-teaser::before {
    content: "";
    position: absolute;
    bottom: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}
.bpe-pricing-teaser > * { position: relative; z-index: 1; }
.bpe-tier-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--bpe-space-4);
    margin-top: var(--bpe-space-6);
}
.bpe-tier {
    flex: 1 1 140px;
    padding: var(--bpe-space-4);
    border: 1px solid var(--bpe-color-border);
    border-radius: var(--bpe-radius-md);
    background: var(--bpe-color-white);
}
.bpe-tier-name { font-size: var(--bpe-text-sm); color: var(--bpe-color-text-muted); }
.bpe-tier-cap  { font-size: var(--bpe-text-xs); color: var(--bpe-color-text-subtle); margin-top: 0.1rem; }
.bpe-tier-price {
    font-family: 'Instrument Serif', serif;
    font-size: var(--bpe-text-2xl);
    color: var(--bpe-color-emerald-600);
    margin-top: var(--bpe-space-2);
}
.bpe-tier-price span { font-family: var(--bpe-font-sans); font-size: var(--bpe-text-sm); color: var(--bpe-color-text-muted); }

/* ---------- Navbar ---------- */

.bpe-nav {
    position: sticky;
    top: 0;
    z-index: var(--bpe-z-overlay);
    background: rgba(255, 255, 255, 0.86);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--bpe-color-border);
}
.bpe-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--bpe-space-4);
    padding-block: var(--bpe-space-4);
}
.bpe-nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: var(--bpe-weight-semibold);
    color: var(--bpe-color-text);
    font-size: var(--bpe-text-base);
}
.bpe-nav-brand img { width: 28px; height: 28px; flex-shrink: 0; }
.bpe-nav-brand strong { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: var(--bpe-text-lg); letter-spacing: -0.01em; display: none; }
@media (min-width: 480px) { .bpe-nav-brand strong { display: inline; } }
.bpe-nav-links {
    display: none;
    gap: var(--bpe-space-6);
    align-items: center;
}
.bpe-nav-links a {
    color: var(--bpe-color-text-muted);
    font-size: var(--bpe-text-sm);
    font-weight: var(--bpe-weight-medium);
    transition: color 200ms ease;
}
.bpe-nav-links a:hover { color: var(--bpe-color-text); }
@media (min-width: 900px) {
    .bpe-nav-links { display: inline-flex; }
}
.bpe-nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.7rem 1.1rem;
    min-height: 44px;
    background: var(--bpe-color-cta);
    color: var(--bpe-color-white);
    border-radius: var(--bpe-radius-md);
    font-size: var(--bpe-text-sm);
    font-weight: var(--bpe-weight-semibold);
    box-shadow: 0 8px 20px -8px rgb(16 185 129 / 0.5);
    transition: background 200ms ease, transform 200ms ease;
}
.bpe-nav-cta:hover { background: var(--bpe-color-cta-hover); transform: translateY(-1px); }
.bpe-nav-cta-full { display: none; }
.bpe-nav-cta-short { display: inline; }
@media (min-width: 520px) {
    .bpe-nav-cta-full { display: inline; }
    .bpe-nav-cta-short { display: none; }
}

.bpe-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid var(--bpe-color-border);
    border-radius: var(--bpe-radius-md);
    color: var(--bpe-color-text);
    cursor: pointer;
}
@media (min-width: 900px) { .bpe-nav-toggle { display: none; } }

.bpe-nav-mobile {
    display: none;
    border-top: 1px solid var(--bpe-color-border);
    background: var(--bpe-color-white);
    padding-block: var(--bpe-space-3);
}
.bpe-nav-mobile.is-open { display: block; }
.bpe-nav-mobile ul { list-style: none; padding: 0; margin: 0; }
.bpe-nav-mobile li a {
    display: block;
    padding: var(--bpe-space-3) var(--bpe-space-6);
    min-height: 44px;
    font-size: var(--bpe-text-base);
    font-weight: var(--bpe-weight-medium);
    color: var(--bpe-color-text);
    border-bottom: 1px solid var(--bpe-color-gray-100);
}
.bpe-nav-mobile li:last-child a { border-bottom: 0; }
@media (min-width: 900px) { .bpe-nav-mobile { display: none !important; } }

/* ---------- Footer ---------- */

.bpe-footer {
    background: var(--bpe-color-gray-900);
    color: var(--bpe-color-gray-400);
    padding-block: clamp(3rem, 5vw, 5rem) var(--bpe-space-8);
    font-size: var(--bpe-text-sm);
}
.bpe-footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--bpe-space-10);
}
@media (min-width: 720px) {
    .bpe-footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
.bpe-footer h5 {
    color: var(--bpe-color-gray-100);
    font-size: var(--bpe-text-xs);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: var(--bpe-weight-semibold);
    margin: 0 0 var(--bpe-space-4);
    font-family: var(--bpe-font-mono);
}
.bpe-footer ul { list-style: none; padding: 0; margin: 0; }
.bpe-footer li { padding: 0.3rem 0; }
.bpe-footer a { color: var(--bpe-color-gray-400); transition: color 200ms ease; }
.bpe-footer a:hover { color: var(--bpe-color-white); }
.bpe-footer-brand {
    font-family: 'Instrument Serif', serif;
    color: var(--bpe-color-white);
    font-size: var(--bpe-text-2xl);
    margin: 0 0 var(--bpe-space-3);
}
.bpe-footer-bottom {
    margin-top: var(--bpe-space-12);
    padding-top: var(--bpe-space-6);
    border-top: 1px solid var(--bpe-color-gray-800);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--bpe-space-3);
    color: var(--bpe-color-gray-500);
    font-size: var(--bpe-text-xs);
}

/* ---------- Subtle reveal animation ----------
   Content stays visible by default (good for SEO + JS-disabled).
   The reveal is opt-in: pages can add .bpe-reveal-enabled on <body> via JS
   if they want the entrance effect. Without that class the elements just appear. */

@keyframes bpe-fade-up {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.bpe-reveal { opacity: 1; transform: none; }

.bpe-reveal-enabled .bpe-reveal {
    opacity: 0;
    animation: bpe-fade-up 600ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.bpe-reveal-enabled .bpe-reveal-1 { animation-delay: 60ms; }
.bpe-reveal-enabled .bpe-reveal-2 { animation-delay: 140ms; }
.bpe-reveal-enabled .bpe-reveal-3 { animation-delay: 220ms; }
.bpe-reveal-enabled .bpe-reveal-4 { animation-delay: 300ms; }
.bpe-reveal-enabled .bpe-reveal-5 { animation-delay: 380ms; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
    .bpe-reveal { opacity: 1; transform: none; }
}

/* ---------- Decorative accents ---------- */

.bpe-accent-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bpe-gradient-primary);
    display: inline-block;
}

.bpe-glow {
    position: relative;
}
.bpe-glow::before {
    content: "";
    position: absolute;
    inset: -2px;
    background: var(--bpe-gradient-primary);
    border-radius: inherit;
    z-index: -1;
    opacity: 0.4;
    filter: blur(20px);
}

/* ---------- Blog ---------- */

.bpe-blog-hero {
    padding-block: clamp(3rem, 6vw, 5rem) clamp(2rem, 4vw, 3rem);
    border-bottom: 1px solid var(--bpe-color-border);
}

.bpe-post-card {
    background: var(--bpe-color-white);
    border: 1px solid var(--bpe-color-border);
    border-radius: var(--bpe-radius-xl);
    padding: var(--bpe-space-6);
    transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.bpe-post-card:hover {
    border-color: var(--bpe-color-indigo-200);
    transform: translateY(-3px);
    box-shadow: var(--bpe-shadow-lg);
}
.bpe-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--bpe-space-3);
    font-family: var(--bpe-font-mono);
    font-size: var(--bpe-text-xs);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bpe-color-text-subtle);
    margin-bottom: var(--bpe-space-4);
}
.bpe-post-meta span { display: inline-flex; align-items: center; gap: 0.4rem; }
.bpe-post-meta .bpe-post-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--bpe-color-gray-400); display: inline-block; }
.bpe-post-card h3 {
    font-family: 'Instrument Serif', serif;
    font-size: var(--bpe-text-2xl);
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin: 0 0 var(--bpe-space-3);
    color: var(--bpe-color-text);
}
.bpe-post-card p {
    color: var(--bpe-color-text-muted);
    font-size: var(--bpe-text-base);
    line-height: 1.55;
    margin: 0 0 var(--bpe-space-4);
    flex: 1;
}
.bpe-post-card a.bpe-post-link {
    align-self: flex-start;
    color: var(--bpe-color-primary);
    font-weight: var(--bpe-weight-semibold);
    font-size: var(--bpe-text-sm);
}
.bpe-post-card a.bpe-post-link::after { content: " →"; transition: transform 200ms ease; display: inline-block; }
.bpe-post-card:hover a.bpe-post-link::after { transform: translateX(4px); }

/* Single post */
.bpe-article {
    max-width: 720px;
    margin-inline: auto;
    padding-block: clamp(3rem, 5vw, 5rem);
}
.bpe-article-header { margin-bottom: var(--bpe-space-12); }
.bpe-article-title {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(2rem, 4vw + 1rem, 3.75rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 var(--bpe-space-6);
    text-wrap: balance;
}
.bpe-article-lede {
    font-size: var(--bpe-text-xl);
    color: var(--bpe-color-text-muted);
    line-height: 1.5;
    margin: 0 0 var(--bpe-space-6);
}
.bpe-article-byline {
    display: flex;
    flex-wrap: wrap;
    gap: var(--bpe-space-4);
    align-items: center;
    color: var(--bpe-color-text-subtle);
    font-size: var(--bpe-text-sm);
    padding-block: var(--bpe-space-4);
    border-top: 1px solid var(--bpe-color-border);
    border-bottom: 1px solid var(--bpe-color-border);
}
.bpe-article-byline strong { color: var(--bpe-color-text); font-weight: var(--bpe-weight-semibold); }

.bpe-prose {
    font-size: var(--bpe-text-base);
    line-height: 1.7;
    color: var(--bpe-color-text);
}
.bpe-prose > * + * { margin-top: var(--bpe-space-5); }
.bpe-prose h2 {
    font-family: 'Instrument Serif', serif;
    font-size: var(--bpe-text-3xl);
    line-height: 1.15;
    margin-top: var(--bpe-space-12);
    margin-bottom: var(--bpe-space-4);
    letter-spacing: -0.01em;
}
.bpe-prose h3 {
    font-family: var(--bpe-font-sans);
    font-size: var(--bpe-text-xl);
    font-weight: var(--bpe-weight-semibold);
    margin-top: var(--bpe-space-10);
    margin-bottom: var(--bpe-space-3);
}
.bpe-prose p { margin: 0; }
.bpe-prose a {
    color: var(--bpe-color-primary);
    border-bottom: 1px solid var(--bpe-color-indigo-200);
    transition: border-color 150ms ease;
}
.bpe-prose a:hover { border-bottom-color: var(--bpe-color-primary); }
.bpe-prose ul, .bpe-prose ol { padding-left: var(--bpe-space-6); margin: 0; }
.bpe-prose li { margin-block: var(--bpe-space-2); }
.bpe-prose blockquote {
    border-left: 3px solid var(--bpe-color-primary);
    padding-left: var(--bpe-space-5);
    color: var(--bpe-color-text-muted);
    font-family: 'Instrument Serif', serif;
    font-size: var(--bpe-text-xl);
    font-style: italic;
    line-height: 1.5;
    margin: var(--bpe-space-8) 0;
}
.bpe-prose code {
    font-family: var(--bpe-font-mono);
    font-size: 0.92em;
    background: var(--bpe-color-indigo-50);
    color: var(--bpe-color-indigo-700);
    padding: 0.12em 0.4em;
    border-radius: var(--bpe-radius-sm);
}
.bpe-prose pre {
    font-family: var(--bpe-font-mono);
    font-size: var(--bpe-text-sm);
    background: var(--bpe-color-gray-900);
    color: var(--bpe-color-gray-100);
    padding: var(--bpe-space-5);
    border-radius: var(--bpe-radius-md);
    overflow-x: auto;
}
.bpe-prose pre code { background: transparent; color: inherit; padding: 0; }
.bpe-prose hr {
    border: 0;
    border-top: 1px solid var(--bpe-color-border);
    margin: var(--bpe-space-10) 0;
}
.bpe-prose table {
    width: 100%;
    border-collapse: collapse;
    margin-block: var(--bpe-space-6);
    font-size: var(--bpe-text-sm);
}
.bpe-prose th, .bpe-prose td {
    text-align: left;
    padding: var(--bpe-space-3) var(--bpe-space-4);
    border-bottom: 1px solid var(--bpe-color-border);
}
.bpe-prose th { font-weight: var(--bpe-weight-semibold); color: var(--bpe-color-text); background: var(--bpe-color-gray-50); }

/* Table of contents */

.bpe-toc-wrapper {
    margin-block: var(--bpe-space-8) var(--bpe-space-12);
    padding: var(--bpe-space-5) var(--bpe-space-6);
    background: var(--bpe-color-bg-soft);
    border: 1px solid var(--bpe-color-border);
    border-radius: var(--bpe-radius-lg);
}
.bpe-toc-wrapper summary {
    cursor: pointer;
    list-style: none;
    font-family: var(--bpe-font-mono);
    font-size: var(--bpe-text-xs);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--bpe-color-text-muted);
    font-weight: var(--bpe-weight-semibold);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.bpe-toc-wrapper summary::-webkit-details-marker { display: none; }
.bpe-toc-wrapper summary::after {
    content: "−";
    font-family: 'Instrument Serif', serif;
    font-size: var(--bpe-text-xl);
    color: var(--bpe-color-primary);
    line-height: 1;
}
.bpe-toc-wrapper:not([open]) summary::after { content: "+"; }
.bpe-toc-wrapper[open] summary { margin-bottom: var(--bpe-space-4); }

.bpe-toc {
    list-style: none;
    padding: 0;
    margin: 0;
}
.bpe-toc ul {
    list-style: none;
    padding-left: var(--bpe-space-5);
    margin-top: var(--bpe-space-2);
}
.bpe-toc li {
    margin-block: var(--bpe-space-2);
    font-size: var(--bpe-text-sm);
    line-height: 1.5;
}
.bpe-toc a {
    color: var(--bpe-color-text);
    border-bottom: 0;
    transition: color 150ms ease;
    display: inline-block;
    padding-block: 0.15rem;
}
.bpe-toc a:hover { color: var(--bpe-color-primary); }
.bpe-toc > li {
    counter-increment: bpe-toc-counter;
    position: relative;
    padding-left: var(--bpe-space-6);
}
.bpe-toc { counter-reset: bpe-toc-counter; }
.bpe-toc > li::before {
    content: counter(bpe-toc-counter, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 0.15rem;
    font-family: var(--bpe-font-mono);
    font-size: var(--bpe-text-xs);
    color: var(--bpe-color-primary);
    letter-spacing: 0.06em;
}

/* Heading anchor links */
.bpe-anchor {
    color: var(--bpe-color-gray-300);
    text-decoration: none;
    margin-right: 0.25em;
    border-bottom: 0;
    transition: color 150ms ease;
}
.bpe-anchor:hover { color: var(--bpe-color-primary); }
.bpe-prose h2:hover .bpe-anchor,
.bpe-prose h3:hover .bpe-anchor { color: var(--bpe-color-primary); }

.bpe-article-cta {
    margin-block: var(--bpe-space-12);
    padding: var(--bpe-space-8);
    background: var(--bpe-color-bg-soft);
    border: 1px solid var(--bpe-color-border);
    border-radius: var(--bpe-radius-xl);
    text-align: center;
}
.bpe-article-cta p {
    font-size: var(--bpe-text-lg);
    margin: 0 0 var(--bpe-space-4);
    max-width: 48ch;
    margin-inline: auto;
}

/* ---------- Pricing page ---------- */

.bpe-plan-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--bpe-space-4);
    margin-top: var(--bpe-space-8);
}
@media (min-width: 720px)  { .bpe-plan-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .bpe-plan-grid { grid-template-columns: repeat(3, 1fr); } }

.bpe-plan {
    background: var(--bpe-color-white);
    border: 1px solid var(--bpe-color-border);
    border-radius: var(--bpe-radius-xl);
    padding: var(--bpe-space-8);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}
.bpe-plan:hover {
    border-color: var(--bpe-color-indigo-200);
    transform: translateY(-3px);
    box-shadow: var(--bpe-shadow-lg);
}
.bpe-plan-popular {
    border-color: var(--bpe-color-indigo-300);
    background: linear-gradient(180deg, var(--bpe-color-white) 0%, var(--bpe-color-indigo-50) 280%);
    position: relative;
}
.bpe-plan-popular::before {
    content: "Most popular";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bpe-gradient-primary);
    color: var(--bpe-color-white);
    padding: 0.3rem 0.75rem;
    font-family: var(--bpe-font-mono);
    font-size: var(--bpe-text-xs);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: var(--bpe-radius-full);
}

.bpe-plan-name {
    font-family: 'Instrument Serif', serif;
    font-size: var(--bpe-text-2xl);
    margin: 0;
    color: var(--bpe-color-text);
}
.bpe-plan-cap {
    font-size: var(--bpe-text-sm);
    color: var(--bpe-color-text-muted);
    margin: var(--bpe-space-1) 0 var(--bpe-space-4);
}
.bpe-plan-price {
    font-family: 'Instrument Serif', serif;
    font-size: var(--bpe-text-5xl);
    line-height: 1;
    color: var(--bpe-color-text);
    font-variant-numeric: tabular-nums;
    margin-bottom: var(--bpe-space-2);
}
.bpe-plan-price small { font-family: var(--bpe-font-sans); font-size: var(--bpe-text-sm); color: var(--bpe-color-text-muted); }
.bpe-plan-usecase {
    color: var(--bpe-color-text-muted);
    font-size: var(--bpe-text-sm);
    line-height: 1.6;
    margin: var(--bpe-space-4) 0 var(--bpe-space-6);
    padding-block: var(--bpe-space-4);
    border-top: 1px dashed var(--bpe-color-gray-200);
    border-bottom: 1px dashed var(--bpe-color-gray-200);
    flex: 1;
}
.bpe-plan-usecase strong { color: var(--bpe-color-text); font-weight: var(--bpe-weight-semibold); }

/* ---------- Utility ---------- */

.bpe-text-center { text-align: center; }
.bpe-mt-0 { margin-top: 0; }
.bpe-mt-2 { margin-top: var(--bpe-space-2); }
.bpe-mt-4 { margin-top: var(--bpe-space-4); }
.bpe-mt-6 { margin-top: var(--bpe-space-6); }
.bpe-mt-8 { margin-top: var(--bpe-space-8); }
.bpe-mt-10 { margin-top: var(--bpe-space-10); }
.bpe-mt-12 { margin-top: var(--bpe-space-12); }
.bpe-mb-2 { margin-bottom: var(--bpe-space-2); }
.bpe-mb-4 { margin-bottom: var(--bpe-space-4); }
.bpe-mb-6 { margin-bottom: var(--bpe-space-6); }
.bpe-mb-8 { margin-bottom: var(--bpe-space-8); }
.bpe-mb-10 { margin-bottom: var(--bpe-space-10); }
.bpe-mb-12 { margin-bottom: var(--bpe-space-12); }

.bpe-row { display: flex; flex-wrap: wrap; gap: var(--bpe-space-4); align-items: center; }
.bpe-row-tight { gap: var(--bpe-space-3); }
