/* ============================================================
   Brainflood marketing - "how you actually use it" infographics
   (show-steps.css)

   Used by:
     /hosts/    -> #the-rig        (show-night setup diagram + rail)
     /players/  -> #between-nights (phone loop + rail)

   Rules honored here:
   - Every color reads a theme token with a taproom-dark fallback.
     NEVER hardcode a theme id in this file (see the LIGHT-THEME
     FAMILY note in themes.css). The only literal colors below are
     inside the fake device screens - those deliberately render the
     product's dark taproom look on every theme, same as the real
     screenshots elsewhere on the site.
   - Scroll entrances key off the marketing-fx engine: the engine
     adds .bf-fx-revealed to .bf-fx-reveal elements. Pre-reveal
     hiding is gated on html.bf-fx-ready so no-JS renders static.
   - One reduced-motion guard at the bottom kills every animation.
   ============================================================ */

/* ------------------------------------------------------------
   Shared: eyebrow + step rail
   ------------------------------------------------------------ */
.bfhow-eyebrow {
    font-family: 'Courier Prime', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent, #f0a32f);
    margin-bottom: 0.9rem;
}

.bfhow-rail {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bfhow-step-num {
    width: 3rem;
    height: 3rem;
    border-radius: 0.9rem;
    display: grid;
    place-items: center;
    font-family: 'Anton', 'Rubik', sans-serif;
    font-size: 1.3rem;
    line-height: 1;
    color: var(--accent, #f0a32f);
    background: rgba(var(--accent-rgb, 240, 163, 47), 0.12);
    border: 1px solid rgba(var(--accent-rgb, 240, 163, 47), 0.35);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.bfhow-step-title {
    font-family: 'Rubik', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary, #f4ebdc);
    margin: 0.75rem 0 0.25rem;
}

.bfhow-step-sub {
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--text-secondary, #b7a488);
    margin: 0;
}

.bfhow-footnote {
    font-family: 'Courier Prime', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    color: var(--text-muted, #a08d71);
    text-align: center;
    margin-top: 2.25rem;
}

/* --- horizontal rail (hosts): coaster chips tossed on the bar --- */
.bfhow-rail-h {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem 1rem;
    margin-top: 2.75rem;
}

.bfhow-rail-h .bfhow-step {
    position: relative;
    text-align: center;
}

.bfhow-rail-h .bfhow-step-num {
    margin: 0 auto;
    transform: rotate(-3deg);
}

.bfhow-rail-h .bfhow-step:nth-child(even) .bfhow-step-num {
    transform: rotate(2.5deg);
}

@media (min-width: 640px) {
    .bfhow-rail-h {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .bfhow-rail-h {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 1rem;
    }

    /* dashed cable between coasters */
    .bfhow-rail-h .bfhow-step:not(:last-child)::after {
        content: "";
        position: absolute;
        top: 1.5rem;
        left: calc(50% + 2.1rem);
        width: calc(100% - 4.2rem);
        border-top: 2px dashed rgba(var(--accent-rgb, 240, 163, 47), 0.3);
    }
}

/* --- vertical rail (players): a tab running down the page --- */
.bfhow-rail-v {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.bfhow-rail-v .bfhow-step {
    position: relative;
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr);
    column-gap: 1.1rem;
    align-items: start;
}

.bfhow-rail-v .bfhow-step-title {
    margin-top: 0.2rem;
}

.bfhow-rail-v .bfhow-step:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 1.5rem;
    top: 3.35rem;
    bottom: -1.15rem;
    border-left: 2px dashed rgba(var(--accent-rgb, 240, 163, 47), 0.28);
}

/* ------------------------------------------------------------
   The Rig - stage card + SVG diagram (hosts)
   ------------------------------------------------------------ */
.bfhow-stage {
    position: relative;
    border-radius: 1.25rem;
    background: var(--kit-card-bg, rgba(255, 255, 255, 0.06));
    border: 1px solid var(--kit-border-2, rgba(255, 255, 255, 0.14));
    box-shadow: var(--kit-shadow-md, 0 18px 40px rgba(0, 0, 0, 0.35));
    padding: clamp(0.75rem, 2.5vw, 2rem);
    overflow: hidden;
}

.bfhow-rig {
    display: block;
    width: 100%;
    height: auto;
    color: var(--text-primary, #f4ebdc);
}

/* --- SVG vocabulary --- */
.rig-line {
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.rig-line-dim {
    opacity: 0.35;
}

.rig-line-faint {
    opacity: 0.16;
}

.rig-fill-dim {
    fill: currentColor;
    opacity: 0.07;
}

.rig-gold {
    stroke: var(--accent, #f0a32f);
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.rig-gold-fill {
    fill: var(--accent, #f0a32f);
}

.rig-copper-fill {
    fill: rgb(var(--secondary-rgb, 226, 105, 74));
}

/* cables carry their dimness via stroke-opacity attributes so the
   reveal choreography can drive `opacity` without a specificity war */
.rig-cable {
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
}

/* device screens always show the product's dark taproom look */
.rig-screen {
    fill: #190f06;
    stroke: currentColor;
    stroke-opacity: 0.25;
    stroke-width: 1.5;
}

.rig-screen-text {
    font-family: 'Courier Prime', monospace;
    font-size: 11px;
    letter-spacing: 0.12em;
    fill: #decdb4;
    opacity: 0.8;
}

.rig-anton {
    font-family: 'Anton', 'Rubik', sans-serif;
    letter-spacing: 0.04em;
}

.rig-label {
    font-family: 'Courier Prime', monospace;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    fill: currentColor;
    opacity: 0.5;
}

.rig-tag circle {
    fill: var(--accent, #f0a32f);
    stroke: rgba(var(--accent-rgb, 240, 163, 47), 0.35);
    stroke-width: 5;
}

.rig-tag text {
    font-family: 'Anton', 'Rubik', sans-serif;
    font-size: 15px;
    fill: var(--btn-accent-text, #2a1b07);
    text-anchor: middle;
}

@media (max-width: 600px) {
    .rig-label-sm {
        display: none;
    }
}

/* --- entrance choreography (fires when the fx engine reveals
       the stage). Base state hidden only when JS is present. --- */
html.bf-fx-ready .bfhow-stage .rig-anim {
    opacity: 0;
}

html.bf-fx-ready .bfhow-stage.bf-fx-revealed .rig-a-room {
    animation: bfhow-fade 0.7s ease-out 0.05s both;
}

html.bf-fx-ready .bfhow-stage.bf-fx-revealed .rig-a-tv {
    animation: bfhow-fade 0.7s ease-out 0.15s both;
}

html.bf-fx-ready .bfhow-stage.bf-fx-revealed .rig-a-laptop {
    animation: bfhow-rise-in 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
}

html.bf-fx-ready .bfhow-stage.bf-fx-revealed .rig-a-speaker {
    animation: bfhow-rise-in 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.45s both;
}

html.bf-fx-ready .bfhow-stage.bf-fx-revealed .rig-a-tent {
    animation: bfhow-rise-in 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s both;
}

html.bf-fx-ready .bfhow-stage.bf-fx-revealed .rig-cable {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: bfhow-draw 1s ease-in-out both;
    opacity: 1;
}

html.bf-fx-ready .bfhow-stage.bf-fx-revealed .rig-cable-hdmi {
    animation-delay: 0.5s;
}

html.bf-fx-ready .bfhow-stage.bf-fx-revealed .rig-cable-aux {
    animation-delay: 0.75s;
}

html.bf-fx-ready .bfhow-stage.bf-fx-revealed .rig-a-tvscreen {
    animation: bfhow-flicker 0.6s ease-out 1.1s both;
}

html.bf-fx-ready .bfhow-stage.bf-fx-revealed .rig-a-bar {
    transform-box: fill-box;
    transform-origin: bottom;
    animation: bfhow-bar-rise 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

html.bf-fx-ready .bfhow-stage.bf-fx-revealed .rig-a-bar-1 { animation-delay: 1.45s; }
html.bf-fx-ready .bfhow-stage.bf-fx-revealed .rig-a-bar-2 { animation-delay: 1.55s; }
html.bf-fx-ready .bfhow-stage.bf-fx-revealed .rig-a-bar-3 { animation-delay: 1.65s; }
html.bf-fx-ready .bfhow-stage.bf-fx-revealed .rig-a-bar-4 { animation-delay: 1.75s; }

html.bf-fx-ready .bfhow-stage.bf-fx-revealed .rig-a-phone {
    transform-box: fill-box;
    transform-origin: center;
    animation: bfhow-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

html.bf-fx-ready .bfhow-stage.bf-fx-revealed .rig-a-phone-1 { animation-delay: 1.5s; }
html.bf-fx-ready .bfhow-stage.bf-fx-revealed .rig-a-phone-2 { animation-delay: 1.65s; }
html.bf-fx-ready .bfhow-stage.bf-fx-revealed .rig-a-phone-3 { animation-delay: 1.8s; }

html.bf-fx-ready .bfhow-stage.bf-fx-revealed .rig-tag {
    transform-box: fill-box;
    transform-origin: center;
    animation: bfhow-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

html.bf-fx-ready .bfhow-stage.bf-fx-revealed .rig-tag-1 { animation-delay: 1.9s; }
html.bf-fx-ready .bfhow-stage.bf-fx-revealed .rig-tag-2 { animation-delay: 2.0s; }
html.bf-fx-ready .bfhow-stage.bf-fx-revealed .rig-tag-3 { animation-delay: 2.1s; }
html.bf-fx-ready .bfhow-stage.bf-fx-revealed .rig-tag-4 { animation-delay: 2.2s; }
html.bf-fx-ready .bfhow-stage.bf-fx-revealed .rig-tag-5 { animation-delay: 2.3s; }
html.bf-fx-ready .bfhow-stage.bf-fx-revealed .rig-tag-6 { animation-delay: 2.4s; }

/* --- ambient loops, only once revealed --- */
.bfhow-stage.bf-fx-revealed .rig-arc {
    animation: bfhow-ping 2.6s ease-out infinite;
}

.bfhow-stage.bf-fx-revealed .rig-arc-2 { animation-delay: 0.35s; }
.bfhow-stage.bf-fx-revealed .rig-arc-3 { animation-delay: 0.7s; }

.bfhow-stage.bf-fx-revealed .rig-wifi {
    animation: bfhow-ping 3s ease-out infinite;
}

.bfhow-stage.bf-fx-revealed .rig-wifi-2 { animation-delay: 0.4s; }
.bfhow-stage.bf-fx-revealed .rig-wifi-3 { animation-delay: 0.8s; }

.bfhow-stage.bf-fx-revealed .rig-qrglow {
    animation: bfhow-glow 2.8s ease-in-out infinite;
}

/* no-JS or pre-reveal: arcs sit at a quiet resting opacity */
.rig-arc,
.rig-wifi {
    opacity: 0.45;
}

.rig-qrglow {
    opacity: 0.22;
}

/* ------------------------------------------------------------
   Between Nights - the phone loop (players)
   ------------------------------------------------------------ */
.bfhow-phone {
    position: relative;
    width: min(272px, 78vw);
    aspect-ratio: 9 / 16;
    margin-inline: auto;
    border-radius: 2.6rem;
    background: #170d05;
    border: 1px solid var(--kit-border-2, rgba(255, 255, 255, 0.18));
    box-shadow:
        inset 0 0 0 3px rgba(255, 240, 214, 0.06),
        0 24px 60px rgba(0, 0, 0, 0.4);
}

.bfhow-phone::before {
    /* the notch */
    content: "";
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 34%;
    height: 9px;
    border-radius: 999px;
    background: rgba(255, 240, 214, 0.1);
    z-index: 2;
}

.bfhow-phone-screen {
    position: absolute;
    inset: 9px;
    border-radius: 2.1rem;
    overflow: hidden;
    background: #1c1108;
}

/* four screens crossfade on a 20s loop */
.bfhow-screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 2.3rem 1rem 1rem;
    opacity: 0;
    animation: bfhow-cycle 20s linear infinite;
}

.bfhow-screen:nth-child(1) { animation-delay: 0s; }
.bfhow-screen:nth-child(2) { animation-delay: 5s; }
.bfhow-screen:nth-child(3) { animation-delay: 10s; }
.bfhow-screen:nth-child(4) { animation-delay: 15s; }

/* fake-app vocabulary: fixed taproom palette, same as .rig-screen */
.bfhow-scr-head {
    font-family: 'Courier Prime', monospace;
    font-size: 0.62rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(244, 235, 220, 0.55);
}

.bfhow-scr-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    background: rgba(255, 240, 214, 0.06);
    border: 1px solid rgba(255, 240, 214, 0.1);
    border-radius: 0.7rem;
    padding: 0.62rem 0.7rem;
}


.bfhow-scr-row-main {
    min-width: 0;
    flex: 1;
}

.bfhow-scr-name {
    font-family: 'Rubik', sans-serif;
    font-weight: 600;
    font-size: 0.72rem;
    color: #f4ebdc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bfhow-scr-sub {
    font-size: 0.62rem;
    color: rgba(222, 205, 180, 0.65);
}

.bfhow-dot {
    flex: none;
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #f0a32f;
}

.bfhow-dot-copper {
    background: #e2694a;
}

.bfhow-dot-cream {
    background: rgba(244, 235, 220, 0.5);
}

.bfhow-chip {
    flex: none;
    font-family: 'Rubik', sans-serif;
    font-weight: 700;
    font-size: 0.56rem;
    letter-spacing: 0.04em;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: #f0a32f;
    color: #2a1b07;
}

.bfhow-chip-ghost {
    background: transparent;
    color: rgba(240, 163, 47, 0.9);
    border: 1px solid rgba(240, 163, 47, 0.5);
}

.bfhow-big {
    font-family: 'Anton', 'Rubik', sans-serif;
    font-size: 2.1rem;
    line-height: 1;
    color: #f0a32f;
}

.bfhow-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    text-align: center;
    margin-top: 0.4rem;
}

.bfhow-days {
    display: flex;
    gap: 0.4rem;
    justify-content: center;
    margin-top: 0.5rem;
}

.bfhow-day {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    background: rgba(240, 163, 47, 0.85);
}

.bfhow-day-off {
    background: rgba(244, 235, 220, 0.15);
}

.bfhow-day-today {
    background: #f0a32f;
    box-shadow: 0 0 0 3px rgba(240, 163, 47, 0.25);
    animation: bfhow-glow 1.8s ease-in-out infinite;
}

.bfhow-scr-btn {
    margin-top: auto;
    text-align: center;
    font-family: 'Rubik', sans-serif;
    font-weight: 700;
    font-size: 0.7rem;
    padding: 0.6rem 0.5rem;
    border-radius: 0.7rem;
    background: #f0a32f;
    color: #2a1b07;
}

.bfhow-scr-btn-ghost {
    background: transparent;
    color: rgba(240, 163, 47, 0.9);
    border: 1px solid rgba(240, 163, 47, 0.45);
}

.bfhow-avatar {
    flex: none;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-family: 'Rubik', sans-serif;
    font-weight: 700;
    font-size: 0.6rem;
    background: rgba(240, 163, 47, 0.2);
    color: #f0a32f;
}

.bfhow-avatar-c {
    background: rgba(226, 105, 74, 0.22);
    color: #e2694a;
}

.bfhow-count {
    flex: none;
    font-family: 'Courier Prime', monospace;
    font-size: 0.6rem;
    color: rgba(222, 205, 180, 0.6);
}

/* BS Bureau gauge */
.bfhow-gauge {
    display: block;
    width: 72%;
    margin: 0.3rem auto 0;
}

.bfhow-gauge .needle {
    transform-box: fill-box;
    transform-origin: 50% 100%;
    animation: bfhow-needle 3.4s ease-in-out infinite;
}

.bfhow-phone-cap {
    font-family: 'Courier Prime', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--text-muted, #a08d71);
    text-align: center;
    margin-top: 1.1rem;
}

/* ------------------------------------------------------------
   Generic stage entrance slots - for any diagram framed in a
   .bfhow-stage (money map cards etc.). Pair with .rig-anim.
   ------------------------------------------------------------ */
html.bf-fx-ready .bfhow-stage.bf-fx-revealed .rig-in-1 {
    animation: bfhow-rise-in 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

html.bf-fx-ready .bfhow-stage.bf-fx-revealed .rig-in-2 {
    animation: bfhow-rise-in 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.25s both;
}

html.bf-fx-ready .bfhow-stage.bf-fx-revealed .rig-in-3 {
    animation: bfhow-rise-in 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s both;
}

html.bf-fx-ready .bfhow-stage.bf-fx-revealed .rig-in-4 {
    animation: bfhow-rise-in 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.55s both;
}

/* ------------------------------------------------------------
   Run of show tape (homepage intermission)
   ------------------------------------------------------------ */
.bfros-stage {
    max-width: 980px;
    margin: 2.25rem auto 0;
}

.bfros-tape {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 0.25rem 0 0.5rem;
}

.bfros-tape::before {
    content: "";
    position: absolute;
    top: 3.5rem;
    left: 5%;
    right: 5%;
    border-top: 2px dashed rgba(var(--accent-rgb, 240, 163, 47), 0.3);
}

.bfros-playhead {
    position: absolute;
    top: calc(3.5rem - 5px);
    left: 5%;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--accent, #f0a32f);
    box-shadow: 0 0 12px rgba(var(--accent-rgb, 240, 163, 47), 0.8);
    opacity: 0;
}

html.bf-fx-ready .bfhow-stage.bf-fx-revealed .bfros-playhead {
    animation: bfros-run 2.9s ease-in-out 0.35s both;
}

.bfros-beat {
    position: relative;
    text-align: center;
}

html.bf-fx-ready .bfhow-stage .bfros-beat {
    opacity: 0;
}

html.bf-fx-ready .bfhow-stage.bf-fx-revealed .bfros-beat {
    animation: bfhow-rise-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

html.bf-fx-ready .bfhow-stage.bf-fx-revealed .bfros-b1 { animation-delay: 0.35s; }
html.bf-fx-ready .bfhow-stage.bf-fx-revealed .bfros-b2 { animation-delay: 0.9s; }
html.bf-fx-ready .bfhow-stage.bf-fx-revealed .bfros-b3 { animation-delay: 1.5s; }
html.bf-fx-ready .bfhow-stage.bf-fx-revealed .bfros-b4 { animation-delay: 2.05s; }
html.bf-fx-ready .bfhow-stage.bf-fx-revealed .bfros-b5 { animation-delay: 2.6s; }

.bfros-time {
    font-family: 'Courier Prime', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    color: var(--accent, #f0a32f);
}

.bfros-node {
    width: 3.4rem;
    height: 3.4rem;
    margin: 0.55rem auto;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--kit-card-bg, rgba(255, 255, 255, 0.07));
    border: 1px solid rgba(var(--accent-rgb, 240, 163, 47), 0.45);
    position: relative;
    z-index: 1;
    color: var(--accent, #f0a32f);
}

.bfros-node svg {
    display: block;
}

.bfros-q {
    font-family: 'Anton', 'Rubik', sans-serif;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--accent, #f0a32f);
}

.bfros-name {
    font-family: 'Rubik', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary, #f4ebdc);
}

.bfros-sub {
    font-size: 0.78rem;
    color: var(--text-secondary, #b7a488);
    margin-top: 0.15rem;
}

@media (max-width: 719px) {
    .bfros-tape {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .bfros-tape::before {
        top: 1rem;
        bottom: 1rem;
        left: 1.7rem;
        right: auto;
        border-top: none;
        border-left: 2px dashed rgba(var(--accent-rgb, 240, 163, 47), 0.3);
    }

    .bfros-playhead {
        display: none;
    }

    .bfros-beat {
        display: grid;
        grid-template-columns: 3.4rem minmax(0, 1fr);
        grid-template-areas:
            "node time"
            "node name"
            "node sub";
        column-gap: 1rem;
        text-align: left;
        align-items: start;
    }

    .bfros-node { grid-area: node; margin: 0; }
    .bfros-time { grid-area: time; }
    .bfros-name { grid-area: name; }
    .bfros-sub { grid-area: sub; }
}

/* ------------------------------------------------------------
   The Tuesday chart (venues hub) - single-hue, zero baseline
   ------------------------------------------------------------ */
.bfweek-chart {
    display: flex;
    align-items: flex-end;
    gap: clamp(6px, 1.8vw, 16px);
    height: 230px;
    border-bottom: 2px solid rgba(var(--accent-rgb, 240, 163, 47), 0.25);
    padding: 0 0.25rem;
}

.bfweek-col {
    flex: 1;
    position: relative;
    height: 100%;
    display: flex;
    align-items: flex-end;
}

.bfweek-bar {
    width: 100%;
    height: var(--h);
    border-radius: 6px 6px 0 0;
    background: rgba(var(--glass-overlay-color, 255, 240, 214), 0.14);
}

.bfweek-col.is-hero .bfweek-bar {
    background: var(--accent, #f0a32f);
}

html.bf-fx-ready .bfweek-stage:not(.bf-fx-revealed) .is-hero .bfweek-bar {
    height: var(--h0);
}

html.bf-fx-ready .bfweek-stage.bf-fx-revealed .is-hero .bfweek-bar {
    animation: bfweek-grow 1.1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.45s both;
}

.bfweek-ghost {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--h0);
    border: 2px dashed rgba(var(--glass-overlay-color, 255, 240, 214), 0.45);
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    pointer-events: none;
}

.bfweek-flag {
    position: absolute;
    left: 50%;
    bottom: calc(var(--h) + 6px);
    transform: translateX(-7px);
    color: var(--accent, #f0a32f);
    white-space: nowrap;
    display: flex;
    align-items: flex-end;
    gap: 0.4rem;
}

.bfweek-flag-label {
    font-family: 'Courier Prime', monospace;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

html.bf-fx-ready .bfweek-stage .bfweek-flag {
    opacity: 0;
}

html.bf-fx-ready .bfweek-stage.bf-fx-revealed .bfweek-flag {
    animation: bfhow-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 1.6s both;
}

.bfweek-days {
    display: flex;
    gap: clamp(6px, 1.8vw, 16px);
    margin-top: 0.6rem;
    padding: 0 0.25rem;
}

.bfweek-day {
    flex: 1;
    text-align: center;
    font-family: 'Courier Prime', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary, #b7a488);
}

.bfweek-day.is-hero {
    color: var(--accent, #f0a32f);
    font-weight: 700;
}

@media (max-width: 560px) {
    .bfweek-chart {
        height: 180px;
    }
}

/* ------------------------------------------------------------
   The karaoke rotation (karaoke-bars venue page)
   ------------------------------------------------------------ */
.bfq-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.bfq-stage-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.05rem 1.25rem;
    border-radius: 1rem;
    background: rgba(var(--accent-rgb, 240, 163, 47), 0.1);
    border: 1px solid rgba(var(--accent-rgb, 240, 163, 47), 0.5);
}

.bfhow-stage.bf-fx-revealed .bfq-stage-card {
    animation: bfq-breathe 3s ease-in-out infinite;
}

.bfq-mic-badge {
    flex: none;
    width: 2.9rem;
    height: 2.9rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(var(--accent-rgb, 240, 163, 47), 0.16);
    color: var(--accent, #f0a32f);
}

.bfq-label {
    font-family: 'Courier Prime', monospace;
    font-size: 0.62rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent, #f0a32f);
}

.bfq-name {
    font-family: 'Rubik', sans-serif;
    font-weight: 700;
    font-size: 1.02rem;
    color: var(--text-primary, #f4ebdc);
}

.bfq-song {
    font-size: 0.85rem;
    color: var(--text-secondary, #b7a488);
}

.bfq-lane {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.bfq-chip {
    flex: 1 1 10rem;
    min-width: 9.5rem;
    padding: 0.7rem 0.85rem;
    border-radius: 0.85rem;
    background: var(--kit-card-bg, rgba(255, 255, 255, 0.05));
    border: 1px solid var(--kit-border-2, rgba(255, 255, 255, 0.14));
}

.bfq-pos {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-family: 'Courier Prime', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted, #a08d71);
    margin-bottom: 0.25rem;
}

.bfq-chip-pass {
    background: rgba(var(--warning-rgb, 234, 179, 8), 0.1);
    border-color: rgba(var(--warning-rgb, 234, 179, 8), 0.45);
}

.bfq-chip-pass .bfq-pos {
    color: rgb(var(--warning-rgb, 234, 179, 8));
}

.bfhow-stage.bf-fx-revealed .bfq-chip-pass {
    animation: bfq-hop 4s ease-in-out 1.2s infinite;
}

.bfq-rule {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: 'Courier Prime', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    color: var(--text-secondary, #b7a488);
    border: 1px dashed rgba(var(--accent-rgb, 240, 163, 47), 0.35);
    border-radius: 0.7rem;
    padding: 0.65rem 0.9rem;
}

.bfq-rule svg {
    flex: none;
    color: var(--accent, #f0a32f);
}

/* ------------------------------------------------------------
   The money map (earnings page) - coins travel the arrows
   ------------------------------------------------------------ */
.bfmoney-svg {
    max-width: 840px;
    margin: 0 auto;
}

.bfmoney-coin {
    fill: var(--accent, #f0a32f);
    opacity: 0;
}

.bfhow-stage.bf-fx-revealed .bfmoney-coin-l {
    animation: bfmoney-coin-l 2.6s linear 1.6s infinite;
}

.bfhow-stage.bf-fx-revealed .bfmoney-coin-r {
    animation: bfmoney-coin-r 2.6s linear 1.6s infinite;
}

.bfhow-stage.bf-fx-revealed .bfmoney-coin-d {
    animation: bfmoney-coin-d 2.6s linear 1.6s infinite;
}

.bfhow-stage.bf-fx-revealed .bfmoney-coin-b {
    animation-delay: 2.9s;
}

/* ------------------------------------------------------------
   Clickable references - a diagram points at its receipts.
   .bfhow-refs = Courier chip row under any stage figure;
   a.bfhow-link = a diagram node that is a real link (tape beats,
   ladder steps, board rows). Hover cue: node ring + name -> gold.
   ------------------------------------------------------------ */
.bfhow-refs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin: 1.1rem auto 0;
    max-width: 52rem;
}
.bfhow-ref {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: 'Courier Prime', 'Courier New', monospace;
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary, #decdb4);
    background: rgba(var(--glass-overlay-color, 252, 246, 236), 0.04);
    border: 1px solid var(--kit-border-2, rgba(252, 246, 236, 0.16));
    border-radius: 999px;
    padding: 0.42rem 0.9rem;
    text-decoration: none;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.bfhow-ref:hover,
.bfhow-ref:focus-visible {
    background: var(--accent, #f0a32f);
    border-color: var(--accent, #f0a32f);
    color: var(--btn-accent-text, #2a1b07);
    transform: translateY(-1px);
}
a.bfhow-link {
    color: inherit;
    text-decoration: none;
}
a.bfhow-link:focus-visible {
    outline: 2px solid var(--accent, #f0a32f);
    outline-offset: 3px;
    border-radius: 10px;
}
a.bfhow-link:hover .bfros-name { color: var(--accent, #f0a32f); }
a.bfhow-link:hover .bfros-node {
    box-shadow: 0 0 0 2px rgba(var(--accent-rgb, 240, 163, 47), 0.5);
}

/* ------------------------------------------------------------
   Growth ladder (library/scaling-up) - four phases as a rising
   staircase, each step a link down into its own playbook.
   ------------------------------------------------------------ */
.bfgl-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
    align-items: end;
}
a.bfgl-step {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.28rem;
    min-height: var(--gl-h, 120px);
    padding: 0.85rem 0.9rem;
    color: inherit;
    text-decoration: none;
    background: rgba(var(--glass-overlay-color, 252, 246, 236), 0.04);
    border: 1px solid var(--kit-border-2, rgba(252, 246, 236, 0.14));
    border-top: 3px solid var(--accent, #f0a32f);
    border-radius: 12px 12px 8px 8px;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.bfgl-row a.bfgl-step:nth-child(1) { --gl-h: 112px; border-top-color: rgba(var(--accent-rgb, 240, 163, 47), 0.45); }
.bfgl-row a.bfgl-step:nth-child(2) { --gl-h: 142px; border-top-color: rgba(var(--accent-rgb, 240, 163, 47), 0.62); }
.bfgl-row a.bfgl-step:nth-child(3) { --gl-h: 172px; border-top-color: rgba(var(--accent-rgb, 240, 163, 47), 0.82); }
.bfgl-row a.bfgl-step:nth-child(4) { --gl-h: 202px; border-top-color: var(--accent, #f0a32f); }
a.bfgl-step:hover,
a.bfgl-step:focus-visible {
    background: rgba(var(--accent-rgb, 240, 163, 47), 0.08);
    border-color: rgba(var(--accent-rgb, 240, 163, 47), 0.5);
}
a.bfgl-step:focus-visible { outline: 2px solid var(--accent, #f0a32f); outline-offset: 3px; }
.bfgl-phase {
    font-family: 'Courier Prime', 'Courier New', monospace;
    font-weight: 700;
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted, #7d6f59);
}
.bfgl-cash {
    font-family: 'Courier Prime', 'Courier New', monospace;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--accent, #f0a32f);
}
.bfgl-name {
    font-weight: 700;
    font-size: 0.92rem;
    line-height: 1.25;
    color: var(--text-primary, #f4ebdc);
    transition: color 0.15s ease;
}
a.bfgl-step:hover .bfgl-name { color: var(--accent, #f0a32f); }
.bfgl-months { font-size: 0.72rem; color: var(--text-muted, #7d6f59); }
html.bf-fx-ready .bfhow-stage:not(.bf-fx-revealed) .bfgl-step { opacity: 0; }
html.bf-fx-ready .bfhow-stage.bf-fx-revealed .bfgl-step {
    animation: bfgl-rise 0.55s ease both;
}
html.bf-fx-ready .bfhow-stage.bf-fx-revealed .bfgl-step:nth-child(2) { animation-delay: 0.12s; }
html.bf-fx-ready .bfhow-stage.bf-fx-revealed .bfgl-step:nth-child(3) { animation-delay: 0.24s; }
html.bf-fx-ready .bfhow-stage.bf-fx-revealed .bfgl-step:nth-child(4) { animation-delay: 0.36s; }
@keyframes bfgl-rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 640px) {
    .bfgl-row { grid-template-columns: 1fr 1fr; align-items: stretch; }
    .bfgl-row a.bfgl-step { --gl-h: 0; min-height: 0; }
}

/* ------------------------------------------------------------
   Read-the-room board (library/game-modes-mastery) - the mode
   decision matrix as IF -> mode rows, each row a link to that
   mode's full playbook further down the page.
   ------------------------------------------------------------ */
.bfmx-list { display: flex; flex-direction: column; gap: 0.45rem; }
a.bfmx-row {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 0.7rem;
    align-items: center;
    padding: 0.55rem 0.8rem;
    color: inherit;
    text-decoration: none;
    background: rgba(var(--glass-overlay-color, 252, 246, 236), 0.03);
    border: 1px solid var(--kit-border-2, rgba(252, 246, 236, 0.12));
    border-radius: 10px;
    transition: background 0.15s ease, border-color 0.15s ease;
}
a.bfmx-row:hover,
a.bfmx-row:focus-visible {
    background: rgba(var(--accent-rgb, 240, 163, 47), 0.07);
    border-color: rgba(var(--accent-rgb, 240, 163, 47), 0.45);
}
a.bfmx-row:focus-visible { outline: 2px solid var(--accent, #f0a32f); outline-offset: 2px; }
.bfmx-if {
    font-family: 'Courier Prime', 'Courier New', monospace;
    font-weight: 700;
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    color: var(--text-muted, #7d6f59);
    border: 1px solid currentColor;
    border-radius: 4px;
    padding: 0.08rem 0.35rem;
    opacity: 0.75;
}
.bfmx-read { color: var(--text-secondary, #decdb4); font-size: 0.88rem; line-height: 1.35; }
.bfmx-arrow { color: var(--accent, #f0a32f); font-weight: 700; opacity: 0.7; }
.bfmx-mode {
    font-family: 'Courier Prime', 'Courier New', monospace;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--btn-accent-text, #2a1b07);
    background: var(--accent, #f0a32f);
    border-radius: 999px;
    padding: 0.3rem 0.75rem;
    white-space: nowrap;
    transition: filter 0.15s ease;
}
a.bfmx-row:hover .bfmx-mode { filter: brightness(1.08); }
@media (max-width: 560px) {
    a.bfmx-row { grid-template-columns: 1fr auto; }
    .bfmx-if, .bfmx-arrow { display: none; }
}

/* spacing utilities - kept LAST so they beat the component margins
   above at equal specificity (used to balance sparse phone screens) */
.bfhow-mt-auto {
    margin-top: auto;
}

.bfhow-mb-auto {
    margin-bottom: auto;
}

/* ------------------------------------------------------------
   Keyframes
   ------------------------------------------------------------ */
@keyframes bfhow-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bfhow-rise-in {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bfhow-draw {
    from { stroke-dashoffset: 1; }
    to { stroke-dashoffset: 0; }
}

@keyframes bfhow-flicker {
    0% { opacity: 0; }
    20% { opacity: 0.65; }
    35% { opacity: 0.1; }
    55% { opacity: 0.85; }
    70% { opacity: 0.4; }
    100% { opacity: 1; }
}

@keyframes bfhow-bar-rise {
    from {
        opacity: 0;
        transform: scaleY(0);
    }
    to {
        opacity: 1;
        transform: scaleY(1);
    }
}

@keyframes bfhow-pop {
    0% {
        opacity: 0;
        transform: scale(0.4);
    }
    70% {
        opacity: 1;
        transform: scale(1.12);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bfhow-ping {
    0% { opacity: 0; }
    30% { opacity: 0.7; }
    100% { opacity: 0; }
}

@keyframes bfhow-glow {
    0%, 100% { opacity: 0.25; }
    50% { opacity: 0.6; }
}

@keyframes bfhow-cycle {
    0% {
        opacity: 0;
        transform: translateY(6px);
    }
    2.5% {
        opacity: 1;
        transform: translateY(0);
    }
    25% {
        opacity: 1;
        transform: translateY(0);
    }
    28% {
        opacity: 0;
        transform: translateY(-4px);
    }
    100% {
        opacity: 0;
    }
}

@keyframes bfhow-needle {
    0%, 100% { transform: rotate(-4deg); }
    50% { transform: rotate(5deg); }
}

@keyframes bfros-run {
    0% {
        left: 5%;
        opacity: 0;
    }
    6% {
        opacity: 1;
    }
    92% {
        opacity: 1;
    }
    100% {
        left: calc(95% - 10px);
        opacity: 0;
    }
}

@keyframes bfweek-grow {
    from { height: var(--h0); }
    to { height: var(--h); }
}

@keyframes bfq-breathe {
    0%, 100% { box-shadow: 0 0 12px rgba(var(--accent-rgb, 240, 163, 47), 0.12); }
    50% { box-shadow: 0 0 28px rgba(var(--accent-rgb, 240, 163, 47), 0.3); }
}

@keyframes bfq-hop {
    0%, 8%, 100% { transform: translateY(0); }
    4% { transform: translateY(-7px); }
}

@keyframes bfmoney-coin-l {
    0% {
        transform: translateX(0);
        opacity: 0;
    }
    8% {
        opacity: 0.9;
    }
    92% {
        opacity: 0.9;
    }
    100% {
        transform: translateX(150px);
        opacity: 0;
    }
}

@keyframes bfmoney-coin-r {
    0% {
        transform: translateX(0);
        opacity: 0;
    }
    8% {
        opacity: 0.9;
    }
    92% {
        opacity: 0.9;
    }
    100% {
        transform: translateX(-150px);
        opacity: 0;
    }
}

@keyframes bfmoney-coin-d {
    0% {
        transform: translateY(0);
        opacity: 0;
    }
    8% {
        opacity: 0.9;
    }
    92% {
        opacity: 0.9;
    }
    100% {
        transform: translateY(62px);
        opacity: 0;
    }
}

/* ------------------------------------------------------------
   Reduced motion: everything static, everything visible
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    html.bf-fx-ready .bfhow-stage .rig-anim {
        opacity: 1 !important;
        animation: none !important;
    }

    /* ambient loops stop but keep their quiet resting opacity */
    .rig-arc,
    .rig-wifi,
    .rig-qrglow,
    .bfhow-screen,
    .bfhow-gauge .needle,
    .bfhow-day-today {
        animation: none !important;
    }

    html.bf-fx-ready .bfhow-stage.bf-fx-revealed .rig-cable {
        animation: none !important;
        stroke-dasharray: none;
        stroke-dashoffset: 0;
    }

    /* the phone holds its first screen */
    .bfhow-screen:nth-child(1) {
        opacity: 1;
    }

    /* newer diagrams: static, everything visible, loops off */
    html.bf-fx-ready .bfhow-stage .bfros-beat,
    html.bf-fx-ready .bfweek-stage .bfweek-flag {
        opacity: 1 !important;
        animation: none !important;
    }

    html.bf-fx-ready .bfhow-stage .bfgl-step {
        opacity: 1 !important;
        animation: none !important;
    }

    .bfros-playhead,
    .bfweek-bar,
    .bfq-stage-card,
    .bfq-chip-pass,
    .bfmoney-coin {
        animation: none !important;
    }

    html.bf-fx-ready .bfweek-stage:not(.bf-fx-revealed) .is-hero .bfweek-bar {
        height: var(--h);
    }
}
