/* =============================================
   BBOTTL.com - Candlelit Pop-Art Experience
   ============================================= */

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

:root {
    /* Jewel-Tone Palette */
    --sapphire: #1B3A6B;
    --ruby: #9B1B30;
    --emerald: #1A6B4A;
    --amber: #D4920B;
    --obsidian: #0D0F14;
    --parchment: #F2EAD9;
    --flame-tip: #FFD97A;
    --ink-black: #111111;

    /* Typography */
    --font-headline: 'Alfa Slab One', serif;
    --font-body: 'Roboto Slab', serif;
    --font-accent: 'IBM Plex Mono', monospace;

    /* Spacing */
    --section-padding: clamp(80px, 12vh, 160px);

    /* Spring easing */
    --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --spring-soft: cubic-bezier(0.22, 1.2, 0.36, 1);
}

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

body {
    font-family: var(--font-body);
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--parchment);
    background-color: var(--obsidian);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Ben-Day Dot Texture (global) --- */
.benday-bg {
    background-image: radial-gradient(circle, var(--ink-black) 1px, transparent 1px);
    background-size: 8px 8px;
    opacity: 0.1;
}

/* --- Floating Bottle-Cap Navigation --- */
.bottle-cap-nav {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}

.bottle-cap-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: block;
    transition: transform 0.3s var(--spring);
    animation: bottleCapPulse 8s ease-in-out infinite;
    position: relative;
    z-index: 1001;
}

.bottle-cap-btn:hover {
    transform: scale(1.15);
}

@keyframes bottleCapPulse {
    0%, 85%, 100% { transform: scale(1); }
    90% { transform: scale(1.05); }
    95% { transform: scale(1); }
}

.radial-menu {
    position: absolute;
    top: 50%;
    left: 50%;
    pointer-events: none;
    opacity: 0;
}

.radial-menu.active {
    pointer-events: auto;
    opacity: 1;
}

.radial-item {
    position: absolute;
    display: block;
    background: var(--obsidian);
    color: var(--parchment);
    font-family: var(--font-accent);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 8px 16px;
    text-decoration: none;
    border: 2px solid var(--ink-black);
    box-shadow: 3px 3px 0 var(--ink-black);
    white-space: nowrap;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.4s var(--spring), background-color 0.2s ease;
}

.radial-menu.active .radial-item {
    transform: translate(-50%, -50%) scale(1);
}

.radial-item:hover {
    background: var(--ruby);
    color: var(--parchment);
}

/* Radial positions */
.radial-item[data-index="0"] { top: -70px; left: 0; transition-delay: 0ms; }
.radial-item[data-index="1"] { top: -22px; left: 80px; transition-delay: 80ms; }
.radial-item[data-index="2"] { top: 45px; left: 55px; transition-delay: 160ms; }
.radial-item[data-index="3"] { top: 45px; left: -55px; transition-delay: 240ms; }
.radial-item[data-index="4"] { top: -22px; left: -80px; transition-delay: 320ms; }

.radial-menu:not(.active) .radial-item {
    transition-delay: 0ms !important;
}

/* --- Corner Stamps --- */
.corner-stamp {
    position: fixed;
    font-family: var(--font-accent);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--parchment);
    opacity: 0.12;
    z-index: 100;
    pointer-events: none;
}

.corner-stamp-tl {
    top: 20px;
    left: 20px;
    transform: rotate(-12deg);
}

.corner-stamp-br {
    bottom: 20px;
    right: 20px;
    transform: rotate(12deg);
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--obsidian);
    overflow: hidden;
}

.hero-darkness {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.candle-container {
    position: relative;
    width: 60px;
    height: 100px;
    margin-bottom: 40px;
}

.candle-flame {
    position: relative;
    width: 60px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flame-outer {
    position: absolute;
    width: 30px;
    height: 50px;
    background: var(--flame-tip);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: flameOuter 1.5s ease-in-out infinite alternate;
    opacity: 0.8;
    filter: blur(1px);
}

.flame-inner {
    position: absolute;
    width: 16px;
    height: 32px;
    background: var(--amber);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: flameInner 1.2s ease-in-out infinite alternate;
    z-index: 1;
    filter: blur(0.5px);
}

@keyframes flameOuter {
    0% { transform: scaleX(1) scaleY(1) rotate(-2deg); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
    25% { transform: scaleX(0.9) scaleY(1.05) rotate(1deg); }
    50% { transform: scaleX(1.05) scaleY(0.95) rotate(-1deg); border-radius: 48% 52% 50% 50% / 58% 62% 42% 38%; }
    75% { transform: scaleX(0.95) scaleY(1.02) rotate(2deg); }
    100% { transform: scaleX(1) scaleY(1) rotate(-1deg); border-radius: 52% 48% 50% 50% / 62% 58% 38% 42%; }
}

@keyframes flameInner {
    0% { transform: scaleX(1) scaleY(1) rotate(1deg); }
    33% { transform: scaleX(0.9) scaleY(1.08) rotate(-2deg); }
    66% { transform: scaleX(1.05) scaleY(0.92) rotate(1deg); }
    100% { transform: scaleX(0.95) scaleY(1.04) rotate(-1deg); }
}

.candle-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--flame-tip) 0%, transparent 70%);
    opacity: 0.08;
    animation: glowPulse 3s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes glowPulse {
    0% { opacity: 0.06; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0.1; transform: translate(-50%, -50%) scale(1.1); }
}

.hero-title {
    font-family: var(--font-headline);
    font-size: clamp(3rem, 8vw, 7rem);
    color: var(--parchment);
    letter-spacing: 0.08em;
    margin-bottom: 20px;
    overflow: hidden;
}

.hero-title .letter {
    display: inline-block;
    opacity: 0;
    transform: scale(1.3);
    transition: opacity 0.4s ease, transform 0.5s var(--spring);
}

.hero-title .letter.visible {
    opacity: 1;
    transform: scale(1);
}

.hero-tagline {
    font-family: var(--font-accent);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--flame-tip);
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.8s ease 1.8s, transform 0.8s var(--spring-soft) 1.8s;
}

.hero-tagline.visible {
    opacity: 0.7;
    transform: translateY(0);
}

.hero-vignette {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, transparent 40%, var(--obsidian) 100%);
    pointer-events: none;
    z-index: 1;
}

/* --- Content Sections (General) --- */
.content-section {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--section-padding) 24px;
}

.content-section .section-headline,
.content-section .text-block,
.content-section .isometric-icon,
.content-section .pull-quote,
.content-section .speech-bubble,
.content-section .bottle-cluster {
    opacity: 0;
    transform: translateY(20px) scale(0.85);
    transition: opacity 0.5s ease, transform 0.6s var(--spring);
}

.content-section .section-headline.animate-in,
.content-section .text-block.animate-in,
.content-section .isometric-icon.animate-in,
.content-section .pull-quote.animate-in,
.content-section .speech-bubble.animate-in,
.content-section .bottle-cluster.animate-in {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* --- Burst Panels (Full-Width Pop-Art) --- */
.burst-panel {
    width: 100%;
    overflow: hidden;
}

.burst-content {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    position: relative;
}

/* Burst color variants */
.burst-sapphire {
    background-color: var(--sapphire);
    background-image: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 10px 10px;
}

.burst-ruby {
    background-color: var(--ruby);
    background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 10px 10px;
}

.burst-amber {
    background-color: var(--obsidian);
    background-image: radial-gradient(circle, var(--amber) 1px, transparent 1px);
    background-size: 12px 12px;
    background-position: 0 0;
    position: relative;
}

.burst-amber::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(212, 146, 11, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.burst-emerald {
    background-color: var(--emerald);
    background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 10px 10px;
}

/* --- Narrow Text Sections --- */
.narrow-section {
    background: var(--obsidian);
    min-height: auto;
    padding: var(--section-padding) 24px;
}

.narrow-content {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
}

/* --- Section Headlines --- */
.section-headline {
    font-family: var(--font-headline);
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: var(--parchment);
    margin-bottom: 32px;
    text-shadow: 4px 4px 0 rgba(17, 17, 17, 0.4);
}

.skew-neg {
    transform: skewX(-2deg);
}

.skew-pos {
    transform: skewX(2deg);
}

.section-headline.skew-neg.animate-in {
    transform: translateY(0) scale(1) skewX(-2deg);
}

.section-headline.skew-pos.animate-in {
    transform: translateY(0) scale(1) skewX(2deg);
}

/* --- Text Blocks --- */
.text-block {
    font-family: var(--font-body);
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--parchment);
    max-width: 560px;
    margin: 0 auto;
}

.text-block p {
    margin-bottom: 1.5em;
}

.text-block p:last-child {
    margin-bottom: 0;
}

/* --- Isometric Icons --- */
.isometric-icon {
    margin-bottom: 32px;
    display: inline-block;
    transition: transform 0.3s var(--spring);
}

.isometric-icon:hover {
    transform: translateY(-8px);
}

.isometric-icon:hover svg {
    filter: drop-shadow(8px 8px 0 rgba(17, 17, 17, 0.5));
}

.isometric-icon svg {
    filter: drop-shadow(4px 4px 0 rgba(17, 17, 17, 0.35));
    transition: filter 0.3s var(--spring);
}

/* --- Pull Quotes --- */
.pull-quote {
    font-family: var(--font-headline);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    line-height: 1.4;
    color: var(--parchment);
    padding: 24px 0 24px 28px;
    border-left: 6px solid var(--ruby);
    text-align: left;
    margin: 0 auto 40px;
    max-width: 480px;
}

.pull-quote-ruby {
    border-left-color: var(--ruby);
}

.pull-quote-emerald {
    border-left-color: var(--emerald);
}

.pull-quote-sapphire {
    border-left-color: var(--sapphire);
}

/* --- Speech Bubble --- */
.speech-bubble {
    position: relative;
    background: var(--parchment);
    color: var(--ink-black);
    font-family: var(--font-body);
    font-size: 1.125rem;
    line-height: 1.75;
    padding: 28px 32px;
    border-radius: 12px;
    border: 3px solid var(--ink-black);
    box-shadow: 5px 5px 0 var(--ink-black);
    margin-bottom: 48px;
    max-width: 480px;
    text-align: left;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 16px solid transparent;
    border-right: 16px solid transparent;
    border-top: 20px solid var(--parchment);
    filter: drop-shadow(2px 3px 0 var(--ink-black));
}

.speech-bubble p {
    margin: 0;
}

/* --- Smoke Lines --- */
.smoke-line {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    opacity: 0.4;
}

.smoke-path {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    animation: smokeRise 6s ease-in-out infinite;
}

@keyframes smokeRise {
    0% { stroke-dashoffset: 400; opacity: 0; }
    20% { opacity: 0.3; }
    80% { opacity: 0.2; }
    100% { stroke-dashoffset: 0; opacity: 0; }
}

/* --- Bottle Cluster --- */
.bottle-cluster {
    margin-top: 32px;
}

.cluster-svg {
    filter: drop-shadow(4px 4px 0 rgba(17, 17, 17, 0.3));
}

/* --- Ben-Day Dot Dividers --- */
.benday-divider {
    width: 100%;
    height: 40px;
    background-image: radial-gradient(circle, var(--parchment) 2px, transparent 2px);
    background-size: 12px 12px;
    opacity: 0.12;
    position: relative;
    overflow: hidden;
}

.benday-divider-1 { background-size: 10px 10px; }
.benday-divider-2 { background-size: 14px 14px; opacity: 0.1; }
.benday-divider-3 { background-size: 10px 10px; }
.benday-divider-4 { background-size: 16px 16px; opacity: 0.08; }

/* --- Wax Drip Dividers --- */
.wax-drip-divider {
    width: 100%;
    height: 60px;
    position: relative;
    background: transparent;
}

.wax-drip-1 {
    background: var(--obsidian);
}

.wax-drip-1::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--sapphire);
    clip-path: polygon(
        0% 0%, 100% 0%,
        100% 30%,
        95% 45%, 92% 60%, 88% 50%, 82% 70%, 78% 40%, 72% 55%, 68% 80%, 62% 45%, 55% 65%, 50% 50%, 45% 75%, 38% 40%, 32% 60%, 28% 45%, 22% 70%, 18% 50%, 12% 65%, 8% 40%, 5% 55%,
        0% 35%
    );
}

.wax-drip-2 {
    background: var(--obsidian);
}

.wax-drip-2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--ruby);
    clip-path: polygon(
        0% 0%, 100% 0%,
        100% 40%,
        96% 55%, 90% 75%, 85% 50%, 80% 65%, 75% 45%, 70% 80%, 65% 55%, 58% 70%, 52% 40%, 48% 60%, 42% 85%, 35% 50%, 30% 65%, 25% 45%, 20% 70%, 15% 55%, 10% 75%, 5% 50%,
        0% 45%
    );
}

.wax-drip-3 {
    background: var(--obsidian);
}

.wax-drip-3::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--obsidian);
    clip-path: polygon(
        0% 0%, 100% 0%,
        100% 35%,
        94% 50%, 88% 70%, 83% 45%, 78% 60%, 72% 80%, 66% 50%, 60% 65%, 54% 45%, 48% 75%, 42% 55%, 36% 70%, 30% 40%, 24% 60%, 18% 80%, 12% 50%, 6% 65%,
        0% 40%
    );
}

.wax-drip-4 {
    background: var(--obsidian);
}

.wax-drip-4::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--emerald);
    clip-path: polygon(
        0% 0%, 100% 0%,
        100% 45%,
        93% 60%, 87% 80%, 80% 50%, 74% 70%, 68% 45%, 62% 65%, 55% 85%, 48% 55%, 42% 70%, 35% 45%, 28% 75%, 22% 50%, 15% 65%, 8% 80%,
        0% 50%
    );
}

/* --- Small Flame Accent --- */
.small-flame-accent {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.small-flame {
    position: relative;
    width: 24px;
    height: 40px;
}

.small-flame-outer {
    position: absolute;
    width: 18px;
    height: 30px;
    left: 3px;
    top: 0;
    background: var(--flame-tip);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: flameOuter 1.8s ease-in-out infinite alternate;
    opacity: 0.7;
}

.small-flame-inner {
    position: absolute;
    width: 10px;
    height: 18px;
    left: 7px;
    top: 6px;
    background: var(--amber);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: flameInner 1.4s ease-in-out infinite alternate;
    z-index: 1;
}

/* --- Footer --- */
.site-footer {
    background: var(--obsidian);
    padding: 80px 24px 60px;
    text-align: center;
    position: relative;
}

.footer-content {
    max-width: 480px;
    margin: 0 auto;
}

.footer-flame {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

.footer-candle-flame {
    width: 40px;
    height: 50px;
}

.footer-candle-flame .flame-outer {
    width: 20px;
    height: 34px;
}

.footer-candle-flame .flame-inner {
    width: 10px;
    height: 20px;
}

.footer-text {
    font-family: var(--font-headline);
    font-size: 2rem;
    color: var(--parchment);
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.footer-sub {
    font-family: var(--font-accent);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--flame-tip);
    opacity: 0.6;
    margin-bottom: 32px;
}

.footer-rule {
    width: 60px;
    height: 3px;
    background: var(--ruby);
    margin: 0 auto 20px;
}

.footer-meta {
    font-family: var(--font-accent);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--parchment);
    opacity: 0.25;
}

/* --- Thick Pop-Art Rules (between burst panels) --- */
.burst-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
}

.burst-sapphire::before { background: var(--amber); }
.burst-ruby::before { background: var(--sapphire); }
.burst-emerald::before { background: var(--ruby); }

/* --- Candle Glow behind content blocks --- */
.burst-panel .burst-content::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--flame-tip) 0%, transparent 70%);
    opacity: 0.06;
    pointer-events: none;
    z-index: 0;
}

.burst-content > * {
    position: relative;
    z-index: 1;
}

/* --- Link Hover Underline --- */
a {
    color: var(--flame-tip);
    text-decoration: none;
    position: relative;
    display: inline-block;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--amber);
    transition: width 0.3s var(--spring);
}

a:hover::after {
    width: 100%;
}

/* --- Scrollbar styling --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--obsidian);
}

::-webkit-scrollbar-thumb {
    background: var(--sapphire);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--ruby);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .section-headline {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }

    .text-block {
        font-size: 1rem;
        padding: 0 8px;
    }

    .pull-quote {
        font-size: clamp(1.2rem, 4vw, 1.8rem);
        padding-left: 20px;
    }

    .speech-bubble {
        padding: 20px 24px;
    }

    .isometric-icon svg {
        width: 140px;
        height: auto;
    }

    .icon-candle svg {
        width: 120px;
        height: auto;
    }

    .bottle-cluster .cluster-svg {
        width: 240px;
        height: auto;
    }

    .radial-item {
        font-size: 0.6rem;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(2.5rem, 12vw, 4rem);
    }

    .section-headline {
        font-size: clamp(1.8rem, 10vw, 3rem);
    }

    .isometric-icon svg {
        width: 120px;
        height: auto;
    }

    .corner-stamp {
        display: none;
    }
}
