/* =============================================
   BBOTTL.com - Holographic Artifact Catalog
   Aurora-gradient editorial magazine design
   ============================================= */

/* CSS Custom Properties */
:root {
    --deep-bg: #0B0C1A;
    --primary-surface: #14162B;
    --aurora-green: #00E8A2;
    --aurora-violet: #8B5CF6;
    --aurora-cyan: #06D6E0;
    --aurora-pink: #F472B6;
    --ember-gold: #FBBF24;
    --text-primary: #E8ECF1;
    --text-secondary: #94A3B8;
    --holo-gradient: linear-gradient(135deg, #00E8A2, #06D6E0, #8B5CF6, #F472B6);
    --holo-gradient-wide: linear-gradient(135deg, #00E8A2 0%, #06D6E0 25%, #8B5CF6 50%, #F472B6 75%, #00E8A2 100%);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Sans 3', 'Inter', sans-serif;
    background-color: var(--deep-bg);
    color: var(--text-primary);
    line-height: 1.75;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3 {
    font-family: 'Libre Baskerville', Georgia, serif;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.section-heading {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.large-heading {
    font-size: clamp(3rem, 6vw, 6rem);
    text-align: center;
}

.section-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--aurora-cyan);
    display: block;
    margin-bottom: 1rem;
}

.body-text {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 1.125rem;
    font-weight: 400;
    line-height: 1.75;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    max-width: 65ch;
}

.centered-text {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.pull-quote {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: 1.75rem;
    line-height: 1.4;
    color: var(--aurora-pink);
    padding: 2rem 0;
    padding-left: 2rem;
    border-left: 2px solid;
    border-image: var(--holo-gradient) 1;
    margin: 2rem 0;
    max-width: 55ch;
}

/* =============================================
   Navigation
   ============================================= */
#main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.5rem 3rem;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

#main-nav.nav-hidden {
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logotype {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--holo-gradient);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmerGradient 8s ease infinite;
}

#scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: var(--holo-gradient);
    background-size: 200% 200%;
    animation: shimmerGradient 8s ease infinite;
    z-index: 1001;
    transition: opacity 0.4s ease;
    opacity: 0;
}

#scroll-progress-bar.visible {
    opacity: 1;
}

/* =============================================
   Hero Section
   ============================================= */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: radial-gradient(ellipse at center, var(--primary-surface) 0%, var(--deep-bg) 70%);
}

.hero-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.hero-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}

.hero-bottle {
    position: absolute;
    z-index: 2;
    width: 200px;
    height: 500px;
    transition: opacity 1.5s ease, transform 1.5s ease;
}

.hero-bottle.dissolving {
    opacity: 0;
    transform: scale(0.8);
}

.bottle-silhouette {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 20px rgba(0, 232, 162, 0.3)) drop-shadow(0 0 40px rgba(139, 92, 246, 0.2));
    animation: bottleRotate 20s ease-in-out infinite;
}

@keyframes bottleRotate {
    0%, 100% { transform: rotate(-3deg) scale(1); }
    25% { transform: rotate(1deg) scale(1.02); }
    50% { transform: rotate(3deg) scale(1); }
    75% { transform: rotate(-1deg) scale(0.98); }
}

.bottle-path {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    animation: drawBottle 3s ease forwards 0.5s;
}

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

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    opacity: 0;
    animation: heroFadeIn 2s ease forwards 1.5s;
}

@keyframes heroFadeIn {
    to { opacity: 1; }
}

.hero-title {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 700;
    background: var(--holo-gradient);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmerGradient 10s ease infinite;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 30px rgba(0, 232, 162, 0.25));
}

.hero-subtitle {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: clamp(1.125rem, 2.5vw, 1.75rem);
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

.hero-bubbles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(6, 214, 224, 0.15);
    background: radial-gradient(circle at 30% 30%, rgba(0, 232, 162, 0.08), transparent 70%);
    animation: bubbleFloat linear infinite;
}

@keyframes bubbleFloat {
    0% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(30px) scale(0.6);
        opacity: 0;
    }
}

/* =============================================
   Chapter Interludes
   ============================================= */
.chapter-interlude {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--deep-bg);
    overflow: hidden;
}

.chapter-inner {
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.chapter-interlude.in-view .chapter-inner {
    opacity: 1;
    transform: translateY(0);
}

.chapter-number {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.875rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 1.5rem;
}

.chapter-title {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: clamp(3rem, 7vw, 5.5rem);
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.chapter-underline {
    width: 0;
    height: 3px;
    margin: 0 auto;
    background: var(--holo-gradient);
    background-size: 200% 200%;
    animation: shimmerGradient 8s ease infinite;
    transition: width 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.chapter-interlude.in-view .chapter-underline {
    width: 200px;
}

/* =============================================
   Content Sections
   ============================================= */
.content-section {
    position: relative;
    min-height: 80vh;
    padding: 8rem 3rem;
    overflow: hidden;
}

.section-bg-motif {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.06;
    z-index: 0;
}

/* Cultural motif backgrounds */
.murano-motif {
    background-image:
        radial-gradient(ellipse 60px 60px at 20% 30%, var(--aurora-cyan) 0%, transparent 70%),
        radial-gradient(ellipse 80px 80px at 80% 60%, var(--aurora-violet) 0%, transparent 70%),
        radial-gradient(ellipse 40px 40px at 50% 80%, var(--aurora-green) 0%, transparent 70%);
}

.sake-motif {
    background-image:
        linear-gradient(45deg, transparent 48%, var(--aurora-pink) 49%, var(--aurora-pink) 51%, transparent 52%),
        linear-gradient(-30deg, transparent 48%, var(--aurora-violet) 49%, var(--aurora-violet) 51%, transparent 52%);
    background-size: 200px 200px;
}

.gourd-motif {
    background-image:
        radial-gradient(circle 100px at 30% 40%, var(--ember-gold) 0%, transparent 70%),
        radial-gradient(circle 80px at 70% 70%, var(--aurora-green) 0%, transparent 70%);
}

.celadon-motif {
    background-image:
        repeating-linear-gradient(60deg, transparent 0%, transparent 5%, var(--aurora-green) 5.1%, transparent 5.2%),
        repeating-linear-gradient(-40deg, transparent 0%, transparent 7%, var(--aurora-cyan) 7.1%, transparent 7.2%);
    background-size: 300px 300px;
}

.african-motif {
    background-image:
        radial-gradient(ellipse 120px 160px at 25% 50%, var(--ember-gold) 0%, transparent 70%),
        radial-gradient(ellipse 100px 140px at 75% 50%, var(--aurora-pink) 0%, transparent 70%);
}

/* =============================================
   Editorial Spread Grid
   ============================================= */
.spread-grid {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    align-items: center;
}

.layout-5-7 {
    grid-template-columns: 5fr 7fr;
}

.layout-7-5 {
    grid-template-columns: 7fr 5fr;
}

.spread-text {
    padding: 2rem;
}

.spread-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Margin Sparkline */
.margin-sparkline {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 120px;
    opacity: 0.4;
}

/* =============================================
   Holographic Cards
   ============================================= */
.holo-card {
    position: relative;
    perspective: 1000px;
    cursor: default;
}

.holo-card-inner {
    position: relative;
    background: linear-gradient(135deg, rgba(20, 22, 43, 0.9), rgba(11, 12, 26, 0.95));
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 16px;
    padding: 2.5rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
}

.holo-card:hover .holo-card-inner {
    box-shadow:
        0 0 30px rgba(0, 232, 162, 0.15),
        0 0 60px rgba(139, 92, 246, 0.1),
        0 20px 60px rgba(0, 0, 0, 0.3);
}

.card-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(0, 232, 162, 0) 0%,
        rgba(6, 214, 224, 0.08) 25%,
        rgba(139, 92, 246, 0.08) 50%,
        rgba(244, 114, 182, 0) 75%
    );
    background-size: 400% 400%;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.holo-card:hover .card-shimmer {
    opacity: 1;
    animation: shimmerSweep 3s ease infinite;
}

@keyframes shimmerSweep {
    0% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
    100% { background-position: 0% 0%; }
}

.card-illustration {
    width: 100%;
    max-width: 320px;
    height: auto;
    display: block;
    margin: 0 auto 1.5rem;
    filter: drop-shadow(0 0 12px rgba(6, 214, 224, 0.2));
}

.card-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: block;
    text-align: center;
    letter-spacing: 0.05em;
}

/* =============================================
   Aurora Dividers
   ============================================= */
.aurora-divider {
    height: 3px;
    background: var(--holo-gradient-wide);
    background-size: 200% 200%;
    animation: shimmerGradient 8s ease infinite;
    margin: 0;
}

.aurora-line {
    height: 1px;
    background: var(--holo-gradient);
    background-size: 200% 200%;
    animation: shimmerGradient 8s ease infinite;
}

@keyframes shimmerGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* =============================================
   Data Visualization Section
   ============================================= */
.dataviz-section {
    background: linear-gradient(180deg, var(--deep-bg) 0%, var(--primary-surface) 50%, var(--deep-bg) 100%);
}

.craft-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
}

.craft-header {
    text-align: center;
    margin-bottom: 4rem;
}

.craft-header .body-text {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.dataviz-panel {
    display: flex;
    justify-content: center;
    margin-bottom: 5rem;
}

.dataviz-card {
    background: rgba(20, 22, 43, 0.6);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 16px;
    padding: 3rem;
    max-width: 500px;
    width: 100%;
}

.dataviz-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: 1.375rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 2rem;
}

.radial-chart {
    width: 100%;
    height: auto;
    display: block;
}

.chart-line {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.chart-line.drawn {
    stroke-dashoffset: 0;
}

.chart-dot {
    transition: opacity 0.6s ease, r 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.chart-dot.visible {
    opacity: 0.8;
}

.chart-label {
    font-family: 'IBM Plex Mono', monospace;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.chart-label.visible {
    opacity: 1;
}

/* Process Flow */
.process-flow {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
    padding: 2rem 0;
}

.process-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 180px;
    flex-shrink: 0;
}

.step-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid var(--aurora-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    position: relative;
    background: var(--deep-bg);
}

.pulse-glow {
    animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 8px rgba(6, 214, 224, 0.2);
    }
    50% {
        box-shadow: 0 0 20px rgba(6, 214, 224, 0.4), 0 0 40px rgba(6, 214, 224, 0.1);
    }
}

.step-num {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--aurora-cyan);
}

.step-content {
    padding: 0 0.5rem;
}

.step-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.25rem;
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.step-desc {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.process-connector {
    display: flex;
    align-items: center;
    padding-top: 1.5rem;
    width: 60px;
    flex-shrink: 0;
}

.connector-line {
    width: 100%;
    height: 4px;
}

.draw-line {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    transition: stroke-dashoffset 1s ease;
}

.draw-line.drawn {
    stroke-dashoffset: 0;
}

/* =============================================
   Immersive Closing
   ============================================= */
.immersive-closing {
    background: radial-gradient(ellipse at center, var(--primary-surface) 0%, var(--deep-bg) 80%);
    padding-bottom: 6rem;
}

.experience-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
}

.experience-header {
    text-align: center;
    margin-bottom: 5rem;
}

.experience-header .body-text {
    max-width: 55ch;
    margin-left: auto;
    margin-right: auto;
}

/* Bottle Gallery */
.bottle-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 5rem;
}

.gallery-item {
    width: 100%;
}

.gallery-item .holo-card-inner {
    padding: 2rem 1.5rem;
    text-align: center;
}

.gallery-bottle {
    width: 100%;
    max-width: 120px;
    height: auto;
    display: block;
    margin: 0 auto 1rem;
    filter: drop-shadow(0 0 8px rgba(6, 214, 224, 0.15));
}

.gallery-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6875rem;
    color: var(--text-secondary);
    display: block;
    letter-spacing: 0.05em;
}

/* Closing statement */
.closing-statement {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.closing-text {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: 1.5rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* =============================================
   Footer
   ============================================= */
#site-footer {
    padding: 4rem 3rem;
    background: var(--deep-bg);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-brand {
    margin-bottom: 2rem;
}

.footer-logo {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.75rem;
}

.footer-tagline {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.footer-divider {
    max-width: 200px;
    margin: 2rem auto;
}

.footer-meta {
    padding-top: 1rem;
}

.footer-copy {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

/* =============================================
   Scroll Reveal Animations
   ============================================= */
.reveal-block {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Stagger children within a revealed block */
.reveal-block.revealed .body-text:nth-child(2) { transition-delay: 0.1s; }
.reveal-block.revealed .body-text:nth-child(3) { transition-delay: 0.2s; }
.reveal-block.revealed .pull-quote { transition-delay: 0.15s; }

/* =============================================
   Responsive Design
   ============================================= */
@media (max-width: 1024px) {
    .spread-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .layout-7-5 .spread-visual {
        order: -1;
    }

    .margin-sparkline {
        display: none;
    }

    .bottle-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .process-flow {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .process-connector {
        transform: rotate(90deg);
        padding-top: 0;
        width: 40px;
    }
}

@media (max-width: 768px) {
    .content-section {
        padding: 5rem 1.5rem;
    }

    #main-nav {
        padding: 1rem 1.5rem;
    }

    .chapter-title {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }

    .hero-bottle {
        width: 140px;
        height: 350px;
    }

    .pull-quote {
        font-size: 1.375rem;
    }

    .bottle-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .gallery-item .holo-card-inner {
        padding: 1.5rem 1rem;
    }

    .spread-text, .spread-visual {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .bottle-gallery {
        grid-template-columns: 1fr 1fr;
    }

    .hero-title {
        font-size: clamp(2.5rem, 12vw, 4rem);
    }

    .hero-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }
}
