/* ============================================= */
/* gabs.day - McBling Terroir                    */
/* ============================================= */

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

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

body {
    background-color: #1a0a10;
    color: #f5e6d3;
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    line-height: 1.7;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

/* ============================================= */
/* Rhinestone Fill Styles                        */
/* ============================================= */
.rhinestone-cluster circle {
    fill: url(#rhinestoneGrad);
}

.cluster-1 circle,
.cluster-2 circle,
.cluster-3 circle,
.cluster-4 circle,
.cluster-5 circle,
.cluster-6 circle {
    fill: #e8b4c8;
    filter: drop-shadow(0 0 3px rgba(232, 180, 200, 0.4));
}

.frame-rhinestones circle {
    fill: #e8b4c8;
    filter: drop-shadow(0 0 2px rgba(232, 180, 200, 0.3));
}

.card-rhinestones circle {
    fill: #e8b4c8;
    filter: drop-shadow(0 0 2px rgba(232, 180, 200, 0.3));
}

.zone-rhinestones circle {
    fill: #e8b4c8;
    filter: drop-shadow(0 0 3px rgba(232, 180, 200, 0.3));
}

.dim-rhinestones circle {
    fill: #8b4557;
    filter: drop-shadow(0 0 2px rgba(139, 69, 87, 0.2));
}

/* ============================================= */
/* Scroll Progress Indicator                     */
/* ============================================= */
.scroll-indicator {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.scroll-indicator:hover {
    opacity: 1;
}

.scroll-indicator svg {
    animation: rhinestoneBreath 6s ease-in-out infinite;
    filter: drop-shadow(0 0 6px rgba(232, 180, 200, 0.5));
}

.scroll-progress-bar {
    width: 3px;
    height: 60px;
    background: rgba(139, 69, 87, 0.3);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.scroll-progress-bar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(to top, #e8b4c8, #8b4557);
    border-radius: 2px;
    transition: height 0.1s ease-out;
}

/* ============================================= */
/* SECTION 1: THE VANITY MIRROR                  */
/* ============================================= */
.vanity-mirror {
    position: relative;
    width: 100%;
    height: 100vh;
    background: radial-gradient(ellipse at center, #4a0e1b 0%, #1a0a10 70%, #0d0508 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.vignette-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 30%, rgba(26, 10, 16, 0.7) 70%, rgba(13, 5, 8, 0.95) 100%);
    pointer-events: none;
    z-index: 2;
}

/* Rhinestone field */
.rhinestone-field {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

.rhinestone-cluster {
    position: absolute;
    opacity: 0;
    animation: rhinestoneFadeIn 1.5s ease-out forwards;
}

.cluster-1 { top: 5%; left: 8%; animation-delay: 0.2s; }
.cluster-2 { top: 12%; right: 10%; animation-delay: 0.4s; }
.cluster-3 { bottom: 20%; left: 5%; animation-delay: 0.6s; }
.cluster-4 { bottom: 15%; right: 8%; animation-delay: 0.8s; }
.cluster-5 { top: 40%; left: 2%; animation-delay: 1.0s; }
.cluster-6 { top: 35%; right: 3%; animation-delay: 1.2s; }

/* Chrome shimmer effect */
.chrome-shimmer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    width: 80vw;
    height: 25vh;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(232, 180, 200, 0.08) 20%,
        rgba(245, 230, 211, 0.12) 40%,
        rgba(196, 133, 109, 0.08) 60%,
        rgba(139, 69, 87, 0.1) 80%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: chromeShift 8s ease-in-out infinite;
    z-index: 4;
    pointer-events: none;
    border-radius: 50%;
    filter: blur(30px);
}

/* Vanity frame */
.vanity-frame {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
}

.frame-rhinestones {
    position: absolute;
    width: 100%;
    height: 30px;
}

.frame-top {
    top: 2rem;
}

.frame-bottom {
    bottom: 2rem;
}

/* Title content */
.vanity-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 2rem;
}

.site-title {
    font-family: 'Bungee Shade', cursive;
    font-size: clamp(3rem, 8vw, 7rem);
    color: #f5e6d3;
    letter-spacing: 0.04em;
    line-height: 1.1;
    text-shadow: 0 0 40px rgba(232, 180, 200, 0.2);
    animation: titleReveal 2s ease-out forwards;
}

.site-subtitle {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 2vw, 1.3rem);
    color: #d4a8a0;
    margin-top: 1.5rem;
    letter-spacing: 0.08em;
    opacity: 0;
    animation: subtitleFadeIn 1.5s ease-out 1.5s forwards;
}

/* ============================================= */
/* SECTION 2: THE SCRAPBOOK ZONE                 */
/* ============================================= */
.scrapbook-zone {
    position: relative;
    width: 100%;
    min-height: 300vh;
    background: linear-gradient(
        to bottom,
        #4a0e1b 0%,
        #1a0a10 15%,
        #1a0a10 85%,
        #1a0d06 100%
    );
    padding: 10vh 5vw 15vh;
    overflow: hidden;
}

/* Chrome gradient ribbons */
.chrome-ribbon {
    position: absolute;
    width: 120%;
    height: 4px;
    left: -10%;
    background: linear-gradient(
        90deg,
        #e8b4c8,
        #f5e6d3,
        #c4856d,
        #8b4557,
        #e8b4c8
    );
    background-size: 200% 100%;
    animation: chromeRibbonShift 12s ease-in-out infinite;
    opacity: 0.6;
    filter: blur(0.5px);
}

.ribbon-1 {
    top: 8%;
    transform: rotate(-1deg);
}

.ribbon-2 {
    top: 45%;
    transform: rotate(0.5deg);
    animation-delay: -4s;
}

.ribbon-3 {
    top: 78%;
    transform: rotate(-0.8deg);
    animation-delay: -8s;
}

/* Scrapbook grid - broken grid layout */
.scrapbook-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 5;
}

/* Card base styles */
.scrapbook-card {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: transform, opacity;
}

.scrapbook-card.visible {
    opacity: 1;
    transform: translateY(0) rotate(var(--card-rotate, 0deg));
}

.card-inner {
    padding: clamp(1.5rem, 3vw, 2.5rem);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.card-title {
    font-family: 'Righteous', cursive;
    font-size: clamp(1.5rem, 3.5vw, 2.8rem);
    font-weight: 400;
    color: #c4856d;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

.card-body {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.6vw, 1.1rem);
    line-height: 1.7;
    letter-spacing: 0.01em;
}

/* Card positions - broken grid */
.card-1 {
    grid-column: 1 / 7;
    grid-row: 1;
    --card-rotate: -2.5deg;
    margin-top: 5vh;
}

.card-2 {
    grid-column: 6 / 12;
    grid-row: 2;
    --card-rotate: 3.5deg;
    margin-top: -3vh;
}

.card-3 {
    grid-column: 2 / 8;
    grid-row: 3;
    --card-rotate: -1.8deg;
    margin-top: 8vh;
}

.card-4 {
    grid-column: 7 / 13;
    grid-row: 4;
    --card-rotate: 2.2deg;
    margin-top: -2vh;
}

.card-5 {
    grid-column: 3 / 10;
    grid-row: 5;
    --card-rotate: -3.2deg;
    margin-top: 6vh;
}

/* Card background textures */
.card-bg-linen {
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(240, 226, 208, 0.03) 2px,
            rgba(240, 226, 208, 0.03) 4px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(240, 226, 208, 0.02) 2px,
            rgba(240, 226, 208, 0.02) 4px
        ),
        #f0e2d0;
    color: #2d1810;
}

.card-bg-linen .card-body {
    color: #2d1810;
}

.card-bg-linen .card-title {
    color: #8b2252;
}

.card-bg-chrome {
    background:
        radial-gradient(ellipse at 30% 50%, rgba(232, 180, 200, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 30%, rgba(245, 230, 211, 0.1) 0%, transparent 40%),
        linear-gradient(135deg, #2d1810 0%, #4a0e1b 50%, #1a0a10 100%);
    color: #f5e6d3;
}

.card-bg-chrome .card-title {
    color: #e8b4c8;
}

.card-bg-cork {
    background:
        radial-gradient(circle at 20% 20%, rgba(196, 133, 109, 0.15) 0%, transparent 30%),
        radial-gradient(circle at 80% 80%, rgba(196, 133, 109, 0.1) 0%, transparent 25%),
        radial-gradient(circle at 50% 50%, rgba(196, 133, 109, 0.05) 0%, transparent 50%),
        #c4856d;
    color: #1a0a10;
}

.card-bg-cork .card-body {
    color: #1a0a10;
}

.card-bg-cork .card-title {
    color: #4a0e1b;
}

.card-bg-linen-dark {
    background:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 3px,
            rgba(139, 69, 87, 0.05) 3px,
            rgba(139, 69, 87, 0.05) 6px
        ),
        linear-gradient(180deg, #f0e2d0 0%, #ede0d4 100%);
    color: #2d1810;
}

.card-bg-linen-dark .card-body {
    color: #2d1810;
}

.card-bg-linen-dark .card-title {
    color: #6b1d2e;
}

.card-bg-chrome-warm {
    background:
        linear-gradient(135deg, rgba(232, 180, 200, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 70%, rgba(196, 133, 109, 0.2) 0%, transparent 50%),
        linear-gradient(180deg, #4a0e1b 0%, #6b1d2e 50%, #4a0e1b 100%);
    color: #f5e6d3;
}

.card-bg-chrome-warm .card-title {
    color: #e8b4c8;
}

/* HUD elements */
.hud-element {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.5;
}

.hud-coords {
    font-family: 'DM Sans', sans-serif;
    font-size: 10px;
    font-weight: 500;
    color: #c4856d;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Card rhinestones */
.card-rhinestones {
    margin-top: 1rem;
}

/* Zone scattered rhinestones */
.zone-rhinestones {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

.zone-cluster-1 {
    position: absolute;
    top: 25%;
    right: 5%;
    opacity: 0.5;
    animation: rhinestoneBreath 6s ease-in-out infinite;
}

.zone-cluster-2 {
    position: absolute;
    bottom: 30%;
    left: 3%;
    opacity: 0.4;
    animation: rhinestoneBreath 6s ease-in-out infinite;
    animation-delay: -3s;
}

/* ============================================= */
/* SECTION 3: THE BURIED TREASURE                */
/* ============================================= */
.buried-treasure {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(
        to bottom,
        #1a0d06 0%,
        #0d0703 100%
    );
    padding: 15vh 5vw;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.root-paths {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.root {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    transition: stroke-dashoffset 0.05s linear;
}

.earth-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    z-index: 3;
    pointer-events: none;
}

.buried-content {
    position: relative;
    z-index: 5;
    max-width: 700px;
    text-align: center;
}

.buried-text-block {
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.buried-text-block.visible {
    opacity: 0.7;
    transform: translateY(0);
}

.buried-text {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 2vw, 1.3rem);
    line-height: 1.8;
    color: #f5e6d3;
    letter-spacing: 0.01em;
}

.dim-rhinestones {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.3;
    z-index: 2;
    pointer-events: none;
    animation: rhinestoneBreath 8s ease-in-out infinite;
}

.final-word {
    position: relative;
    z-index: 10;
    margin-top: 6rem;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.5s ease-out, transform 1.5s ease-out;
}

.final-word.visible {
    opacity: 1;
    transform: translateY(0);
}

.final-text {
    font-family: 'Righteous', cursive;
    font-size: clamp(2rem, 5vw, 4rem);
    color: #f5e6d3;
    letter-spacing: 0.06em;
}

/* ============================================= */
/* Animations                                     */
/* ============================================= */
@keyframes rhinestoneFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rhinestoneBreath {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 3px rgba(232, 180, 200, 0.3));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 8px rgba(232, 180, 200, 0.6));
    }
}

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

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

@keyframes titleReveal {
    0% {
        opacity: 0;
        transform: scale(0.95);
        filter: blur(8px);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

@keyframes subtitleFadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================= */
/* Responsive adjustments                         */
/* ============================================= */
@media (max-width: 768px) {
    .scrapbook-grid {
        display: flex;
        flex-direction: column;
        gap: 3rem;
        padding: 0 1rem;
    }

    .scrapbook-card {
        width: 100%;
    }

    .scrapbook-card.visible {
        transform: translateY(0) rotate(var(--card-rotate, 0deg));
    }

    .card-1, .card-2, .card-3, .card-4, .card-5 {
        margin-top: 3vh;
    }

    .rhinestone-field svg {
        transform: scale(0.6);
    }

    .frame-rhinestones {
        height: 20px;
    }

    .chrome-ribbon {
        height: 2px;
    }

    .vanity-frame {
        display: none;
    }

    .scroll-indicator {
        bottom: 1rem;
        right: 1rem;
    }

    .buried-content {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: clamp(2rem, 10vw, 4rem);
    }

    .scrapbook-card.visible {
        transform: translateY(0) rotate(0deg);
    }
}
