/* ================================================
   quirk.one - Y2K Futurism + Pastoral Romantic
   ================================================ */

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

:root {
    --ethereal-blue: #7dd3fc;
    --dreamy-lavender: #d8b4fe;
    --cream-paper: #f5f1e8;
    --deep-navy: #1e3a4a;
    --pastel-green: #a7d8a8;
    --glitch-pink: #f472b6;
    --muted-taupe: #a19575;

    --font-headline: 'Quicksand', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --font-accent: 'Poppins', sans-serif;
}

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

body {
    background-color: var(--cream-paper);
    color: var(--deep-navy);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.8;
    letter-spacing: 0.01em;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* --- Paper Texture Overlay --- */
.paper-texture {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.04;
    mix-blend-mode: multiply;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(161, 149, 117, 0.08) 2px,
            rgba(161, 149, 117, 0.08) 3px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 3px,
            rgba(161, 149, 117, 0.05) 3px,
            rgba(161, 149, 117, 0.05) 4px
        );
}

/* --- Paper Creases --- */
.paper-creases {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

.crease {
    position: absolute;
    background: linear-gradient(
        45deg,
        transparent 48%,
        rgba(161, 149, 117, 0.15) 49%,
        rgba(161, 149, 117, 0.15) 51%,
        transparent 52%
    );
    width: 200%;
    height: 1px;
}

.crease-1 {
    top: 30%;
    left: -20%;
    transform: rotate(45deg);
    opacity: 0.15;
}

.crease-2 {
    top: 60%;
    left: -30%;
    transform: rotate(-30deg);
    opacity: 0.1;
}

.crease-3 {
    top: 80%;
    left: -10%;
    transform: rotate(20deg);
    opacity: 0.08;
}

/* --- Floating Geometric Motifs --- */
.floating-motifs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.motif {
    position: absolute;
    border-style: solid;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.motif.visible {
    opacity: 1;
}

.motif-circle {
    border-radius: 50%;
}

.motif-square {
    border-radius: 2px;
}

.motif-triangle {
    border: none;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

/* Individual motif styles */
.motif-1 {
    width: 60px;
    height: 60px;
    border-width: 1px;
    border-color: var(--ethereal-blue);
    top: 8%;
    left: 12%;
    animation: floatSlow 16s ease-in-out infinite, rotateSlow 20s linear infinite;
}

.motif-2 {
    width: 40px;
    height: 40px;
    border-width: 2px;
    border-color: var(--dreamy-lavender);
    top: 15%;
    right: 18%;
    animation: floatMed 12s ease-in-out infinite, rotateSlow 15s linear infinite reverse;
}

.motif-3 {
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-bottom: 30px solid var(--ethereal-blue);
    opacity: 0.4;
    top: 25%;
    left: 70%;
    animation: floatSlow 14s ease-in-out infinite 2s;
}

.motif-3.visible {
    opacity: 0.4;
}

.motif-4 {
    width: 90px;
    height: 90px;
    border-width: 1px;
    border-color: var(--pastel-green);
    top: 40%;
    left: 5%;
    animation: floatMed 18s ease-in-out infinite 1s, rotateSlow 25s linear infinite;
}

.motif-5 {
    width: 25px;
    height: 25px;
    border-width: 1.5px;
    border-color: var(--ethereal-blue);
    top: 50%;
    right: 8%;
    animation: floatFast 8s ease-in-out infinite, rotateSlow 12s linear infinite reverse;
}

.motif-6 {
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 20px solid var(--dreamy-lavender);
    opacity: 0.35;
    top: 65%;
    left: 25%;
    animation: floatMed 10s ease-in-out infinite 3s;
}

.motif-6.visible {
    opacity: 0.35;
}

.motif-7 {
    width: 50px;
    height: 50px;
    border-width: 1px;
    border-color: var(--glitch-pink);
    top: 72%;
    right: 22%;
    animation: floatSlow 15s ease-in-out infinite 2s, rotateSlow 18s linear infinite;
}

.motif-8 {
    width: 35px;
    height: 35px;
    border-width: 1px;
    border-color: var(--muted-taupe);
    top: 82%;
    left: 60%;
    animation: floatFast 9s ease-in-out infinite 1s, rotateSlow 14s linear infinite reverse;
}

.motif-9 {
    width: 120px;
    height: 120px;
    border-width: 1px;
    border-color: var(--ethereal-blue);
    top: 90%;
    left: 80%;
    opacity: 0.3;
    animation: floatSlow 20s ease-in-out infinite, rotateSlow 30s linear infinite;
}

.motif-9.visible {
    opacity: 0.3;
}

.motif-10 {
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 42px solid var(--pastel-green);
    opacity: 0.3;
    top: 5%;
    right: 40%;
    animation: floatMed 13s ease-in-out infinite 4s;
}

.motif-10.visible {
    opacity: 0.3;
}

/* --- Watercolor Blobs --- */
.watercolor-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    opacity: 0.3;
}

.blob-1 {
    width: 250px;
    height: 220px;
    background: radial-gradient(ellipse, rgba(125, 211, 252, 0.2) 0%, transparent 70%);
    top: 10%;
    left: -5%;
    border-radius: 60% 40% 55% 45% / 50% 60% 40% 50%;
    animation: blobFloat1 20s ease-in-out infinite;
}

.blob-2 {
    width: 300px;
    height: 280px;
    background: radial-gradient(ellipse, rgba(216, 180, 254, 0.18) 0%, transparent 70%);
    top: 35%;
    right: -8%;
    border-radius: 45% 55% 60% 40% / 55% 45% 50% 50%;
    animation: blobFloat2 24s ease-in-out infinite 3s;
}

.blob-3 {
    width: 200px;
    height: 180px;
    background: radial-gradient(ellipse, rgba(167, 216, 168, 0.15) 0%, transparent 70%);
    bottom: 20%;
    left: 15%;
    border-radius: 55% 45% 40% 60% / 45% 55% 55% 45%;
    animation: blobFloat1 18s ease-in-out infinite 5s;
}

.blob-4 {
    width: 180px;
    height: 160px;
    background: radial-gradient(ellipse, rgba(244, 114, 182, 0.12) 0%, transparent 70%);
    bottom: 5%;
    right: 20%;
    border-radius: 50% 50% 45% 55% / 60% 40% 55% 45%;
    animation: blobFloat2 22s ease-in-out infinite 2s;
}

/* --- Y2K Clouds --- */
.y2k-cloud {
    position: fixed;
    pointer-events: none;
    z-index: 3;
    opacity: 0.6;
}

.y2k-cloud-1 {
    top: 12%;
    right: 5%;
    animation: cloudDrift 30s ease-in-out infinite;
}

.y2k-cloud-2 {
    bottom: 15%;
    left: 3%;
    animation: cloudDrift 35s ease-in-out infinite 8s;
}

/* --- Chrome Spheres --- */
.chrome-sphere {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    position: absolute;
    background: radial-gradient(
        circle at 35% 35%,
        #ffffff 0%,
        var(--ethereal-blue) 30%,
        var(--deep-navy) 70%,
        #0a1a24 100%
    );
    box-shadow:
        0 0 15px rgba(125, 211, 252, 0.2),
        inset 0 0 10px rgba(255, 255, 255, 0.3);
    z-index: 5;
}

.chrome-sphere-hero {
    width: 50px;
    height: 50px;
    bottom: -20px;
    right: 40px;
    animation: floatSlow 10s ease-in-out infinite;
}

.chrome-sphere-journal {
    width: 30px;
    height: 30px;
    top: 20px;
    left: -15px;
    animation: floatMed 8s ease-in-out infinite 2s;
}

/* --- Pixel Stars --- */
.pixel-star {
    position: absolute;
    color: var(--ethereal-blue);
    z-index: 5;
    opacity: 0.6;
}

.pixel-star-1 {
    top: 30px;
    right: -40px;
    animation: twinkle 4s ease-in-out infinite;
}

.pixel-star-2 {
    bottom: 40px;
    left: -30px;
    color: var(--dreamy-lavender);
    animation: twinkle 5s ease-in-out infinite 1.5s;
}

/* --- Content Stage --- */
.content-stage {
    position: relative;
    z-index: 10;
    max-width: 1100px;
    margin: 0 auto;
    padding: 80px 40px 120px;
}

/* --- Block (Section) Base --- */
.block {
    position: relative;
    margin-bottom: 120px;
    opacity: 0;
    transform: translateY(20px) rotate(var(--block-rotate, 0deg));
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.block.in-view {
    opacity: 1;
    transform: translateY(0) rotate(var(--block-rotate, 0deg));
}

.block-inner {
    position: relative;
}

/* --- Asymmetric Block Rotations --- */
.block-hero {
    --block-rotate: 0deg;
    text-align: center;
    padding-top: 80px;
    margin-bottom: 160px;
}

.block-about {
    --block-rotate: -1.5deg;
    max-width: 620px;
    margin-left: 8%;
}

.block-collection {
    --block-rotate: 1deg;
    max-width: 900px;
    margin-left: auto;
    margin-right: 5%;
}

.block-journal {
    --block-rotate: -2deg;
    max-width: 600px;
    margin-left: 15%;
}

.block-gallery {
    --block-rotate: 0.5deg;
    max-width: 800px;
    margin-left: auto;
    margin-right: 8%;
}

.block-closing {
    --block-rotate: 0deg;
    text-align: center;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
    padding-top: 40px;
}

/* --- Typography --- */
.hero-title {
    font-family: var(--font-headline);
    font-weight: 300;
    font-size: clamp(2.4rem, 6vw, 4.8rem);
    letter-spacing: 0.04em;
    color: var(--ethereal-blue);
    line-height: 1.1;
    margin-bottom: 16px;
    position: relative;
    display: inline-block;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    color: var(--muted-taupe);
    letter-spacing: 0.08em;
    margin-top: 8px;
}

.section-title {
    font-family: var(--font-headline);
    font-weight: 500;
    font-size: clamp(1.8rem, 4.5vw, 3.6rem);
    letter-spacing: 0.04em;
    color: var(--deep-navy);
    line-height: 1.25;
    margin-bottom: 24px;
}

.label {
    font-family: var(--font-accent);
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--dreamy-lavender);
    display: inline-block;
    margin-bottom: 12px;
    padding: 4px 12px;
    border: 1px solid var(--dreamy-lavender);
    border-radius: 20px;
}

.body-text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    line-height: 1.8;
    letter-spacing: 0.01em;
    color: var(--deep-navy);
    max-width: 540px;
}

.closing-title {
    font-family: var(--font-headline);
    font-weight: 600;
    font-size: clamp(2rem, 5vw, 3.2rem);
    letter-spacing: 0.04em;
    color: var(--ethereal-blue);
    margin-bottom: 20px;
    display: inline-block;
    position: relative;
}

.closing-text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    line-height: 1.8;
    color: var(--muted-taupe);
    max-width: 440px;
    margin: 0 auto 32px;
}

.closing-mark {
    margin-top: 24px;
}

/* --- Glitch Effect --- */
.glitch-target {
    position: relative;
}

.glitch-target:hover::before,
.glitch-target:hover::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.glitch-target:hover::before {
    color: rgba(125, 211, 252, 0.7);
    animation: glitchOffset1 200ms steps(3) forwards;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}

.glitch-target:hover::after {
    color: rgba(244, 114, 182, 0.7);
    animation: glitchOffset2 200ms steps(3) forwards;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
}

/* --- Cards --- */
.card-scatter {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    margin-top: 24px;
}

.card {
    flex: 1 1 220px;
    max-width: 280px;
    padding: 28px 24px;
    background: rgba(245, 241, 232, 0.8);
    border: 1px solid rgba(161, 149, 117, 0.2);
    border-radius: 8px;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.card-1 {
    transform: rotate(-3deg);
}

.card-2 {
    transform: rotate(2deg) translateY(12px);
}

.card-3 {
    transform: rotate(-1deg) translateY(-8px);
}

.card:hover {
    box-shadow: 0 8px 30px rgba(30, 58, 74, 0.08);
    transform: rotate(0deg) translateY(-4px);
}

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

.card-title {
    font-family: var(--font-headline);
    font-weight: 600;
    font-size: 1.15rem;
    letter-spacing: 0.04em;
    color: var(--deep-navy);
    margin-bottom: 8px;
}

.card-text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--muted-taupe);
}

/* --- Journal Entries --- */
.journal-entries {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-top: 32px;
}

.journal-entry {
    padding: 24px 28px;
    border-left: 2px solid var(--dreamy-lavender);
    position: relative;
    transition: transform 0.3s ease;
}

.entry-1 {
    transform: translateX(0) rotate(-1deg);
}

.entry-2 {
    transform: translateX(20px) rotate(0.5deg);
}

.entry-3 {
    transform: translateX(-10px) rotate(-0.8deg);
}

.journal-entry:hover {
    transform: translateX(8px) rotate(0deg);
}

.entry-date {
    font-family: var(--font-accent);
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ethereal-blue);
    display: block;
    margin-bottom: 8px;
}

.entry-text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(0.9rem, 1.8vw, 1rem);
    line-height: 1.8;
    color: var(--deep-navy);
}

/* --- Gallery --- */
.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 24px;
    align-items: start;
}

.gallery-item {
    position: relative;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gallery-item-1 {
    transform: rotate(3deg);
}

.gallery-item-2 {
    transform: rotate(-2deg) translateY(20px);
}

.gallery-item-3 {
    transform: rotate(5deg) translateY(-10px);
}

.gallery-item:hover {
    transform: rotate(0deg) translateY(-6px) scale(1.02);
}

.gallery-placeholder {
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(30, 58, 74, 0.1);
}

.gallery-placeholder svg {
    display: block;
}

.gallery-caption {
    display: block;
    font-family: var(--font-accent);
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted-taupe);
    margin-top: 10px;
    text-align: center;
}

/* --- Keyframe Animations --- */
@keyframes floatSlow {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(8px, -12px); }
    50% { transform: translate(-6px, -20px); }
    75% { transform: translate(10px, -8px); }
}

@keyframes floatMed {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(-10px, -15px); }
    66% { transform: translate(12px, -10px); }
}

@keyframes floatFast {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(6px, -10px); }
}

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

@keyframes blobFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    30% { transform: translate(20px, -15px) scale(1.05); }
    60% { transform: translate(-10px, 10px) scale(0.98); }
}

@keyframes blobFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    40% { transform: translate(-15px, 20px) scale(1.03); }
    70% { transform: translate(10px, -10px) scale(0.97); }
}

@keyframes cloudDrift {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(30px); }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

@keyframes glitchOffset1 {
    0% { transform: translate(0, 0); }
    33% { transform: translate(-3px, 1px); }
    66% { transform: translate(2px, -1px); }
    100% { transform: translate(0, 0); }
}

@keyframes glitchOffset2 {
    0% { transform: translate(0, 0); }
    33% { transform: translate(3px, -1px); }
    66% { transform: translate(-2px, 2px); }
    100% { transform: translate(0, 0); }
}

/* --- Floating Pause (slow on hover) --- */
.content-stage .block:hover ~ .floating-motifs .motif,
.block:hover .chrome-sphere {
    animation-duration: 30s !important;
}

/* --- Mobile Responsive --- */
@media (max-width: 768px) {
    .content-stage {
        padding: 60px 24px 80px;
    }

    .block {
        margin-bottom: 80px;
    }

    .block-about,
    .block-journal {
        margin-left: 4%;
        max-width: 100%;
    }

    .block-collection,
    .block-gallery {
        margin-right: 4%;
        max-width: 100%;
    }

    .block-hero {
        padding-top: 40px;
        margin-bottom: 100px;
    }

    .card-scatter {
        flex-direction: column;
        align-items: center;
    }

    .card {
        max-width: 100%;
    }

    .card-1, .card-2, .card-3 {
        transform: rotate(0deg) translateY(0);
    }

    .gallery-grid {
        flex-direction: column;
        align-items: center;
    }

    .gallery-item-1, .gallery-item-2, .gallery-item-3 {
        transform: rotate(0deg) translateY(0);
    }

    .entry-1, .entry-2, .entry-3 {
        transform: translateX(0) rotate(0deg);
    }

    /* Reduce floating range on mobile */
    @keyframes floatSlow {
        0%, 100% { transform: translate(0, 0); }
        25% { transform: translate(4px, -6px); }
        50% { transform: translate(-3px, -10px); }
        75% { transform: translate(5px, -4px); }
    }

    @keyframes floatMed {
        0%, 100% { transform: translate(0, 0); }
        33% { transform: translate(-5px, -8px); }
        66% { transform: translate(6px, -5px); }
    }

    @keyframes floatFast {
        0%, 100% { transform: translate(0, 0); }
        50% { transform: translate(3px, -5px); }
    }

    .blob-1, .blob-2, .blob-3, .blob-4 {
        opacity: 0.15;
    }

    .y2k-cloud {
        display: none;
    }

    .motif-9 {
        display: none;
    }
}

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

    .section-title {
        font-size: clamp(1.5rem, 7vw, 2.2rem);
    }

    .block-about,
    .block-collection,
    .block-journal,
    .block-gallery {
        --block-rotate: 0deg;
    }
}