/* ============================================================
   BBOTTL.com — Forbidden Apothecary of Luminous Glass
   Dark-academia + dopamine-neon, F-pattern, bebas-bold, underline-draw
   Implementation trace: IntersectionObserver` trigger sequential animations as sections enter the viewport. Each section transition should feel like turning a page: content fades up from 30px below with 600ms ease-out timing. JetBrains Mono with a vertical neon rule on their left edge. JetBrains Mono" (Google Fonts.
   ============================================================ */

:root {
    /* Palette */
    --bg-primary: #121017;        /* Obsidian Parchment */
    --bg-secondary: #1e1520;      /* Dusty Mahogany */
    --surface: #2a1f2d;           /* Burnt Library */
    --text-primary: #e8dcc8;      /* Aged Vellum */
    --text-secondary: #9b8e7e;    /* Muted Quill */
    --neon-primary: #c8ff00;      /* Electric Chartreuse */
    --neon-secondary: #ff2d6b;    /* Hot Magenta */
    --neon-tertiary: #7b2dff;     /* Ultraviolet Glow */
    --border-gold: #4a3f2f;       /* Faded Gold */
    --hover-green: #00ff88;       /* Phosphor Green */

    /* Fonts */
    --f-display: "Bebas Neue", "Inter", sans-serif;
    --f-body: "Libre Baskerville", Georgia, serif;
    --f-mono: "JetBrains Mono", "Space Mono", monospace;

    /* Spacing */
    --section-pad: clamp(100px, 14vh, 180px);
    --gutter: clamp(24px, 5vw, 96px);
}

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

html {
    scroll-behavior: smooth;
    background: var(--bg-primary);
}

body {
    font-family: var(--f-body);
    color: var(--text-primary);
    background: var(--bg-primary);
    font-size: 1.125rem;
    line-height: 1.75;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* SVG defs reservoir */
.svg-defs {
    position: absolute;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Paper-grain overlay */
.grain-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    opacity: .06;
    mix-blend-mode: screen;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.91  0 0 0 0 0.86  0 0 0 0 0.78  0 0 0 1 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* Body radial candlelight wash */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(1200px 800px at 15% 10%, rgba(200, 255, 0, 0.035), transparent 60%),
        radial-gradient(900px 700px at 90% 40%, rgba(123, 45, 255, 0.045), transparent 65%),
        radial-gradient(1000px 900px at 50% 110%, rgba(255, 45, 107, 0.03), transparent 70%),
        linear-gradient(180deg, var(--bg-primary), var(--bg-secondary) 50%, var(--bg-primary));
}

main {
    position: relative;
    z-index: 1;
}

/* ---------- Typography primitives ---------- */
.h-display {
    font-family: var(--f-display);
    font-weight: 400;
    font-size: clamp(2.4rem, 5vw, 4.5rem);
    letter-spacing: -0.02em;
    line-height: 1;
    color: var(--text-primary);
    text-transform: uppercase;
    display: inline-block;
    background-image: linear-gradient(90deg, var(--neon-primary), var(--neon-secondary));
    background-repeat: no-repeat;
    background-position: left bottom;
    background-size: 0% 2px;
    padding-bottom: 10px;
    transition: background-size .9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.h-display.is-inview,
.h-display:hover {
    background-size: 100% 2px;
}

.h-entry {
    font-family: var(--f-display);
    font-weight: 400;
    font-size: clamp(1.5rem, 2.6vw, 2.4rem);
    letter-spacing: -0.01em;
    line-height: 1.05;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 1rem;
    max-width: 22ch;
}

.label-tag {
    display: inline-block;
    font-family: var(--f-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--neon-primary);
    padding: 0.25rem 0 0.5rem;
}

.lede {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}
.lede::first-letter {
    font-family: var(--f-display);
    font-size: 3.2rem;
    float: left;
    line-height: .9;
    padding: 4px 10px 0 0;
    color: var(--neon-primary);
    text-shadow: 0 0 10px rgba(200, 255, 0, 0.35);
}

p {
    color: var(--text-primary);
    margin-bottom: 1.1rem;
    max-width: 62ch;
}
em { color: var(--neon-primary); font-style: italic; }

a {
    color: var(--text-primary);
    text-decoration: none;
    background-image: linear-gradient(90deg, var(--neon-primary), var(--neon-secondary));
    background-repeat: no-repeat;
    background-position: left bottom;
    background-size: 0% 2px;
    padding-bottom: 3px;
    transition: background-size 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), color .3s;
}
a:hover {
    background-size: 100% 2px;
    color: var(--neon-primary);
}

cite {
    display: block;
    font-style: normal;
    font-family: var(--f-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
    margin-top: 1rem;
}

/* ---------- Rule lines ---------- */
.rule-line {
    display: block;
    height: 1px;
    background: var(--border-gold);
    width: 100%;
    margin: var(--section-pad) auto 0;
    transform-origin: left center;
    transform: scaleX(0);
    transition: transform 1.2s cubic-bezier(0.22, 0.61, 0.36, 1),
                background 0.8s ease, box-shadow 0.8s ease;
}
.rule-line.is-inview {
    transform: scaleX(1);
    background: linear-gradient(90deg, transparent, var(--neon-primary) 30%, var(--neon-secondary) 70%, transparent);
    box-shadow: 0 0 8px rgba(200, 255, 0, 0.4);
}
.rule-line--hero {
    position: absolute;
    left: var(--gutter);
    right: var(--gutter);
    bottom: 7vh;
    width: auto;
    margin: 0;
    transform: scaleX(1);
    background: linear-gradient(90deg, transparent, var(--border-gold) 20%, var(--border-gold) 80%, transparent);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px var(--gutter);
    transition: padding .4s ease, background .4s ease;
    background: linear-gradient(180deg, rgba(18,16,23,0.8), transparent);
    backdrop-filter: blur(4px);
}

.nav__wordmark {
    font-family: var(--f-display);
    font-size: 1.5rem;
    letter-spacing: 0.06em;
    color: var(--text-primary);
    text-transform: uppercase;
    background: none;
    padding: 0;
    position: relative;
}
.nav__wordmark::after {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--neon-primary);
    margin-left: 6px;
    vertical-align: middle;
    box-shadow: 0 0 7px var(--neon-primary), 0 0 16px rgba(200,255,0,.5);
    animation: pulse-dot 3s ease-in-out infinite;
}
.nav__dot-mark { display: none; }

.nav__links {
    display: flex;
    gap: 2.5rem;
    transition: opacity .4s ease, transform .4s ease;
}
.nav__links a {
    font-family: var(--f-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-primary);
    padding-bottom: 3px;
}

.nav__dot {
    display: none;
    position: relative;
    width: 14px;
    height: 14px;
    border: none;
    padding: 0;
    background: transparent;
    cursor: pointer;
    overflow: visible;
}
.nav__dot-core {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--neon-primary);
    box-shadow: 0 0 7px var(--neon-primary), 0 0 20px rgba(200,255,0,.6), 0 0 42px rgba(200,255,0,.3);
    animation: pulse-dot 3s ease-in-out infinite;
    transition: transform .3s ease;
}
.nav__dot-expanded {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 0;
    overflow: hidden;
    white-space: nowrap;
    background: var(--surface);
    border: 1px solid var(--border-gold);
    border-radius: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    padding: 0;
    opacity: 0;
    transition: width .4s cubic-bezier(0.22, 0.61, 0.36, 1), opacity .3s ease, padding .4s ease;
    box-shadow: 0 0 20px rgba(200,255,0,.15);
}
.nav__dot-expanded a {
    font-family: var(--f-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-primary);
    padding: 0 14px;
    background: none;
}
.nav__dot:hover .nav__dot-expanded,
.nav__dot.is-open .nav__dot-expanded {
    width: 360px;
    opacity: 1;
    padding: 0 10px;
}
.nav__dot:hover .nav__dot-core {
    transform: scale(0.7);
}

/* Condensed state on scroll */
.nav.is-condensed {
    padding: 20px var(--gutter);
    background: linear-gradient(180deg, rgba(18,16,23,0.92), rgba(18,16,23,0));
}
.nav.is-condensed .nav__links {
    opacity: 0;
    transform: translateX(10px);
    pointer-events: none;
}
.nav.is-condensed .nav__dot {
    display: block;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ============================================================
   FLOATING AMBIENT ELEMENTS
   ============================================================ */
.floaters {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}
.floater {
    position: absolute;
    left: var(--x);
    top: var(--y);
    animation: drift 7s ease-in-out infinite;
    animation-delay: var(--d);
    opacity: .5;
}
.floater--cork {
    width: 28px;
    height: 14px;
    background: linear-gradient(180deg, #6e4f35, #3d2818);
    border-radius: 3px;
    box-shadow: inset 0 0 4px rgba(0,0,0,.5);
    transform: rotate(15deg);
}
.floater--wax {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #b93a3a, #6b0f0f 65%, #2a0404);
    box-shadow: 0 0 0 2px rgba(255,45,107,.15);
}
.floater--scrap {
    width: 46px;
    height: 22px;
    background: linear-gradient(90deg, rgba(232,220,200,.12), rgba(232,220,200,.05));
    clip-path: polygon(0 20%, 22% 0, 70% 8%, 100% 40%, 92% 100%, 32% 92%, 6% 80%);
    transform: rotate(-8deg);
}

.float-drift {
    animation: drift 6s ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}
@keyframes drift {
    0%   { transform: translateY(0) rotate(0deg); }
    50%  { transform: translateY(-18px) rotate(2deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    min-height: 100vh;
    padding: clamp(140px, 18vh, 220px) var(--gutter) 12vh;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr minmax(280px, 0.65fr);
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
        "mark    mark"
        "head    bottle"
        "tag     bottle";
    gap: 3vh 4vw;
    isolation: isolate;
}

.hero__watermark {
    grid-area: mark;
    font-family: var(--f-display);
    font-size: 15vw;
    line-height: 1;
    color: var(--neon-primary);
    opacity: 0.05;
    letter-spacing: -0.02em;
    position: absolute;
    top: 8vh;
    right: -2vw;
    pointer-events: none;
    user-select: none;
    z-index: 0;
}

.hero__headline {
    grid-area: head;
    font-family: var(--f-display);
    font-weight: 400;
    font-size: clamp(5rem, 18vw, 18rem);
    letter-spacing: -0.03em;
    line-height: 0.85;
    color: var(--text-primary);
    margin-left: -2vw;
    position: relative;
    z-index: 3;
    align-self: center;
    perspective: 900px;
    overflow: visible;
}
.hero__headline .ltr {
    display: inline-block;
    opacity: 0;
    transform: translateY(40px) rotateX(-90deg);
    transform-origin: bottom;
    transition: opacity 0.7s ease-out, transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.hero__headline.is-on .ltr {
    opacity: 1;
    transform: translateY(0) rotateX(0);
}
.hero__headline.is-on .ltr:hover {
    color: var(--neon-primary);
    text-shadow:
        0 0 7px var(--neon-primary),
        0 0 20px var(--neon-primary),
        0 0 42px rgba(200, 255, 0, 0.3);
    animation: neon-flicker 2.5s infinite;
}

@keyframes neon-flicker {
    0%, 100% { opacity: 1; }
    40% { opacity: 0.92; }
    45% { opacity: 1; }
    55% { opacity: 0.85; }
    60% { opacity: 1; }
}

.hero__bottle-stage {
    grid-area: bottle;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.hero__tagline {
    grid-area: tag;
    max-width: 46ch;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    z-index: 3;
}
.hero__tagline-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-style: italic;
    max-width: 40ch;
}

.scroll-hint {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--f-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--neon-primary);
    margin-top: 1.2rem;
}
.scroll-hint em { color: var(--neon-primary); font-style: normal; }
.scroll-hint__line {
    display: inline-block;
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, var(--neon-primary), transparent);
    position: relative;
    overflow: hidden;
}
.scroll-hint__line::after {
    content: "";
    position: absolute;
    top: 0;
    left: -30px;
    width: 30px;
    height: 100%;
    background: var(--neon-primary);
    animation: scroll-run 2.5s linear infinite;
}
@keyframes scroll-run {
    0% { transform: translateX(0); opacity: 0; }
    30% { opacity: 1; }
    100% { transform: translateX(90px); opacity: 0; }
}

/* ============================================================
   CSS BOTTLE
   ============================================================ */
.bottle {
    position: relative;
    width: 180px;
    aspect-ratio: 180 / 460;
    transform: rotate(var(--tilt, 6deg));
    transition: transform 0.3s ease;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.6));
}

.bottle--hero {
    width: clamp(240px, 34vw, 440px);
    --tilt: 6deg;
}
.bottle--giant {
    width: clamp(320px, 40vw, 560px);
    --tilt: -8deg;
}
.bottle--editorial {
    width: clamp(220px, 26vw, 340px);
    --tilt: -5deg;
    margin: 0 auto;
}
.bottle--slim {
    width: clamp(120px, 14vw, 180px);
    --tilt: 9deg;
}
.bottle--tiny {
    width: clamp(90px, 10vw, 130px);
    --tilt: -12deg;
    margin-top: 2rem;
    margin-left: 3rem;
}

.bottle__neon {
    position: absolute;
    inset: -8% -14%;
    border-radius: 120px;
    background: radial-gradient(ellipse at center, rgba(200,255,0,0.35), rgba(200,255,0,0.12) 40%, transparent 65%);
    filter: blur(18px);
    animation: bottle-glow 4s ease-in-out infinite alternate;
    z-index: 0;
    pointer-events: none;
}
.bottle__neon--magenta {
    background: radial-gradient(ellipse at center, rgba(255,45,107,0.4), rgba(255,45,107,0.15) 40%, transparent 65%);
}
.bottle__neon--violet {
    background: radial-gradient(ellipse at center, rgba(123,45,255,0.42), rgba(123,45,255,0.15) 40%, transparent 65%);
}
.bottle__neon--green {
    background: radial-gradient(ellipse at center, rgba(0,255,136,0.38), rgba(0,255,136,0.15) 40%, transparent 65%);
}

@keyframes bottle-glow {
    0%   { opacity: 0.85; transform: scale(1); }
    50%  { opacity: 1;    transform: scale(1.05); }
    100% { opacity: 0.88; transform: scale(1.02); }
}

.bottle__neck {
    position: absolute;
    left: 35%;
    right: 35%;
    top: 0;
    height: 16%;
    background: linear-gradient(180deg, #2f2638 0%, #1a1320 100%);
    border: 1px solid rgba(232,220,200,0.08);
    border-bottom: none;
    border-radius: 6px 6px 2px 2px;
    z-index: 2;
}
.bottle__neck::before {
    content: "";
    position: absolute;
    left: 10%;
    top: 20%;
    width: 18%;
    height: 60%;
    background: linear-gradient(90deg, rgba(232,220,200,.3), transparent);
    border-radius: 2px;
    filter: blur(0.5px);
}

.bottle__cork {
    position: absolute;
    left: 33%;
    right: 33%;
    top: -3%;
    height: 6%;
    background: linear-gradient(180deg, #8b6a47, #5d4425);
    border-radius: 4px 4px 0 0;
    box-shadow: inset 0 -2px 3px rgba(0,0,0,.4), 0 -2px 3px rgba(0,0,0,.3);
    z-index: 3;
}

.bottle__body {
    position: absolute;
    left: 0;
    right: 0;
    top: 16%;
    bottom: 0;
    border-radius: 24px 24px 32px 32px / 30px 30px 40px 40px;
    background:
        linear-gradient(135deg,
            rgba(232, 220, 200, 0.08) 0%,
            rgba(30, 21, 32, 0.88) 40%,
            rgba(18, 16, 23, 0.95) 100%);
    border: 1.5px solid rgba(232, 220, 200, 0.12);
    overflow: hidden;
    z-index: 2;
    box-shadow:
        inset 2px 0 8px rgba(255,255,255,0.08),
        inset -8px 0 20px rgba(0,0,0,0.5);
}

.bottle__liquid {
    position: absolute;
    left: 3%;
    right: 3%;
    top: 14%;
    bottom: 3%;
    background: linear-gradient(180deg, rgba(200, 255, 0, 0.55), rgba(200, 255, 0, 0.25) 60%, rgba(200, 255, 0, 0.4));
    border-radius: 20px 20px 28px 28px;
    box-shadow: inset 0 0 40px rgba(200, 255, 0, 0.35);
    animation: liquid-shimmer 5s ease-in-out infinite alternate;
}
.bottle__liquid--magenta {
    background: linear-gradient(180deg, rgba(255, 45, 107, 0.55), rgba(255, 45, 107, 0.25) 60%, rgba(255, 45, 107, 0.4));
    box-shadow: inset 0 0 40px rgba(255, 45, 107, 0.4);
}
.bottle__liquid--violet {
    background: linear-gradient(180deg, rgba(123, 45, 255, 0.55), rgba(123, 45, 255, 0.25) 60%, rgba(123, 45, 255, 0.4));
    box-shadow: inset 0 0 40px rgba(123, 45, 255, 0.42);
}
.bottle__liquid--green {
    background: linear-gradient(180deg, rgba(0, 255, 136, 0.55), rgba(0, 255, 136, 0.25) 60%, rgba(0, 255, 136, 0.4));
    box-shadow: inset 0 0 40px rgba(0, 255, 136, 0.4);
}
@keyframes liquid-shimmer {
    0% { filter: brightness(1); }
    100% { filter: brightness(1.15); }
}

.bottle__shine {
    position: absolute;
    left: 12%;
    top: 8%;
    width: 14%;
    height: 75%;
    background: linear-gradient(180deg, rgba(255,255,255,0.45), rgba(255,255,255,0.1) 50%, transparent);
    border-radius: 20px;
    filter: blur(1px);
    mix-blend-mode: screen;
    z-index: 3;
}

.bottle__label {
    position: absolute;
    left: 12%;
    right: 12%;
    top: 38%;
    background: linear-gradient(180deg, #e8dcc8, #d4c6ad);
    padding: 10px 8px;
    border-radius: 2px;
    transform: rotate(-1deg);
    box-shadow: 0 2px 6px rgba(0,0,0,.4);
    z-index: 4;
    font-family: var(--f-mono);
    text-align: center;
    color: #2a1f2d;
}
.bottle__label::before, .bottle__label::after {
    content: "";
    position: absolute;
    left: 10%;
    right: 10%;
    height: 1px;
    background: rgba(42, 31, 45, 0.4);
}
.bottle__label::before { top: 6px; }
.bottle__label::after  { bottom: 6px; }
.bottle__label-line {
    font-size: 0.55rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(42, 31, 45, 0.7);
    margin-bottom: 4px;
}
.bottle__label-title {
    font-family: var(--f-display);
    font-size: clamp(0.8rem, 1.4vw, 1.25rem);
    line-height: 0.95;
    letter-spacing: 0.02em;
    color: #1e1520;
}
.bottle__label-sub {
    font-size: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(42, 31, 45, 0.6);
    margin-top: 4px;
}

.bottle__subsurface {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 50%, rgba(200, 255, 0, 0.22), transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(255, 45, 107, 0.1), transparent 50%);
    mix-blend-mode: screen;
    pointer-events: none;
}
.bottle__subsurface--magenta {
    background:
        radial-gradient(ellipse at 30% 50%, rgba(255, 45, 107, 0.25), transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(200, 255, 0, 0.1), transparent 50%);
}
.bottle__subsurface--violet {
    background:
        radial-gradient(ellipse at 30% 50%, rgba(123, 45, 255, 0.28), transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(0, 255, 136, 0.12), transparent 50%);
}
.bottle__subsurface--green {
    background:
        radial-gradient(ellipse at 30% 50%, rgba(0, 255, 136, 0.25), transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(200, 255, 0, 0.12), transparent 50%);
}

.bottle__shadow {
    position: absolute;
    bottom: -10%;
    left: -10%;
    right: -10%;
    height: 30px;
    background: radial-gradient(ellipse at center, rgba(200, 255, 0, 0.25), transparent 70%);
    filter: blur(12px);
    z-index: 0;
}
.bottle__shadow--magenta { background: radial-gradient(ellipse at center, rgba(255, 45, 107, 0.3), transparent 70%); }
.bottle__shadow--violet  { background: radial-gradient(ellipse at center, rgba(123, 45, 255, 0.3), transparent 70%); }
.bottle__shadow--green   { background: radial-gradient(ellipse at center, rgba(0, 255, 136, 0.3), transparent 70%); }

/* ============================================================
   SECTION SCAFFOLDS
   ============================================================ */
.section-head {
    padding: 0 var(--gutter);
    margin-bottom: 4rem;
    max-width: 1100px;
}

.manuscript,
.gallery,
.annotations,
.letter {
    padding-top: var(--section-pad);
    padding-bottom: var(--section-pad);
    position: relative;
}

/* ----- Manuscript editorial ----- */
.manuscript__grid {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 0.65fr);
    gap: 6vw;
    padding: 0 var(--gutter);
    align-items: start;
}
.manuscript__column {
    position: relative;
    padding-right: 2vw;
}
.manuscript__side {
    position: sticky;
    top: 20vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    min-height: 60vh;
}

.annotation {
    border-left: 2px solid var(--neon-primary);
    padding: 0.6rem 0 0.6rem 1.2rem;
    margin: 2rem 0 2rem auto;
    max-width: 42ch;
    font-family: var(--f-mono);
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--text-secondary);
    background: linear-gradient(90deg, rgba(200,255,0,0.04), transparent 70%);
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .7s ease-out, transform .7s ease-out;
}
.annotation.is-inview {
    opacity: 1;
    transform: translateY(0);
}
.annotation__mark {
    display: block;
    font-family: var(--f-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--neon-primary);
    margin-bottom: .5rem;
}

/* ----- Parallax break ----- */
.parallax-break {
    position: relative;
    min-height: 90vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: var(--section-pad) var(--gutter);
    background: linear-gradient(180deg, transparent, rgba(30, 21, 32, 0.6) 20%, rgba(30, 21, 32, 0.6) 80%, transparent);
    overflow: hidden;
    isolation: isolate;
}

.parallax-break__watermark {
    position: absolute;
    top: 4vh;
    left: -1vw;
    font-family: var(--f-display);
    font-size: 22vw;
    line-height: 1;
    color: var(--neon-primary);
    opacity: 0.04;
    pointer-events: none;
    user-select: none;
    z-index: 0;
}

.parallax-break__bottle {
    justify-self: center;
    position: relative;
    z-index: 1;
    will-change: transform;
}

.parallax-break__quote {
    padding-left: 2vw;
    max-width: 40ch;
    border-left: 1px solid var(--border-gold);
    padding-top: .6rem;
    padding-bottom: .6rem;
    font-family: var(--f-body);
    font-style: italic;
    font-size: 1.4rem;
    line-height: 1.55;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .8s ease-out, transform .8s ease-out;
}
.parallax-break__quote.is-inview {
    opacity: 1;
    transform: translateY(0);
}
.parallax-break__quote em { color: var(--neon-primary); font-style: italic; }

/* ----- Gallery shelf ----- */
.gallery__shelf {
    display: flex;
    flex-direction: column;
    gap: 14vh;
    padding: 0 var(--gutter);
}
.shelf-entry {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 6vw;
    align-items: center;
    border: 1px solid var(--border-gold);
    background: linear-gradient(135deg, rgba(42, 31, 45, 0.5), rgba(30, 21, 32, 0.3));
    padding: clamp(2rem, 5vw, 4rem);
    position: relative;
    box-shadow: 4px 4px 0 0 rgba(200, 255, 0, 0.18);
    opacity: 0;
    transform: translateY(40px);
    transition: opacity .9s ease-out, transform .9s ease-out, box-shadow .4s ease;
}
.shelf-entry:nth-child(2) { box-shadow: 4px 4px 0 0 rgba(255, 45, 107, 0.22); }
.shelf-entry:nth-child(3) { box-shadow: 4px 4px 0 0 rgba(123, 45, 255, 0.22); }

.shelf-entry.is-inview {
    opacity: 1;
    transform: translateY(0);
}
.shelf-entry--reverse {
    direction: rtl;
}
.shelf-entry--reverse > * { direction: ltr; }

.shelf-entry__bottle-col {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 420px;
}
.shelf-entry__text-col {
    max-width: 52ch;
}

.wax-list {
    list-style: none;
    margin-top: 1.4rem;
    padding-left: 0;
}
.wax-list li {
    position: relative;
    padding-left: 36px;
    margin-bottom: .7rem;
    font-family: var(--f-mono);
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.6;
    text-transform: none;
}
.wax-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #c83a3a, #6b0f0f 65%, #2a0404);
    box-shadow: 0 0 0 2px rgba(255,45,107,.12), inset 0 -2px 3px rgba(0,0,0,.4);
}

/* ----- Annotations / notes ----- */
.annotations__grid {
    display: grid;
    grid-template-columns: 1fr minmax(240px, 0.45fr);
    gap: 6vw;
    padding: 0 var(--gutter);
    align-items: start;
}

.note {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-gold);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .7s ease-out, transform .7s ease-out;
}
.note.is-inview {
    opacity: 1;
    transform: translateY(0);
}
.note__num {
    font-family: var(--f-display);
    font-size: 2.4rem;
    color: var(--neon-primary);
    line-height: 1;
    text-shadow: 0 0 6px rgba(200,255,0,.5), 0 0 16px rgba(200,255,0,.3);
}
.note p {
    font-size: 1.05rem;
    line-height: 1.75;
}

.annotations__margin {
    position: sticky;
    top: 20vh;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding-top: 2rem;
}
.margin-note {
    border-left: 2px solid var(--neon-secondary);
    padding: .4rem 0 .4rem 1rem;
    font-family: var(--f-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.6;
    background: linear-gradient(90deg, rgba(255,45,107,0.04), transparent 70%);
}
.margin-note span {
    display: block;
    color: var(--neon-secondary);
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: .3rem;
}

/* ----- Letter / Footer ----- */
.letter {
    padding-top: calc(var(--section-pad) * 0.9);
    padding-bottom: calc(var(--section-pad) * 0.4);
}
.letter__envelope {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 5vh 5vw 5vh;
    background: linear-gradient(135deg, rgba(232, 220, 200, 0.05), rgba(232, 220, 200, 0.015));
    border: 1px solid var(--border-gold);
    box-shadow:
        4px 4px 0 0 rgba(200, 255, 0, 0.18),
        inset 0 0 60px rgba(232, 220, 200, 0.02);
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s ease, transform 1s ease;
}
.letter__envelope.is-inview {
    opacity: 1;
    transform: translateY(0);
}
.letter__envelope::before,
.letter__envelope::after {
    content: "";
    position: absolute;
    top: 0;
    width: 50%;
    height: 80px;
    background: linear-gradient(180deg, rgba(232,220,200,0.04), transparent);
    border-bottom: 1px solid var(--border-gold);
}
.letter__envelope::before {
    left: 0;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.letter__envelope::after {
    right: 0;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.letter__seal {
    position: absolute;
    top: 40px;
    left: 50%;
    width: 64px;
    height: 64px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #d14242, #7a1414 60%, #2a0303);
    box-shadow:
        0 0 0 2px rgba(255,45,107,.18),
        inset 0 -4px 6px rgba(0,0,0,.5),
        0 6px 20px rgba(0,0,0,.5);
    z-index: 3;
}
.letter__seal::before {
    content: "B";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--f-display);
    font-size: 2rem;
    color: rgba(232, 220, 200, 0.65);
    text-shadow: 0 1px 1px rgba(0,0,0,.5);
}

.letter__body {
    padding-top: 6vh;
    max-width: 62ch;
    margin: 0 auto;
}
.letter__h {
    font-size: clamp(1.8rem, 3.4vw, 3rem);
    margin: .5rem 0 1.4rem;
}

.letter__meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border-gold);
}
.letter__meta > div .label-tag { display: block; margin-bottom: .4rem; }
.letter__meta a {
    font-family: var(--f-body);
    font-size: 1rem;
    color: var(--text-primary);
}

.letter__footline {
    max-width: 900px;
    margin: 4rem auto 0;
    padding: 0 var(--gutter);
    display: flex;
    justify-content: space-between;
    font-family: var(--f-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-secondary);
    gap: 2rem;
    flex-wrap: wrap;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .parallax-break { grid-template-columns: 1fr; gap: 6vh; }
    .parallax-break__quote { padding-left: 0; border-left: none; border-top: 1px solid var(--border-gold); padding-top: 2rem; }
    .shelf-entry { grid-template-columns: 1fr; }
    .shelf-entry--reverse { direction: ltr; }
    .shelf-entry__bottle-col { min-height: 340px; }
}

@media (max-width: 768px) {
    :root { --gutter: 22px; }
    .nav__links { display: none; }
    .nav__dot { display: block; }
    .nav__dot-expanded { width: 0; }
    .nav__dot.is-open .nav__dot-expanded { width: min(80vw, 340px); }

    .hero {
        grid-template-columns: 1fr;
        grid-template-areas:
            "mark"
            "head"
            "bottle"
            "tag";
        gap: 2rem;
        min-height: auto;
        padding-top: 120px;
    }
    .hero__headline { font-size: clamp(4.5rem, 22vw, 10rem); margin-left: 0; }
    .hero__bottle-stage { min-height: 44vh; }

    .manuscript__grid { grid-template-columns: 1fr; gap: 3rem; }
    .manuscript__side { flex-direction: row; justify-content: center; position: relative; top: 0; min-height: auto; }

    .annotations__grid { grid-template-columns: 1fr; gap: 2rem; }
    .annotations__margin { position: relative; top: 0; flex-direction: row; flex-wrap: wrap; }

    .note { grid-template-columns: 40px 1fr; gap: 1rem; }
    .note__num { font-size: 1.8rem; }

    .letter__footline { flex-direction: column; text-align: center; }
}

/* Utility: reveal baseline for elements using [data-reveal] */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .8s ease-out, transform .8s ease-out;
}
[data-reveal].is-inview {
    opacity: 1;
    transform: translateY(0);
}
