/* ================= BRAND DESIGN SYSTEM — SWISS MINIMALIST ================= */
/* ParseTx · DESIGN.md v2 · Terminal Functionalism                            */

:root {
    /* Background */
    --bg-base:             #08090d;
    --bg-surface:          #11131a;
    --bg-code:             #040508;

    /* Borders */
    --border-subtle:       #1e293b;
    --border-muted:        rgba(30, 41, 59, 0.5);

    /* Text */
    --text-primary:        #f8fafc;
    --text-secondary:      #94a3b8;
    --text-muted:          #64748b;

    /* Accent — single "Cognitive Purple" */
    --color-accent:        #7c3aed;
    --color-accent-light:  #a78bfa;
    --color-accent-dim:    rgba(124, 58, 237, 0.12);
    --color-accent-border: rgba(124, 58, 237, 0.35);

    /* Semantic */
    --color-success:       #00e59b;
    --color-success-dim:   rgba(0, 229, 155, 0.12);
    --color-success-border:rgba(0, 229, 155, 0.25);
    --color-error:         #ef4444;
    --color-warn:          #f59e0b;
    --color-warn-dim:      rgba(245, 158, 11, 0.2);

    /* Typography */
    --font-display:        'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body:           'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono:           'Geist Mono', 'Courier New', Courier, monospace;

    /* Radius — strict and minimal */
    --radius-none:  0px;
    --radius-sm:    6px;
    --radius-md:    8px;

    /* Spacing */
    --space-1: 8px;
    --space-2: 16px;
    --space-3: 24px;
    --space-4: 32px;
    --space-5: 48px;
    --space-6: 64px;
    --space-7: 80px;
}

/* ================= RESET ================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ================= TYPOGRAPHY ================= */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    letter-spacing: -0.03em;
    line-height: 1.15;
}

h1 { font-size: 3.25rem; font-weight: 700; }
h2 { font-size: 2.1rem;  font-weight: 700; }
h3 { font-size: 1.35rem; font-weight: 600; }
h4 { font-size: 1.15rem; font-weight: 600; }

p { line-height: 1.7; }

/* ================= UTILITIES ================= */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-3);
}

.max-width-600 { max-width: 600px !important; }
.text-center  { text-align: center; }

/* Accent text — replaces gradient-text */
.accent-text {
    color: var(--color-accent-light);
}

.success-text {
    color: var(--color-success);
}

/* Muted text utility */
.muted {
    color: var(--text-muted);
}

/* Mono utility */
.mono {
    font-family: var(--font-mono);
}

/* ================= BADGE / TAG ================= */
.badge {
    display: inline-block;
    padding: 5px 10px;
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
    text-transform: uppercase;
}

/* ================= BUTTONS ================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-body);
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
    border: 1px solid transparent;
    white-space: nowrap;
}

.btn-primary {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
}
.btn-primary:hover {
    background: oklch(65% 0.17 280);
    border-color: oklch(65% 0.17 280);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-subtle);
}
.btn-secondary:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
    background: rgba(255,255,255,0.03);
}

.w-100 { width: 100%; }

.btn-spinner {
    display: none;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    flex-shrink: 0;
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

.btn.loading {
    cursor: not-allowed;
    opacity: 0.85;
}

.btn.loading .btn-spinner {
    display: block;
    animation: btn-spin 0.65s linear infinite;
}

/* ================= CARDS ================= */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-4);
}

.card h3 {
    font-size: 1.2rem;
    margin-bottom: 6px;
}

.card-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* ================= SECTION LABELS ================= */
.section-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 12px;
}

.section-desc {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-5) auto;
    font-size: 1rem;
}

/* ================= HEADER NAVBAR ================= */
.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 100;
    background: rgba(8, 9, 13, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 14px 0;
    overflow: visible;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-mark {
    height: 26px;
    width: auto;
    display: block;
}

.logo-wordmark {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.logo-accent {
    color: var(--color-accent);
}

/* Nav links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    transition: color 0.15s, background 0.15s;
    position: relative;
}

.nav-links a:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.04);
}

.nav-links a.nav-active {
    color: var(--text-primary);
}

/* Nav actions */
.nav-actions {
    flex-shrink: 0;
}

/* Mobile CTA — only rendered inside the mobile dropdown */
.nav-mobile-cta {
    display: none;
}

/* Hamburger */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.hamburger-bar {
    display: block;
    width: 20px;
    height: 1.5px;
    background: var(--text-secondary);
    border-radius: 1px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-hamburger.open .hamburger-bar:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}
.nav-hamburger.open .hamburger-bar:nth-child(2) {
    opacity: 0;
}
.nav-hamburger.open .hamburger-bar:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* ================= HERO SECTION ================= */
.hero {
    padding: 96px 0 72px;
}

.hero h1 {
    font-size: 3.25rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    margin-bottom: 20px;
    line-height: 1.12;
}

.hero .subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 72px;
}

/* Stats row with vertical dividers */
.hero-stats {
    display: flex;
    justify-content: center;
    align-items: stretch;
    border-top: 1px solid var(--border-subtle);
    padding-top: 40px;
    max-width: 760px;
    margin: 0 auto;
    gap: 0;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    padding: 0 32px;
    position: relative;
}

.stat-item + .stat-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10%;
    height: 80%;
    width: 1px;
    background: var(--border-subtle);
}

.stat-num {
    font-family: var(--font-mono);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 4px;
}

.demo-counter {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    background: var(--bg-surface);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    margin-right: auto;
}

.snippet-tabs {
    display: flex;
    gap: 16px;
    padding: 0 20px;
    border-bottom: 1px solid var(--bg-base);
    background: var(--bg-code);
}

.snippet-tab {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 10px 0;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    outline: 0; /* :focus-visible below provides WCAG-compliant ring */
}

.snippet-tab:hover {
    color: var(--text-primary);
}

.snippet-tab.active {
    color: var(--color-success);
    border-bottom-color: var(--color-success);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ================= PLAYGROUND / SANDBOX ================= */
.playground-section {
    padding: var(--space-7) 0;
    border-top: 1px solid var(--border-subtle);
}

.playground-section > .container > .section-label {
    text-align: center;
}

.playground-section h2 {
    font-size: 2.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.playground-grid {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 24px;
    margin-top: var(--space-5);
}

.playground-input {
    display: flex;
    flex-direction: column;
}

.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.preset-btn {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    padding: 6px 12px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.preset-btn:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.preset-btn.active {
    background: var(--color-accent-dim);
    border-color: var(--color-accent-border);
    color: var(--text-primary);
}

.custom-input-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 16px 0 12px;
}
.custom-input-divider::before,
.custom-input-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.07);
}

.input-group {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.input-group input {
    flex-grow: 1;
    background: var(--bg-code);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-none);
    padding: 13px 14px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.88rem;
    transition: border-color 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--color-accent);
}

.input-group .btn {
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.playground-output {
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    animation: pulse-glow 4s infinite;
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 1px var(--border-subtle), 0 0 10px rgba(0, 229, 155, 0.05); }
    50% { box-shadow: 0 0 0 1px var(--color-success-border), 0 0 30px rgba(0, 229, 155, 0.15); }
    100% { box-shadow: 0 0 0 1px var(--border-subtle), 0 0 10px rgba(0, 229, 155, 0.05); }
}

.output-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.output-header h3 {
    margin-bottom: 0 !important;
    font-size: 0.88rem;
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0;
}

.output-badges {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-badge {
    background: var(--color-success-dim);
    border: 1px solid var(--color-success-border);
    color: var(--color-success);
    font-size: 0.72rem;
    font-family: var(--font-mono);
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    letter-spacing: 0.05em;
}

.code-wrapper {
    background: var(--bg-code);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    padding: 20px;
    flex-grow: 1;
    min-height: 300px;
    max-height: 420px;
    overflow-y: auto;
}

.code-wrapper pre { margin: 0; }

.code-wrapper code {
    font-family: var(--font-mono);
    font-size: 0.83rem;
    color: #e2e8f0;
    white-space: pre-wrap;
    word-break: break-all;
    transition: opacity 0.2s;
}

/* Typing cursor flash on new result */
.code-wrapper code.typing::after {
    content: '▋';
    display: inline-block;
    animation: cursor-blink 0.7s step-end 4;
    color: var(--color-accent);
}

@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* ================= FEATURES — BENTO GRID ================= */
.features-section {
    padding: var(--space-7) 0;
    border-top: 1px solid var(--border-subtle);
}

.features-section h2 {
    margin-bottom: 0;
}

.bento-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    grid-template-rows: auto auto;
    gap: 16px;
    margin-top: var(--space-5);
}

.bento-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s ease, border-color 0.2s;
}

.bento-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.bento-card:hover {
    border-color: var(--text-muted);
}

.bento-wide {
    grid-column: 1 / -1;
}

.bento-tall {
    grid-row: span 2;
}

.bento-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: var(--space-3);
    display: block;
}

/* Benchmark table */
.bench-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.bench-table th {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-align: left;
    padding: 8px 12px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-subtle);
    font-weight: 500;
}

.bench-table td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--border-muted);
    color: var(--text-secondary);
}

.bench-table tr:last-child td {
    border-bottom: none;
}

.bench-table td.mono {
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.bench-table td.accent-text {
    color: var(--color-accent-light);
}

.bench-table td.success-text {
    color: var(--color-success);
}

/* Bento code block */
.bento-code {
    background: var(--bg-code);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-none);
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.65;
    color: #c8d3e6;
    overflow-x: auto;
    white-space: pre;
    margin: 0;
    flex-grow: 1;
}

.bento-code-wrap {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Field list */
.field-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.field-list li {
    display: flex;
    align-items: baseline;
    gap: 12px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-muted);
}

.field-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.field-key {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--color-accent-light);
    flex-shrink: 0;
    min-width: 130px;
}

.field-desc {
    color: var(--text-muted);
    font-size: 0.82rem;
}

/* ================= PRICING ================= */
.pricing-section {
    padding: var(--space-7) 0;
    border-top: 1px solid var(--border-subtle);
}

.pricing-section h2 {
    margin-bottom: 8px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
    max-width: 840px;
    margin: var(--space-5) auto 0;
}

.pricing-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 36px;
    position: relative;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s ease, border-color 0.2s;
}

.pricing-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.pricing-card.popular {
    border-color: var(--color-accent-border);
    box-shadow: inset 0 0 0 1px var(--color-accent-border);
}

.card-badge {
    position: absolute;
    top: -1px;
    left: var(--space-4);
    background: var(--color-accent);
    color: #fff;
    padding: 3px 10px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pricing-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 16px;
    margin-top: 8px;
}

.price {
    font-family: var(--font-mono);
    font-size: 2.6rem;
    font-weight: 600;
    margin-bottom: 16px;
    line-height: 1;
    letter-spacing: -0.02em;
}

.price span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0;
}

.pricing-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--space-4);
    min-height: 44px;
    line-height: 1.6;
}

.pricing-features {
    list-style: none;
    margin-bottom: var(--space-5);
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pricing-features li {
    color: var(--text-secondary);
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pricing-features li::before {
    content: "✓";
    color: var(--color-success);
    font-weight: 700;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* ================= CONTACT FORM ================= */
.contact-section {
    padding: var(--space-7) 0 120px;
    border-top: 1px solid var(--border-subtle);
}

.contact-section h2 {
    margin-bottom: 8px;
}

.form-group {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    background: var(--bg-code);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-none);
    padding: 11px 14px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ================= FOOTER ================= */
.footer {
    border-top: 1px solid var(--border-subtle);
    padding: 48px 0;
    background: var(--bg-base);
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.footer-logo-mark {
    height: 22px;
    width: auto;
}

.footer-logo-wordmark {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.footer-logo-wordmark span {
    color: var(--color-accent);
}

.company-info {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    margin-bottom: var(--space-2);
    letter-spacing: 0.02em;
}

.tech-stack {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: var(--space-3);
    opacity: 0.7;
}

.footer-links {
    margin-bottom: var(--space-3);
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.82rem;
    margin: 0 12px;
    transition: color 0.15s;
}

.footer-links a:hover {
    color: var(--text-secondary);
}

.copyright {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    opacity: 0.6;
}

/* ================= COMPLIANCE MODALS ================= */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 660px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 60px rgba(0,0,0,0.7);
    transform: translateY(16px) scale(0.98);
    transition: transform 0.25s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3);
    border-bottom: 1px solid var(--border-subtle);
}

.modal-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s;
    padding: 4px;
}

.close-btn:hover { color: var(--text-primary); }

.modal-body {
    padding: var(--space-3);
    overflow-y: auto;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.modal-body h3 {
    color: var(--text-primary);
    font-size: 1rem;
    margin: 20px 0 8px;
    letter-spacing: -0.02em;
}

.modal-body p { margin-bottom: 14px; }
.modal-body strong { color: var(--text-primary); }

/* ================= ACCESSIBILITY — KEYBOARD FOCUS RINGS ================= */
/*
 * WCAG 2.1 AA — Success Criterion 2.4.7 "Focus Visible"
 * :focus-visible only activates for keyboard/sequential navigation,
 * not for mouse clicks, so it never adds visual noise for pointer users.
 * All rings use --color-accent-light (lavender #a78bfa) to stay on-brand.
 */

/* Buttons */
.btn:focus-visible,
button:focus-visible {
    outline: 2px solid var(--color-accent-light);
    outline-offset: 3px;
}

/* Links — nav links, footer links, inline anchors */
a:focus-visible {
    outline: 2px solid var(--color-accent-light);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* Form inputs and textareas */
.form-group input:focus-visible,
.form-group textarea:focus-visible,
.input-group input:focus-visible,
.calc-input-group input:focus-visible {
    outline: 2px solid var(--color-accent-light);
    outline-offset: 2px;
    /* Keep the existing border-color accent on focus too */
    border-color: var(--color-accent);
}

/* Playground code-tab buttons */
.snippet-tab:focus-visible {
    outline: 2px solid var(--color-accent-light);
    outline-offset: 2px;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

/* Preset transaction buttons ("Amazon", "Netflix", etc.) */
.preset-btn:focus-visible {
    outline: 2px solid var(--color-accent-light);
    outline-offset: 2px;
}

/* Modal close button */
.close-btn:focus-visible {
    outline: 2px solid var(--color-accent-light);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* Nav hamburger toggle (mobile) */
.nav-hamburger:focus-visible {
    outline: 2px solid var(--color-accent-light);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* ================= SCROLL REVEAL ANIMATIONS ================= */
@keyframes reveal-up {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ================= RESPONSIVE ADJUSTMENTS ================= */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .bento-wide { grid-column: 1; }
    .bento-tall { grid-row: span 1; }
    .playground-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.75rem; }

    .hero { padding: 64px 0 48px; }

    .hero-stats {
        flex-direction: column;
        gap: 0;
        border-top: 1px solid var(--border-subtle);
    }

    .stat-item {
        padding: 20px 0;
        border-bottom: 1px solid var(--border-muted);
    }

    .stat-item + .stat-item::before {
        display: none;
    }

    .stat-item:last-child {
        border-bottom: none;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .nav-hamburger {
        display: flex;
    }

    /* Hide the desktop CTA pill — the mobile menu carries it instead */
    .nav-actions {
        display: none;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(8, 9, 13, 0.98);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--border-subtle);
        padding: 8px 0;
        z-index: 99;
        gap: 0;
        overflow: hidden;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        margin: 0;
        padding: 14px 24px;
        font-size: 0.95rem;
        border-radius: 0;
        border-bottom: 1px solid var(--border-muted);
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    /* Mobile CTA row at the bottom of the dropdown */
    .nav-mobile-cta {
        display: flex;
        padding: 14px 24px;
        border-top: 1px solid var(--border-subtle);
        margin-top: 4px;
    }

    .nav-mobile-cta a {
        display: block;
        width: 100%;
        text-align: center;
        background: var(--color-accent);
        color: #fff !important;
        border-radius: var(--radius-sm);
        padding: 11px 22px !important;
        font-weight: 600;
        border-bottom: none !important;
        border: none !important;
        transition: background 0.18s;
    }

    .nav-mobile-cta a:hover {
        background: oklch(65% 0.17 280);
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .bento-code {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .hero { padding: 48px 0 40px; }
    .hero h1 { font-size: 1.9rem; }
    .stat-num { font-size: 1.5rem; }
}
