/* Lights Up: a post's listening, hung as a lighting rig over a photo of the night.
   The theme loads this file on show pages (theme/default.hbs). */

.lu {
    --paper: #f5f0e8;
    --ink: #1c1917;
    --venue: #141210;
    --amber: #c9952c;
    --amber-light: #e8c56a;
    --amber-dark: #9a7422;
    --slate: #6b6560;
    --slate-light: #9c9590;
    --lu-gutter: clamp(16px, 4vw, 56px);
    --lu-display: var(--gh-font-heading, "Newsreader", "Iowan Old Style", Georgia, serif);
    --lu-body: var(--gh-font-body, "IBM Plex Sans", "Segoe UI", system-ui, sans-serif);
    --lu-mono: "IBM Plex Mono", "SF Mono", Consolas, monospace;
}

.gh-content > .lu {
    grid-column: 1 / -1;
    margin: clamp(2.5rem, 6vw, 5rem) 0 0;
}

.lu-stage {
    position: relative;
    overflow: hidden;
    background: #000;
    isolation: isolate;
}

/* Shorter than the post's own photo, so it reads as a card and not a second hero. */
.lu-photo {
    display: block;
    width: 100%;
    height: clamp(22rem, 60vh, 40rem);
    object-fit: cover;
    filter: brightness(var(--lit, 1));
}

/* The beams are flat polygons; the browser blurs and screens the whole rig on the GPU,
   which is far cheaper than an SVG blur filter re-run every time a beam changes. */
.lu-rig {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    filter: blur(5px);
    mix-blend-mode: screen;
    will-change: opacity;
}

/* Lamps hang on the truss as real circles. Inside the stretched drawing they became bars on phones. */
.lu-truss {
    position: absolute;
    top: 2.5%;
    right: 0;
    left: 0;
    height: 0;
    border-top: 1px solid rgba(245, 240, 232, 0.35);
    pointer-events: none;
}

.lu-lamp {
    position: absolute;
    top: 0;
    width: calc(4px + 8px * var(--s, 0.5));
    height: calc(4px + 8px * var(--s, 0.5));
    border-radius: 50%;
    background: var(--paper);
    box-shadow: 0 0 6px 1px rgba(245, 240, 232, 0.55);
    transform: translate(-50%, -50%);
}

.lu-readout {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: clamp(4rem, 10vw, 8rem) var(--lu-gutter) 1.25rem;
    background: linear-gradient(to top, rgba(20, 18, 16, 0.92) 20%, transparent);
    color: var(--paper);
}

.lu-readout strong {
    display: block;
    font-family: var(--lu-display);
    font-size: clamp(2rem, 5.5vw, 4.5rem);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.015em;
}

.lu-readout span {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.9375rem;
    line-height: 1.4;
}

.lu-board {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(1.75rem, 4vw, 3rem) clamp(2rem, 6vw, 5rem);
    width: min(64rem, 100% - 2 * var(--lu-gutter));
    margin: clamp(1.5rem, 3vw, 2.25rem) auto 0;
}

.gh-content .lu-board h2 {
    margin: 0 0 0.5rem;
    font-family: var(--lu-display);
    font-size: 2.25rem;
    font-weight: 600;
    line-height: 1.1;
}

.lu-intro > p {
    margin: 0;
}

.lu-intro > .lu-note {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--slate-light);
}

.lu-console {
    display: grid;
    gap: 1rem;
    margin-top: 1.25rem;
}

.lu-console[hidden] {
    display: none;
}

.lu-run {
    justify-self: start;
    min-height: 2.75rem;
    padding: 0.5rem 1.25rem;
    border: 0;
    border-radius: 0;
    background: var(--amber);
    color: var(--venue);
    font: 500 1rem var(--lu-body);
    cursor: pointer;
}

.lu-run:hover {
    background: var(--amber-light);
}

.lu-fader {
    display: grid;
    gap: 0.35rem;
    font-size: 0.875rem;
    color: var(--slate-light);
}

.lu-fader input {
    width: 100%;
    height: 2rem;
    margin: 0;
    accent-color: var(--amber);
    cursor: pointer;
}

/* Heard, not seen: what a screen reader gets when a cue is picked or the run ends. */
.lu-status {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.gh-content .lu-sheet h3 {
    margin: 0 0 0.75rem;
    font-family: var(--lu-display);
    font-size: 1.5rem;
    font-weight: 600;
}

.lu-sheet ol {
    display: grid;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: cue;
}

.lu-sheet li {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: 0 0.25rem;
    counter-increment: cue;
    line-height: 1.45;
}

/* Cues really do run in order, so they are numbered like a stage manager's sheet. */
.lu-sheet li::before {
    content: counter(cue);
    padding-top: 0.35rem;
    font-family: var(--lu-mono);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.9;
    color: var(--amber);
}

/* The whole cue is the button, tall enough for a thumb. */
.lu-cue {
    display: block;
    width: 100%;
    min-height: 2.75rem;
    padding: 0.35rem 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    line-height: 1.45;
    text-align: left;
}

.lu-cue:not(:disabled) {
    cursor: pointer;
}

.lu-cue-when {
    display: block;
    font-family: var(--lu-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    line-height: 1.9;
    text-transform: uppercase;
    color: var(--slate-light);
    text-underline-offset: 0.25em;
}

.lu-cue-text {
    display: block;
}

.lu-cue:not(:disabled):hover .lu-cue-when,
.lu-cue.is-current .lu-cue-when {
    color: var(--amber-light);
    text-decoration: underline;
}

.lu-cue-link {
    grid-column: 2;
    justify-self: start;
    margin-top: -0.35rem;
    font-size: 0.875rem;
}

/* The tear-off at the foot of the post, square-cornered like the theme's own stubs. */

.lu-stub {
    --notch: 10px;
    --tear: 70%;
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 70% 30%;
    background: var(--paper);
    color: var(--ink);
    -webkit-mask:
        radial-gradient(circle var(--notch) at var(--tear) 0, transparent 98%, #000) top / 100% 51% no-repeat,
        radial-gradient(circle var(--notch) at var(--tear) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
    mask:
        radial-gradient(circle var(--notch) at var(--tear) 0, transparent 98%, #000) top / 100% 51% no-repeat,
        radial-gradient(circle var(--notch) at var(--tear) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
}

.lu-stub-main {
    min-width: 0;
    padding: clamp(1.25rem, 3vw, 2rem);
}

.lu-stub-name {
    margin: 0;
    font-family: var(--lu-display);
    font-size: clamp(1.875rem, 4.5vw, 3.25rem);
    font-weight: 600;
    line-height: 1.02;
    letter-spacing: -0.015em;
}

.lu-stub-support {
    margin: 0.35rem 0 0;
    font-family: var(--lu-display);
    font-size: 1.25rem;
    font-style: italic;
    font-weight: 500;
}

.lu-stub dl {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem clamp(1.25rem, 3vw, 2.5rem);
    margin: 1.25rem 0 0;
}

.lu-stub dt {
    font-family: var(--lu-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--slate);
}

.lu-stub dd {
    margin: 0;
    font-family: var(--lu-display);
    font-size: 1.125rem;
    font-weight: 500;
}

.lu-stub-tear {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
    min-width: 0;
    padding: clamp(1.25rem, 3vw, 2rem) clamp(1rem, 2.5vw, 1.75rem);
    border-left: 2px dashed rgba(28, 25, 23, 0.3);
}

.lu-stub-tear p {
    margin: 0;
    font-family: var(--lu-display);
    font-size: 1.25rem;
    font-style: italic;
    font-weight: 500;
    line-height: 1.15;
}

.gh-content a.lu-stub-link {
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--ink);
    text-decoration-color: var(--amber-dark);
    text-decoration-thickness: 2px;
}

.lu-stub-link:focus-visible {
    outline-color: var(--amber-dark);
}

@media (max-width: 759px) {
    .lu-board {
        grid-template-columns: minmax(0, 1fr);
    }

    .lu-stub {
        grid-template-columns: minmax(0, 1fr);
        -webkit-mask: none;
        mask: none;
    }

    .lu-stub-tear {
        border-top: 2px dashed rgba(28, 25, 23, 0.3);
        border-left: 0;
    }
}
