/* QCRM public landing page.
   Self-contained marketing styles. Brand tokens mirror css/login.css so the
   landing, login, and app surfaces feel like one product. External stylesheet
   only (no inline <style>) to satisfy the app Content-Security-Policy. */

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

:root,
[data-theme="dark"] {
    --lp-surface: #0b1220;
    --lp-surface-2: #0e1626;
    --lp-panel: #111c2f;
    --lp-panel-2: #17233a;
    --lp-text: #f8fafc;
    --lp-text-muted: #aab8d0;
    --lp-faint: #8294b0;
    --lp-border: rgba(148, 163, 184, 0.18);
    --lp-accent: #60a5fa;
    --lp-accent-strong: #3b82f6;
    --lp-link: #93c5fd;
    --lp-success: #34d399;
    --lp-radius: 10px;
    --lp-radius-lg: 16px;
    --lp-font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    --lp-color-scheme: dark;
    --lp-shadow: 0 24px 70px rgba(0, 0, 0, 0.40);
    --lp-shadow-sm: 0 10px 30px rgba(0, 0, 0, 0.28);
    --lp-glow: rgba(96, 165, 250, 0.12);
    --lp-header-bg: rgba(11, 18, 32, 0.78);
    --lp-mark-inset: rgba(255, 255, 255, 0.28);
    --lp-mark-detail: rgba(255, 255, 255, 0.82);
    --lp-mark-fill: rgba(255, 255, 255, 0.78);
    --lp-btn-text: #ffffff;
}

[data-theme="light"] {
    --lp-surface: #f3f6fb;
    --lp-surface-2: #ffffff;
    --lp-panel: #ffffff;
    --lp-panel-2: #f1f5fb;
    --lp-text: #102033;
    --lp-text-muted: #51607a;
    --lp-faint: #76849c;
    --lp-border: rgba(15, 23, 42, 0.12);
    --lp-accent: #2563eb;
    --lp-accent-strong: #1d4ed8;
    --lp-link: #1d4ed8;
    --lp-success: #059669;
    --lp-color-scheme: light;
    --lp-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
    --lp-shadow-sm: 0 10px 30px rgba(15, 23, 42, 0.10);
    --lp-glow: rgba(37, 99, 235, 0.10);
    --lp-header-bg: rgba(255, 255, 255, 0.82);
    --lp-mark-inset: rgba(255, 255, 255, 0.5);
    --lp-mark-detail: rgba(255, 255, 255, 0.88);
    --lp-mark-fill: rgba(255, 255, 255, 0.84);
    --lp-btn-text: #ffffff;
}

html { scroll-behavior: smooth; }

body.lp {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(1200px 600px at 100% -10%, var(--lp-glow), transparent 60%),
        var(--lp-surface);
    color: var(--lp-text);
    font-family: var(--lp-font);
    line-height: 1.6;
    color-scheme: var(--lp-color-scheme);
    -webkit-font-smoothing: antialiased;
}

.lp-container {
    width: min(100%, 1140px);
    margin-inline: auto;
    padding-inline: clamp(16px, 4vw, 32px);
}

.lp-skip {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--lp-accent-strong);
    color: #fff;
    padding: 10px 16px;
    border-radius: var(--lp-radius);
    z-index: 100;
}
.lp-skip:focus { left: 12px; top: 12px; }

/* ---------------------------------------------------------------- Brand */
.lp-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--lp-text);
    font-weight: 800;
    font-size: 1.05rem;
    line-height: 1;
}
.lp-brand-mark {
    position: relative;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--lp-accent), color-mix(in srgb, var(--lp-success) 70%, var(--lp-accent)));
    box-shadow: inset 0 0 0 1px var(--lp-mark-inset), 0 12px 24px rgba(59, 130, 246, 0.24);
    flex: none;
}
.lp-brand-mark::before,
.lp-brand-mark::after { content: ""; position: absolute; border-radius: 3px; border: 1px solid var(--lp-mark-detail); }
.lp-brand-mark::before { inset: 7px 9px 9px 7px; }
.lp-brand-mark::after { width: 7px; height: 7px; right: 6px; bottom: 6px; background: var(--lp-mark-fill); }

/* --------------------------------------------------------------- Header */
.lp-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: saturate(140%) blur(10px);
    background: var(--lp-header-bg);
    border-bottom: 1px solid var(--lp-border);
}
.lp-header-inner { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.lp-nav { display: flex; gap: 4px; margin-inline-start: auto; }
.lp-nav a {
    color: var(--lp-text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 8px 12px;
    border-radius: 8px;
}
.lp-nav a:hover { color: var(--lp-text); background: color-mix(in srgb, var(--lp-accent) 12%, transparent); }
.lp-header-actions { display: flex; align-items: center; gap: 10px; margin-inline-start: 4px; }
.lp-theme-toggle {
    display: grid;
    place-items: center;
    width: 40px; height: 40px;
    border-radius: 9px;
    border: 1px solid var(--lp-border);
    background: color-mix(in srgb, var(--lp-panel) 70%, transparent);
    color: var(--lp-text-muted);
    cursor: pointer;
    transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.lp-theme-toggle:hover { color: var(--lp-text); border-color: color-mix(in srgb, var(--lp-accent) 40%, var(--lp-border)); }
.lp-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.lp-icon-moon { display: none; }
[data-theme="light"] .lp-icon-sun { display: none; }
[data-theme="light"] .lp-icon-moon { display: block; }

/* ---------------------------------------------------------------- Buttons */
.lp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--lp-radius);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    white-space: nowrap;
    transition: filter .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease, transform .05s ease;
}
.lp-btn:active { transform: translateY(1px); }
.lp-btn-lg { padding: 13px 24px; font-size: 1rem; }
.lp-btn-primary {
    background: linear-gradient(180deg, var(--lp-accent), var(--lp-accent-strong));
    color: var(--lp-btn-text);
    border-color: color-mix(in srgb, var(--lp-accent) 50%, transparent);
    box-shadow: 0 12px 24px rgba(59, 130, 246, 0.24);
}
.lp-btn-primary:hover { filter: brightness(1.07); box-shadow: 0 14px 30px rgba(59, 130, 246, 0.32); }
.lp-btn-ghost {
    background: color-mix(in srgb, var(--lp-panel) 70%, transparent);
    color: var(--lp-text);
    border-color: var(--lp-border);
}
.lp-btn-ghost:hover { background: color-mix(in srgb, var(--lp-accent) 14%, var(--lp-panel)); border-color: color-mix(in srgb, var(--lp-accent) 40%, var(--lp-border)); }

/* ----------------------------------------------------------------- Hero */
.lp-hero { padding: clamp(40px, 7vw, 92px) 0 clamp(36px, 5vw, 68px); }
.lp-hero .lp-container {
    width: min(100%, 1320px);
}
.lp-hero-inner {
    display: grid;
    grid-template-columns: minmax(320px, 0.9fr) minmax(460px, 1.25fr);
    gap: clamp(28px, 4vw, 56px);
    align-items: center;
}
.lp-hero-copy {
    max-width: 590px;
}
.lp-eyebrow {
    margin: 0 0 12px;
    color: var(--lp-accent);
    font-weight: 750;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.lp-h1 {
    margin: 0 0 18px;
    font-size: clamp(2rem, 4.6vw, 3.25rem);
    line-height: 1.08;
    font-weight: 820;
    letter-spacing: -0.02em;
}
.lp-lead {
    margin: 0 0 26px;
    color: var(--lp-text-muted);
    font-size: clamp(1.02rem, 1.6vw, 1.18rem);
    max-width: 48ch;
}
.lp-hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }

.lp-hero-visual {
    margin: 0;
    scroll-margin-top: 88px;
}
.lp-hero-visual img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--lp-shadow);
}

/* Trust badges under the hero CTAs */
.lp-badges { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 11px 20px; }
.lp-badges li { display: inline-flex; align-items: center; gap: 9px; color: var(--lp-text-muted); font-size: 0.9rem; font-weight: 600; }
.lp-badges svg {
    width: 22px; height: 22px; flex: none; padding: 4px;
    fill: none; stroke: var(--lp-success); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
    border-radius: 50%;
    background: color-mix(in srgb, var(--lp-success) 16%, transparent);
}

/* -------------------------------------------------------------- Sections */
.lp-section { padding: clamp(48px, 7vw, 90px) 0; }
.lp-section-alt {
    background: linear-gradient(180deg, transparent, var(--lp-surface-2) 12% 88%, transparent);
    border-block: 1px solid var(--lp-border);
}
.lp-section-head { max-width: 640px; margin: 0 auto clamp(28px, 4vw, 48px); text-align: center; }
.lp-section-head .lp-eyebrow { text-align: center; }
.lp-h2 {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.015em;
}

/* ------------------------------------------------------------ Feature grid */
.lp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 22px); }
.lp-card {
    background: color-mix(in srgb, var(--lp-panel) 92%, transparent);
    border: 1px solid var(--lp-border);
    border-radius: var(--lp-radius-lg);
    padding: clamp(20px, 2.6vw, 28px);
    box-shadow: var(--lp-shadow-sm);
    transition: transform .15s ease, border-color .15s ease;
}
.lp-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--lp-accent) 40%, var(--lp-border)); }
.lp-card-icon {
    display: inline-grid;
    place-items: center;
    width: 46px; height: 46px;
    border-radius: 12px;
    margin-bottom: 16px;
    background: color-mix(in srgb, var(--lp-accent) 16%, transparent);
    color: var(--lp-accent);
}
.lp-card-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.lp-card h3 { margin: 0 0 8px; font-size: 1.12rem; font-weight: 750; }
.lp-card p { margin: 0; color: var(--lp-text-muted); font-size: 0.95rem; }

/* ----------------------------------------------------------------- CTA band */
.lp-cta { padding: clamp(44px, 6vw, 76px) 0; }
.lp-cta-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
    padding: clamp(28px, 4vw, 44px);
    border-radius: var(--lp-radius-lg);
    border: 1px solid var(--lp-border);
    background:
        radial-gradient(900px 400px at 0% 0%, var(--lp-glow), transparent 70%),
        color-mix(in srgb, var(--lp-panel) 90%, transparent);
    box-shadow: var(--lp-shadow-sm);
}
.lp-cta-inner .lp-lead { margin: 8px 0 0; }
.lp-cta-inner .lp-h2 { max-width: 18ch; }
.lp-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ------------------------------------------------------------------ Footer */
.lp-footer {
    border-top: 1px solid var(--lp-border);
    background: color-mix(in srgb, var(--lp-surface-2) 55%, transparent);
    padding: 48px 0 24px;
}
.lp-footer-grid {
    display: grid;
    grid-template-columns: 1.7fr 1fr 1fr 1fr;
    gap: 28px 24px;
    padding-bottom: 26px;
    border-bottom: 1px solid var(--lp-border);
}
.lp-footer-brand .lp-brand { margin-bottom: 13px; }
.lp-footer-brand p { color: var(--lp-text-muted); font-size: 0.9rem; max-width: 34ch; margin: 0 0 8px; }
.lp-footer-by { font-size: 0.86rem; }
.lp-footer-by a { color: var(--lp-link); text-decoration: none; font-weight: 700; }
.lp-footer-by a:hover { text-decoration: underline; text-underline-offset: 3px; }
.lp-footer-col { display: flex; flex-direction: column; gap: 11px; }
.lp-footer-col h4 {
    margin: 0 0 3px;
    color: var(--lp-text);
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.lp-footer-col a { color: var(--lp-text-muted); font-size: 0.9rem; text-decoration: none; font-weight: 600; }
.lp-footer-col a:hover { color: var(--lp-text); text-decoration: underline; text-underline-offset: 3px; }
.lp-footer-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    padding-top: 22px;
}
.lp-footer-bar p { margin: 0; color: var(--lp-faint); font-size: 0.84rem; }
.lp-footer-mini { display: flex; gap: 18px; }
.lp-footer-mini a { color: var(--lp-text-muted); text-decoration: none; font-size: 0.84rem; font-weight: 600; }
.lp-footer-mini a:hover { color: var(--lp-text); text-decoration: underline; text-underline-offset: 3px; }

/* -------------------------------------------------------------- Responsive */
@media (max-width: 900px) {
    .lp-hero-inner { grid-template-columns: 1fr; }
    .lp-hero-visual { max-width: 900px; }
    .lp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lp-footer-grid { grid-template-columns: 1fr 1fr; }
    .lp-footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
    .lp-nav { display: none; }
    .lp-hero-visual img { border-radius: 12px; }
    .lp-grid { grid-template-columns: 1fr; }
    .lp-cta-inner { flex-direction: column; align-items: flex-start; }
    .lp-footer-grid { grid-template-columns: 1fr 1fr; }
    .lp-login { padding-inline: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *,
    *::before,
    *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
