/* ==========================================================================
   gabs.bar -- a sun-faded cocktail lounge, ca. 1967-1974
   Palette: warm-axis only. No blues. No cool grays. No pure black or white.
   ========================================================================== */

:root {
    --bourbon-shadow: #2B1810;
    --terracotta-glow: #C4622D;
    --filament-gold: #D4A24E;
    --buttermilk: #F5ECD7;
    --old-negroni: #8B2E16;
    --aged-leather: #7A5230;
    --warm-ivory: #FAF3E6;
    --midnight-walnut: #1A0D08;

    --font-display: "Playfair Display", "Times New Roman", serif;
    --font-accent: "Cormorant Garamond", "Georgia", serif;
    --font-body: "Source Serif 4", "Cormorant Garamond", "Georgia", serif;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bourbon-shadow);
}

body {
    font-family: var(--font-body);
    color: var(--bourbon-shadow);
    background-color: var(--bourbon-shadow);
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ----- Scroll container ----- */

.scroll-container {
    scroll-snap-type: y proximity;
    overflow-x: hidden;
}

/* ----- Bands (full-bleed scroll sections) ----- */

.band {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: clamp(4rem, 10vh, 8rem) clamp(1.25rem, 5vw, 5rem);
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
    overflow: hidden;
    transition: background-color 0.6s ease;
}

.band-inner {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
}

/* ----- Texture overlays ----- */

.band-grain,
.band-vignette,
.band-leather-grain,
.band-paper-fiber,
.band-boomerang,
.band-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.band-bg {
    z-index: 0;
}

.band-grain {
    z-index: 1;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.16  0 0 0 0 0.08  0 0 0 0 0.04  0 0 0 0.55 0'/></filter><rect width='180' height='180' filter='url(%23n)' opacity='0.55'/></svg>");
    opacity: 0.18;
    mix-blend-mode: overlay;
}

.band-vignette {
    z-index: 2;
    background: radial-gradient(ellipse at center, transparent 38%, rgba(26, 13, 8, 0.55) 100%);
}

.band-paper-fiber {
    z-index: 1;
    background-image:
        repeating-linear-gradient(0deg, rgba(122, 82, 48, 0.045) 0 1px, transparent 1px 3px),
        repeating-linear-gradient(90deg, rgba(122, 82, 48, 0.035) 0 1px, transparent 1px 4px),
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='p'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.48  0 0 0 0 0.32  0 0 0 0 0.19  0 0 0 0.4 0'/></filter><rect width='160' height='160' filter='url(%23p)'/></svg>");
    opacity: 0.45;
    mix-blend-mode: multiply;
}

.band-leather-grain {
    z-index: 1;
    background:
        repeating-radial-gradient(circle at 25% 30%, rgba(212, 162, 78, 0.025) 0 2px, transparent 2px 5px),
        repeating-radial-gradient(circle at 70% 70%, rgba(196, 98, 45, 0.03) 0 2px, transparent 2px 6px),
        radial-gradient(ellipse at 50% 50%, rgba(43, 24, 16, 0.0) 0%, rgba(26, 13, 8, 0.4) 100%);
    opacity: 0.85;
}

.band-boomerang {
    z-index: 1;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'><g fill='%23C4622D' opacity='0.08'><path d='M10 30 Q35 8 60 30 L52 38 Q35 22 18 38 Z'/><path d='M70 80 Q95 58 110 80 L102 88 Q90 74 78 88 Z'/><path d='M40 70 Q55 55 70 70 L65 76 Q55 66 45 76 Z'/></g></svg>");
    background-size: 120px 120px;
    background-repeat: repeat;
    opacity: 0.9;
}

/* ============================================================
   Band 1 -- The Pour (Hero)
   ============================================================ */

.band-pour {
    background-color: var(--bourbon-shadow);
    color: var(--warm-ivory);
    align-items: flex-start;
    padding-top: clamp(6rem, 18vh, 14rem);
}

.band-pour .leatherette {
    background:
        radial-gradient(ellipse at 30% 20%, rgba(212, 162, 78, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse at 70% 80%, rgba(196, 98, 45, 0.18) 0%, transparent 60%),
        repeating-linear-gradient(135deg, rgba(122, 82, 48, 0.08) 0 2px, transparent 2px 7px),
        repeating-linear-gradient(45deg, rgba(26, 13, 8, 0.18) 0 1px, transparent 1px 5px),
        linear-gradient(160deg, #2B1810 0%, #1A0D08 60%, #2B1810 100%);
}

.hero-content {
    position: relative;
    z-index: 4;
    text-align: center;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.hero-matchbook {
    width: clamp(80px, 12vw, 140px);
    margin: 0 auto 2rem auto;
    opacity: 0;
    transform: translateY(-12px);
    animation: fadeDown 1100ms var(--ease-out) 0.3s forwards;
    filter: drop-shadow(0 6px 18px rgba(26, 13, 8, 0.55));
}

.hero-matchbook svg {
    width: 100%;
    height: auto;
    display: block;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(3.5rem, 10vw, 8rem);
    line-height: 0.95;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--filament-gold);
    text-shadow:
        0 2px 0 rgba(26, 13, 8, 0.55),
        0 0 30px rgba(212, 162, 78, 0.25),
        0 0 80px rgba(212, 162, 78, 0.15);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1200ms var(--ease-out) 0.6s forwards;
}

.hero-tagline {
    font-family: var(--font-accent);
    font-style: italic;
    font-weight: 500;
    font-variant: small-caps;
    font-size: clamp(1rem, 2.4vw, 1.5rem);
    color: var(--warm-ivory);
    margin-top: clamp(1.5rem, 3vh, 2.5rem);
    letter-spacing: 0.08em;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1000ms var(--ease-out) 1.2s forwards;
}

.hero-rule {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: clamp(1.5rem, 3vh, 2.5rem) auto;
    width: min(420px, 60vw);
    opacity: 0;
    animation: fadeIn 900ms var(--ease-out) 1.6s forwards;
}

.rule-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 162, 78, 0.65), transparent);
}

.rule-diamond {
    width: 9px;
    height: 9px;
    background-color: var(--filament-gold);
    transform: rotate(45deg);
    box-shadow: 0 0 8px rgba(212, 162, 78, 0.6);
}

.hero-meta {
    font-family: var(--font-body);
    font-size: clamp(0.85rem, 1.6vw, 1rem);
    color: var(--aged-leather);
    color: rgba(245, 236, 215, 0.65);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeIn 900ms var(--ease-out) 1.9s forwards;
}

/* ============================================================
   Section heads (used inside multiple bands)
   ============================================================ */

.section-head {
    text-align: center;
    margin-bottom: clamp(2.5rem, 6vh, 4.5rem);
}

.eyebrow {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.32em;
    color: var(--terracotta-glow);
    margin-bottom: 1rem;
}

.eyebrow-light {
    color: var(--filament-gold);
}

.section-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: 0.03em;
    color: var(--bourbon-shadow);
    line-height: 1.1;
    margin-bottom: 1rem;
}

.section-head-light .section-title {
    color: var(--warm-ivory);
}

.section-subtitle {
    font-family: var(--font-accent);
    font-style: italic;
    font-weight: 500;
    font-size: clamp(1.05rem, 2.2vw, 1.5rem);
    color: var(--aged-leather);
    max-width: 640px;
    margin: 0 auto;
}

.section-head-light .section-subtitle {
    color: rgba(245, 236, 215, 0.78);
}

/* ============================================================
   Band 2 -- The Regulars
   ============================================================ */

.band-regulars {
    background-color: var(--buttermilk);
}

.portrait-cluster {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(-2rem, -3vw, 1rem);
    flex-wrap: wrap;
    min-height: 420px;
}

.portrait {
    position: relative;
    text-align: center;
    flex: 0 0 auto;
    margin: 0 -1.25rem;
}

.portrait-a {
    transform: translateY(-1.5rem) rotate(-3deg);
    z-index: 3;
}

.portrait-b {
    transform: translateY(1rem) rotate(2deg);
    z-index: 4;
}

.portrait-c {
    transform: translateY(-0.5rem) rotate(-1deg);
    z-index: 2;
}

.portrait-frame {
    width: clamp(170px, 22vw, 260px);
    height: clamp(170px, 22vw, 260px);
    border-radius: 50%;
    background-color: var(--warm-ivory);
    padding: 8px;
    box-shadow:
        0 4px 20px rgba(26, 13, 8, 0.25),
        inset 0 0 0 1px rgba(122, 82, 48, 0.3);
    margin: 0 auto 1.25rem auto;
    position: relative;
}

.portrait-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background:
        radial-gradient(ellipse at center, transparent 40%, rgba(26, 13, 8, 0.4) 100%),
        linear-gradient(160deg, #8a5b34, #7A5230 50%, #5e3e22);
    filter: sepia(15%) saturate(120%) contrast(105%) brightness(95%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portrait-photo::before {
    content: attr(data-label);
    font-family: var(--font-accent);
    font-style: italic;
    font-size: clamp(0.75rem, 1.4vw, 0.95rem);
    color: var(--warm-ivory);
    text-align: center;
    padding: 0 1rem;
    letter-spacing: 0.04em;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    z-index: 2;
    position: relative;
}

.portrait-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 0.7  0 0 0 0 0.5  0 0 0 0 0.3  0 0 0 0.4 0'/></filter><rect width='120' height='120' filter='url(%23g)'/></svg>");
    opacity: 0.15;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.portrait figcaption {
    font-family: var(--font-accent);
    font-style: italic;
    font-size: clamp(0.95rem, 1.7vw, 1.15rem);
    color: var(--aged-leather);
    max-width: 240px;
    margin: 0 auto;
    line-height: 1.4;
}

/* ============================================================
   Band 3 -- The Menu
   ============================================================ */

.band-menu {
    background-color: var(--buttermilk);
    border-top: 1px solid rgba(122, 82, 48, 0.18);
    border-bottom: 1px solid rgba(122, 82, 48, 0.18);
}

.menu-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: clamp(2rem, 4vw, 4rem);
    align-items: stretch;
}

.menu-list {
    list-style: none;
}

.menu-item {
    padding: 1.1rem 0;
    border-bottom: 1px dashed rgba(122, 82, 48, 0.35);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    position: relative;
    padding-left: 1.5rem;
}

.menu-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1.55rem;
    width: 10px;
    height: 10px;
    background-color: var(--filament-gold);
    clip-path: polygon(
        50% 0%, 61% 35%, 98% 35%, 68% 57%,
        79% 91%, 50% 70%, 21% 91%, 32% 57%,
        2% 35%, 39% 35%
    );
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.15rem, 2.2vw, 1.6rem);
    color: var(--bourbon-shadow);
    letter-spacing: 0.02em;
}

.menu-meta {
    font-family: var(--font-accent);
    font-style: italic;
    font-size: clamp(0.95rem, 1.6vw, 1.1rem);
    color: var(--aged-leather);
}

.menu-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0 0.5rem;
}

.menu-divider .divider-line {
    flex: 1;
    width: 1px;
    background: linear-gradient(180deg, transparent, var(--filament-gold), transparent);
    min-height: 80px;
}

.divider-diamond {
    width: 12px;
    height: 12px;
    background-color: var(--filament-gold);
    transform: rotate(45deg);
    box-shadow: 0 0 6px rgba(212, 162, 78, 0.5);
}

.menu-notes {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    justify-content: center;
}

.menu-blurb {
    font-family: var(--font-body);
    font-size: clamp(0.95rem, 1.6vw, 1.05rem);
    color: var(--bourbon-shadow);
    line-height: 1.7;
}

.menu-bullets {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.menu-bullets li {
    font-family: var(--font-accent);
    font-style: italic;
    font-size: clamp(0.95rem, 1.6vw, 1.1rem);
    color: var(--aged-leather);
    position: relative;
    padding-left: 1.5rem;
}

.menu-bullets li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 9px;
    height: 9px;
    background-color: var(--terracotta-glow);
    clip-path: polygon(
        50% 0%, 61% 35%, 98% 35%, 68% 57%,
        79% 91%, 50% 70%, 21% 91%, 32% 57%,
        2% 35%, 39% 35%
    );
}

/* ============================================================
   Band 4 -- The Jukebox
   ============================================================ */

.band-jukebox {
    background-color: #2B1810;
    color: var(--warm-ivory);
}

.jukebox-stage {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    justify-items: center;
    min-height: 540px;
}

.jukebox-illustration {
    width: clamp(220px, 32vw, 360px);
    filter: drop-shadow(0 0 60px rgba(212, 162, 78, 0.35));
    position: relative;
    z-index: 2;
}

.jukebox-illustration svg {
    width: 100%;
    height: auto;
    display: block;
}

.jukebox-fragments {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
}

.fragment {
    position: absolute;
    background-color: var(--warm-ivory);
    color: var(--bourbon-shadow);
    padding: 1rem 1.25rem;
    width: clamp(170px, 22vw, 240px);
    box-shadow:
        0 8px 22px rgba(26, 13, 8, 0.55),
        inset 0 0 0 1px rgba(122, 82, 48, 0.3);
    font-family: var(--font-accent);
    font-style: italic;
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    line-height: 1.45;
    /* torn-paper edges */
    -webkit-mask-image: radial-gradient(circle at 4% 50%, transparent 0 4px, black 5px),
                        radial-gradient(circle at 96% 50%, transparent 0 4px, black 5px);
    -webkit-mask-composite: source-in;
    transform: rotate(var(--rest-rotate, 0deg));
}

.fragment::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100'><filter id='f'><feTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='1'/><feColorMatrix values='0 0 0 0 0.6  0 0 0 0 0.45  0 0 0 0 0.25  0 0 0 0.4 0'/></filter><rect width='100' height='100' filter='url(%23f)'/></svg>");
    opacity: 0.18;
    mix-blend-mode: multiply;
    pointer-events: none;
}

.fragment-song {
    font-family: var(--font-display);
    font-weight: 700;
    font-style: normal;
    font-size: clamp(0.95rem, 1.7vw, 1.15rem);
    color: var(--old-negroni);
    margin-bottom: 0.25rem;
    letter-spacing: 0.02em;
}

.fragment-artist {
    font-family: var(--font-accent);
    font-style: italic;
    color: var(--aged-leather);
    font-size: 0.92em;
}

.fragment-quote {
    font-family: var(--font-accent);
    font-style: italic;
    color: var(--bourbon-shadow);
}

.fragment-1 { top: 8%; left: 4%; }
.fragment-2 { top: 18%; right: 6%; }
.fragment-3 { top: 48%; left: 2%; }
.fragment-4 { bottom: 22%; right: 3%; }
.fragment-5 { bottom: 6%; left: 10%; }
.fragment-6 { top: 36%; right: 14%; }

/* ============================================================
   Band 5 -- Last Call
   ============================================================ */

.band-lastcall {
    background-color: var(--midnight-walnut);
    color: var(--warm-ivory);
    text-align: center;
}

.lastcall-content {
    max-width: 720px;
    margin: 0 auto;
}

.lastcall-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(2.5rem, 7vw, 5rem);
    letter-spacing: 0.05em;
    color: var(--filament-gold);
    text-transform: uppercase;
    margin: 0.75rem 0;
    text-shadow: 0 0 30px rgba(212, 162, 78, 0.3);
}

.lastcall-line {
    font-family: var(--font-accent);
    font-style: italic;
    font-size: clamp(1.1rem, 2.4vw, 1.5rem);
    color: rgba(245, 236, 215, 0.85);
    line-height: 1.6;
    margin: 1.5rem auto;
    max-width: 560px;
}

.rule-light .rule-line {
    background: linear-gradient(90deg, transparent, rgba(212, 162, 78, 0.7), transparent);
}

.lastcall-sign {
    font-family: var(--font-accent);
    font-style: italic;
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    color: var(--terracotta-glow);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-top: 1rem;
}

/* ============================================================
   Reveal animations (driven by IntersectionObserver in JS)
   ============================================================ */

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity 800ms var(--ease-out),
        transform 800ms var(--ease-out);
    transition-delay: calc(var(--stagger, 0) * 150ms);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* fragments have their own resting rotation -- preserve it */
.fragment.reveal {
    transform: translateY(24px) rotate(calc(var(--rest-rotate, 0deg) - 2deg)) scale(0.95);
    transition:
        opacity 900ms var(--ease-out),
        transform 900ms var(--ease-out);
    transition-delay: calc(var(--stagger, 0) * 200ms);
}

.fragment.reveal.is-visible {
    opacity: 1;
    transform: translateY(0) rotate(var(--rest-rotate, 0deg)) scale(1);
}

/* ============================================================
   Scroll-to-top matchbook button
   ============================================================ */

.scroll-top {
    position: fixed;
    right: clamp(1rem, 2.5vw, 2rem);
    bottom: clamp(1rem, 2.5vw, 2rem);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: rgba(43, 24, 16, 0.85);
    border: 1px solid rgba(212, 162, 78, 0.45);
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        opacity 400ms var(--ease-out),
        transform 400ms var(--ease-out),
        box-shadow 400ms var(--ease-out);
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 6px 18px rgba(26, 13, 8, 0.45);
}

.scroll-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.scroll-top svg {
    width: 30px;
    height: 30px;
    transition: transform 400ms var(--ease-out);
    color: var(--filament-gold);
    filter: drop-shadow(0 0 12px rgba(212, 162, 78, 0.4));
}

.scroll-top:hover {
    box-shadow:
        0 6px 24px rgba(26, 13, 8, 0.55),
        0 0 18px rgba(212, 162, 78, 0.4);
}

.scroll-top:hover svg {
    transform: rotate(15deg);
}

/* ============================================================
   Keyframes
   ============================================================ */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 900px) {
    .menu-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .menu-divider {
        flex-direction: row;
        width: 100%;
        padding: 0.5rem 0;
    }
    .menu-divider .divider-line {
        width: auto;
        height: 1px;
        min-height: 0;
        flex: 1;
        background: linear-gradient(90deg, transparent, var(--filament-gold), transparent);
    }
}

@media (max-width: 768px) {
    .portrait-cluster {
        flex-direction: column;
        gap: 1rem;
    }
    .portrait {
        margin: 0;
    }
    .portrait-a, .portrait-b, .portrait-c {
        transform: rotate(-2deg);
    }
    .portrait-b {
        transform: rotate(2deg);
    }

    .jukebox-stage {
        min-height: 0;
    }

    .jukebox-fragments {
        position: relative;
        inset: auto;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        margin-top: 2rem;
    }

    .fragment {
        position: relative;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        width: 100%;
    }
}

@media (max-width: 540px) {
    .jukebox-fragments {
        grid-template-columns: 1fr;
    }
    .band {
        padding: clamp(3rem, 8vh, 6rem) 1rem;
    }
}
