/* ============================================================
   Base design system + marketing landing components
   Brand tokens are overridden per site (see :root).
   ============================================================ */
:root {
    --bg: #f6f8fc;
    --surface: #ffffff;
    --surface-2: #f1f4fb;
    --text: #101828;
    --muted: #5b6478;
    --border: #e2e7f0;
    --border-strong: #cdd5e4;

    --brand: #2563eb;
    --brand-2: #06b6d4;
    --brand-ink: #ffffff;

    --ok: #15803d;
    --warn: #a16207;
    --danger: #b42318;

    --radius: 14px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
    --shadow: 0 18px 40px -18px rgba(16, 24, 40, .35);
    --shadow-lg: 0 40px 80px -32px rgba(16, 24, 40, .45);
    --maxw: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); }

a:focus, button:focus, input:focus, select:focus, textarea:focus {
    outline: 3px solid #ffbf47;
    outline-offset: 1px;
}

.container { width: min(var(--maxw), 92vw); margin: 0 auto; }

/* full-bleed escape hatch for a section inside .container */
.bleed {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* ------------------------------------------------------------
   Header
   ------------------------------------------------------------ */
header.site {
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    backdrop-filter: saturate(140%) blur(12px);
    -webkit-backdrop-filter: saturate(140%) blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 40;
}
header.site .inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
    padding: 12px 0;
}
.brand {
    display: inline-flex; align-items: center; gap: 10px;
    font-weight: 800; text-decoration: none; color: var(--text);
    font-size: 1.12rem; letter-spacing: -.01em;
}
.brand::before {
    content: "";
    width: 26px; height: 26px; border-radius: 8px; flex: none;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 6px 16px -6px var(--brand);
}
nav.site { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
nav.site a {
    text-decoration: none; color: var(--muted);
    padding: 7px 11px; border-radius: 9px; font-weight: 600; font-size: .93rem;
    transition: background .18s, color .18s;
}
nav.site a:hover { color: var(--text); background: var(--surface-2); }
nav.site form { display: inline-flex; margin: 0 0 0 2px; }
nav.site .btn { padding: 7px 13px; margin-left: 4px; }
nav.site .btn.secondary { padding: 6px 11px; }

/* ------------------------------------------------------------
   Layout
   ------------------------------------------------------------ */
main { padding: 28px 0 72px; }
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
}
.grid { display: grid; gap: 18px; }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

h1 { font-size: 1.7rem; margin: 0 0 10px; letter-spacing: -.02em; }
h2 { font-size: 1.28rem; margin: 0 0 8px; letter-spacing: -.01em; }
h3 { font-size: 1.06rem; margin: 0 0 6px; }
p.lead { font-size: 1.08rem; color: var(--muted); }

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */
.btn {
    display: inline-flex; align-items: center; gap: 8px; justify-content: center;
    background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand-2) 22%, var(--brand)));
    color: var(--brand-ink);
    border: 1px solid transparent; border-radius: 11px;
    padding: 11px 18px; text-decoration: none; cursor: pointer;
    font-size: .95rem; font-weight: 700; line-height: 1.1;
    box-shadow: 0 12px 26px -14px var(--brand);
    transition: transform .18s, box-shadow .18s, filter .18s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.03); box-shadow: 0 18px 34px -14px var(--brand); }
.btn.secondary {
    background: var(--surface); color: var(--text);
    border-color: var(--border-strong); box-shadow: var(--shadow-sm);
}
.btn.secondary:hover { border-color: var(--brand); color: var(--brand); }
.btn.danger { background: var(--danger); border-color: var(--danger); box-shadow: none; }
.btn.lg { padding: 14px 24px; font-size: 1rem; border-radius: 13px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* ------------------------------------------------------------
   Forms & data
   ------------------------------------------------------------ */
label { display: block; font-weight: 600; margin-bottom: 5px; font-size: .9rem; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=file], select, textarea {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); font-size: .95rem; background: #fff;
    transition: border-color .18s, box-shadow .18s;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent);
}
.field { margin-bottom: 14px; }
.hint { color: var(--muted); font-size: .85rem; margin-top: 4px; }

table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: .92rem; }
th { background: var(--surface-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; border: 1px solid var(--border); background: var(--surface-2); }
.badge.ok { color: var(--ok); border-color: #bbe3c6; background: #ecfdf3; }
.badge.warn { color: var(--warn); border-color: #f2d999; background: #fef7e6; }
.badge.danger { color: var(--danger); border-color: #f2b8b2; background: #fdecea; }
.badge.info { color: #0b4bbd; border-color: #bccdfb; background: #eaf1ff; }

.flash { padding: 12px 15px; border-radius: var(--radius-sm); margin: 18px 0; border: 1px solid; }
.flash.status { background: #ecfdf3; border-color: #bbe3c6; color: var(--ok); }
.flash.error { background: #fdecea; border-color: #f2b8b2; color: var(--danger); }
.errors { margin: 0 0 14px; padding-left: 18px; color: var(--danger); }

.muted { color: var(--muted); }
.small { font-size: .85rem; }
.stack > * + * { margin-top: 10px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
footer.site {
    border-top: 1px solid var(--border);
    background: var(--surface);
    padding: 26px 0; color: var(--muted); font-size: .88rem;
}
footer.site a { color: var(--muted); text-decoration: none; }
footer.site a:hover { color: var(--brand); }

/* ============================================================
   Marketing / landing components
   ============================================================ */

/* --- Hero --- */
.lp-hero {
    position: relative;
    overflow: hidden;
    margin-top: -28px;
    padding: clamp(80px, 9vw, 128px) 24px clamp(64px, 8vw, 112px);
    background:
        radial-gradient(60% 90% at 12% 0%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 70%),
        radial-gradient(55% 80% at 92% 8%, color-mix(in srgb, var(--brand-2) 22%, transparent), transparent 70%),
        linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
    border-bottom: 1px solid var(--border);
}
.lp-hero .inner { max-width: var(--maxw); margin: 0 auto; }
.lp-hero-grid {
    display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: center;
}
.lp-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 14px; border-radius: 999px;
    background: color-mix(in srgb, var(--brand) 12%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--brand) 26%, transparent);
    color: var(--brand); font-weight: 700; font-size: .8rem; letter-spacing: .02em;
    text-transform: uppercase;
}
.lp-title {
    font-size: clamp(2.1rem, 4.4vw, 3.3rem);
    line-height: 1.05; letter-spacing: -.035em; font-weight: 800;
    margin: 20px 0 0;
}
.lp-title .grad {
    background: linear-gradient(100deg, var(--brand), color-mix(in srgb, var(--brand-2) 62%, #0b1220));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lp-lead { font-size: clamp(1.02rem, 1.7vw, 1.18rem); color: var(--muted); margin-top: 18px; max-width: 54ch; }
.lp-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.lp-note { margin-top: 16px; color: var(--muted); font-size: .88rem; display: flex; align-items: center; gap: 8px; }
.lp-note::before { content: "✓"; color: var(--ok); font-weight: 800; }

/* faux product panel */
.lp-panel {
    border-radius: 18px; background: var(--surface);
    border: 1px solid var(--border); box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.lp-panel .bar {
    display: flex; align-items: center; gap: 6px;
    padding: 11px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.lp-panel .bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); display: inline-block; }
.lp-panel .bar i:nth-child(1) { background: #ff5f57; }
.lp-panel .bar i:nth-child(2) { background: #febc2e; }
.lp-panel .bar i:nth-child(3) { background: #28c840; }
.lp-panel .bar span { margin-left: 8px; font-size: .78rem; color: var(--muted); font-weight: 600; }
.lp-panel .body { padding: 18px; display: grid; gap: 12px; }
.lp-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.lp-row .dot { width: 34px; height: 34px; border-radius: 9px; flex: none; display: grid; place-items: center; font-size: 1rem; background: color-mix(in srgb, var(--brand) 12%, var(--surface)); }
.lp-row .lines { flex: 1; }
.lp-row .lines b { display: block; font-size: .9rem; }
.lp-row .lines span { display: block; height: 8px; border-radius: 4px; background: var(--surface-2); margin-top: 6px; }
.lp-row .lines span.short { width: 55%; }
.lp-tile { height: 60px; border-radius: 12px; background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 16%, var(--surface)), color-mix(in srgb, var(--brand-2) 16%, var(--surface))); border: 1px solid var(--border); }

/* --- value strip --- */
.lp-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: -34px; position: relative; z-index: 2; }
.lp-value { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.lp-value h3 { display: flex; align-items: center; gap: 9px; }
.lp-value h3 .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 12%, var(--surface)); color: var(--brand); }
.lp-value p { margin: 6px 0 0; color: var(--muted); font-size: .92rem; }

/* --- generic section --- */
.lp-section { padding: clamp(52px, 7vw, 88px) 24px; }
.lp-section.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.lp-head { max-width: 720px; margin: 0 auto 40px; text-align: center; }
.lp-head .kicker { color: var(--brand); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; }
.lp-head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -.03em; margin: 10px 0 0; }
.lp-head p { color: var(--muted); margin: 12px 0 0; font-size: 1.02rem; }

/* --- steps --- */
.lp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.lp-step { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.lp-step .num {
    width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-weight: 800;
    background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand-2) 22%, var(--brand))); color: #fff; box-shadow: 0 10px 22px -12px var(--brand);
}
.lp-step h3 { margin: 16px 0 6px; }
.lp-step p { margin: 0; color: var(--muted); font-size: .93rem; }

/* --- feature grid --- */
.lp-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.lp-feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); transition: transform .18s, border-color .18s, box-shadow .18s; }
.lp-feature:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.lp-feature .ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-size: 1.15rem; background: color-mix(in srgb, var(--brand) 12%, var(--surface)); }
.lp-feature h3 { margin: 15px 0 6px; }
.lp-feature p { margin: 0; color: var(--muted); font-size: .92rem; }

/* --- split content --- */
.lp-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 60px); align-items: center; }
.lp-split.rev .lp-split-media { order: -1; }
.lp-split h2 { font-size: clamp(1.5rem, 2.6vw, 2.05rem); letter-spacing: -.03em; }
.lp-split p { color: var(--muted); font-size: 1.02rem; }
.lp-checks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.lp-checks li { position: relative; padding-left: 34px; color: var(--text); font-size: .96rem; }
.lp-checks li::before {
    content: "✓"; position: absolute; left: 0; top: 1px;
    width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center;
    background: color-mix(in srgb, var(--ok) 16%, var(--surface)); color: var(--ok); font-weight: 800; font-size: .8rem;
}
.lp-media {
    border-radius: 18px; padding: 22px; background: var(--surface);
    border: 1px solid var(--border); box-shadow: var(--shadow);
}
.lp-media .lp-tile { height: 130px; margin-bottom: 12px; }

/* --- tools tiles --- */
.lp-tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lp-tool { display: block; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); transition: .18s; }
.lp-tool:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: var(--shadow); }
.lp-tool b { display: block; }
.lp-tool span { color: var(--muted); font-size: .88rem; }
.lp-tool .go { color: var(--brand); font-weight: 700; font-size: .88rem; margin-top: 10px; display: inline-block; }

/* --- FAQ --- */
.lp-faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.lp-faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 20px; box-shadow: var(--shadow-sm); }
.lp-faq summary { cursor: pointer; font-weight: 700; padding: 15px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: "+"; color: var(--brand); font-weight: 800; font-size: 1.2rem; }
.lp-faq details[open] summary::after { content: "–"; }
.lp-faq p { margin: 0 0 16px; color: var(--muted); }

/* --- final CTA band --- */
.lp-cta-band {
    border-radius: 24px; padding: clamp(34px, 5vw, 60px); text-align: center; position: relative; overflow: hidden;
    background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand-2) 22%, var(--brand))); color: #fff; box-shadow: var(--shadow-lg);
}
.lp-cta-band h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -.03em; margin: 0 0 12px; }
.lp-cta-band p { margin: 0 auto 26px; max-width: 52ch; opacity: .92; }
.lp-cta-band .btn { background: #fff; color: var(--brand); box-shadow: 0 14px 30px -14px rgba(0,0,0,.4); }
.lp-cta-band .btn.secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }

/* --- misc --- */
.lp-center { text-align: center; }
.lp-mt { margin-top: 34px; }
.lp-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.lp-kpi { text-align: center; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.lp-kpi b { display: block; font-size: 1.9rem; letter-spacing: -.02em; background: linear-gradient(120deg, var(--brand), color-mix(in srgb, var(--brand-2) 62%, #0b1220)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-kpi span { color: var(--muted); font-size: .85rem; font-weight: 600; }

/* --- responsive --- */
@media (max-width: 900px) {
    .lp-hero-grid { grid-template-columns: 1fr; }
    .lp-hero .lp-panel { order: -1; }
    .lp-values, .lp-steps, .lp-features, .lp-tools, .lp-kpis { grid-template-columns: 1fr 1fr; }
    .lp-split { grid-template-columns: 1fr; }
    .lp-split.rev .lp-split-media { order: 0; }
}
@media (max-width: 620px) {
    .lp-values, .lp-steps, .lp-features, .lp-tools, .lp-kpis { grid-template-columns: 1fr; }
    nav.site { width: 100%; }
    header.site .inner { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; scroll-behavior: auto; }
}
