/* --- FRANKLY LANDING PAGE ---
   Scoped to index.html only. The shared marketing.css still drives login.html
   and app/logged-out.html and is deliberately left alone, so the auth pages
   render exactly as they did before this redesign.

   Palette is sampled from the CAM brand marks in app/img/:
     navy #243084 · blue #2478B4 · magenta #903C90                          */

:root {
    --cam-navy: #243084;
    --cam-blue: #2478b4;
    --cam-magenta: #903c90;

    --bg: #070a18;
    --panel: #0d122c;
    --panel-2: #111739;
    --rule: #1f2752;
    --rule-soft: #171e40;
    --ink: #f4f6fc;
    --ink-dim: #a7b1d0;
    --ink-faint: #6b769b;

    /* lightened brand tints, for legibility against the dark ground */
    --blue-lift: #6fb4e0;
    --magenta-lift: #c578c5;

    --font: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

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

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Brand hairline across the very top */
.topline {
    position: relative;
    z-index: 2;
    height: 3px;
    background: linear-gradient(90deg, var(--cam-navy), var(--cam-blue) 52%, var(--cam-magenta));
}

/* Ambient bloom. First layer paints on top: a tight magenta note at the crown,
   a broad navy wash beneath it, a cool blue lift off to the side. The navy is
   doing most of the work — that is what keeps the magenta from reading pink. */
.glow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(40rem 22rem at 50% -10%, rgba(144, 60, 144, 0.46), transparent 64%),
        radial-gradient(66rem 40rem at 50% -16%, rgba(36, 48, 132, 0.62), transparent 72%),
        radial-gradient(30rem 22rem at 88% 2%, rgba(36, 120, 180, 0.20), transparent 74%);
}

.grid-lines {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.026) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
    background-size: 74px 74px;
    -webkit-mask-image: radial-gradient(44rem 32rem at 40% 4%, #000 26%, transparent 76%);
    mask-image: radial-gradient(44rem 32rem at 40% 4%, #000 26%, transparent 76%);
}

.wrap {
    position: relative;
    z-index: 1;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- Nav --- */
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.75rem 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    flex: none;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.10), 0 6px 18px -8px rgba(0, 0, 0, 0.7);
}

.brand-name {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.brand-name .dot {
    color: var(--magenta-lift);
}

.brand-by {
    border-left: 1px solid var(--rule);
    margin-left: 0.25rem;
    padding-left: 0.875rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.btn-ghost {
    border: 1px solid var(--rule);
    border-radius: 4px;
    padding: 0.5rem 1.125rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ink-dim);
    transition: border-color 0.18s, color 0.18s, background-color 0.18s;
}

.btn-ghost:hover {
    border-color: var(--magenta-lift);
    color: var(--ink);
    background: rgba(144, 60, 144, 0.14);
}

/* --- Hero --- */
.hero {
    padding: 5.5rem 0 0;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-bottom: 2rem;
}

.eyebrow::before {
    content: "";
    width: 40px;
    height: 1px;
    background: var(--cam-magenta);
    flex: none;
}

.hero h1 {
    font-size: clamp(2.75rem, 6vw, 4.25rem);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -0.035em;
    margin-bottom: 1.75rem;
    max-width: 20ch;
}

/* Solid CAM blue with a magenta rule beneath, in place of the old
   blue-to-emerald gradient fill. */
.hero h1 .accent {
    color: var(--blue-lift);
    box-shadow: inset 0 -0.09em 0 var(--cam-magenta);
}

.lede {
    font-size: 1.125rem;
    color: var(--ink-dim);
    max-width: 34rem;
    margin-bottom: 2.5rem;
}

.cta-row {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    flex-wrap: wrap;
}

.btn-solid {
    display: inline-block;
    background: var(--ink);
    color: #0a0e22;
    padding: 0.875rem 1.75rem;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    transition: transform 0.18s, box-shadow 0.18s;
}

.btn-solid:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 32px -12px rgba(197, 120, 197, 0.6);
}

.access-note {
    font-size: 0.8125rem;
    color: var(--ink-faint);
    max-width: 22rem;
    line-height: 1.5;
}

.access-note a {
    color: var(--ink-dim);
    border-bottom: 1px solid var(--rule);
}

.access-note a:hover {
    color: var(--blue-lift);
    border-bottom-color: var(--blue-lift);
}

/* --- Illustrative product panel (hand-drawn, not a screen capture) --- */
.console {
    margin-top: 4rem;
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
    border: 1px solid var(--rule);
    border-radius: 14px;
    box-shadow: 0 50px 90px -40px rgba(0, 0, 0, 0.92), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

.console-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--rule);
    background: rgba(255, 255, 255, 0.018);
}

.console-bar i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: block;
    flex: none;
    background: #2a3260;
}

.console-title {
    margin-left: 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--ink-faint);
}

.console-tag {
    margin-left: auto;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--magenta-lift);
    border: 1px solid rgba(197, 120, 197, 0.32);
    border-radius: 4px;
    padding: 0.1875rem 0.5rem;
}

.console-body {
    padding: 1.5rem;
}

.kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.875rem;
    margin-bottom: 1.5rem;
}

.kpi {
    background: rgba(255, 255, 255, 0.022);
    border: 1px solid var(--rule);
    border-radius: 9px;
    padding: 0.875rem 1rem;
}

.kpi-label {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-bottom: 0.5rem;
}

.kpi-val {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.kpi-delta {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.1875rem;
}

.kpi-delta.up {
    color: var(--blue-lift);
}

.kpi-delta.down {
    color: var(--magenta-lift);
}

.kpi-delta.flat {
    color: var(--ink-faint);
}

.chart {
    border: 1px solid var(--rule);
    border-radius: 9px;
    padding: 1.125rem 1.25rem 1rem;
    background: rgba(255, 255, 255, 0.014);
}

.chart-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.chart-head h4 {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: -0.005em;
    color: var(--ink-dim);
}

.legend {
    display: flex;
    gap: 1rem;
    font-size: 0.6875rem;
    color: var(--ink-faint);
}

.legend span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.legend i {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    display: block;
}

.legend i.actual {
    background: var(--cam-blue);
}

.legend i.budget {
    background: var(--cam-navy);
}

.legend i.variance {
    background: var(--cam-magenta);
}

/* The figures in the panel above are invented. Say so. */
.console-caption {
    font-size: 0.6875rem;
    color: var(--ink-faint);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 0.875rem;
    text-align: right;
}

/* --- Features --- */
.features {
    border-top: 1px solid var(--rule);
    margin-top: 5.5rem;
    padding: 5rem 0 1rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.feature {
    padding: 0 2.5rem;
    border-left: 1px solid var(--rule-soft);
}

.feature:first-child {
    padding-left: 0;
    border-left: 0;
}

.feature:last-child {
    padding-right: 0;
}

.feature-num {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: var(--ink-faint);
    font-variant-numeric: tabular-nums;
}

.feature svg {
    display: block;
    margin: 1.5rem 0 1.375rem;
}

.feature h3 {
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin-bottom: 0.625rem;
}

.feature p {
    font-size: 0.9375rem;
    color: var(--ink-dim);
}

/* --- Footer --- */
.site-footer {
    border-top: 1px solid var(--rule);
    margin-top: 5.5rem;
    padding: 2.5rem 0 3.5rem;
}

.foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.lockup {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.lockup img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    flex: none;
}

.lockup-text {
    font-size: 0.8125rem;
    color: var(--ink-faint);
    line-height: 1.45;
}

.lockup-text strong {
    display: block;
    color: var(--ink-dim);
    font-weight: 600;
    letter-spacing: -0.005em;
}

.foot-links {
    display: flex;
    gap: 1.75rem;
    font-size: 0.8125rem;
    color: var(--ink-faint);
}

.foot-links a:hover {
    color: var(--blue-lift);
}

@media (max-width: 860px) {
    .hero {
        padding-top: 3.25rem;
    }

    .hero h1 {
        max-width: none;
    }

    .console {
        margin-top: 2.75rem;
    }

    .console-body {
        padding: 1.125rem;
    }

    .console-caption {
        text-align: left;
    }

    .features {
        margin-top: 4rem;
        padding-top: 3.5rem;
    }

    .feature {
        padding: 0 0 2.25rem;
        border-left: 0;
    }

    .brand-by {
        display: none;
    }
}

/* Respect a reduced-motion preference: drop the lift/transform affordances. */
@media (prefers-reduced-motion: reduce) {
    .btn-solid,
    .btn-ghost {
        transition: none;
    }

    .btn-solid:hover {
        transform: none;
    }
}
