/* scriptswirl.com - Watercolor Calligraphic Experience */
/* Palette: #faf8f5 #1a0a2e #2d1f3d #6d28d9 #c026d3 #ede9fe #f5f3ff #0f0520 */

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

html {
    background-color: #faf8f5;
}

body {
    font-family: 'Lora', Georgia, serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.8;
    color: #2d1f3d;
    background-color: #faf8f5;
    overflow-x: hidden;
}

/* ===== The Splash ===== */
#splash {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#ink-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #1a0a2e;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.4s ease;
}

#ink-dot.visible {
    opacity: 1;
}

#ink-bloom {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(109, 40, 217, 0.15) 0%, rgba(192, 38, 211, 0.08) 50%, transparent 100%);
    z-index: 2;
    opacity: 0;
    animation: none;
}

#ink-bloom.active {
    opacity: 1;
    animation: bloomExpand 3s ease-out forwards;
}

@keyframes bloomExpand {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(4); opacity: 0.3; }
}

#brush-stroke {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 800px;
    height: auto;
    z-index: 2;
}

#brush-stroke path {
    will-change: stroke-dashoffset;
}

#ink-droplets {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.ink-droplet {
    position: absolute;
    border-radius: 50%;
    background: #0f0520;
    opacity: 0;
    transform: scale(0);
}

.ink-droplet.visible {
    animation: dropletBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes dropletBounce {
    0% { opacity: 0; transform: scale(0); }
    60% { opacity: 0.8; transform: scale(1.2); }
    100% { opacity: 0.7; transform: scale(1); }
}

#splash-title {
    position: relative;
    z-index: 4;
    text-align: center;
}

#title-text {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-style: italic;
    font-size: clamp(48px, 10vw, 120px);
    color: #1a0a2e;
    letter-spacing: 0.02em;
}

.title-char {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.title-char.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Flow Bands ===== */
.flow-band {
    position: relative;
    padding: 120px 0;
    margin: 60px 0;
    overflow: visible;
}

.band-skew-neg {
    transform: skewY(-3deg);
}

.band-skew-pos {
    transform: skewY(3deg);
}

.band-counter-skew {
    transform: skewY(3deg);
}

.band-counter-skew-pos {
    transform: skewY(-3deg);
}

.band-wash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(237, 233, 254, 0.6) 0%,
        rgba(237, 233, 254, 0.2) 30%,
        rgba(245, 243, 255, 0.4) 50%,
        rgba(237, 233, 254, 0.1) 70%,
        transparent 100%
    );
    pointer-events: none;
}

.band-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 1px;
    background: rgba(109, 40, 217, 0.4);
    transition: width 0.8s ease;
}

.flow-band.visible .band-line {
    width: 100%;
}

.band-content {
    position: relative;
    z-index: 1;
}

.content-column {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 5vw;
}

.body-text {
    margin-bottom: 32px;
    opacity: 0;
    filter: blur(4px);
    transition: opacity 0.5s ease, filter 0.5s ease;
}

.flow-band.visible .body-text {
    opacity: 1;
    filter: blur(0);
}

.pull-quote {
    font-family: 'Dancing Script', cursive;
    font-size: 28px;
    font-weight: 700;
    color: rgba(109, 40, 217, 0.8);
    line-height: 1.4;
    margin: 32px -20px;
    padding: 16px 0;
    position: relative;
}

/* ===== Dissolution ===== */
#dissolution {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#dissolution-content {
    text-align: center;
}

#dissolution-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-style: italic;
    font-size: clamp(36px, 8vw, 96px);
    color: #6d28d9;
    opacity: 0.15;
    filter: blur(2px);
    letter-spacing: 0.04em;
}

/* ===== Ink bloom on dissolution ===== */
#dissolution::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(192, 38, 211, 0.05) 0%, rgba(245, 243, 255, 0.03) 50%, transparent 100%);
    pointer-events: none;
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    .title-char {
        opacity: 1;
        transform: none;
        transition: none;
    }

    #ink-bloom {
        animation: none;
    }

    .ink-droplet.visible {
        animation: none;
        opacity: 0.7;
        transform: scale(1);
    }

    .body-text {
        opacity: 1;
        filter: none;
        transition: none;
    }

    .band-line {
        width: 100%;
        transition: none;
    }

    #ink-dot {
        opacity: 1;
        transition: none;
    }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .pull-quote {
        font-size: 22px;
        margin: 24px 0;
    }

    .flow-band {
        padding: 80px 0;
        margin: 40px 0;
    }

    .band-skew-neg,
    .band-skew-pos {
        transform: skewY(-1.5deg);
    }

    .band-counter-skew {
        transform: skewY(1.5deg);
    }

    .band-counter-skew-pos {
        transform: skewY(-1.5deg);
    }
}
