/* quirk.bar - Grainy-Textured Luxury Speakeasy */

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

:root {
    --deep-plum: #2A1B3D;
    --burnt-sienna: #C75B39;
    --antique-gold: #C9A84C;
    --warm-cream: #F5ECD7;
    --dusty-rose: #D4A0A0;
    --charcoal-velvet: #1A1423;
    --grain-amber: rgba(212, 160, 64, 0.20);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Work Sans', sans-serif;
    font-weight: 300;
    font-size: 1.05rem;
    line-height: 1.75;
    background-color: var(--deep-plum);
    color: var(--warm-cream);
    overflow-x: hidden;
    position: relative;
}

/* === Grain Overlay === */
#grain-overlay {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: 1000;
    pointer-events: none;
    opacity: 0.08;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-size: 300px 300px;
}

/* === Floating Elements === */
.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}

.floater {
    position: absolute;
    opacity: 0.6;
}

.floater-1 {
    top: 15%;
    right: 12%;
    animation: floatDrift1 6s ease-in-out infinite alternate, floatRotate1 8s ease-in-out infinite alternate;
}

.floater-2 {
    top: 40%;
    left: 8%;
    animation: floatDrift2 7s ease-in-out infinite alternate, floatRotate2 9s ease-in-out infinite alternate;
}

.floater-3 {
    top: 60%;
    right: 20%;
    animation: floatDrift1 5s ease-in-out infinite alternate, floatRotate1 7s ease-in-out infinite alternate;
}

.floater-4 {
    top: 75%;
    left: 15%;
    animation: floatDrift2 8s ease-in-out infinite alternate, floatRotate2 10s ease-in-out infinite alternate;
}

.floater-5 {
    top: 25%;
    left: 60%;
    animation: floatDrift1 6.5s ease-in-out infinite alternate, floatRotate1 8.5s ease-in-out infinite alternate;
}

@keyframes floatDrift1 {
    from { transform: translateY(0); }
    to { transform: translateY(-10px); }
}

@keyframes floatDrift2 {
    from { transform: translateY(0); }
    to { transform: translateY(10px); }
}

@keyframes floatRotate1 {
    from { rotate: -5deg; }
    to { rotate: 5deg; }
}

@keyframes floatRotate2 {
    from { rotate: 5deg; }
    to { rotate: -5deg; }
}

/* === Hero Section === */
.section-hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: var(--deep-plum);
    z-index: 2;
    overflow: hidden;
}

.hero-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.hero-word {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: var(--warm-cream);
    display: block;
    opacity: 0;
    will-change: transform, opacity;
}

.hero-quirk {
    transform: translate(-60px, -30px) rotate(-5deg);
}

.hero-bar {
    transform: translate(60px, 30px) rotate(5deg);
}

.hero-quirk.animate-in {
    animation: slideQuirk 0.8s ease-out 0.4s forwards;
}

.hero-bar.animate-in {
    animation: slideBar 0.8s ease-out 0.7s forwards;
}

@keyframes slideQuirk {
    to {
        opacity: 1;
        transform: translate(-40px, -10px) rotate(-5deg);
    }
}

@keyframes slideBar {
    to {
        opacity: 1;
        transform: translate(40px, 10px) rotate(5deg);
    }
}

.hero-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.2), transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    position: relative;
    z-index: 3;
}

.hero-circle.animate-in {
    animation: fadeCircle 0.5s ease-out 1.0s forwards;
}

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

.corkscrew-mark {
    width: 80px;
    height: 80px;
}

.corkscrew-path {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
}

.corkscrew-path.animate-draw {
    animation: drawPath 1.8s ease-in-out 1.2s forwards;
}

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

/* === Diagonal Bands === */
.diagonal-band {
    position: relative;
    padding: 8rem 2rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    z-index: 2;
    overflow: hidden;
}

.diagonal-band::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(245, 236, 215, 0.03) 10px,
        rgba(245, 236, 215, 0.03) 11px
    );
    pointer-events: none;
}

.band-rose {
    background-color: var(--dusty-rose);
    color: var(--charcoal-velvet);
    transform: skewY(5deg);
}

.band-rose .band-content {
    transform: skewY(-5deg);
}

.band-plum {
    background-color: var(--deep-plum);
    color: var(--warm-cream);
    transform: skewY(-5deg);
}

.band-plum .band-content {
    transform: skewY(5deg);
}

.band-deep {
    background-color: var(--charcoal-velvet);
    color: var(--antique-gold);
    transform: skewY(7deg);
}

.band-deep .band-content {
    transform: skewY(-7deg);
}

.band-content {
    max-width: 600px;
    margin-left: 38%;
    position: relative;
    z-index: 3;
}

.section-number {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.5;
    display: block;
    margin-bottom: 1rem;
}

.band-heading {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1.25rem, 2.5vw, 2rem);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.band-heading em {
    font-style: italic;
}

.band-text {
    font-family: 'Work Sans', sans-serif;
    font-weight: 300;
    font-size: 1.05rem;
    line-height: 1.75;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.band-text.visible {
    opacity: 1;
    transform: translateY(0);
}

.diagonal-separator {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--antique-gold);
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 0.8s ease-out;
}

.diagonal-separator.draw {
    transform: scaleX(1);
}

/* === Skeleton Shimmer === */
.shimmer-active .band-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(201, 168, 76, 0.12), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
    z-index: 10;
    pointer-events: none;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* === Kinetic Quote (Sanctum) === */
.sanctum-content {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    max-width: 800px;
}

.kinetic-quote {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4rem);
    color: var(--antique-gold);
    line-height: 1.2;
}

.kinetic-quote .kinetic-char {
    display: inline-block;
    animation: kineticWobble 3s ease-in-out infinite alternate;
    animation-delay: calc(var(--char-index) * 0.05s);
}

@keyframes kineticWobble {
    0% { transform: rotate(-1deg); }
    50% { transform: rotate(1deg); }
    100% { transform: rotate(-1deg); }
}

/* === Finale Section === */
.section-finale {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: var(--deep-plum);
    z-index: 2;
    overflow: hidden;
}

.finale-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.corkscrew-final {
    animation: slowSpin 20s linear infinite;
    position: relative;
    z-index: 3;
}

.corkscrew-path-final {
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
}

.corkscrew-path-final.animate-draw {
    animation: drawPathFinal 2.5s ease-in-out forwards;
}

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

@keyframes slowSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.finale-circle {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.25), transparent 70%);
    z-index: 1;
}

.finale-circle.expand {
    animation: expandCircle 4s ease-out forwards;
}

@keyframes expandCircle {
    to {
        width: 200vmax;
        height: 200vmax;
    }
}

/* === Navigation Dots === */
#nav-dots {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--antique-gold);
    border: none;
    cursor: pointer;
    position: relative;
    opacity: 0.4;
    transition: opacity 0.3s, transform 0.3s;
    padding: 0;
}

.nav-dot.active {
    opacity: 1;
    transform: scale(1.3);
}

.nav-dot:hover {
    opacity: 1;
    animation: dotPulse 1s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.4); }
}

.dot-label {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--antique-gold);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    font-style: italic;
}

.nav-dot:hover .dot-label {
    opacity: 1;
}

/* === Responsive === */
@media (max-width: 768px) {
    .band-content {
        margin-left: 10%;
        max-width: 80%;
    }

    .hero-word {
        font-size: clamp(2rem, 10vw, 3.5rem);
    }

    .kinetic-quote {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
    }

    .band-rose {
        transform: skewY(3deg);
    }
    .band-rose .band-content {
        transform: skewY(-3deg);
    }
    .band-plum {
        transform: skewY(-3deg);
    }
    .band-plum .band-content {
        transform: skewY(3deg);
    }
    .band-deep {
        transform: skewY(4deg);
    }
    .band-deep .band-content {
        transform: skewY(-4deg);
    }

    #nav-dots {
        bottom: 1rem;
        right: 1rem;
    }
}
