/* ─────────────────────────────────────────────────────────────
 * HalloLead — App stylesheet
 * Cal.com-inspired grayscale design. Monochrome confidence.
 * ───────────────────────────────────────────────────────────── */

:root {
    /* Primary — grayscale + green accent */
    --hl-black:         #242424;
    --hl-deep:          #111111;
    --hl-secondary:     #898989;
    --hl-bg:            #ffffff;
    --hl-surface:       #f5f5f5;

    /* Green accent */
    --hl-accent:        #9fe870;
    --hl-accent-dark:   #163300;
    --hl-accent-light:  #e8f5e0;

    /* Semantic */
    --hl-success:       #054d28;
    --hl-danger:        #d03238;
    --hl-warning:       #ffd11a;
    --hl-info:          rgba(56, 200, 255, 0.10);
    --hl-link:          #0099ff;

    /* Shadows (Cal.com system) */
    --hl-shadow-ring:   rgba(34, 42, 53, 0.08);
    --hl-shadow-soft:   rgba(34, 42, 53, 0.05);
    --hl-shadow-sharp:  rgba(19, 19, 22, 0.7);
    --hl-card-shadow:
        var(--hl-shadow-sharp) 0px 1px 5px -4px,
        var(--hl-shadow-ring) 0px 0px 0px 1px,
        var(--hl-shadow-soft) 0px 4px 8px;

    /* Legacy compat — tenant dashboard now uses green accents */
    --hl-green:         #9fe870;
    --hl-green-dark:    #163300;
    --hl-green-light:   #e8f5e0;
    --hl-green-pastel:  #f0fdf4;
    --hl-gray-dark:     #898989;
    --hl-gray:          #898989;
    --hl-ring:          rgba(34, 42, 53, 0.08);
    --hl-nav-hover:     rgba(0, 0, 0, 0.06);

    /* Spacing base unit = 8px */
    --hl-s1: 8px;
    --hl-s2: 16px;
    --hl-s3: 24px;
    --hl-s4: 32px;
    --hl-s5: 40px;
    --hl-s6: 64px;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Host Grotesk', -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
    background: var(--hl-bg);
    color: var(--hl-black);
    font-size: 16px;
    line-height: 1.50;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: var(--hl-black);
    text-decoration: none;
}
a:hover { text-decoration: underline; }

/* ── Typography ─────────────────────────────────────────────── */
.display-hero  { font-family: 'Cal Sans', Inter, sans-serif; font-weight: 600; font-size: 4rem; line-height: 1.10; margin: 0; }
.section-head  { font-family: 'Cal Sans', Inter, sans-serif; font-weight: 600; font-size: 3rem; line-height: 1.10; margin: 0; }
.sub-head      { font-family: 'Cal Sans', Inter, sans-serif; font-weight: 600; font-size: 1.5rem; line-height: 1.20; letter-spacing: 0.2px; margin: 0; }
.card-title    { font-family: 'Cal Sans', Inter, sans-serif; font-weight: 600; font-size: 1.25rem; line-height: 1.30; margin: 0; }
.caption       { font-size: 0.875rem; color: var(--hl-secondary); }
.body-bold     { font-weight: 600; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
    display: inline-block;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    touch-action: manipulation;
    font-size: 1rem;
    line-height: 1;
    padding: 12px 24px;
    border-radius: 8px;
    transition: opacity 0.15s, transform 0.15s;
    text-decoration: none;
}
.btn:hover  { opacity: 0.7; text-decoration: none; }
.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--hl-accent);
    color: var(--hl-accent-dark);
}
.btn-secondary {
    background: var(--hl-bg);
    color: var(--hl-black);
    box-shadow: var(--hl-card-shadow);
}
.btn-block { display: block; width: 100%; text-align: center; }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
    background: var(--hl-bg);
    border-radius: 12px;
    border: none;
    box-shadow: var(--hl-card-shadow);
    padding: var(--hl-s4);
}
.card-sm { border-radius: 8px; padding: var(--hl-s3); }
.card-lg { border-radius: 16px; padding: var(--hl-s5); }

/* ── Forms ─────────────────────────────────────────────────── */
label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    font-size: 0.875rem;
    color: var(--hl-black);
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="url"],
input[type="number"],
select,
textarea {
    width: 100%;
    font-family: inherit;
    font-size: 1rem;
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    background: var(--hl-bg);
    color: var(--hl-black);
    box-shadow: var(--hl-shadow-ring) 0px 0px 0px 1px;
    transition: box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    box-shadow: rgba(59, 130, 246, 0.5) 0px 0px 0px 2px;
}
.form-group { margin-bottom: var(--hl-s3); }
.form-help  { font-size: 0.8125rem; color: var(--hl-secondary); margin-top: 4px; }

/* ── Flash messages ────────────────────────────────────────── */
.flash {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: var(--hl-s3);
    font-weight: 500;
    font-size: 0.875rem;
}
.flash-success { background: #f0fdf4; color: var(--hl-success); }
.flash-error   { background: #fef2f2; color: var(--hl-danger); }
.flash-info    { background: #f0f9ff; color: var(--hl-black); }

/* ── Layout helpers ────────────────────────────────────────── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--hl-s3);
}
.stack > * + * { margin-top: var(--hl-s2); }
.stack-lg > * + * { margin-top: var(--hl-s4); }

/* ── Auth pages ────────────────────────────────────────────── */
.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--hl-s4) var(--hl-s3);
    background: var(--hl-surface);
}
.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--hl-bg);
    border-radius: 12px;
    border: none;
    box-shadow: var(--hl-card-shadow);
    padding: var(--hl-s5);
}
.auth-brand {
    text-align: center;
    font-family: 'Cal Sans', Inter, sans-serif;
    font-weight: 600;
    font-size: 1.75rem;
    line-height: 1.10;
    margin-bottom: var(--hl-s4);
    color: var(--hl-black);
}
.auth-brand .brand-green { color: var(--hl-accent); }
.auth-footer {
    margin-top: var(--hl-s3);
    text-align: center;
    font-size: 0.875rem;
    color: var(--hl-secondary);
}

/* ── App layout (tenant/master) ────────────────────────────── */
.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px 1fr;
    background: var(--hl-surface);
}
.app-sidebar {
    background: var(--hl-black);
    color: #fff;
    padding: var(--hl-s4) var(--hl-s3);
}
.app-sidebar .brand {
    font-family: 'Cal Sans', Inter, sans-serif;
    font-weight: 600;
    font-size: 1.5rem;
    line-height: 1.10;
    margin-bottom: var(--hl-s5);
}
.app-sidebar .brand-green { color: var(--hl-accent); }
.app-sidebar nav a {
    display: block;
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 4px;
    text-decoration: none;
    font-weight: 500;
}
.app-sidebar nav a:hover,
.app-sidebar nav a.active {
    background: rgba(255,255,255,0.08);
    color: #fff;
}
.app-sidebar nav form { margin-top: 32px; }
.app-sidebar nav form button {
    display: block; width: 100%;
    padding: 10px 14px; border-radius: 8px;
    background: transparent; color: #fff;
    border: 1px solid rgba(255,255,255,0.20);
    font-weight: 500; font-size: 0.875rem;
    cursor: pointer; font-family: inherit;
}
.app-sidebar nav form button:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.4);
}
.app-main {
    padding: var(--hl-s5) var(--hl-s5);
}
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--hl-s4);
}
.app-header h1 {
    font-family: 'Cal Sans', Inter, sans-serif;
    font-weight: 600;
    font-size: 2rem;
    line-height: 1.10;
    margin: 0;
}

/* ── Tables ────────────────────────────────────────────────── */
.table {
    width: 100%;
    background: var(--hl-bg);
    border-radius: 12px;
    border: none;
    box-shadow: var(--hl-card-shadow);
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}
.table th, .table td {
    text-align: left;
    padding: 14px 20px;
    border-bottom: 1px solid var(--hl-shadow-ring);
}
.table tbody tr:last-child td { border-bottom: 0; }
.table th {
    background: var(--hl-surface);
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--hl-secondary);
}

/* ── Badges ────────────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-active   { background: #f0fdf4; color: var(--hl-success); }
.badge-inactive { background: var(--hl-surface); color: var(--hl-secondary); }

/* ── Impersonation banner ──────────────────────────────────── */
.impersonation-bar {
    background: var(--hl-warning);
    color: var(--hl-black);
    text-align: center;
    padding: 10px;
    font-weight: 600;
}

/* ── Mobile header ─────────────────────────────────────────── */
.app-mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--hl-black);
    z-index: 1001;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
}
.app-mobile-brand {
    font-family: 'Cal Sans', Inter, sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    color: #fff;
    text-decoration: none;
    line-height: 1;
}
.app-mobile-brand:hover { text-decoration: none; color: #fff; }
.app-mobile-brand .brand-green { color: var(--hl-accent); }

/* ── Sidebar toggle (mobile) ───────────────────────────────── */
.app-sidebar-toggle {
    display: none;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 0;
    border-radius: 8px;
    padding: 0;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.app-sidebar-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    transition: transform 0.2s, opacity 0.2s;
}
.app-sidebar-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.app-sidebar-toggle.is-open span:nth-child(2) { opacity: 0; }
.app-sidebar-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Dashboard (Fase 4) ────────────────────────────────────── */
.dash-filter-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.dash-filter-form select,
.dash-filter-form input[type="date"] {
    width: auto;
    padding: 8px 14px;
    font-size: 0.875rem;
}
.form-row-stack {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}
.form-row-stack > .form-group { flex: 1 1 180px; margin-bottom: 0; }
.form-row-stack > .btn { flex: 0 0 auto; }

.dash-plan-strip {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}
.dash-plan-bar {
    flex: 1;
    height: 8px;
    background: var(--hl-surface);
    border-radius: 9999px;
    overflow: hidden;
    min-width: 120px;
}
.dash-plan-bar-fill {
    height: 100%;
    background: var(--hl-accent);
    border-radius: 9999px;
    transition: width 0.3s;
}

.dash-active-bots {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.dash-bot-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--hl-bg);
    box-shadow: var(--hl-shadow-ring) 0px 0px 0px 1px;
    border: none;
    border-radius: 9999px;
    padding: 6px 14px;
    font-size: 0.8125rem;
    font-weight: 500;
}
.dash-bot-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.dash-bot-dot.on  { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.20); }
.dash-bot-dot.off { background: var(--hl-secondary); }

.dash-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.dash-block {
    display: flex;
    flex-direction: column;
    min-height: 150px;
}
.dash-block-wide { grid-column: span 2; }
.dash-block-label {
    font-size: 0.8125rem;
    color: var(--hl-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 8px;
}
.dash-block-value {
    font-family: 'Cal Sans', Inter, sans-serif;
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 1.10;
    color: var(--hl-black);
    margin-bottom: 10px;
}
.dash-linechart {
    width: 100%;
    height: 90px;
    margin-top: auto;
}
.dash-chart-empty {
    color: var(--hl-secondary);
    font-size: 0.875rem;
    text-align: center;
    padding: 20px 0;
}

.dash-barchart {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    margin-top: 12px;
    height: 110px;
}
.dash-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    height: 100%;
}
.dash-bar-track {
    width: 100%;
    flex: 1;
    background: var(--hl-surface);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}
.dash-bar-fill {
    width: 100%;
    background: var(--hl-accent);
    border-radius: 4px;
    min-height: 2px;
    transition: height 0.3s;
}
.dash-bar-val {
    font-size: 0.75rem;
    color: var(--hl-secondary);
    font-weight: 600;
}
.dash-bar-label {
    font-size: 0.75rem;
    color: var(--hl-secondary);
}

/* ── Mobile (app) ─────────────────────────────────────────── */
@media (max-width: 1100px) {
    .dash-grid { grid-template-columns: repeat(2, 1fr); }
    .dash-block-wide { grid-column: span 2; }
}
@media (max-width: 768px) {
    .app-shell { grid-template-columns: 1fr; }
    .app-sidebar {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 260px;
        height: 100vh;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        overflow-y: auto;
    }
    .app-shell.sidebar-open .app-sidebar { transform: translateX(0); }
    .app-shell.sidebar-open::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.45);
        z-index: 999;
    }
    .app-mobile-header { display: flex; }
    .app-sidebar-toggle { display: flex; }
    .app-sidebar { top: 56px; height: calc(100vh - 56px); }
    .app-main { padding: var(--hl-s3); padding-top: 72px; }
    .display-hero { font-size: 3rem; }
    .section-head { font-size: 2rem; }
    .dash-grid { grid-template-columns: 1fr; }
    .dash-block-wide { grid-column: span 1; }
    .dash-plan-strip { flex-wrap: wrap; }
    .app-header { flex-direction: column; align-items: flex-start; gap: 16px; }
    .app-main .card { overflow-x: auto; }
    .app-main .table { min-width: 560px; }
    .form-row-stack > .form-group,
    .form-row-stack > .btn { flex: 1 1 100%; width: 100%; }
    .form-row-stack > .btn { text-align: center; }
}

/* ════════════════════════════════════════════════════════════════
 * Public marketing site — Cal.com inspired grayscale
 * ════════════════════════════════════════════════════════════════ */

.public-body { background: var(--hl-bg); color: var(--hl-black); }

/* ── Nav ──────────────────────────────────────────────────── */
.public-nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(8px);
    box-shadow: var(--hl-shadow-ring) 0px 0px 0px 1px;
}
.public-nav-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 64px; gap: 32px;
}
.public-brand {
    font-family: 'Cal Sans', Inter, sans-serif;
    font-weight: 600; font-size: 1.5rem; line-height: 1;
    color: var(--hl-black); text-decoration: none;
}
.public-brand:hover { text-decoration: none; }
.public-brand .brand-green { color: var(--hl-accent); }
.public-nav-links {
    display: flex; gap: 24px; flex: 1; justify-content: center;
}
.public-nav-links a {
    font-size: 0.875rem; font-weight: 500; color: var(--hl-deep);
    padding: 6px 4px;
}
.public-nav-links a:hover { color: var(--hl-black); text-decoration: none; opacity: 0.7; }
.public-nav-utility { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.public-nav-utility > * { white-space: nowrap; }
.public-nav-phone { font-weight: 500; font-size: 0.875rem; color: var(--hl-secondary); white-space: nowrap; }
.public-nav-login { font-weight: 500; font-size: 0.875rem; color: var(--hl-deep); }
.public-nav-toggle {
    display: none; border: 0; background: transparent; cursor: pointer;
    width: 40px; height: 40px; flex-direction: column; gap: 5px; align-items: center; justify-content: center;
}
.public-nav-toggle span {
    display: block; width: 22px; height: 2px; background: var(--hl-black);
    transition: transform .2s, opacity .2s;
}
.public-nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.public-nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.public-nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.public-nav-mobile {
    display: flex; flex-direction: column; gap: 4px;
    padding: 16px 24px 24px;
    background: var(--hl-bg);
    box-shadow: var(--hl-shadow-soft) 0px 4px 8px;
}
.public-nav-mobile[hidden] { display: none; }
.public-nav-mobile a {
    padding: 12px 8px; border-radius: 8px; font-weight: 500;
}
.public-nav-mobile .btn { margin-top: 12px; text-align: center; }

/* ── Hero ─────────────────────────────────────────────────── */
.public-hero {
    padding: 96px 0 80px;
    background: var(--hl-bg);
}
.hero-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}
.public-hero h1 {
    font-family: 'Cal Sans', Inter, sans-serif;
    font-weight: 600; font-size: clamp(2.5rem, 6vw, 4rem); line-height: 1.10;
    max-width: 16ch; margin: 0; color: var(--hl-black);
    hyphens: manual;
}
.public-hero h1 .accent {
    color: var(--hl-black);
}
.public-hero p {
    max-width: 560px; margin: 24px 0 40px;
    font-size: 1.125rem; line-height: 1.50; color: var(--hl-secondary);
}
.public-hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Hero flow animation ─────────────────────────────────── */
.hero-flow {
    display: flex;
    justify-content: center;
    min-height: 380px; /* Reserve space to prevent CLS */
}
.hero-flow-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}
/*
 * Flow nodes — skeleton-first om CLS te voorkomen.
 * Elk element neemt direct zijn definitieve ruimte in en toont een grijze
 * skeleton-stijl. Bij zijn delay morpht 'ie naar de echte stijl en faden de
 * children (icoon + tekst) in. `animation-delay: inherit` op de children
 * zorgt dat ze de stagger van .flow-anim-N overnemen.
 */
.flow-node {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #eef0f3;
    border: 2px solid #dfe3e8;
    border-radius: 12px;
    padding: 14px 20px;
    min-width: 200px;
    box-shadow: 3px 3px 0 #dfe3e8;
    animation: flowNodeReveal 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.flow-node--sm {
    min-width: 0;
    padding: 10px 16px;
    font-size: 0.875rem;
}
.flow-node--whatsapp {
    background: #eef0f3;
    border-color: #dfe3e8;
    box-shadow: 3px 3px 0 #dfe3e8;
    animation: flowNodeRevealWa 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.flow-node-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--hl-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--hl-secondary);
    opacity: 0;
    animation: flowChildIn 0.35s ease-out both;
    animation-delay: inherit;
}
.flow-node-icon--whatsapp {
    background: #25D366;
    color: #fff;
}
.flow-node--sm .flow-node-icon {
    width: 28px; height: 28px; border-radius: 6px;
}
.flow-node-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    opacity: 0;
    animation: flowChildIn 0.35s ease-out both;
    animation-delay: inherit;
}
.flow-node-title {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--hl-black);
}
.flow-node-sub {
    font-size: 0.75rem;
    color: var(--hl-secondary);
}
.flow-line {
    width: 2px;
    height: 24px;
    background: #dfe3e8;
    flex-shrink: 0;
    animation: flowLineReveal 0.3s ease-out both;
}
.flow-branch {
    display: flex;
    align-items: center;
    gap: 32px;
    position: relative;
    min-height: 36px;
    animation: flowBranchReveal 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.flow-branch::before {
    content: '';
    position: absolute;
    left: 50%;
    width: 80px;
    height: 2px;
    top: 50%;
    transform: translateX(-50%);
    background: #dfe3e8;
    animation: flowLineReveal 0.3s ease-out both;
    animation-delay: inherit;
}
.flow-branch-yes, .flow-branch-no {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 2px solid #dfe3e8;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef0f3;
    z-index: 1;
    opacity: 0;
    animation: flowChildIn 0.35s ease-out both, flowBranchPipReveal 0.45s ease-out both;
    animation-delay: inherit;
}

/* Staggered animation delays — vlotter cascade (~0.65× origineel). */
.flow-anim-1 { animation-delay: 0.05s; }
.flow-anim-2 { animation-delay: 0.20s; }
.flow-anim-3 { animation-delay: 0.32s; }
.flow-anim-4 { animation-delay: 0.46s; }
.flow-anim-5 { animation-delay: 0.58s; }
.flow-anim-6 { animation-delay: 0.72s; }
.flow-anim-7 { animation-delay: 0.84s; }
.flow-anim-8 { animation-delay: 0.98s; }
.flow-anim-9 { animation-delay: 1.10s; }

@keyframes flowNodeReveal {
    0%, 50% {
        background: #eef0f3;
        border-color: #dfe3e8;
        box-shadow: 3px 3px 0 #dfe3e8;
    }
    100% {
        background: #fff;
        border-color: var(--hl-black);
        box-shadow: 3px 3px 0 var(--hl-black);
    }
}
@keyframes flowNodeRevealWa {
    0%, 50% {
        background: #eef0f3;
        border-color: #dfe3e8;
        box-shadow: 3px 3px 0 #dfe3e8;
    }
    100% {
        background: #f0fdf4;
        border-color: #25D366;
        box-shadow: 3px 3px 0 #25D366;
    }
}
@keyframes flowBranchReveal {
    0%, 50% { opacity: 0.6; }
    100%    { opacity: 1; }
}
@keyframes flowBranchPipReveal {
    0%, 50% { background: #eef0f3; border-color: #dfe3e8; }
    100%    { background: #fff;    border-color: var(--hl-surface); }
}
@keyframes flowChildIn {
    0%, 40% { opacity: 0; transform: translateY(4px); }
    100%    { opacity: 1; transform: translateY(0); }
}
@keyframes flowLineReveal {
    0%, 50% { background: #dfe3e8; }
    100%    { background: var(--hl-black); }
}

/* ── USP illustration grid ───────────────────────────────── */
.public-usp-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}
.public-usp-card {
    background: var(--hl-surface);
    border-radius: 16px;
    padding: 32px 24px 24px;
    text-align: center;
}
.public-usp-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    min-height: 120px;
}
.public-usp-visual svg {
    width: 100%;
    max-width: 160px;
    height: auto;
}
.public-usp-label {
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--hl-black);
    margin: 0;
    line-height: 1.35;
}

/* ── Section ──────────────────────────────────────────────── */
.public-section { padding: 80px 0; }
.public-section-alt { background: var(--hl-surface); }
.public-section-dark { background: var(--hl-black); color: var(--hl-bg); }
.public-section-dark h2,
.public-section-dark h3 { color: var(--hl-bg); }
.public-section-dark a { color: var(--hl-bg); }
.public-section-dark .public-lede { color: var(--hl-secondary); }

.public-eyebrow {
    display: inline-block;
    border-left: 3px solid var(--hl-accent-dark);
    padding: 0 0 0 10px;
    color: var(--hl-accent-dark);
    font-weight: 600; font-size: 0.75rem; letter-spacing: 1px; text-transform: uppercase;
    margin-bottom: 16px;
}
.public-h2 {
    font-family: 'Cal Sans', Inter, sans-serif;
    font-weight: 600; font-size: clamp(1.75rem, 4vw, 3rem); line-height: 1.10;
    margin: 0 0 16px; max-width: 20ch; color: var(--hl-black);
}
.public-lede {
    max-width: 560px; font-size: 1.0625rem; color: var(--hl-secondary); margin: 0 0 48px;
    line-height: 1.50;
}

/* ── Logo strip ───────────────────────────────────────────── */
.public-logos {
    display: flex; flex-wrap: wrap; gap: 36px 56px; align-items: center; justify-content: center;
    padding: 16px 0;
}
.public-logos span {
    font-weight: 500; font-size: 0.9375rem; color: var(--hl-secondary);
    opacity: .65;
}

/* ── Three-column blocks ──────────────────────────────────── */
.public-grid-3 {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.public-block {
    background: var(--hl-bg); border-radius: 12px; padding: 32px;
    box-shadow: var(--hl-card-shadow);
    border: none;
}
.public-block h3 {
    font-family: 'Cal Sans', Inter, sans-serif;
    font-weight: 600; font-size: 1.25rem; line-height: 1.20; margin: 0 0 12px;
}
.public-block p { color: var(--hl-secondary); margin: 0; font-size: 0.9375rem; line-height: 1.50; }
.public-section-alt .public-block { background: var(--hl-bg); }

/* ── Feature list ─────────────────────────────────────────── */
.public-features {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
    list-style: none; padding: 0; margin: 0;
}
.public-features li {
    padding: 16px 20px; border-radius: 8px; background: var(--hl-surface);
    font-weight: 500; font-size: 0.9375rem; color: var(--hl-black);
}

/* ── Quote ───────────────────────────────────────────────── */
.public-quote {
    font-family: 'Cal Sans', Inter, sans-serif;
    font-weight: 600; font-size: clamp(1.75rem, 4vw, 3rem); line-height: 1.10;
    max-width: 20ch; color: var(--hl-bg); margin-left: auto; margin-right: auto;
}
.public-quote-attr { margin-top: 20px; color: var(--hl-secondary); font-weight: 500; font-size: 0.9375rem; }

/* ── Cases grid ──────────────────────────────────────────── */
.public-cases {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.public-case {
    background: var(--hl-bg); border-radius: 12px; overflow: hidden;
    box-shadow: var(--hl-card-shadow);
    border: none;
    display: flex; flex-direction: column;
    text-decoration: none; color: var(--hl-black); transition: transform .15s, box-shadow .15s;
}
.public-case:hover { transform: translateY(-2px); text-decoration: none;
    box-shadow: var(--hl-shadow-sharp) 0px 2px 8px -4px, var(--hl-shadow-ring) 0px 0px 0px 1px, var(--hl-shadow-soft) 0px 8px 16px;
}
.public-case-thumb {
    aspect-ratio: 16/10; background: var(--hl-surface);
    display: flex; align-items: center; justify-content: center;
    color: var(--hl-secondary); font-family: 'Cal Sans', Inter, sans-serif;
    font-weight: 600; font-size: 1.5rem;
    text-align: center; padding: 24px;
}
.public-case-body { padding: 24px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.public-case-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.public-case-tag {
    font-size: 0.6875rem; font-weight: 600; padding: 3px 8px; border-radius: 9999px;
    background: var(--hl-surface); color: var(--hl-secondary);
}
.public-case h3 { font-weight: 600; font-size: 1.125rem; line-height: 1.20; margin: 4px 0 0; }
.public-case p { color: var(--hl-secondary); margin: 0; font-size: 0.875rem; line-height: 1.50; }
.public-case-meta {
    margin-top: auto; font-size: 0.8125rem; color: var(--hl-secondary);
    display: flex; justify-content: space-between; align-items: center;
}

/* ── Case filter chips ───────────────────────────────────── */
.public-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.public-chip {
    padding: 6px 14px; border-radius: 9999px; background: var(--hl-bg);
    box-shadow: var(--hl-shadow-ring) 0px 0px 0px 1px;
    border: none;
    font-size: 0.8125rem; font-weight: 500;
    cursor: pointer; color: var(--hl-black);
    text-decoration: none;
    transition: background 0.15s;
}
.public-chip:hover { background: var(--hl-surface); text-decoration: none; }
.public-chip.is-active { background: var(--hl-accent); color: var(--hl-accent-dark); box-shadow: none; }

/* ── Pricing — Slider + Calculator ──────────────────────── */
.pricing-calculator {
    max-width: 560px;
    margin: 0 auto;
    background: var(--hl-bg);
    border-radius: 16px;
    box-shadow: var(--hl-card-shadow);
    padding: 48px;
}
.pricing-slider-group { margin-bottom: 40px; }
.pricing-slider-group > label {
    font-family: 'Cal Sans', Inter, sans-serif;
    font-weight: 600; font-size: 1.125rem; margin-bottom: 20px;
    color: var(--hl-black);
}
.pricing-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: var(--hl-surface);
    border-radius: 9999px;
    outline: none;
    margin: 16px 0 12px;
    cursor: pointer;
}
.pricing-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--hl-accent);
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.pricing-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--hl-accent);
    cursor: pointer;
    border: none;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.pricing-slider-labels {
    display: flex; justify-content: space-between;
    font-size: 0.75rem; color: var(--hl-secondary); font-weight: 500;
}

.pricing-ai-toggle {
    padding: 20px 24px;
    background: var(--hl-surface);
    border-radius: 12px;
    margin-bottom: 40px;
}
.pricing-ai-toggle label {
    display: flex; align-items: center; gap: 10px;
    font-weight: 600; font-size: 1rem; cursor: pointer;
    margin-bottom: 0;
    color: var(--hl-black);
}
.pricing-ai-toggle input[type="checkbox"] {
    width: 18px; height: 18px; cursor: pointer;
    accent-color: var(--hl-black);
}
.pricing-ai-desc {
    margin: 8px 0 0 28px;
    font-size: 0.8125rem; color: var(--hl-secondary);
}

.pricing-result { text-align: center; }
.pricing-amount {
    display: flex; align-items: baseline; justify-content: center; gap: 8px;
    margin-bottom: 8px;
}
.pricing-price {
    font-family: 'Cal Sans', Inter, sans-serif;
    font-weight: 600; font-size: 3.5rem; line-height: 1.10;
    color: var(--hl-black);
}
.pricing-period {
    font-size: 0.9375rem; color: var(--hl-secondary); font-weight: 400;
}
.pricing-plan-name {
    font-size: 0.875rem; color: var(--hl-secondary); margin-bottom: 24px;
}
.pricing-enterprise-note {
    font-family: 'Cal Sans', Inter, sans-serif;
    font-weight: 600; font-size: 2rem; line-height: 1.10;
    color: var(--hl-black); margin-bottom: 8px;
}

/* Legacy pricing table (hidden, kept for fallback) */
.public-pricing {
    width: 100%; border-collapse: separate; border-spacing: 0; background: var(--hl-bg);
    border-radius: 12px; overflow: hidden;
    box-shadow: var(--hl-card-shadow);
}
.public-pricing th, .public-pricing td {
    padding: 16px 20px; text-align: left;
    border-bottom: 1px solid var(--hl-shadow-ring);
}
.public-pricing th {
    background: var(--hl-black); color: #fff;
    font-weight: 500; font-size: 0.875rem;
}
.public-pricing tr:last-child td { border-bottom: 0; }
.public-pricing td:last-child { text-align: right; font-weight: 600; }

/* ── Team grid ───────────────────────────────────────────── */
.public-team {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.public-team-card {
    background: var(--hl-bg); border-radius: 12px; padding: 32px;
    box-shadow: var(--hl-card-shadow); border: none;
}
.public-team-avatar {
    width: 72px; height: 72px; border-radius: 50%;
    background: var(--hl-black); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Cal Sans', Inter, sans-serif;
    font-weight: 600; font-size: 1.25rem; margin-bottom: 16px;
}
.public-team-card h3 { margin: 0 0 4px; font-weight: 600; font-size: 1.0625rem; }
.public-team-card .functie { color: var(--hl-secondary); font-size: 0.875rem; margin-bottom: 16px; }
.public-team-card a { display: block; font-size: 0.875rem; padding: 3px 0; color: var(--hl-link); }

/* ── Partner levels ──────────────────────────────────────── */
.public-levels {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.public-level {
    padding: 28px 20px; border-radius: 12px; text-align: center;
    background: var(--hl-bg);
    box-shadow: var(--hl-card-shadow); border: none;
}
.public-level-medal { font-size: 1.5rem; margin-bottom: 8px; color: var(--hl-secondary); }
.public-level h3 { margin: 0 0 8px; font-weight: 600; font-size: 1.0625rem; }
.public-level p { color: var(--hl-secondary); font-size: 0.8125rem; margin: 0; }
.public-level.gold   { background: var(--hl-bg); }
.public-level.silver { background: var(--hl-bg); }
.public-level.bronze { background: var(--hl-bg); }

/* ── Blog list ───────────────────────────────────────────── */
.public-blog-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.public-blog-card {
    background: var(--hl-bg); border-radius: 12px;
    box-shadow: var(--hl-card-shadow); border: none;
    overflow: hidden; display: flex; flex-direction: column;
    text-decoration: none; color: var(--hl-black); transition: transform .15s, box-shadow .15s;
}
.public-blog-card:hover { transform: translateY(-2px); text-decoration: none;
    box-shadow: var(--hl-shadow-sharp) 0px 2px 8px -4px, var(--hl-shadow-ring) 0px 0px 0px 1px, var(--hl-shadow-soft) 0px 8px 16px;
}
.public-blog-thumb {
    aspect-ratio: 16/9; background: var(--hl-surface);
    color: var(--hl-secondary); font-weight: 500; font-size: 0.8125rem;
    display: flex; align-items: flex-end; padding: 16px;
}
.public-blog-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.public-blog-card h3 { font-weight: 600; font-size: 1.0625rem; line-height: 1.20; margin: 0; }
.public-blog-meta { font-size: 0.75rem; color: var(--hl-secondary); margin-top: auto; }

/* ── Article (legal/blog detail) ─────────────────────────── */
.public-article { max-width: 680px; margin: 0 auto; padding-top: 80px; padding-bottom: 80px; }
.public-article h1 {
    font-family: 'Cal Sans', Inter, sans-serif;
    font-weight: 600; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.10; margin: 0 0 20px;
}
.public-article h2 {
    font-family: 'Cal Sans', Inter, sans-serif;
    font-weight: 600; font-size: 1.5rem; margin: 48px 0 12px; line-height: 1.10;
}
.public-article h3 { font-weight: 600; font-size: 1.125rem; margin: 32px 0 8px; }
.public-article p, .public-article li { line-height: 1.65; color: var(--hl-black); font-size: 1rem; }
.public-article ul, .public-article ol { padding-left: 20px; }
.public-article .breadcrumb { font-size: 0.8125rem; color: var(--hl-secondary); margin-bottom: 16px; }
.public-article-meta { color: var(--hl-secondary); font-size: 0.875rem; margin-bottom: 32px; }

/* ── Result chips on case detail ─────────────────────────── */
.public-results {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
    margin: 32px 0;
}
.public-result {
    background: var(--hl-black); color: #fff;
    padding: 24px; border-radius: 12px; text-align: center;
}
.public-result-cijfer { font-family: 'Cal Sans', Inter, sans-serif; font-weight: 600; font-size: 2rem; line-height: 1; margin-bottom: 8px; }
.public-result-label { font-size: 0.8125rem; color: var(--hl-secondary); }

/* ── Contact form ────────────────────────────────────────── */
.public-contact-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start;
}
.public-contact-form .form-group { margin-bottom: 16px; }
.public-honeypot { position: absolute; left: -10000px; }

/* ── Slot CTA ────────────────────────────────────────────── */
.public-slot {
    background: var(--hl-black); color: #fff;
    border-radius: 16px; padding: 80px 64px; text-align: center;
}
.public-slot h2 {
    font-family: 'Cal Sans', Inter, sans-serif;
    font-weight: 600; font-size: clamp(1.75rem, 4vw, 3rem); line-height: 1.10; margin: 0 0 16px; color: #fff;
}
.public-slot p { font-size: 1.0625rem; margin: 0 0 28px; color: var(--hl-secondary); }
.public-slot p a { color: #fff; text-decoration: underline; }
.public-slot .btn-primary { background: var(--hl-accent); color: var(--hl-accent-dark); }

/* ── Footer ──────────────────────────────────────────────── */
.public-footer {
    background: var(--hl-black); color: #9ca3af; padding: 80px 0 32px;
}
.public-footer .public-brand { color: #fff; }
.public-footer .public-brand .brand-green { color: var(--hl-accent); }
.public-footer-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
    margin-bottom: 48px;
}
.public-footer h4 { color: #fff; font-weight: 600; margin: 0 0 16px; font-size: 0.875rem; }
.public-footer ul { list-style: none; padding: 0; margin: 0; }
.public-footer li { margin-bottom: 8px; }
.public-footer a { color: #9ca3af; font-size: 0.875rem; }
.public-footer a:hover { color: #fff; }
.public-footer-brand p { color: #6b7280; font-size: 0.875rem; max-width: 30ch; }
.public-footer-contact { margin-top: 16px; }
.public-footer-bottom {
    padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.08);
    display: flex; justify-content: space-between; font-size: 0.8125rem; color: #6b7280;
}

/* ── Cookie banner ───────────────────────────────────────── */
.public-cookie {
    position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 200;
    width: calc(100% - 32px); max-width: 720px;
    background: var(--hl-black); color: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.public-cookie-inner {
    display: flex; align-items: center; gap: 32px; padding: 20px 24px;
}
.public-cookie p { margin: 4px 0 0; color: #9ca3af; font-size: 0.8125rem; max-width: 56ch; }
.public-cookie a { color: var(--hl-link); }
.public-cookie-actions { display: flex; gap: 8px; margin-left: auto; flex-shrink: 0; }
.public-cookie .btn-secondary { background: rgba(255,255,255,0.08); color: #fff; box-shadow: none; }

/* ── Responsive (public) ─────────────────────────────────── */
@media (max-width: 1100px) {
    .public-grid-3,
    .public-cases,
    .public-team,
    .public-blog-list { grid-template-columns: repeat(2, 1fr); }
    .public-footer-grid { grid-template-columns: 1fr 1fr; }
    .public-levels { grid-template-columns: repeat(2, 1fr); }
    .public-contact-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 768px) {
    .public-nav-links,
    .public-nav-utility { display: none; }
    .public-nav-toggle { display: flex; }
    .public-nav-inner { height: 56px; }
    .public-section { padding: 56px 0; }
    .public-hero { padding: 56px 0 48px; }
    .public-grid-3,
    .public-cases,
    .public-team,
    .public-blog-list,
    .public-features,
    .public-results { grid-template-columns: 1fr; }
    .public-footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .public-footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
    .public-slot { padding: 48px 24px; border-radius: 12px; }
    .public-cookie { left: 12px; right: 12px; bottom: 12px; width: auto; transform: none; }
    .public-cookie-inner { flex-direction: column; align-items: flex-start; }
    .public-cookie-actions { margin-left: 0; width: 100%; }
    .public-cookie-actions .btn { flex: 1; text-align: center; }
    .pricing-calculator { padding: 32px 24px; }
    .pricing-price { font-size: 2.5rem; }
    .public-levels { grid-template-columns: 1fr 1fr; }
    .public-hero h1 { font-size: clamp(2rem, 8vw, 2.5rem); }
    /* Mobile: animatie tussen H1 en paragraaf via display:contents + order. */
    .hero-split {
        display: flex;
        flex-direction: column;
        gap: 24px;
    }
    .hero-text { display: contents; }
    .hero-text h1 { order: 1; }
    .hero-flow { order: 2; min-height: 320px; }
    .hero-text p { order: 3; margin-top: 0; }
    .hero-text .public-hero-cta { order: 4; justify-content: center; }
    .hero-text h1, .hero-text p { text-align: center; }
    .flow-node { min-width: 0; padding: 10px 14px; font-size: 0.875rem; }
    .flow-node--sm { padding: 8px 12px; }
}
@media (max-width: 380px) {
    .public-section { padding: 40px 0; }
    .container { padding-left: 16px; padding-right: 16px; }
    .public-usp-grid { grid-template-columns: 1fr 1fr; }
    .flow-node-icon { width: 24px; height: 24px; }
    .flow-node-icon svg { width: 14px; height: 14px; }
}
