/* ============================================================
   Readiness visuals (NAS-379)
   ComplianceOrbit — /compliance hero
   ReadinessFlow   — /howitwork Layer 3
   Both replace PNGs whose wording was drawn into the image. Theme follows
   body.light-mode, which compliance.js and howitwork.js toggle.
============================================================ */

.ro-orbit,
.rf-flow {
    --rv-blue: #1da1ff;
    --rv-purple: #b77bff;
    --rv-green: #35d36a;
    --rv-gold: #f5a623;
    --rv-gold-light: #ffd166;
    --rv-text: #ffffff;
    --rv-muted: #94a3b8;
    --rv-card: rgba(8, 18, 38, 0.82);
    --rv-line: rgba(255, 255, 255, 0.12);
    container-type: inline-size;
    color: var(--rv-text);
}

body.light-mode .ro-orbit,
body.light-mode .rf-flow {
    --rv-blue: #0a7fd6;
    --rv-purple: #8b3fe0;
    --rv-green: #12924a;
    --rv-gold: #c97a00;
    --rv-gold-light: #b36b00;
    --rv-text: #0f172a;
    --rv-muted: #475569;
    --rv-card: rgba(255, 255, 255, 0.92);
    --rv-line: rgba(15, 23, 42, 0.12);
}

.ro-tone-blue { --rv-tone: var(--rv-blue); }
.ro-tone-purple { --rv-tone: var(--rv-purple); }
.ro-tone-green { --rv-tone: var(--rv-green); }

/* ---------------- ComplianceOrbit ---------------- */

.ro-orbit {
    position: relative;
    width: min(100%, 620px);
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    background: radial-gradient(circle at 50% 50%, rgba(29, 161, 255, 0.22), transparent 58%);
}

body.light-mode .ro-orbit {
    background: radial-gradient(circle at 50% 50%, rgba(29, 161, 255, 0.16), transparent 60%);
}

.ro-ring {
    position: absolute;
    left: 12%;
    top: 12%;
    width: 76%;
    height: 76%;
    border-radius: 50%;
    border: 1px solid rgba(29, 161, 255, 0.45);
    box-shadow: 0 0 40px rgba(29, 161, 255, 0.25), inset 0 0 40px rgba(29, 161, 255, 0.12);
}

.ro-stage {
    position: absolute;
    left: 28%;
    top: 63%;
    width: 44%;
    height: 12%;
    border-radius: 50%;
    background:
        radial-gradient(ellipse at center, rgba(120, 200, 255, 0.95) 0%, rgba(29, 161, 255, 0.55) 18%, transparent 42%),
        repeating-radial-gradient(ellipse at center, rgba(29, 161, 255, 0.55) 0 2px, transparent 2px 9px);
    box-shadow: 0 0 60px rgba(29, 161, 255, 0.55);
    opacity: 0.9;
}

.ro-emblem {
    position: absolute;
    left: 29%;
    top: 29%;
    width: 42%;
    height: auto;
}

/* The page gives every image in .compliance-section a rounded frame, and in
   light mode a white backing; the emblem is a cut-out and needs neither. */
.ro-orbit img.ro-emblem {
    border-radius: 0;
    background: none;
    box-shadow: none;
    filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.55));
}

body.light-mode .ro-orbit img.ro-emblem {
    background: none;
    box-shadow: none;
    filter: drop-shadow(0 18px 26px rgba(15, 23, 42, 0.28));
}

.ro-badges {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ro-badge {
    position: absolute;
    width: 23%;
    aspect-ratio: 1 / 1;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35cqw;
    text-align: center;
    background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--rv-tone) 22%, transparent), var(--rv-card) 70%);
    border: 1.5px solid color-mix(in srgb, var(--rv-tone) 70%, transparent);
    box-shadow: 0 0 24px color-mix(in srgb, var(--rv-tone) 35%, transparent);
}

.ro-badge i {
    font-size: max(4.6cqw, 14px);
    color: var(--rv-tone);
    margin-bottom: 0.6cqw;
}

.ro-badge-name {
    font-size: max(2.55cqw, 9.5px);
    font-weight: 700;
    line-height: 1.15;
    color: var(--rv-text);
    padding: 0 6%;
}

.ro-badge-sub {
    font-size: max(2cqw, 8px);
    color: var(--rv-muted);
}

/* ---------------- ReadinessFlow ---------------- */

.rf-flow {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 0;
}

.rf-eyebrow {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    color: var(--rv-gold);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.rf-eyebrow::before,
.rf-eyebrow::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--rv-gold), transparent);
    opacity: 0.6;
}

.rf-cards {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.6rem;
}

.rf-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.9rem 0.5rem;
    text-align: center;
    border-radius: 12px;
    background: var(--rv-card);
    border: 1px solid color-mix(in srgb, var(--rv-gold) 35%, transparent);
    box-shadow: 0 0 18px color-mix(in srgb, var(--rv-gold) 12%, transparent);
}

.rf-card i {
    font-size: 1.5rem;
    color: var(--rv-gold);
}

.rf-card-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--rv-gold-light);
    line-height: 1.2;
}

.rf-card-desc {
    font-size: 0.68rem;
    line-height: 1.35;
    color: var(--rv-muted);
}

.rf-connectors {
    width: 100%;
    height: 56px;
    overflow: visible;
}

.rf-connectors path {
    fill: none;
    stroke: var(--rv-gold);
    stroke-width: 2;
    opacity: 0.75;
    filter: drop-shadow(0 0 4px var(--rv-gold));
}

.rf-dash {
    width: min(100%, 440px);
    padding: 1.1rem 1.25rem;
    border-radius: 16px;
    background: var(--rv-card);
    border: 1px solid color-mix(in srgb, var(--rv-gold) 55%, transparent);
    box-shadow: 0 0 36px color-mix(in srgb, var(--rv-gold) 22%, transparent);
}

.rf-dash-head {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--rv-line);
}

.rf-dash-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1.5px solid var(--rv-gold);
    color: var(--rv-gold);
    font-size: 1.25rem;
    box-shadow: 0 0 16px color-mix(in srgb, var(--rv-gold) 40%, transparent);
}

.rf-dash-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--rv-text);
}

.rf-dash-sub {
    font-size: 0.78rem;
    color: var(--rv-muted);
}

.rf-steps {
    list-style: none;
    margin: 0.9rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem 1rem;
}

.rf-step {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.8rem;
    color: var(--rv-text);
}

.rf-step i {
    width: 1rem;
    color: var(--rv-gold);
    text-align: center;
}

.rf-arrow {
    color: var(--rv-gold);
    font-size: 1.1rem;
    margin: 0.6rem 0;
    filter: drop-shadow(0 0 6px var(--rv-gold));
}

.rf-brand {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0.9rem 1.5rem;
    border-radius: 16px;
    background: var(--rv-card);
    border: 1px solid color-mix(in srgb, var(--rv-gold) 40%, transparent);
}

.rf-logo {
    width: 170px;
    height: auto;
    padding-right: 1.25rem;
    border-right: 1px solid var(--rv-line);
}

.rf-logo-light,
body.light-mode .rf-logo-dark {
    display: none;
}

body.light-mode .rf-logo-light {
    display: block;
}

.rf-tagline {
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--rv-text);
}

.rf-tagline strong {
    color: var(--rv-gold);
    font-weight: 600;
}

/* On a phone the orbit is ~350px wide; give the badges a little more room so
   the minimum font sizes above still fit inside the circle. */
@container (max-width: 420px) {
    .ro-badge {
        width: 26%;
    }
}

/* Five cards stop fitting on one row: wrap them and drop the connectors,
   which only make sense when every card sits above the dashboard. */
@container (max-width: 560px) {
    .rf-cards {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .rf-card {
        grid-column: span 2;
    }

    .rf-card:nth-child(4) {
        grid-column: 2 / span 2;
    }

    .rf-connectors {
        display: none;
    }

    .rf-dash {
        margin-top: 1rem;
    }
}

@container (max-width: 380px) {
    .rf-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rf-card,
    .rf-card:nth-child(4) {
        grid-column: auto;
    }

    .rf-card:last-child {
        grid-column: 1 / -1;
    }

    .rf-steps {
        grid-template-columns: 1fr;
    }

    .rf-brand {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .rf-logo {
        padding-right: 0;
        border-right: 0;
    }
}

/* ---------------- LayersHero (/howitwork hero) ---------------- */

.lh-hero {
    --lh-blue: #3b82f6;
    --lh-green: #22c55e;
    --lh-gold: #f5a623;
    --lh-text: #ffffff;
    --lh-muted: #94a3b8;
    --lh-card: rgba(6, 14, 30, 0.88);
    container-type: inline-size;
    width: 100%;
    padding: 1.75rem 1.25rem 1.25rem;
    border-radius: 28px;
    color: var(--lh-text);
    background:
        radial-gradient(ellipse 70% 45% at 50% 82%, rgba(59, 130, 246, 0.28), transparent 70%),
        radial-gradient(ellipse 60% 50% at 50% 20%, rgba(34, 197, 94, 0.08), transparent 70%),
        #040a18;
}

body.light-mode .lh-hero {
    --lh-blue: #1d64d8;
    --lh-green: #138a43;
    --lh-gold: #b86e00;
    --lh-text: #0f172a;
    --lh-muted: #475569;
    --lh-card: rgba(255, 255, 255, 0.94);
    background:
        radial-gradient(ellipse 70% 45% at 50% 82%, rgba(59, 130, 246, 0.18), transparent 70%),
        #eef4ff;
}

.lh-layer-safernet { --lh-tone: var(--lh-blue); }
.lh-layer-zed { --lh-tone: var(--lh-green); }
.lh-layer-compliance { --lh-tone: var(--lh-gold); }

.lh-layers {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.lh-layer {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem 0.75rem 1.1rem;
    border-radius: 14px;
    background: var(--lh-card);
    border: 1.5px solid color-mix(in srgb, var(--lh-tone) 75%, transparent);
    box-shadow: 0 0 26px color-mix(in srgb, var(--lh-tone) 30%, transparent);
}

.lh-mark {
    display: grid;
    place-items: center;
    height: 44px;
    margin-bottom: 0.35rem;
    color: var(--lh-tone);
    font-size: 2rem;
}

.lh-hero img.lh-mark-img {
    width: 38px;
    max-width: none;
    height: auto;
    border-radius: 0;
    filter: none;
}

.lh-mark-letter {
    font-size: 2.6rem;
    font-weight: 900;
    line-height: 1;
    font-style: italic;
    text-shadow: 0 0 14px color-mix(in srgb, var(--lh-tone) 60%, transparent);
}

.lh-number {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--lh-muted);
}

.lh-name {
    margin-top: 0.15rem;
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--lh-tone);
}

.lh-role {
    margin-top: 0.3rem;
    min-height: 2.4em;
    font-size: 0.7rem;
    line-height: 1.3;
    color: var(--lh-text);
}

.lh-items {
    list-style: none;
    margin: 0.7rem 0 0;
    padding: 0;
    align-self: stretch;
    display: grid;
    gap: 0.35rem;
    text-align: left;
}

.lh-items li {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    font-size: 0.68rem;
    line-height: 1.3;
    color: var(--lh-text);
}

.lh-items i {
    flex: none;
    color: var(--lh-tone);
    font-size: 0.7rem;
}

.lh-beams {
    display: block;
    width: 100%;
    height: 70px;
    overflow: visible;
}

.lh-beams path {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
}

.lh-beam-safernet { stroke: var(--lh-blue); filter: drop-shadow(0 0 5px var(--lh-blue)); }
.lh-beam-zed { stroke: var(--lh-green); filter: drop-shadow(0 0 5px var(--lh-green)); }
.lh-beam-compliance { stroke: var(--lh-gold); filter: drop-shadow(0 0 5px var(--lh-gold)); }

.lh-platform {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lh-stage {
    position: absolute;
    top: 62px;
    left: 50%;
    width: min(70%, 340px);
    height: 70px;
    transform: translateX(-50%);
    border-radius: 50%;
    background:
        radial-gradient(ellipse at center, rgba(140, 210, 255, 0.85) 0%, rgba(59, 130, 246, 0.45) 22%, transparent 55%),
        repeating-radial-gradient(ellipse at center, rgba(59, 130, 246, 0.5) 0 2px, transparent 2px 10px);
    box-shadow: 0 0 60px rgba(59, 130, 246, 0.5);
}

.lh-hero img.lh-emblem {
    position: relative;
    width: 110px;
    max-width: none;
    height: auto;
    border-radius: 0;
    filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.6));
}

body.light-mode .lh-hero img.lh-emblem,
body.light-mode .lh-hero img.lh-mark-img {
    filter: drop-shadow(0 10px 18px rgba(15, 23, 42, 0.25));
}

.lh-wordmark {
    position: relative;
    margin-top: 1.4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-transform: uppercase;
}

.lh-wordmark-top {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    line-height: 1;
    color: var(--lh-text);
}

.lh-wordmark-bottom {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.42em;
    color: var(--lh-gold);
}

.lh-wordmark-tag {
    margin-top: 0.4rem;
    font-size: 0.72rem;
    letter-spacing: 0;
    text-transform: none;
    color: var(--lh-text);
}

/* Three cards side by side need ~480px; below that stack them and drop the
   beams, which only line up when the cards sit in one row. */
@container (max-width: 480px) {
    .lh-layers {
        grid-template-columns: 1fr;
    }

    .lh-role {
        min-height: 0;
    }

    .lh-items {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lh-beams {
        display: none;
    }

    .lh-platform {
        margin-top: 1.5rem;
    }
}
