/* ========================================
   FEATURE SUB-PAGE STYLES
   Extends main.css and reuses its tokens:
     brand red #dc2626 / #b91c1c   ink #0f172a   muted #6b7280
     Inter body  ·  IBM Plex Mono for data/axis labels
   Every selector is fp- prefixed so nothing collides with main.css.
   ======================================== */

/* ---- Top bar ------------------------------------------------ */
.fp-topbar {
    position: relative;
    z-index: 10;
}

.fp-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.25s ease;
}

.fp-back:hover {
    color: #ffffff;
}

.fp-back i {
    transition: transform 0.25s ease;
}

.fp-back:hover i {
    transform: translateX(-3px);
}

/* ---- Hero --------------------------------------------------- */
.fp-hero {
    background-image: url("../images/bg-hero.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.fp-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(220, 38, 38, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(30, 58, 95, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

.fp-hero .container {
    position: relative;
    z-index: 1;
}

.fp-hero-inner {
    padding: 30px 0 64px;
}

.fp-hero-copy {
    animation: fadeInLeft 0.8s ease-out;
}

.fp-eyebrow {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 19px;
    padding: 4px 14px;
    margin-bottom: 20px;
}

.fp-hero-title {
    font-size: 38px;
    font-weight: 600;
    line-height: 1.16;
    letter-spacing: -1.1px;
    margin-bottom: 16px;
}

.fp-hero-desc {
    font-size: 16px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.82);
    max-width: 520px;
    margin-bottom: 0;
}

/* ---- Hero visual -------------------------------------------
   A white product panel lifted off the dark hero, with small
   floating chips. Reuses main.css's float / fadeInRight keyframes
   so it moves like the floating cards on the homepage hero.       */
.fp-hero-visual {
    position: relative;
    animation: fadeInRight 0.9s ease-out;
}

.fp-hero-panel {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px 20px 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.fp-hero-panel-kicker {
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 600;
    color: #94a3b8;
}

.fp-hero-panel-title {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    margin: 2px 0 14px;
    line-height: 1.3;
}

.fp-hero-mini {
    position: relative;
    height: 186px;
}

.fp-hero-chip {
    position: absolute;
    background: #ffffff;
    border-radius: 12px;
    padding: 11px 16px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
    animation: float 3s ease-in-out infinite;
    z-index: 2;
}

.fp-hero-chip--kpi {
    top: -20px;
    right: -8px;
    animation-delay: 0.4s;
}

.fp-hero-chip--tag {
    bottom: -18px;
    left: -14px;
    display: flex;
    align-items: center;
    gap: 9px;
    animation-delay: 1s;
}

.fp-chip-label {
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
    color: #94a3b8;
}

.fp-chip-value {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #0f172a;
    line-height: 1.2;
}

.fp-chip-delta {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 600;
    color: #15803d;
}

.fp-chip-delta--muted {
    color: #64748b;
}

.fp-chip-tag-text {
    font-size: 12px;
    font-weight: 600;
    color: #1f2937;
}

/* ---- Sections ----------------------------------------------- */
.fp-section {
    padding: 84px 0;
    background: #ffffff;
}

.fp-section--tint {
    background-image: url("../images/bg-kpis.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.fp-section-head {
    margin-bottom: 36px;
}

.fp-section-title {
    font-size: 30px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.5px;
    color: #0f172a;
    margin: 0;
}

.fp-section-sub {
    font-size: 15px;
    color: #6b7280;
    line-height: 1.7;
    max-width: 660px;
    margin: 10px 0 0;
}

.fp-sample-note {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ---- Chart cards -------------------------------------------- */
.fp-card {
    background: #ffffff;
    border: 1px solid #eef1f5;
    border-radius: 16px;
    padding: 24px;
    height: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fp-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.fp-card-kicker {
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 600;
    color: #94a3b8;
}

.fp-card-title {
    font-size: 17px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.3;
    margin: 3px 0 5px;
}

.fp-card-note {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0 0 18px;
}

.fp-chart {
    position: relative;
    height: 260px;
}

.fp-chart--tall {
    height: 320px;
}

/* ---- KPI cards (mirrors the dashboard's headline cards) ------ */
.fp-kpi {
    background: #ffffff;
    border: 1px solid #eef1f5;
    border-radius: 14px;
    padding: 20px;
    height: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fp-kpi:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
}

.fp-kpi-label {
    font-size: 10px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 8px;
}

.fp-kpi-value {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -1px;
    color: #0f172a;
    line-height: 1.1;
}

.fp-kpi-delta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    padding: 3px 9px;
    margin-top: 10px;
}

.fp-kpi-delta--good {
    background: #dcfce7;
    color: #15803d;
}

.fp-kpi-delta--bad {
    background: #fee2e2;
    color: #b91c1c;
}

.fp-kpi-delta--flat {
    background: #f1f5f9;
    color: #64748b;
}

/* ---- Fuelling matrix (mirrors the dashboard component) ------- */
.fp-matrix {
    display: grid;
    gap: 3px;
    font-size: 12px;
}

.fp-matrix-head {
    text-align: center;
    font-weight: 600;
    color: #64748b;
    padding-bottom: 2px;
    font-size: 11px;
}

.fp-matrix-row-label {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
    text-align: right;
    color: #64748b;
    line-height: 1.1;
}

.fp-matrix-row-label--muted {
    color: #94a3b8;
    font-style: italic;
}

.fp-matrix-row-label--total {
    font-weight: 700;
    color: #334155;
}

.fp-matrix-cell {
    border-radius: 6px;
    padding: 7px 0;
    text-align: center;
}

.fp-matrix-pct {
    font-weight: 700;
    font-size: 13px;
    line-height: 1.2;
}

.fp-matrix-litres {
    font-size: 10px;
    font-family: 'IBM Plex Mono', monospace;
    line-height: 1.3;
}

.fp-matrix-cell--empty {
    background: rgba(220, 38, 38, 0.06);
    color: #cbd5e1;
}

.fp-matrix-cell--total {
    background: #e2e8f0;
    color: #334155;
}

.fp-matrix-cell--total .fp-matrix-litres {
    color: #64748b;
}

.fp-matrix-legend {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    font-size: 11px;
    color: #94a3b8;
}

.fp-matrix-scale {
    height: 8px;
    width: 96px;
    border-radius: 4px;
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.08), rgba(220, 38, 38, 0.74));
}

/* ---- Ask FleetPulse mock (mirrors the live modal component) -- */
.fp-ask {
    background: #ffffff;
    border: 1px solid #eef1f5;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.fp-ask-head {
    padding: 18px 22px;
    border-bottom: 1px solid #f1f5f9;
}

.fp-ask-kicker {
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 600;
    color: #94a3b8;
}

.fp-ask-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    margin-top: 2px;
}

.fp-ask-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
}

.fp-ask-input {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 14px;
    color: #334155;
}

.fp-ask-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.fp-ask-btn {
    background: #dc2626;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    padding: 9px 22px;
}

.fp-ask-hint {
    font-size: 11px;
    color: #94a3b8;
}

.fp-ask-answer {
    background: #f8fafc;
    border-radius: 10px;
    padding: 16px 18px;
    font-size: 13.5px;
    color: #334155;
    line-height: 1.7;
}

.fp-ask-answer p {
    margin: 0 0 10px;
}

.fp-ask-answer p:last-child {
    margin-bottom: 0;
}

.fp-ask-answer strong {
    color: #0f172a;
    font-weight: 700;
}

.fp-ask-export {
    display: flex;
    justify-content: flex-end;
    /* Pins the export row to the bottom so side-by-side panels line up */
    margin-top: auto;
}

.fp-ask-export-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 7px 13px;
}

/* ---- Benefit points ----------------------------------------- */
.fp-point {
    display: flex;
    gap: 18px;
}

.fp-point-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 10px;
    background: #fee2e2;
    color: #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.fp-point:hover .fp-point-icon {
    background: #dc2626;
    color: #ffffff;
    transform: scale(1.08);
}

.fp-point-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
    line-height: 1.35;
}

.fp-point-text {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.7;
    margin: 0;
}

/* ---- Responsive --------------------------------------------- */
@media (max-width: 991px) {
    .fp-hero-title {
        font-size: 33px;
    }

    .fp-section-title {
        font-size: 26px;
    }

    /* Stacked layout: give the visual room to breathe below the copy */
    .fp-hero-visual {
        margin-top: 56px;
    }
}

@media (max-width: 767px) {
    .fp-hero-inner {
        padding: 24px 0 52px;
    }

    .fp-hero-title {
        font-size: 28px;
        letter-spacing: -0.8px;
    }

    .fp-hero-desc {
        font-size: 15px;
    }

    /* Same call as the homepage makes for its floating cards */
    .fp-hero-chip {
        display: none;
    }

    .fp-hero-visual {
        margin-top: 40px;
    }

    .fp-hero-mini {
        height: 168px;
    }

    .fp-section {
        padding: 56px 0;
    }

    .fp-chart,
    .fp-chart--tall {
        height: 240px;
    }

    .fp-matrix {
        font-size: 11px;
    }
}

@media (max-width: 575px) {
    .fp-card {
        padding: 20px;
    }
}

/* ---- Motion preferences ------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .fp-hero-copy,
    .fp-hero-visual,
    .fp-hero-chip {
        animation: none;
    }

    .fp-card,
    .fp-kpi,
    .fp-point-icon,
    .fp-back i {
        transition: none;
    }

    .fp-card:hover,
    .fp-kpi:hover {
        transform: none;
    }
}
