/* continu.st - Ethereal Blue Calm Portfolio */
/* Palette: #e8f4fd, #c8dff0, #e0d5eb, #3a3a4a, #7a8fb5, #b8c8d8 */

:root {
    --sky-start: #e8f4fd;
    --sky-mid: #c8dff0;
    --lavender: #e0d5eb;
    --text: #3a3a4a;
    --accent: #7a8fb5;
    --whisper: #b8c8d8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(to bottom, var(--sky-start), var(--sky-mid), var(--lavender), #f4f0f8, #faf8fc);
    color: var(--text);
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    line-height: 1.8;
    min-height: 500vh;
    overflow-x: hidden;
    position: relative;
}

/* ═══════════════════════════════════════
   Background Wave SVG
   ═══════════════════════════════════════ */

.wave-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.12;
}

/* ═══════════════════════════════════════
   Scroll Dot Indicator
   ═══════════════════════════════════════ */

.scroll-dot {
    position: fixed;
    left: 24px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.5;
    z-index: 10;
    transition: top 0.15s linear, opacity 0.6s ease;
}

/* ═══════════════════════════════════════
   Sections
   ═══════════════════════════════════════ */

.section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 4rem 2rem;
    position: relative;
    z-index: 1;
}

/* ═══════════════════════════════════════
   Hero / Emergence
   ═══════════════════════════════════════ */

.hero-section {
    min-height: 100vh;
}

.brand {
    font-family: 'Cormorant', serif;
    font-weight: 300;
    font-size: clamp(3rem, 8vw, 5rem);
    color: var(--text);
    opacity: 0;
    animation: emerge 4s ease forwards;
    letter-spacing: 0.05em;
}

@keyframes emerge {
    0% { opacity: 0; }
    100% { opacity: 0.6; }
}

/* ═══════════════════════════════════════
   Breathing System
   ═══════════════════════════════════════ */

.breathing {
    animation: breathe 5s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { opacity: 0.85; }
    50% { opacity: 1; }
}

/* Slower breathing for stillness phase */
.breathing-slow {
    animation: breathe-slow 8s ease-in-out infinite;
}

@keyframes breathe-slow {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* Brand gets breathing after emergence */
.brand.breathing {
    animation: emerge 4s ease forwards, breathe 5s ease-in-out 4s infinite;
}

/* ═══════════════════════════════════════
   Flow Blocks
   ═══════════════════════════════════════ */

.flow-block {
    max-width: 580px;
    text-align: center;
    mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
}

.marker {
    font-family: 'Source Code Pro', monospace;
    font-weight: 300;
    font-size: 0.7rem;
    color: var(--whisper);
    letter-spacing: 0.2em;
    display: block;
    margin-bottom: 1.5rem;
}

.display-heading {
    font-family: 'Cormorant', serif;
    font-weight: 300;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--text);
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

.body-text {
    font-weight: 300;
    font-size: 1rem;
    color: var(--text);
    line-height: 1.9;
}

/* ═══════════════════════════════════════
   Fade Elements (Scroll-driven visibility)
   ═══════════════════════════════════════ */

.fade-element {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.4s ease, transform 1.4s ease;
}

.fade-element.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-element.exiting {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 1s ease, transform 1s ease;
}

/* When visible and breathing, let the animation handle opacity */
.fade-element.visible.breathing {
    transform: translateY(0);
}

/* ═══════════════════════════════════════
   Stillness Section
   ═══════════════════════════════════════ */

.stillness-section {
    min-height: 120vh;
    padding: 10rem 2rem;
}

.stillness-text {
    font-family: 'Cormorant', serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(2rem, 6vw, 4rem);
    color: var(--text);
    text-align: center;
    line-height: 1.4;
}

/* ═══════════════════════════════════════
   Dissolution
   ═══════════════════════════════════════ */

.dissolution-section {
    min-height: 80vh;
}

.dissolve-element.visible {
    opacity: 0.5;
}

.final-section {
    min-height: 60vh;
}

.final-whisper {
    font-family: 'Cormorant', serif;
    font-weight: 300;
    font-size: 3rem;
    color: var(--whisper);
    text-align: center;
    transition: opacity 2s ease;
}

.final-whisper.visible {
    opacity: 0.4;
}

/* ═══════════════════════════════════════
   Dissolution Overlay (fades page to white)
   ═══════════════════════════════════════ */

.dissolution-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    pointer-events: none;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s linear;
}

/* ═══════════════════════════════════════
   Responsive
   ═══════════════════════════════════════ */

@media (max-width: 768px) {
    .scroll-dot {
        left: 12px;
        width: 6px;
        height: 6px;
    }

    .flow-block {
        max-width: 100%;
        padding: 0 0.5rem;
    }

    .section {
        padding: 3rem 1.5rem;
    }

    .stillness-section {
        padding: 6rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .scroll-dot {
        display: none;
    }
}
