/* =========================================================
   CRM-007 — Marketing Theme
   Shares the product's own visual language (deep navy surfaces,
   brass/compass-needle accent, hot/warm/cold status colors) so the
   marketing site visually predicts the app a visitor is about to join.
   ========================================================= */

:root {
    /* --- surfaces (mirrors the in-app crm-app.css tokens) --- */
    --deep: #12242B;
    --deep-2: #1C3540;
    --deep-3: #24424F;
    --canvas: #F7F5F0;
    --card: #FFFFFF;
    --hairline: #DCE1E4;
    --hairline-dark: #2B4854;

    /* --- accent (brass / compass needle) --- */
    --brass: #B8823C;
    --brass-light: #E4B372;
    --brass-dark: #8C6329;
    --brass-wash: #FBF3E7;

    /* --- text --- */
    --ink: #16232A;
    --ink-soft: #384752;
    --muted: #5B6B76;
    --muted-2: #8695A0;
    --on-dark: #EAF1F4;
    --on-dark-muted: #9FB4BD;

    /* --- semantic status (matches the in-app lead badges) --- */
    --hot: #C1462B;
    --hot-wash: #FCEAE5;
    --warm: #B8823C;
    --cold: #4A7A96;
    --success: #2F7D5C;
    --success-wash: #E7F3EE;

    /* --- type --- */
    --font-display: "Space Grotesk", sans-serif;
    --font-body: "IBM Plex Sans", sans-serif;
    --font-mono: "IBM Plex Mono", monospace;

    /* --- Bootstrap 5.3 variable overrides --- */
    --bs-primary: var(--deep);
    --bs-primary-rgb: 18, 36, 43;
    --bs-primary-text-emphasis: var(--deep-2);
    --bs-primary-bg-subtle: var(--brass-wash);
    --bs-primary-border-subtle: var(--hairline);
    --bs-link-color: var(--deep);
    --bs-link-hover-color: var(--brass-dark);
    --bs-body-bg: var(--canvas);
    --bs-body-color: var(--ink);
    --bs-body-font-family: var(--font-body);
    --bs-border-radius: 0.5rem;
    --bs-border-radius-sm: 0.35rem;
    --bs-border-radius-lg: 0.75rem;
}

body {
    font-family: var(--font-body);
}

h1, h2, h3, h4, .display-1, .display-2, .display-3, .display-4 {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--ink);
}

.font-mono {
    font-family: var(--font-mono);
}

/* --- Buttons --- */
.btn {
    font-weight: 600;
    border-radius: var(--bs-border-radius-sm);
    padding: 0.65rem 1.4rem;
    transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease, border-color 120ms ease;
}

.btn-primary {
    background: var(--deep);
    border-color: var(--deep);
    color: var(--on-dark);
}

    .btn-primary:hover, .btn-primary:focus {
        background: var(--deep-2);
        border-color: var(--deep-2);
        color: #fff;
        transform: translateY(-1px);
    }

.btn-accent {
    background: var(--brass);
    border-color: var(--brass);
    color: #fff;
}

    .btn-accent:hover, .btn-accent:focus {
        background: var(--brass-dark);
        border-color: var(--brass-dark);
        color: #fff;
        transform: translateY(-1px);
    }

.btn-outline-secondary {
    border-color: var(--hairline);
    color: var(--ink);
}

    .btn-outline-secondary:hover {
        background: var(--card);
        border-color: var(--ink);
        color: var(--ink);
    }

.btn-lg {
    padding: 0.85rem 1.9rem;
    font-size: 1.02rem;
}

/* --- Brand mark --- */
.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1;
}

.brand-glyph {
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 50%;
    background: var(--deep);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

    .brand-glyph::after {
        content: "";
        width: 0;
        height: 0;
        border-left: 4px solid transparent;
        border-right: 4px solid transparent;
        border-bottom: 9px solid var(--brass);
        transform: rotate(45deg);
    }

.brand-wordmark {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--ink);
    letter-spacing: -0.01em;
}

.brand-wordmark .dim {
    color: var(--muted-2);
    font-weight: 500;
}

/* --- Eyebrow labels --- */
.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brass-dark);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

    .eyebrow::before {
        content: "";
        width: 1.1rem;
        height: 1px;
        background: var(--brass);
    }

/* --- Top nav --- */
.marketing-nav {
    background: rgba(247, 245, 240, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--hairline);
    padding: 0.85rem 0;
}

    .marketing-nav .nav-link {
        color: var(--ink-soft);
        font-weight: 500;
        font-size: 0.94rem;
        padding: 0.5rem 0.9rem !important;
    }

        .marketing-nav .nav-link:hover, .marketing-nav .nav-link.active {
            color: var(--ink);
        }

/* --- Hero --- */
.hero {
    background:
        radial-gradient(ellipse 60% 50% at 85% 0%, rgba(184, 130, 60, 0.14), transparent 70%),
        var(--canvas);
    padding: 5.5rem 0 4.5rem;
    position: relative;
    overflow: hidden;
}

    .hero h1 {
        font-size: clamp(2.4rem, 4.2vw, 3.6rem);
        line-height: 1.08;
    }

    .hero .lead {
        color: var(--muted);
        max-width: 34rem;
        font-size: 1.15rem;
    }

.hero-visual-wrap {
    position: relative;
}

    .hero-visual-wrap::before {
        content: "";
        position: absolute;
        inset: -1.5rem -1rem auto auto;
        width: 70%;
        height: 70%;
        background: radial-gradient(circle, rgba(184, 130, 60, 0.16), transparent 70%);
        z-index: 0;
        border-radius: 50%;
    }

/* --- Launch-discount burst (Home hero) — a spiky badge that links to /pricing. The spikes
   rotate slowly and continuously behind a static text layer, so "50% OFF" stays upright and
   readable at all times instead of spinning with the shape. Only rendered while the live launch
   coupon is still valid (see Home.razor), so it needs no manual removal once it expires. --- */
.discount-burst {
    position: absolute;
    top: -6.5rem;
    right: 0.5rem;
    width: 162px;
    height: 162px;
    z-index: 2;
    display: block;
    text-decoration: none;
    filter: drop-shadow(0 10px 18px rgba(18, 36, 43, 0.4));
    animation: burst-pulse 2.6s ease-in-out infinite;
}

    .discount-burst:hover .discount-burst-spikes {
        animation-duration: 4s;
    }

.discount-burst-spikes {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brass-light), var(--brass) 55%, var(--brass-dark));
    clip-path: polygon(50% 0%, 60.09% 12.33%, 75% 6.7%, 77.58% 22.42%, 93.3% 25%, 87.67% 39.91%, 100% 50%, 87.67% 60.09%, 93.3% 75%, 77.58% 77.58%, 75% 93.3%, 60.09% 87.67%, 50% 100%, 39.91% 87.67%, 25% 93.3%, 22.42% 77.58%, 6.7% 75%, 12.33% 60.09%, 0% 50%, 12.33% 39.91%, 6.7% 25%, 22.42% 22.42%, 25% 6.7%, 39.91% 12.33%);
    animation: burst-spin 18s linear infinite;
}

.discount-burst-text {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
    color: var(--deep);
    text-align: center;
}

    .discount-burst-text strong {
        font-family: var(--font-display);
        font-size: 2.4rem;
        font-weight: 700;
    }

    .discount-burst-text small {
        font-size: 0.93rem;
        letter-spacing: 0.09em;
        font-weight: 700;
        text-transform: uppercase;
        margin-top: 0.2rem;
    }

@keyframes burst-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes burst-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

@media (max-width: 991.98px) {
    .discount-burst { top: -5rem; right: 0.5rem; width: 114px; height: 114px; }
    .discount-burst-text strong { font-size: 1.7rem; }
    .discount-burst-text small { font-size: 0.78rem; }
}

@media (prefers-reduced-motion: reduce) {
    .discount-burst, .discount-burst-spikes { animation: none; }
}

/* --- Product preview mockups (used across Home/Features instead of stock imagery) --- */
.product-preview {
    background: var(--deep);
    border-radius: var(--bs-border-radius-lg);
    box-shadow: 0 30px 60px -20px rgba(18, 36, 43, 0.45), 0 2px 0 rgba(255, 255, 255, 0.04) inset;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

    .product-preview .pp-chrome {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--hairline-dark);
    }

    .product-preview .pp-dot {
        width: 0.55rem;
        height: 0.55rem;
        border-radius: 50%;
        background: var(--on-dark-muted);
        opacity: 0.5;
    }

    .product-preview .pp-body {
        padding: 1.1rem 1.2rem 1.4rem;
    }

.pp-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.8rem;
    border-radius: 0.4rem;
    margin-bottom: 0.4rem;
}

    .pp-row:hover, .pp-row.pp-highlight {
        background: rgba(255, 255, 255, 0.04);
    }

.pp-avatar {
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.pp-name {
    color: var(--on-dark);
    font-size: 0.88rem;
    font-weight: 600;
}

.pp-sub {
    color: var(--on-dark-muted);
    font-size: 0.74rem;
    font-family: var(--font-mono);
}

.pp-badge {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    padding: 0.2rem 0.55rem;
    border-radius: 1rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

    .pp-badge.hot {
        background: rgba(193, 70, 43, 0.22);
        color: #ec9d89;
    }

    .pp-badge.warm {
        background: rgba(184, 130, 60, 0.22);
        color: var(--brass-light);
    }

    .pp-badge.cold {
        background: rgba(74, 122, 150, 0.25);
        color: #9dc3d8;
    }

.pp-kanban {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
}

.pp-kcol-label {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--on-dark-muted);
    margin-bottom: 0.5rem;
}

.pp-kcard {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 0.4rem;
    padding: 0.55rem 0.65rem;
    margin-bottom: 0.5rem;
}

.pp-kcard-title {
    color: var(--on-dark);
    font-size: 0.76rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.pp-kcard-value {
    color: var(--brass-light);
    font-family: var(--font-mono);
    font-size: 0.72rem;
}

/* --- Dimension divider (kept as a signature rule motif) --- */
.dimension-divider {
    display: flex;
    align-items: center;
    margin: 2.5rem 0;
}

    .dimension-divider .dim-tick {
        width: 1px;
        height: 10px;
        background: var(--muted-2);
        flex-shrink: 0;
    }

    .dimension-divider .dim-line {
        flex: 1;
        height: 1px;
        background: var(--hairline);
        margin: 0 2px;
    }

    .dimension-divider.dimension-divider-accent .dim-line,
    .dimension-divider.dimension-divider-accent .dim-tick {
        background: var(--brass);
    }

/* --- Feature cards --- */
.feature-card {
    border: 1px solid var(--hairline);
    border-radius: var(--bs-border-radius);
    background: var(--card);
    height: 100%;
    padding: 1.6rem;
    transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

    .feature-card:hover {
        border-color: var(--brass-light);
        box-shadow: 0 12px 28px -12px rgba(18, 36, 43, 0.18);
        transform: translateY(-2px);
    }

    .feature-card .feature-icon {
        width: 2.75rem;
        height: 2.75rem;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--deep);
        color: var(--brass-light);
        border-radius: 0.5rem;
        margin-bottom: 1.1rem;
    }

    .feature-card h5, .feature-card h6 {
        margin-bottom: 0.5rem;
    }

/* --- Split feature rows (Features page) --- */
.feature-row {
    padding: 4rem 0;
}

    .feature-row + .feature-row {
        border-top: 1px solid var(--hairline);
    }

.feature-row-list {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0 0;
}

    .feature-row-list li {
        display: flex;
        align-items: flex-start;
        gap: 0.65rem;
        margin-bottom: 0.65rem;
        color: var(--ink-soft);
        font-size: 0.95rem;
    }

    .feature-row-list .check {
        color: var(--success);
        font-family: var(--font-mono);
        font-weight: 700;
        flex-shrink: 0;
        margin-top: 0.1rem;
    }

/* --- Pricing --- */
.pricing-card {
    border: 1px solid var(--hairline);
    border-radius: var(--bs-border-radius-lg);
    background: var(--card);
    position: relative;
}

    .pricing-card.pricing-card-featured {
        border-color: var(--brass);
        box-shadow: 0 20px 40px -18px rgba(184, 130, 60, 0.35);
    }

    .pricing-card .price {
        font-family: var(--font-mono);
        font-size: 2.5rem;
        color: var(--ink);
        font-weight: 700;
    }

        .pricing-card .price .period {
            font-size: 1rem;
            color: var(--muted);
            font-family: var(--font-body);
            font-weight: 400;
        }

.pricing-featured-tag {
    position: absolute;
    top: -0.7rem;
    left: 1.6rem;
    background: var(--brass);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.3rem 0.65rem;
    border-radius: 1rem;
    font-weight: 700;
}

/* --- Diagram panels (How it works page) --- */
.diagram-panel {
    border: 1px solid var(--hairline);
    border-radius: var(--bs-border-radius-lg);
    background: var(--card);
    padding: 1.5rem;
    overflow-x: auto;
}

    .diagram-panel svg {
        display: block;
        width: 100%;
        min-width: 760px;
        height: auto;
    }

.diagram-lane {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

    .diagram-lane .dot {
        width: 0.4rem;
        height: 0.4rem;
        border-radius: 50%;
        background: var(--brass);
    }

/* --- Stats strip --- */
.stat-strip {
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
    padding: 2.5rem 0;
}

    .stat-strip .stat-value {
        font-family: var(--font-mono);
        font-size: 2.1rem;
        font-weight: 700;
        color: var(--deep);
    }

    .stat-strip .stat-label {
        color: var(--muted);
        font-size: 0.85rem;
    }

/* --- CTA band --- */
.cta-band {
    background: var(--deep);
    background-image: radial-gradient(ellipse 60% 80% at 15% 20%, rgba(184, 130, 60, 0.16), transparent 70%);
    color: #fff;
    padding: 4.5rem 0;
}

    .cta-band h2 {
        color: #fff;
    }

/* --- Form controls (Contact page) --- */
.marketing-form .form-control,
.marketing-form .form-select {
    border-color: var(--hairline);
    padding: 0.7rem 0.9rem;
    border-radius: var(--bs-border-radius-sm);
}

    .marketing-form .form-control:focus,
    .marketing-form .form-select:focus {
        border-color: var(--brass);
        box-shadow: 0 0 0 0.2rem rgba(184, 130, 60, 0.15);
    }

.marketing-form label {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--ink-soft);
    margin-bottom: 0.35rem;
}

/* --- Footer --- */
footer.site-footer {
    background: var(--deep);
    color: var(--on-dark-muted);
    padding: 3rem 0 2rem;
    font-size: 0.9rem;
}

    footer.site-footer a {
        color: var(--on-dark);
        text-decoration: none;
    }

        footer.site-footer a:hover {
            color: var(--brass-light);
        }

    footer.site-footer h6 {
        color: var(--on-dark);
        font-family: var(--font-mono);
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        margin-bottom: 0.9rem;
    }

    footer.site-footer .footer-links {
        list-style: none;
        padding: 0;
        margin: 0;
    }

        footer.site-footer .footer-links li {
            margin-bottom: 0.55rem;
        }

    footer.site-footer .footer-bottom {
        border-top: 1px solid var(--hairline-dark);
        margin-top: 2.5rem;
        padding-top: 1.5rem;
        font-size: 0.82rem;
        color: var(--on-dark-muted);
    }

@media (prefers-reduced-motion: no-preference) {
    .fade-up {
        animation: fade-up 600ms ease-out both;
    }

    @keyframes fade-up {
        from {
            opacity: 0;
            transform: translateY(14px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}
