/* ===========================
   BBOTTL.com - Styles
   Mid-century + Dark Neon
   =========================== */

/* --- CSS Custom Properties --- */
:root {
    --bg-deep: #0B0B1A;
    --bg-mid: #12122A;
    --neon-magenta: #FF2D7B;
    --neon-cyan: #00F0FF;
    --neon-lime: #AAFF00;
    --warm-neutral: #E8D5A3;
    --text-primary: #F0ECE3;
    --text-muted: #8B85A1;
    --glow-magenta: rgba(255, 45, 123, 0.3);
    --glow-cyan: rgba(0, 240, 255, 0.3);
    --glow-lime: rgba(170, 255, 0, 0.3);
    --font-headline: 'Space Grotesk', sans-serif;
    --font-body: 'Work Sans', sans-serif;
    --font-mono: 'Space Mono', monospace;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-deep);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* --- Background Pattern (atomic starbursts) --- */
#bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image:
        radial-gradient(circle, var(--neon-magenta) 1px, transparent 1px),
        radial-gradient(circle, var(--neon-cyan) 0.5px, transparent 0.5px);
    background-size: 80px 80px, 120px 120px;
    background-position: 0 0, 40px 40px;
    opacity: 0.04;
}

/* --- Pour Line SVG --- */
#pour-line-svg {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
    opacity: 0.4;
}

#pour-line {
    stroke-dasharray: 3200;
    stroke-dashoffset: 3200;
    transition: stroke-dashoffset 0.05s linear;
}

/* --- Scanlines overlay --- */
.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
}

/* --- Radial Navigation --- */
#nav-toggle {
    position: fixed;
    top: 24px;
    left: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-mid);
    border: 2px solid var(--neon-magenta);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    box-shadow: 0 0 15px var(--glow-magenta);
}

#nav-toggle:hover {
    transform: rotate(90deg);
    box-shadow: 0 0 25px var(--glow-magenta);
}

#nav-toggle .cap-line {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--neon-magenta);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#nav-toggle.open .cap-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

#nav-toggle.open .cap-line:nth-child(2) {
    opacity: 0;
}

#nav-toggle.open .cap-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

#radial-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

#radial-nav.open {
    pointer-events: all;
    opacity: 1;
}

.nav-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 11, 26, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.nav-items {
    position: absolute;
    top: 24px;
    left: 24px;
    width: 280px;
    height: 280px;
}

.nav-item {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--bg-mid);
    border: 1px solid var(--neon-cyan);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 11px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    box-shadow: 0 0 12px var(--glow-cyan);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    transform: scale(0);
}

#radial-nav.open .nav-item {
    transform: scale(1);
}

.nav-item[data-angle="0"] { top: 20px; left: 100px; transition-delay: 0.05s; }
.nav-item[data-angle="72"] { top: 80px; left: 180px; transition-delay: 0.1s; }
.nav-item[data-angle="144"] { top: 170px; left: 160px; transition-delay: 0.15s; }
.nav-item[data-angle="216"] { top: 190px; left: 70px; transition-delay: 0.2s; }
.nav-item[data-angle="288"] { top: 100px; left: 20px; transition-delay: 0.25s; }

.nav-item:hover {
    box-shadow: 0 0 25px var(--glow-cyan);
    transform: scale(1.1);
}

/* --- Sections Base --- */
.section {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    z-index: 2;
}

.section-curve {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    z-index: 5;
}

.section-curve svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* --- HERO / NECK --- */
#hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-deep);
    padding-bottom: 120px;
}

.hero-bottle {
    position: relative;
    width: 300px;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bottle-silhouette {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 20px var(--glow-cyan));
}

.bottle-outline {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    animation: draw-bottle 2.5s ease-out forwards;
}

@keyframes draw-bottle {
    to { stroke-dashoffset: 0; }
}

.bottle-cap-svg {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    animation: draw-bottle 2s ease-out 0.5s forwards;
}

.starburst-ring {
    animation: pulse-ring 3s ease-in-out infinite;
}

.starburst-ring:nth-child(4) { animation-delay: 0s; }
.starburst-ring:nth-child(5) { animation-delay: 1s; }
.starburst-ring:nth-child(6) { animation-delay: 2s; }

@keyframes pulse-ring {
    0%, 100% { opacity: 0.2; transform-origin: center; }
    50% { opacity: 0.5; }
}

#hero-particles {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 400px;
    pointer-events: none;
}

.hero-content {
    text-align: center;
    margin-top: -80px;
    z-index: 3;
}

.hero-title {
    font-family: var(--font-headline);
    font-weight: 700;
    font-size: clamp(4rem, 10vw, 8rem);
    letter-spacing: 0.05em;
    color: var(--text-primary);
    text-shadow: 0 0 40px var(--glow-magenta), 0 0 80px var(--glow-magenta);
    margin-bottom: 16px;
}

.hero-question {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--text-muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0;
    animation: fade-in 1s ease-out 2s forwards;
}

@keyframes fade-in {
    to { opacity: 1; }
}

/* Neon Flicker animation */
.neon-flicker {
    animation: neon-flicker-anim 3s infinite;
}

@keyframes neon-flicker-anim {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        text-shadow: 0 0 40px var(--glow-magenta), 0 0 80px var(--glow-magenta);
    }
    20%, 24%, 55% {
        text-shadow: 0 0 30px rgba(255, 45, 123, 0.2), 0 0 60px rgba(255, 45, 123, 0.15);
    }
}

/* Starburst divider */
.starburst-divider {
    position: absolute;
    bottom: 160px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    z-index: 4;
    opacity: 0.6;
    animation: spin-slow 20s linear infinite;
}

@keyframes spin-slow {
    to { transform: translateX(-50%) rotate(360deg); }
}

.starburst-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 8px var(--glow-magenta));
}

/* --- THE POUR --- */
#pour {
    background: var(--bg-mid);
    padding: 120px 24px 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pour-container {
    max-width: 900px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 60px;
    position: relative;
    z-index: 3;
}

.pour-blob {
    padding: 48px;
    border-radius: 40% 60% 55% 45% / 50% 40% 60% 50%;
    background: rgba(11, 11, 26, 0.6);
    border: 1px solid rgba(0, 240, 255, 0.15);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.08);
    position: relative;
    max-width: 600px;
}

.pour-blob-1 {
    align-self: flex-start;
    border-radius: 55% 45% 50% 50% / 45% 55% 45% 55%;
}

.pour-blob-2 {
    align-self: flex-end;
    border-radius: 45% 55% 60% 40% / 50% 45% 55% 50%;
}

.pour-blob-3 {
    align-self: center;
    border-radius: 50% 50% 45% 55% / 55% 50% 50% 45%;
}

.pour-blob h2 {
    font-family: var(--font-headline);
    font-weight: 700;
    font-size: 2.5rem;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-shadow: 0 0 30px var(--glow-magenta);
}

.pour-blob h3 {
    font-family: var(--font-headline);
    font-weight: 700;
    font-size: 1.6rem;
    letter-spacing: 0.03em;
    color: var(--neon-cyan);
    margin-bottom: 16px;
    text-shadow: 0 0 20px var(--glow-cyan);
}

.pour-blob p {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-primary);
    opacity: 0.9;
}

/* Circuit-pour lines */
.circuit-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.08;
}

.pour-circuits {
    background-image:
        linear-gradient(90deg, var(--neon-cyan) 1px, transparent 1px),
        linear-gradient(0deg, var(--neon-cyan) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.3) 30%, rgba(0,0,0,0.3) 70%, transparent 100%);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.3) 30%, rgba(0,0,0,0.3) 70%, transparent 100%);
}

/* Boomerang shapes */
.boomerang {
    position: absolute;
    pointer-events: none;
    z-index: 2;
    opacity: 0.5;
}

.boomerang-1 {
    top: 20%;
    right: 5%;
    width: 120px;
    transform: rotate(-20deg);
    animation: float-1 6s ease-in-out infinite;
}

.boomerang-2 {
    bottom: 30%;
    left: 3%;
    width: 100px;
    transform: rotate(15deg);
    animation: float-2 8s ease-in-out infinite;
}

@keyframes float-1 {
    0%, 100% { transform: rotate(-20deg) translateY(0); }
    50% { transform: rotate(-20deg) translateY(-20px); }
}

@keyframes float-2 {
    0%, 100% { transform: rotate(15deg) translateY(0); }
    50% { transform: rotate(15deg) translateY(15px); }
}

/* --- THE FIZZ --- */
#fizz {
    background: var(--bg-deep);
    padding: 120px 24px 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fizz-container {
    max-width: 1000px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 3;
}

.fizz-title {
    font-family: var(--font-headline);
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 4rem);
    letter-spacing: 0.05em;
    color: var(--text-primary);
    margin-bottom: 12px;
    text-shadow: 0 0 40px var(--glow-cyan);
}

.fizz-subtitle {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 60px;
}

.bubble-field {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    padding: 40px;
    min-height: 400px;
    align-items: center;
}

.bubble {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: default;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform;
}

.bubble[data-size="lg"] svg { width: 100px; height: 100px; }
.bubble[data-size="md"] svg { width: 80px; height: 80px; }
.bubble[data-size="sm"] svg { width: 60px; height: 60px; }

.bubble svg {
    filter: drop-shadow(0 0 12px var(--glow-cyan));
    transition: filter 0.3s ease;
}

.bubble:hover svg {
    filter: drop-shadow(0 0 25px var(--glow-cyan));
}

.bubble-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* Bubble cluster BG */
.bubble-cluster-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.cluster-svg {
    width: 100%;
    height: 100%;
}

/* --- THE LABEL --- */
#label {
    background: var(--bg-mid);
    padding: 120px 24px 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.label-container {
    max-width: 700px;
    width: 100%;
    position: relative;
    z-index: 3;
}

.label-border {
    position: relative;
    border: 2px solid var(--warm-neutral);
    padding: 60px 48px;
    background: rgba(18, 18, 42, 0.8);
    overflow: hidden;
}

/* Label corners */
.label-corner {
    position: absolute;
    width: 60px;
    height: 60px;
    z-index: 5;
}

.label-corner-tl { top: -1px; left: -1px; }
.label-corner-tr { top: -1px; right: -1px; }
.label-corner-bl { bottom: -1px; left: -1px; }
.label-corner-br { bottom: -1px; right: -1px; }

/* Starburst decoration */
.label-starburst {
    position: absolute;
    z-index: 4;
}

.label-starburst-top {
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    animation: spin-slow 15s linear infinite;
}

/* Barcode texture */
.barcode-texture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.04;
    background-image: repeating-linear-gradient(
        90deg,
        var(--warm-neutral) 0px,
        var(--warm-neutral) 1px,
        transparent 1px,
        transparent 4px,
        var(--warm-neutral) 4px,
        var(--warm-neutral) 5px,
        transparent 5px,
        transparent 12px,
        var(--warm-neutral) 12px,
        var(--warm-neutral) 14px,
        transparent 14px,
        transparent 18px,
        var(--warm-neutral) 18px,
        var(--warm-neutral) 19px,
        transparent 19px,
        transparent 24px
    );
}

.label-content {
    position: relative;
    z-index: 3;
    text-align: center;
}

.label-est {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 16px;
}

.label-title {
    font-family: var(--font-headline);
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 5rem);
    letter-spacing: 0.1em;
    color: var(--text-primary);
    text-shadow: 0 0 30px var(--glow-magenta);
    margin-bottom: 20px;
}

.label-rule {
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--warm-neutral), transparent);
    margin: 24px auto;
}

.label-subtitle {
    font-family: var(--font-headline);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--neon-cyan);
    text-shadow: 0 0 15px var(--glow-cyan);
    margin-bottom: 8px;
}

.label-body {
    max-width: 500px;
    margin: 0 auto;
}

.label-body p {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-primary);
    opacity: 0.85;
    margin-bottom: 16px;
}

.label-body p:last-child {
    margin-bottom: 0;
}

.label-batch {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    display: block;
    margin-top: 8px;
}

/* --- THE CAP (FOOTER) --- */
#cap {
    background: var(--bg-deep);
    padding: 120px 24px 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}

.cap-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.bottle-cap {
    position: relative;
    width: 200px;
    height: 200px;
    cursor: pointer;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bottle-cap:hover {
    transform: rotate(45deg);
}

.cap-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 20px var(--glow-magenta));
    animation: cap-hover-spin 30s linear infinite;
}

@keyframes cap-hover-spin {
    to { transform: rotate(360deg); }
}

.bottle-cap:hover .cap-svg {
    animation-play-state: paused;
}

.cap-links {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.cap-link {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 36px;
    margin: -18px 0 0 -18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-deep);
    border: 1px solid var(--neon-cyan);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 8px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    pointer-events: all;
    box-shadow: 0 0 8px var(--glow-cyan);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    transform: translate(
        calc(cos(var(--angle)) * 110px),
        calc(sin(var(--angle)) * 110px)
    );
}

.cap-link:hover {
    box-shadow: 0 0 20px var(--glow-cyan);
    transform: translate(
        calc(cos(var(--angle)) * 120px),
        calc(sin(var(--angle)) * 120px)
    );
}

.cap-tagline {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--text-primary);
    opacity: 0.8;
}

.cap-copyright {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

/* --- Reveal Animation (scroll-triggered) --- */
.reveal-element {
    opacity: 0;
    transform: translateY(40px) scale(0.97);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal-element.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* --- Stagger children inside revealed elements --- */
.reveal-element.revealed > * {
    animation: stagger-in 0.5s ease-out both;
}

.reveal-element.revealed > *:nth-child(1) { animation-delay: 0ms; }
.reveal-element.revealed > *:nth-child(2) { animation-delay: 80ms; }
.reveal-element.revealed > *:nth-child(3) { animation-delay: 160ms; }
.reveal-element.revealed > *:nth-child(4) { animation-delay: 240ms; }
.reveal-element.revealed > *:nth-child(5) { animation-delay: 320ms; }
.reveal-element.revealed > *:nth-child(6) { animation-delay: 400ms; }

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

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero-bottle {
        width: 220px;
        height: 440px;
    }

    .hero-content {
        margin-top: -60px;
    }

    .pour-blob {
        padding: 32px;
        border-radius: 30% 70% 50% 50% / 50% 40% 60% 50%;
    }

    .pour-blob-2 {
        align-self: flex-start;
    }

    .label-border {
        padding: 40px 24px;
    }

    .bubble-field {
        gap: 20px;
        padding: 20px;
    }

    .bubble[data-size="lg"] svg { width: 70px; height: 70px; }
    .bubble[data-size="md"] svg { width: 56px; height: 56px; }
    .bubble[data-size="sm"] svg { width: 44px; height: 44px; }

    #nav-toggle {
        top: 16px;
        left: 16px;
        width: 40px;
        height: 40px;
    }

    #nav-toggle .cap-line {
        width: 16px;
    }

    .nav-items {
        top: 16px;
        left: 16px;
        width: 240px;
        height: 240px;
    }

    .bottle-cap {
        width: 160px;
        height: 160px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 3rem;
    }

    .pour-blob {
        padding: 24px;
    }

    .pour-blob h2 {
        font-size: 1.8rem;
    }

    .fizz-title {
        font-size: 2rem;
    }

    .label-title {
        font-size: 2.5rem;
    }
}
