/* ============================================================
   lower.bar -- v2
   A subterranean dark-academia bar, ocean-deep palette,
   modular alcoves, eclectic-hybrid serif/sans typography,
   line-illustration motifs, retro-pattern wallpaper, candle.
   ============================================================ */

:root {
    --ocean-deep: #0c1420;
    --alcove-dark: #081018;
    --mid-depth: #1a3040;
    --gold: #c4a050;
    --teal: #2a6a6a;
    --line-illu: #2a4050;
    --pattern: #1a2838;
    --candle: #e8c060;
    --candle-warm: #f0d878;
    --text-primary: #c8d0d8;
    --text-secondary: #6a7a88;

    --serif: 'Vollkorn', 'Lora', Georgia, serif;
    --sans: 'DM Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --gap-thin: 1px;
    --pad-module: 28px;
    --pad-section: clamp(48px, 8vw, 120px);
    --max-width: 1320px;
}

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

html, body {
    background: var(--ocean-deep);
    color: var(--text-primary);
    font-family: var(--sans);
    font-weight: 400;
    line-height: 1.7;
    font-size: clamp(15px, 1.05vw, 17px);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body {
    position: relative;
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 20% 10%, rgba(42, 106, 106, 0.06), transparent 60%),
        radial-gradient(ellipse at 80% 90%, rgba(196, 160, 80, 0.04), transparent 55%),
        var(--ocean-deep);
}

::selection { background: rgba(196, 160, 80, 0.35); color: #fff8e0; }

/* -------------------- Persistent retro-pattern wallpaper -------------------- */
.wallpaper-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.7;
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent 0 22px,
            rgba(26, 40, 56, 0.45) 22px 23px,
            transparent 23px 44px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent 0 22px,
            rgba(26, 40, 56, 0.45) 22px 23px,
            transparent 23px 44px
        );
    mix-blend-mode: screen;
}

/* drifting Latin marginalia */
.marginalia {
    position: fixed;
    top: 14px;
    left: 0;
    width: 100%;
    overflow: hidden;
    z-index: 5;
    pointer-events: none;
    font-family: var(--serif);
    font-style: italic;
    font-size: 12px;
    letter-spacing: 0.18em;
    color: rgba(106, 122, 136, 0.55);
    white-space: nowrap;
}

.marginalia-line {
    display: inline-block;
    padding-left: 100%;
    animation: drift 60s linear infinite;
}

@keyframes drift {
    from { transform: translateX(0); }
    to   { transform: translateX(-100%); }
}

/* -------------------- HERO -------------------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--pad-section) 24px 80px;
    overflow: hidden;
    background: var(--ocean-deep);
    z-index: 1;
}

.vault-arches {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.vault-line {
    stroke-linecap: round;
    stroke-linejoin: round;
}

.vault-line.keystone,
.vault-line.keystone-inner,
.vault-line.keystone-stone {
    stroke-dasharray: 4000;
    stroke-dashoffset: 4000;
    animation: drawArch 1800ms cubic-bezier(0.5, 0, 0.2, 1) forwards;
}

.vault-line.keystone-inner { animation-delay: 200ms; }
.vault-line.keystone-stone { animation-delay: 600ms; stroke-dasharray: 200; stroke-dashoffset: 200; }

@keyframes drawArch {
    to { stroke-dashoffset: 0; }
}

/* embers */
.embers {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.ember {
    position: absolute;
    bottom: -10px;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: var(--candle);
    opacity: 0;
    box-shadow: 0 0 6px rgba(232, 192, 96, 0.6);
    animation: ember-rise linear infinite;
}

@keyframes ember-rise {
    0%   { transform: translate(0, 0) scale(0.6); opacity: 0; }
    10%  { opacity: 0.8; }
    50%  { opacity: 0.6; }
    100% { transform: translate(var(--ember-x, 20px), -110vh) scale(0.4); opacity: 0; }
}

.hero-inner {
    position: relative;
    z-index: 2;
    max-width: 880px;
    width: 100%;
    text-align: center;
}

.overline {
    font-family: var(--sans);
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.42em;
    color: var(--gold);
    margin-bottom: 36px;
    opacity: 0;
    animation: fadeUp 700ms ease-out 200ms forwards;
}

.title-stack {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
}

.title-lower {
    font-family: var(--serif);
    font-weight: 800;
    font-size: clamp(56px, 10vw, 124px);
    line-height: 0.95;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    opacity: 0;
    animation: fadeUp 800ms ease-out 500ms forwards;
}

.gold-rule {
    display: block;
    height: 1px;
    width: 0;
    background: var(--gold);
    box-shadow: 0 0 6px rgba(196, 160, 80, 0.4);
    animation: ruleDraw 700ms ease-out 900ms forwards;
}

@keyframes ruleDraw {
    to { width: clamp(180px, 32vw, 380px); }
}

.title-bar {
    font-family: var(--sans);
    font-weight: 300;
    font-size: clamp(28px, 4.5vw, 48px);
    letter-spacing: 0.42em;
    color: var(--text-primary);
    text-transform: uppercase;
    opacity: 0;
    animation: fadeUp 700ms ease-out 1200ms forwards;
}

.hero-tagline {
    font-family: var(--sans);
    font-weight: 400;
    font-size: clamp(14px, 1.3vw, 17px);
    color: var(--text-secondary);
    margin: 8px auto 56px;
    max-width: 540px;
    opacity: 0;
    animation: fadeUp 700ms ease-out 1500ms forwards;
}

.hero-tagline em {
    font-family: var(--serif);
    font-style: italic;
    color: var(--gold);
    letter-spacing: 0.02em;
}

.hero-meta {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gap-thin);
    background: var(--gold);
    background-image: linear-gradient(var(--gold), var(--gold));
    border: 1px solid rgba(196, 160, 80, 0.35);
    max-width: 720px;
    margin: 0 auto;
    opacity: 0;
    animation: fadeUp 800ms ease-out 1800ms forwards;
}

.meta-cell {
    background: var(--ocean-deep);
    padding: 18px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    text-align: center;
}

.meta-label {
    font-family: var(--sans);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.32em;
    color: var(--text-secondary);
}

.meta-value {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.scroll-cue {
    margin-top: 64px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0;
    animation: fadeUp 800ms ease-out 2200ms forwards;
}

.scroll-cue-label {
    font-family: var(--sans);
    font-size: 10px;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.scroll-cue-line {
    display: block;
    width: 1px;
    height: 64px;
    background: linear-gradient(to bottom, transparent, var(--gold), transparent);
    animation: cuePulse 2.4s ease-in-out infinite;
}

@keyframes cuePulse {
    0%, 100% { opacity: 0.35; transform: scaleY(0.85); }
    50%      { opacity: 1;    transform: scaleY(1.15); }
}

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

/* -------------------- Section heads -------------------- */
.section-head {
    text-align: center;
    margin: 0 auto 64px;
    max-width: 720px;
    position: relative;
}

.section-numeral {
    display: inline-block;
    font-family: var(--serif);
    font-style: italic;
    font-weight: 400;
    font-size: 14px;
    color: var(--gold);
    letter-spacing: 0.32em;
    margin-bottom: 12px;
}

.section-title {
    font-family: var(--serif);
    font-weight: 800;
    font-size: clamp(32px, 5vw, 56px);
    color: var(--text-primary);
    margin-bottom: 14px;
    letter-spacing: -0.005em;
}

.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: var(--gold);
    margin: 18px auto 0;
}

.section-deck {
    font-family: var(--serif);
    font-style: italic;
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    letter-spacing: 0.01em;
}

/* -------------------- Menu grid -------------------- */
.menu {
    position: relative;
    padding: var(--pad-section) 24px;
    z-index: 1;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 220px;
    gap: var(--gap-thin);
    background: var(--gold);
    background-image: linear-gradient(var(--gold), var(--gold));
    border: 1px solid rgba(196, 160, 80, 0.4);
    max-width: var(--max-width);
    margin: 0 auto;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.4);
}

.alcove {
    background: var(--ocean-deep);
    padding: var(--pad-module);
    position: relative;
    overflow: hidden;
    transition: filter 220ms ease, transform 220ms ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    transform: translateY(8px);
}

.alcove.is-revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 700ms ease, transform 700ms ease, filter 220ms ease;
}

.alcove:hover {
    filter: brightness(1.12);
}

.alcove-tall {
    grid-column: span 1;
    grid-row: span 2;
}

.alcove-wide {
    grid-column: span 2;
    grid-row: span 1;
}

.alcove-square {
    grid-column: span 1;
    grid-row: span 1;
}

/* corners (subtle gold tick marks at the corners of featured blocks) */
.alcove-corner {
    position: absolute;
    width: 12px;
    height: 12px;
    border: 1px solid var(--gold);
    opacity: 0.55;
}

.alcove-corner-tl { top: 6px; left: 6px; border-right: none; border-bottom: none; }
.alcove-corner-tr { top: 6px; right: 6px; border-left: none; border-bottom: none; }
.alcove-corner-bl { bottom: 6px; left: 6px; border-right: none; border-top: none; }
.alcove-corner-br { bottom: 6px; right: 6px; border-left: none; border-top: none; }

/* retro-pattern wallpaper inside each alcove */
.alcove-pattern {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.045;
    background-image:
        repeating-linear-gradient(
            90deg,
            transparent 0 30px,
            var(--pattern) 30px 31px,
            transparent 31px 60px
        ),
        repeating-linear-gradient(
            0deg,
            transparent 0 30px,
            var(--pattern) 30px 31px,
            transparent 31px 60px
        ),
        radial-gradient(circle at 50% 50%, var(--pattern) 1px, transparent 2px);
    background-size: 60px 60px, 60px 60px, 30px 30px;
}

/* featured pulse */
.alcove.featured {
    box-shadow: inset 0 0 0 0 var(--gold);
    animation: pulseAlcove 3.4s ease-in-out infinite;
}

@keyframes pulseAlcove {
    0%, 100% { box-shadow: inset 0 0 0 0 rgba(196, 160, 80, 0); }
    50%      { box-shadow: inset 0 0 14px 1px rgba(196, 160, 80, 0.18); }
}

.alcove-tag {
    font-family: var(--sans);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.32em;
    color: var(--gold);
    position: relative;
    z-index: 1;
}

.alcove-title {
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(20px, 1.8vw, 26px);
    color: var(--text-primary);
    line-height: 1.15;
    letter-spacing: -0.005em;
    position: relative;
    z-index: 1;
}

.alcove-title-tight {
    font-size: clamp(22px, 2vw, 30px);
}

.alcove-title .pos {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 400;
    color: var(--gold);
    font-size: 0.65em;
    margin-left: 6px;
}

.alcove-latin {
    font-family: var(--serif);
    font-style: italic;
    font-size: 13px;
    color: var(--gold);
    letter-spacing: 0.02em;
    position: relative;
    z-index: 1;
}

.alcove-body {
    font-family: var(--sans);
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.alcove-body .alt {
    color: var(--gold);
    font-family: var(--serif);
    font-style: italic;
    font-weight: 600;
}

.alcove-detail {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--sans);
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-secondary);
    border-top: 1px dashed rgba(106, 122, 136, 0.3);
    padding-top: 10px;
    position: relative;
    z-index: 1;
}

.alcove-detail span:last-child {
    color: var(--gold);
    font-family: var(--serif);
    font-style: italic;
    letter-spacing: 0.04em;
    text-transform: none;
    font-size: 14px;
}

.cocktail-illustration {
    display: block;
    width: 80px;
    height: auto;
    margin: 4px 0 4px;
    position: relative;
    z-index: 1;
}

/* quote */
.alcove-quote {
    position: relative;
    z-index: 1;
    border-left: 1px solid var(--gold);
    padding-left: 18px;
    margin-bottom: 4px;
}

.quote-text {
    font-family: var(--serif);
    font-weight: 600;
    font-style: italic;
    font-size: clamp(18px, 1.6vw, 22px);
    line-height: 1.4;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.quote-cite {
    font-family: var(--sans);
    font-style: normal;
    font-size: 11px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

/* rules list */
.alcove-rules {
    list-style: none;
    counter-reset: rule;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.alcove-rules li {
    counter-increment: rule;
    font-family: var(--sans);
    font-size: 13px;
    color: var(--text-primary);
    padding-left: 26px;
    position: relative;
    line-height: 1.5;
}

.alcove-rules li::before {
    content: counter(rule, lower-roman) '.';
    position: absolute;
    left: 0;
    top: 0;
    font-family: var(--serif);
    font-style: italic;
    color: var(--gold);
    font-size: 13px;
}

/* -------------------- Deep alcove section -------------------- */
.deep-alcove {
    position: relative;
    padding: var(--pad-section) 24px;
    background: var(--alcove-dark);
    border-top: 1px solid rgba(196, 160, 80, 0.18);
    border-bottom: 1px solid rgba(196, 160, 80, 0.18);
    overflow: hidden;
    z-index: 1;
}

.alcove-vault {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 280px;
    pointer-events: none;
    opacity: 0.5;
}

.deep-alcove .alcove-pattern.alcove-pattern-left {
    position: absolute;
    top: 0;
    left: 0;
    width: 30%;
    height: 100%;
    opacity: 0.06;
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent 0 10px,
            rgba(42, 64, 80, 0.6) 10px 11px,
            transparent 11px 20px
        );
}

.deep-alcove .alcove-pattern.alcove-pattern-right {
    position: absolute;
    top: 0;
    right: 0;
    width: 30%;
    height: 100%;
    opacity: 0.06;
    background-image:
        repeating-linear-gradient(
            -45deg,
            transparent 0 10px,
            rgba(42, 64, 80, 0.6) 10px 11px,
            transparent 11px 20px
        );
}

.deep-alcove-inner {
    max-width: 760px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    padding-top: 60px;
}

.alcove-prose p {
    font-family: var(--serif);
    font-size: clamp(16px, 1.4vw, 19px);
    line-height: 1.75;
    color: var(--text-primary);
    margin-bottom: 22px;
}

.alcove-prose p:first-child::first-letter {
    font-family: var(--serif);
    font-weight: 800;
    font-size: 4em;
    float: left;
    line-height: 0.9;
    margin-right: 10px;
    margin-top: 4px;
    color: var(--gold);
}

.alcove-prose em {
    font-style: italic;
    color: var(--gold);
}

.alcove-pull {
    text-align: center;
    border-top: 1px solid rgba(196, 160, 80, 0.25);
    border-bottom: 1px solid rgba(196, 160, 80, 0.25);
    padding: 26px 0;
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(20px, 2vw, 26px) !important;
    color: var(--gold) !important;
    line-height: 1.4 !important;
}

.alcove-pull-trans {
    display: block;
    font-family: var(--sans);
    font-style: normal;
    font-size: 13px;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    margin-top: 10px;
}

/* -------------------- Ledger -------------------- */
.ledger {
    position: relative;
    padding: var(--pad-section) 24px;
    z-index: 1;
}

.ledger-list {
    list-style: none;
    max-width: 880px;
    margin: 0 auto;
    border-top: 1px solid rgba(196, 160, 80, 0.25);
}

.ledger-item {
    display: grid;
    grid-template-columns: 200px 1fr 160px;
    gap: 24px;
    padding: 22px 8px;
    border-bottom: 1px solid rgba(106, 122, 136, 0.18);
    align-items: baseline;
    transition: background 240ms ease;
}

.ledger-item:hover {
    background: rgba(42, 106, 106, 0.05);
}

.ledger-date {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 600;
    color: var(--gold);
    font-size: 14px;
    letter-spacing: 0.02em;
}

.ledger-entry {
    font-family: var(--sans);
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-primary);
}

.ledger-entry em {
    font-family: var(--serif);
    font-style: italic;
    color: var(--text-primary);
}

.ledger-tally {
    font-family: var(--sans);
    font-size: 11px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--text-secondary);
    text-align: right;
}

/* -------------------- Last call footer -------------------- */
.last-call {
    position: relative;
    padding: 96px 24px 64px;
    text-align: center;
    background: var(--alcove-dark);
    overflow: hidden;
    z-index: 1;
}

.last-call::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 1px;
    height: 64px;
    background: linear-gradient(to bottom, transparent, var(--gold));
    transform: translateX(-50%);
}

.candle-area {
    position: relative;
    width: 120px;
    height: 200px;
    margin: 0 auto 24px;
}

.candle-glow {
    position: absolute;
    inset: -40% -40% -10% -40%;
    background: radial-gradient(circle at 50% 35%, rgba(232, 192, 96, 0.22), rgba(232, 192, 96, 0.06) 40%, transparent 70%);
    pointer-events: none;
    animation: glowPulse 2.4s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.55; transform: scale(1); }
    50%      { opacity: 1;    transform: scale(1.08); }
}

.candle-svg {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.candle-flame {
    transform-origin: 40px 50px;
    animation: flameWobble 2.1s ease-in-out infinite;
    filter: drop-shadow(0 0 6px rgba(232, 192, 96, 0.5));
}

@keyframes flameWobble {
    0%   { transform: scaleX(1)    scaleY(1)    translateX(0); }
    20%  { transform: scaleX(0.92) scaleY(1.06) translateX(-1px); }
    40%  { transform: scaleX(1.08) scaleY(0.96) translateX(1px); }
    60%  { transform: scaleX(0.96) scaleY(1.04) translateX(-0.5px); }
    80%  { transform: scaleX(1.04) scaleY(0.98) translateX(0.8px); }
    100% { transform: scaleX(1)    scaleY(1)    translateX(0); }
}

.last-call-line {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 600;
    font-size: clamp(20px, 2.4vw, 28px);
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}

.last-call-sub {
    font-family: var(--serif);
    font-style: italic;
    font-size: 14px;
    color: var(--gold);
    letter-spacing: 0.02em;
    margin-bottom: 28px;
}

.last-call-meta {
    display: inline-flex;
    gap: 14px;
    align-items: center;
    font-family: var(--sans);
    font-size: 11px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.last-call-meta .dot {
    color: var(--gold);
    letter-spacing: 0;
}

/* -------------------- Responsive -------------------- */
@media (max-width: 1024px) {
    .menu-grid { grid-template-columns: repeat(2, 1fr); }
    .alcove-tall { grid-row: span 2; }
    .alcove-wide { grid-column: span 2; }
    .ledger-item { grid-template-columns: 160px 1fr; }
    .ledger-tally { grid-column: 1 / -1; text-align: left; padding-top: 4px; }
    .hero-meta { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .menu-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
    .alcove { grid-column: span 1 !important; grid-row: span 1 !important; min-height: 220px; }
    .alcove-tall { min-height: 320px; }
    .ledger-item { grid-template-columns: 1fr; gap: 4px; }
    .hero-meta { grid-template-columns: 1fr; }
    .marginalia { display: none; }
}
