/* =============================================
   BBOTTL.com - Styles
   Palette: Neon-Electric on Near-Black
   Fonts: Fraunces, Source Sans 3, Anybody
   ============================================= */

/* CSS Custom Property for animated gradient angle */
@property --angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

@property --border-progress {
    syntax: "<number>";
    initial-value: 0;
    inherits: false;
}

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

html {
    scroll-behavior: smooth;
    background: #0D0D0D;
}

body {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    font-size: 20px;
    line-height: 1.65;
    color: #E8E6E1;
    background: #0D0D0D;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Concrete texture overlay (simulated with noise) */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

/* ---- Animated Border Keyframes ---- */
@keyframes borderRotate {
    from { --angle: 0deg; }
    to { --angle: 360deg; }
}

@keyframes borderPulse {
    0%, 100% { border-width: 2px; }
    50% { border-width: 4px; }
}

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

@keyframes breathExpand {
    from { width: 0%; }
    to { width: 100%; }
}

@keyframes typewriterBlink {
    0%, 49% { border-color: #E8E6E1; }
    50%, 100% { border-color: transparent; }
}

/* ---- Navigation ---- */
#nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 48px;
    z-index: 1000;
    background: rgba(13, 13, 13, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 47px;
    padding: 0 32px;
}

.nav-wordmark {
    font-family: 'Fraunces', serif;
    font-weight: 900;
    font-style: italic;
    font-size: 22px;
    letter-spacing: -0.02em;
    color: #E8E6E1;
    transition: color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-wordmark:hover {
    color: #FF2D7B;
}

.nav-links {
    display: flex;
    gap: 28px;
}

.nav-link {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.0;
    letter-spacing: 0.02em;
    color: #9B9B9B;
    transition: color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover {
    color: #00F0FF;
}

.nav-border-line {
    height: 1px;
    width: 100%;
    background: conic-gradient(from var(--angle), #FF2D7B, #00F0FF, #B8FF00, #FF2D7B);
    animation: borderRotate 8s linear infinite;
}

/* ---- Labels / Tags ---- */
.label-tag {
    font-family: 'Anybody', sans-serif;
    font-weight: 600;
    font-size: 13px;
    line-height: 1.3;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #9B9B9B;
    display: inline-block;
}

/* ---- Spreads (General) ---- */
.spread {
    position: relative;
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
}

/* ---- Breathing Rooms ---- */
.breathing-room {
    height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0D0D0D;
    position: relative;
}

.breathing-line {
    height: 1px;
    width: 0%;
    background: conic-gradient(from var(--angle), #FF2D7B, #00F0FF, #B8FF00, #FF2D7B);
    animation: borderRotate 8s linear infinite;
    transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.breathing-line.expanded {
    width: 100%;
}

/* ---- Street Stickers ---- */
.sticker {
    position: absolute;
    font-family: 'Anybody', sans-serif;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #0D0D0D;
    background: #E8E6E1;
    padding: 4px 12px;
    z-index: 10;
}

.sticker-1 {
    bottom: 15%;
    right: 8%;
    transform: rotate(-18deg);
}

.sticker-2 {
    top: 12%;
    right: 5%;
    transform: rotate(22deg);
    background: #FF2D7B;
    color: #0D0D0D;
}

.sticker-3 {
    bottom: 8%;
    left: 4%;
    transform: rotate(-12deg);
    background: #B8FF00;
    color: #0D0D0D;
}

/* ---- Barcode Separator ---- */
.barcode-separator {
    position: absolute;
    bottom: 24px;
    left: 32px;
    display: flex;
    gap: 3px;
    height: 30px;
    align-items: flex-end;
}

.barcode-separator .bar {
    display: block;
    width: 2px;
    height: 20px;
    background: #9B9B9B;
    opacity: 0.5;
}

.barcode-separator .bar-wide {
    width: 4px;
}

.barcode-separator .bar-accent {
    background: #FF2D7B;
    opacity: 1;
    height: 26px;
}

/* =============================================
   SPREAD 1: HERO
   ============================================= */
.spread-hero {
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    background: #0D0D0D;
    padding-bottom: 10vh;
}

/* Hero animated border frame */
.hero-border-frame {
    position: absolute;
    inset: 8px;
    border: 2px solid transparent;
    pointer-events: none;
    z-index: 5;
    background: transparent;
}

.hero-border-frame::before {
    content: '';
    position: absolute;
    inset: -2px;
    border: 2px solid transparent;
    background: conic-gradient(from var(--angle), #FF2D7B, #00F0FF, #B8FF00, #FF2D7B) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: borderRotate 8s linear infinite, borderPulse 3s ease-in-out infinite;
    opacity: 0;
    transition: opacity 1s ease;
}

.hero-border-frame.visible::before {
    opacity: 1;
}

/* Perspective Grid Behind Hero */
.hero-perspective-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    background:
        linear-gradient(to bottom, transparent 30%,
            rgba(139, 92, 246, 0.03) 50%,
            transparent 100%),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent calc(50% - 200px),
            rgba(139, 92, 246, 0.05) calc(50% - 200px),
            rgba(139, 92, 246, 0.05) calc(50% - 199px),
            transparent calc(50% - 199px),
            transparent calc(50% + 199px),
            rgba(139, 92, 246, 0.05) calc(50% + 199px),
            rgba(139, 92, 246, 0.05) calc(50% + 200px),
            transparent calc(50% + 200px)
        );
}

/* 3D Bottle Scene */
.hero-bottle-scene {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    z-index: 2;
    transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-bottle-scene.scaled {
    transform: translate(-50%, -50%) scale(1);
}

.bottle-3d {
    position: relative;
    width: 200px;
    height: 500px;
}

.bottle-body {
    position: relative;
    width: 100%;
    height: 100%;
}

.bottle-neck {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 80px;
    background: linear-gradient(135deg, #1A1A1F 0%, #3a3a45 50%, #1A1A1F 100%);
    border-radius: 6px 6px 0 0;
}

.bottle-shoulder {
    position: absolute;
    top: 75px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 40px;
    background: linear-gradient(135deg, #1A1A1F 0%, #3a3a45 50%, #1A1A1F 100%);
    clip-path: polygon(25% 0%, 75% 0%, 100% 100%, 0% 100%);
}

.bottle-main {
    position: absolute;
    top: 110px;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 320px;
    background: linear-gradient(135deg,
        rgba(26, 26, 31, 1) 0%,
        rgba(60, 60, 70, 0.9) 30%,
        rgba(26, 26, 31, 0.95) 50%,
        rgba(80, 80, 90, 0.8) 70%,
        rgba(26, 26, 31, 1) 100%
    );
    border-radius: 4px 4px 12px 12px;
    box-shadow:
        inset 0 0 60px rgba(0, 0, 0, 0.5),
        inset 20px 0 40px rgba(255, 45, 123, 0.08),
        inset -20px 0 40px rgba(0, 240, 255, 0.08);
}

.bottle-base {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 12px;
    background: rgba(26, 26, 31, 0.9);
    border-radius: 0 0 8px 8px;
}

/* Rim lighting */
.bottle-rim-light {
    position: absolute;
    top: 110px;
    width: 3px;
    height: 320px;
    border-radius: 2px;
    pointer-events: none;
}

.bottle-rim-left {
    left: calc(50% - 72px);
    background: linear-gradient(to bottom,
        transparent 0%,
        rgba(255, 45, 123, 0.5) 20%,
        rgba(255, 45, 123, 0.8) 50%,
        rgba(255, 45, 123, 0.3) 80%,
        transparent 100%
    );
    box-shadow: 0 0 20px rgba(255, 45, 123, 0.3), 0 0 40px rgba(255, 45, 123, 0.15);
}

.bottle-rim-right {
    right: calc(50% - 72px);
    background: linear-gradient(to bottom,
        transparent 0%,
        rgba(0, 240, 255, 0.5) 20%,
        rgba(0, 240, 255, 0.8) 50%,
        rgba(0, 240, 255, 0.3) 80%,
        transparent 100%
    );
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3), 0 0 40px rgba(0, 240, 255, 0.15);
}

/* Bottle shadow */
.bottle-shadow {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    height: 30px;
    background: radial-gradient(ellipse at center,
        rgba(255, 45, 123, 0.15) 0%,
        rgba(0, 240, 255, 0.1) 40%,
        transparent 70%
    );
    border-radius: 50%;
}

/* Hero content */
.hero-content {
    position: relative;
    z-index: 10;
    padding-left: calc(16.66% + 32px); /* 2-column offset on 12-col grid */
    padding-right: 32px;
}

.hero-headline {
    font-family: 'Fraunces', serif;
    font-weight: 900;
    font-size: 96px;
    line-height: 1.0;
    letter-spacing: -0.02em;
    color: #E8E6E1;
    text-shadow: 0 0 60px rgba(255, 45, 123, 0.2);
}

/* =============================================
   SPREAD 2: STATEMENT
   ============================================= */
.spread-statement {
    display: flex;
    align-items: center;
    background: #0D0D0D;
}

.statement-inner {
    display: flex;
    width: 100%;
    padding: 0 32px;
    gap: 48px;
    align-items: center;
}

.statement-left {
    flex: 0 0 60%;
}

.pull-quote {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-style: italic;
    font-size: 96px;
    line-height: 1.0;
    letter-spacing: -0.03em;
    color: #E8E6E1;
}

.statement-right {
    flex: 0 0 calc(40% - 48px);
}

.thumb-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.thumb-card {
    position: relative;
    border: 2px solid #9B9B9B;
    padding: 16px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.thumb-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border: 3px solid transparent;
    background: conic-gradient(from var(--angle), #FF2D7B, #00F0FF, #B8FF00, #FF2D7B) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: borderRotate 8s linear infinite;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.thumb-card:hover::before {
    opacity: 1;
}

.thumb-card:hover {
    border-color: transparent;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
    transform: translateY(-4px);
}

.thumb-image {
    width: 100%;
    height: 120px;
    margin-bottom: 12px;
}

.urban-img-1 {
    background: linear-gradient(135deg, #1A1A1F 0%, #FF2D7B 40%, #0D0D0D 60%, #00F0FF 100%);
    opacity: 0.6;
}

.urban-img-2 {
    background: linear-gradient(180deg, #1A1A1F 0%, #00F0FF 30%, #0D0D0D 70%, #9B9B9B 100%);
    opacity: 0.5;
}

.urban-img-3 {
    background: linear-gradient(225deg, #0D0D0D 0%, #8B5CF6 30%, #1A1A1F 60%, #FFB300 100%);
    opacity: 0.5;
}

/* =============================================
   SPREAD 3: FEATURE GRID (RELEASE)
   ============================================= */
.spread-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1A1A1F;
    padding: 80px 32px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto auto auto;
    gap: 20px;
    width: 100%;
    max-width: 1200px;
}

.grid-card {
    position: relative;
    background: #0D0D0D;
    border: 2px solid #9B9B9B;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
    opacity: 0;
    transform: translateY(40px);
}

.grid-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.grid-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
    border-color: transparent;
}

/* Animated border on cards */
.card-border-anim {
    position: absolute;
    inset: -2px;
    border: 3px solid transparent;
    background: conic-gradient(from var(--angle), #FF2D7B, #00F0FF, #B8FF00, #FF2D7B) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: borderRotate 6s linear infinite;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 2;
}

.grid-card:hover .card-border-anim {
    opacity: 1;
}

.grid-card-tall {
    grid-row: span 2;
    min-height: 450px;
}

.grid-card-square {
    min-height: 210px;
}

.grid-card-wide {
    grid-column: span 2;
    min-height: 210px;
}

.card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    position: relative;
    z-index: 1;
}

.card-bottle {
    margin-bottom: 16px;
}

.bottle-svg {
    width: 80px;
    height: 200px;
}

.bottle-svg-sq {
    width: 120px;
    height: 120px;
}

.bottle-svg-wide {
    width: 280px;
    height: 120px;
}

.card-title {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: 22px;
    line-height: 1.2;
    margin-top: 8px;
    color: #E8E6E1;
}

/* =============================================
   SPREAD 4: NARRATIVE
   ============================================= */
.spread-narrative {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0D0D0D;
    padding: 120px 32px;
    min-height: auto;
}

.narrative-pane {
    max-width: 680px;
    width: 100%;
    position: relative;
    z-index: 2;
}

.section-headline {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: 56px;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: #E8E6E1;
    margin-bottom: 48px;
}

.narrative-text p {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    font-size: 20px;
    line-height: 1.65;
    color: #E8E6E1;
    margin-bottom: 28px;
}

.narrative-full-bleed {
    margin: 48px -32px;
    position: relative;
    width: calc(100% + 64px);
    overflow: hidden;
}

.full-bleed-image {
    width: 100%;
}

.cityscape-svg {
    width: 100%;
    height: auto;
    display: block;
}

.drip-edge {
    position: relative;
    margin-top: -2px;
}

.drip-svg {
    width: 100%;
    height: 40px;
    display: block;
}

/* Manhole cover decorative element */
.manhole-pattern {
    position: absolute;
    bottom: 40px;
    right: 40px;
    width: 150px;
    height: 150px;
    opacity: 0.3;
    pointer-events: none;
}

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

/* =============================================
   SPREAD 5: CLOSE
   ============================================= */
.spread-close {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0D0D0D;
    min-height: 100vh;
}

.close-border-frame {
    position: absolute;
    inset: 8px;
    pointer-events: none;
    z-index: 2;
}

.close-border-frame::before {
    content: '';
    position: absolute;
    inset: -2px;
    border: 3px solid transparent;
    background: conic-gradient(from var(--angle), #FF2D7B, #00F0FF, #B8FF00, #FF2D7B) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: borderRotate 8s linear infinite;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.close-border-frame.visible::before {
    opacity: 1;
}

.close-border-frame.accelerate::before {
    animation-duration: 2s;
}

.close-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 0 32px;
}

.close-statement {
    font-family: 'Fraunces', serif;
    font-weight: 900;
    font-size: 72px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #E8E6E1;
    border-right: 3px solid #E8E6E1;
    padding-right: 8px;
    display: inline;
    white-space: nowrap;
}

.close-statement.typing {
    animation: typewriterBlink 0.8s step-end infinite;
}

.close-statement.done {
    border-color: transparent;
}

/* Bottle cap badge */
.bottle-cap-badge {
    position: absolute;
    bottom: 40px;
    right: 40px;
    width: 80px;
    height: 80px;
    z-index: 3;
    opacity: 0.6;
}

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

/* =============================================
   FIRE ESCAPE BACKGROUND
   ============================================= */
.fire-escape-bg {
    position: fixed;
    top: 0;
    right: 40px;
    width: 300px;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

.fire-escape-svg {
    width: 100%;
    height: 100%;
}

/* =============================================
   ANIMATION STATES
   ============================================= */
.animate-in {
    opacity: 0;
    transform: translateY(20px);
}

.animate-in.visible {
    animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Stagger delays for animate-in elements */
.animate-in.visible:nth-child(1) { animation-delay: 0ms; }
.animate-in.visible:nth-child(2) { animation-delay: 100ms; }
.animate-in.visible:nth-child(3) { animation-delay: 200ms; }
.animate-in.visible:nth-child(4) { animation-delay: 300ms; }
.animate-in.visible:nth-child(5) { animation-delay: 400ms; }
.animate-in.visible:nth-child(6) { animation-delay: 500ms; }

/* Card stagger */
.animate-card.visible {
    transition-delay: calc(var(--card-delay, 0) * 80ms);
}

/* =============================================
   REDUCED MOTION
   ============================================= */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    .hero-border-frame::before,
    .close-border-frame::before {
        animation: none;
        background: linear-gradient(90deg, #FF2D7B, #00F0FF);
        opacity: 1;
    }

    .nav-border-line {
        animation: none;
        background: linear-gradient(90deg, #FF2D7B, #00F0FF, #B8FF00);
    }

    .breathing-line {
        width: 100%;
    }

    .animate-in,
    .grid-card {
        opacity: 1;
        transform: none;
    }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
    .hero-headline {
        font-size: 52px;
    }

    .hero-content {
        padding-left: 24px;
        padding-right: 24px;
    }

    .pull-quote {
        font-size: 48px;
    }

    .statement-inner {
        flex-direction: column;
        padding: 60px 24px;
    }

    .statement-left,
    .statement-right {
        flex: 1 1 100%;
    }

    .grid-container {
        grid-template-columns: 1fr 1fr;
        padding: 0;
    }

    .grid-card-tall {
        grid-row: span 1;
        min-height: 280px;
    }

    .grid-card-wide {
        grid-column: span 2;
    }

    .section-headline {
        font-size: 36px;
    }

    .close-statement {
        font-size: 36px;
        white-space: normal;
    }

    .nav-links {
        display: none;
    }

    .narrative-full-bleed {
        margin: 32px -24px;
        width: calc(100% + 48px);
    }

    .bottle-3d {
        width: 140px;
        height: 360px;
    }

    .bottle-main {
        width: 100px;
        height: 230px;
    }

    .bottle-rim-light {
        height: 230px;
    }

    .bottle-rim-left {
        left: calc(50% - 52px);
    }

    .bottle-rim-right {
        right: calc(50% - 52px);
    }

    .fire-escape-bg {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-headline {
        font-size: 40px;
    }

    .pull-quote {
        font-size: 36px;
    }

    .grid-container {
        grid-template-columns: 1fr;
    }

    .grid-card-wide {
        grid-column: span 1;
    }

    .close-statement {
        font-size: 28px;
    }
}
