/* gabs.bar — late-night avant-garde lookbook of overheard chatter
   Palette:
     #0A0A0B  Counter Black (page bg, bar-rule)
     #EDE7DC  Stenciled Bone (text, stencils)
     #5BE9F2  Ozone Cyan (accent: seats, ticks, hover, underglow)
     #C0337A  Bruised Magenta (chevron once per act)
     #3C3A38  Ash (guide lines, ledger rules, disabled)
   Faces:
     Italiana (display)
     Fraunces (editorial body, variable SOFT)
     JetBrains Mono (credits, ledger)
*/

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

html {
    scroll-behavior: smooth;
    background: #0A0A0B;
}

body {
    background: #0A0A0B;
    color: #EDE7DC;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 300;
    font-variation-settings: 'opsz' 144, 'SOFT' 100;
    overflow-x: hidden;
    cursor: crosshair;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Custom 1px cyan cross-hair cursor (SVG data-uri) */
body {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'><line x1='9' y1='0' x2='9' y2='18' stroke='%235BE9F2' stroke-width='1'/><line x1='0' y1='9' x2='18' y2='9' stroke='%235BE9F2' stroke-width='1'/></svg>") 9 9, crosshair;
}

em {
    font-style: italic;
    color: #EDE7DC;
}

/* === The Bar Rule — fixed structural spine === */
.bar-rule {
    position: fixed;
    top: 38vh;
    left: 5vw;
    width: 90vw;
    height: 4px;
    background: #0A0A0B;
    border-top: 1px solid #EDE7DC;
    border-bottom: 1px solid #EDE7DC;
    z-index: 50;
    pointer-events: auto;
    cursor: pointer;
    filter: drop-shadow(0 0 24px rgba(91, 233, 242, 0.25));
    animation: barPulse 6.4s linear infinite;
}

@keyframes barPulse {
    0%, 100% {
        filter: drop-shadow(0 0 24px rgba(91, 233, 242, 0.15));
    }
    50% {
        filter: drop-shadow(0 0 24px rgba(91, 233, 242, 0.35));
    }
}

/* The stenciled bone strip on the bar */
.bar-rule::before {
    content: "";
    position: absolute;
    inset: 1px 0;
    background: #EDE7DC;
}

/* === Vertical progress ticks === */
.progress {
    position: fixed;
    top: 50%;
    right: 2ch;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 18px;
    z-index: 60;
}

.progress-tick {
    display: block;
    width: 14px;
    height: 1px;
    background: #3C3A38;
    transition: background 200ms ease-out, width 200ms ease-out;
    position: relative;
}

.progress-tick.is-active {
    background: #5BE9F2;
    width: 22px;
}

.progress-tick.is-active::after {
    content: "›";
    position: absolute;
    right: -10px;
    top: -10px;
    color: #5BE9F2;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
}

/* === Acts (sections) === */
main {
    position: relative;
}

.act {
    position: relative;
    min-height: 100vh;
    padding: 12vh 8vw 12vh;
    overflow: hidden;
}

.act-marker {
    position: absolute;
    top: 4vh;
    left: 8vw;
    display: flex;
    align-items: baseline;
    gap: 1.2ch;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #EDE7DC;
    z-index: 5;
}

.act-marker .chevron {
    color: #C0337A;
    font-size: 9px;
    transform: translateY(-1px);
}

.act-marker .act-num {
    font-family: 'Italiana', 'Playfair Display', serif;
    font-style: italic;
    font-size: 18px;
    letter-spacing: 0;
    color: #EDE7DC;
}

.act-marker .act-title {
    color: #EDE7DC;
    opacity: 0.7;
}

/* === ACT I: Cover Spread === */
.act--cover {
    display: grid;
    grid-template-rows: 1fr auto;
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
    min-height: 100vh;
}

.cover-quote {
    font-family: 'Italiana', 'Playfair Display', serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(4.4rem, 12vw, 11rem);
    line-height: 0.95;
    letter-spacing: 0;
    color: #EDE7DC;
    max-width: 70vw;
    margin-top: 8vh;
    align-self: end;
    transform: translateY(-2vh);
}

.cover-quote em {
    font-style: italic;
    color: #5BE9F2;
}

.cover-credit {
    align-self: end;
    margin-bottom: 8vh;
    display: flex;
    gap: 4ch;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #EDE7DC;
    opacity: 0.7;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-feature-settings: "tnum", "ss03";
}

/* === ACT II: Editor's Note === */
.act--note {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4vw;
    align-items: start;
    padding-top: 18vh;
}

.editors-note {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.18em;
    line-height: 2;
    color: #EDE7DC;
    opacity: 0.85;
    height: 70vh;
    text-transform: lowercase;
}

.note-line {
    margin-bottom: 2ch;
    white-space: nowrap;
}

.note-pull {
    position: relative;
    height: 70vh;
}

/* Fragments pinned to the bar with tethers */
.fragment {
    position: relative;
    font-family: 'Fraunces', Georgia, serif;
    font-style: italic;
    font-weight: 300;
    font-size: 1.6rem;
    line-height: 1.18;
    color: #EDE7DC;
    max-width: 32ch;
    transition: font-variation-settings 800ms ease-out, color 800ms ease-out;
    font-variation-settings: 'opsz' 144, 'SOFT' 100, 'wght' 300;
    cursor: crosshair;
}

.fragment:hover {
    font-variation-settings: 'opsz' 144, 'SOFT' 0, 'wght' 360;
    color: #5BE9F2;
}

.fragment .frag-text {
    display: block;
    text-indent: -0.55em;
    padding-left: 0.55em;
}

.fragment .frag-credit {
    display: block;
    margin-top: 1.2em;
    font-family: 'JetBrains Mono', monospace;
    font-style: normal;
    font-size: 11px;
    letter-spacing: 0.12em;
    color: #3C3A38;
    text-transform: lowercase;
    font-feature-settings: "tnum", "ss03";
}

.fragment .frag-tether {
    display: block;
    width: 1px;
    background: #3C3A38;
    margin: 0.6em 0;
}

.fragment--pinned-above {
    position: absolute;
    top: -22vh;
}

.fragment--pinned-above .frag-tether {
    height: 14vh;
    margin-left: 6ch;
}

.fragment--pinned-below {
    position: absolute;
    top: 8vh;
    text-align: right;
    margin-left: auto;
}

.fragment--pinned-below .frag-tether {
    height: 6vh;
    margin-left: auto;
    margin-right: 6ch;
}

/* === ACT III: Run 01 — Horizontal scroll runway === */
.act--runway {
    padding-left: 0;
    padding-right: 0;
}

.runway {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    gap: 6vw;
    padding: 12vh 8vw;
    scrollbar-width: thin;
    scrollbar-color: #3C3A38 #0A0A0B;
}

.runway::-webkit-scrollbar {
    height: 1px;
    background: #0A0A0B;
}
.runway::-webkit-scrollbar-thumb {
    background: #3C3A38;
}

.look {
    flex: 0 0 60vw;
    scroll-snap-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 50vh;
    padding-left: 2ch;
    border-left: 1px solid #3C3A38;
}

.look-quote {
    font-family: 'Fraunces', Georgia, serif;
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.4rem, 2.6vw, 2.2rem);
    line-height: 1.2;
    color: #EDE7DC;
    max-width: 38ch;
    margin-bottom: 2.4em;
    transition: font-variation-settings 800ms ease-out, color 800ms ease-out;
    font-variation-settings: 'opsz' 144, 'SOFT' 100, 'wght' 300;
}

.look:hover .look-quote {
    font-variation-settings: 'opsz' 144, 'SOFT' 0, 'wght' 360;
    color: #5BE9F2;
}

.look-quote em {
    font-style: italic;
}

.look-credit {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #3C3A38;
    letter-spacing: 0.12em;
    text-transform: lowercase;
    font-feature-settings: "tnum", "ss03";
}

.runway-hint {
    position: absolute;
    right: 8vw;
    bottom: 4vh;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #3C3A38;
    letter-spacing: 0.2em;
    text-transform: lowercase;
}

/* === ACT IV: Counter Map === */
.act--map {
    padding-top: 18vh;
}

.map-wrap {
    position: relative;
    margin-top: 8vh;
    width: 100%;
}

.counter-map {
    width: 100%;
    height: auto;
    display: block;
    overflow: visible;
}

.seats g.seat {
    cursor: crosshair;
}

.seats g.seat circle {
    fill: none;
    stroke: #EDE7DC;
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
    transition: stroke 200ms ease-out, fill 200ms ease-out;
}

.seats g.seat text {
    fill: #EDE7DC;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    text-anchor: middle;
    dominant-baseline: middle;
    transition: fill 200ms ease-out;
    font-feature-settings: "tnum", "ss03";
}

.seats g.seat:hover circle {
    stroke: #5BE9F2;
    fill: rgba(91, 233, 242, 0.08);
}

.seats g.seat:hover text {
    fill: #5BE9F2;
}

.seats g.seat .tether {
    stroke: #5BE9F2;
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.seats g.seat:hover .tether {
    stroke-dashoffset: 0;
}

.map-tags {
    position: relative;
    margin-top: 4vh;
    min-height: 8vh;
    font-family: 'Fraunces', Georgia, serif;
    font-style: italic;
    font-size: 1.2rem;
    color: #5BE9F2;
    text-align: center;
    transition: opacity 200ms ease-out;
}

.map-tag-active {
    display: block;
    max-width: 60ch;
    margin: 0 auto;
}

.map-tag-active .tag-credit {
    display: block;
    margin-top: 0.8em;
    font-family: 'JetBrains Mono', monospace;
    font-style: normal;
    font-size: 11px;
    color: #3C3A38;
    letter-spacing: 0.12em;
    text-transform: lowercase;
}

.map-hint {
    text-align: center;
    margin-top: 1.6em;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #3C3A38;
    letter-spacing: 0.18em;
    text-transform: lowercase;
}

/* === ACT V: Drift columns === */
.act--drift {
    padding-top: 18vh;
}

.drift-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4ch;
    margin-top: 6vh;
    transition: gap 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.drift-wrap.is-drifting {
    gap: 28ch;
}

.drift-col {
    display: flex;
    flex-direction: column;
    gap: 8vh;
}

.drift-col .fragment {
    max-width: 30ch;
}

/* === ACT VI: Glassware Plates === */
.act--glassware {
    padding-top: 18vh;
}

.plates {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 6vh 4vw;
    margin-top: 8vh;
}

.plate {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 800ms ease-out, transform 800ms ease-out;
}

.plate.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

.plate svg {
    width: 100%;
    max-width: 200px;
    height: auto;
    display: block;
}

.plate-caption {
    margin-top: 1.2em;
    display: flex;
    flex-direction: column;
    gap: 0.4em;
    align-items: center;
}

.plate-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #5BE9F2;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.plate-name {
    font-family: 'Italiana', 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.6rem;
    color: #EDE7DC;
    letter-spacing: 0.04em;
}

.plate-quote {
    font-family: 'Fraunces', Georgia, serif;
    font-style: italic;
    font-weight: 300;
    font-size: 1rem;
    color: #EDE7DC;
    opacity: 0.85;
    max-width: 28ch;
    margin-top: 0.8em;
    line-height: 1.3;
}

/* Quote inside the glass — placed via absolute positioning on hover */
.plate {
    position: relative;
}

/* === ACT VII: Slump === */
.act--slump {
    padding-top: 18vh;
    padding-bottom: 22vh;
}

.slump-wrap {
    display: flex;
    flex-direction: column;
    gap: 4vh;
    margin-top: 6vh;
    max-width: 70ch;
    margin-left: auto;
    margin-right: auto;
}

.slump {
    transform: rotate(0deg);
    transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.slump.is-slumped {
    transform: rotate(var(--rot, 0deg));
}

/* === ACT VIII: Closing Inventory ledger === */
.act--inventory {
    padding-top: 18vh;
    padding-bottom: 14vh;
}

.ledger {
    margin-top: 6vh;
    max-width: 70ch;
    margin-left: auto;
    margin-right: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: #EDE7DC;
    font-feature-settings: "tnum", "ss03";
    line-height: 1.6;
}

.ledger-row {
    display: grid;
    grid-template-columns: 16ch 1fr;
    gap: 2ch;
    padding: 0.8em 0;
    border-top: 1px solid #3C3A38;
    text-transform: lowercase;
    letter-spacing: 0.04em;
}

.ledger-row:last-child {
    border-bottom: 1px solid #3C3A38;
}

.ledger-row dt {
    color: #3C3A38;
    letter-spacing: 0.12em;
}

.ledger-row dd {
    color: #EDE7DC;
}

.ledger-row dd em {
    font-style: italic;
    color: #5BE9F2;
}

.ledger-foot {
    margin-top: 4vh;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #3C3A38;
    letter-spacing: 0.2em;
    text-transform: lowercase;
}

/* === Mobile === */
@media (max-width: 640px) {
    .bar-rule {
        left: 4vw;
        width: 92vw;
    }

    .progress {
        right: 1ch;
        gap: 14px;
    }

    .progress-tick {
        width: 10px;
    }

    .act {
        padding: 10vh 5vw;
    }

    .cover-quote {
        font-size: clamp(2.6rem, 14vw, 4.4rem);
        max-width: 92vw;
    }

    .cover-credit {
        flex-direction: column;
        gap: 0.6em;
    }

    .act--note {
        grid-template-columns: 1fr;
    }

    .editors-note {
        writing-mode: horizontal-tb;
        transform: none;
        height: auto;
        white-space: normal;
    }

    .note-line {
        white-space: normal;
    }

    .note-pull {
        height: auto;
        margin-top: 6vh;
    }

    .fragment--pinned-above,
    .fragment--pinned-below {
        position: relative;
        top: auto;
        text-align: left;
        margin-bottom: 6vh;
    }

    .fragment--pinned-below {
        margin-left: 0;
    }

    .look {
        flex: 0 0 88vw;
    }

    .drift-wrap {
        grid-template-columns: 1fr;
        gap: 4vh;
    }

    .drift-wrap.is-drifting {
        gap: 6vh;
    }

    .slump.is-slumped {
        transform: rotate(calc(var(--rot, 0deg) * 0.5));
    }

    .ledger-row {
        grid-template-columns: 1fr;
        gap: 0.4ch;
    }
}

/* === Selection === */
::selection {
    background: #C0337A;
    color: #EDE7DC;
}
