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

html, body {
    width: 100%;
    min-height: 100vh;
    background-color: #F4F0EC;
    font-family: 'Lora', serif;
    color: #4A4A5E;
    overflow-x: hidden;
}

#editorial {
    max-width: 720px;
    margin: 0 auto;
    padding: 100px 24px 120px;
}

/* Hero */
#hero {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
}

.display-heading {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 40px;
    color: #2A2A3E;
    margin-bottom: 12px;
}

#hero .display-heading {
    font-size: 52px;
}

.subtitle {
    font-family: 'Lora', serif;
    font-weight: 400;
    font-style: italic;
    font-size: 16px;
    color: #7A6A8E;
}

/* Content sections */
.content-section {
    margin-bottom: 80px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.content-section.visible {
    opacity: 1;
}

.accent-label {
    font-family: 'Fira Code', monospace;
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 0.04em;
    color: #7A6A8E;
    display: block;
    margin-bottom: 12px;
}

.body-text {
    font-family: 'Lora', serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.7;
    color: #4A4A5E;
}

.mono-accent {
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    color: #7A6A8E;
}

/* Pull quotes */
.pull-quote {
    margin: 0 0 80px 48px;
    padding: 24px 32px;
    background-color: #EAE4DE;
    border-left: 3px solid #B87878;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.pull-quote.visible {
    opacity: 1;
}

.pull-quote p {
    font-family: 'Lora', serif;
    font-weight: 400;
    font-style: italic;
    font-size: 20px;
    line-height: 1.6;
    color: #4A4A5E;
}

/* Memphis diagrams */
.memphis-diagram {
    margin: 0 -10% 80px -10%;
    width: 120%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.memphis-diagram.visible {
    opacity: 1;
}

.memphis-shape {
    transform-origin: center;
    transform: scale(0);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.memphis-diagram.visible .memphis-shape {
    transform: scale(1);
}

.diagram-line {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 0.6s ease 0.3s;
}

.memphis-diagram.visible .diagram-line {
    stroke-dashoffset: 0;
}

/* Water bubbles */
.bubble-cluster {
    position: relative;
    height: 60px;
    margin-bottom: 40px;
}

.inline-cluster {
    margin-bottom: 80px;
}

.water-bubble {
    position: absolute;
    border-radius: 50%;
    cursor: pointer;
    animation: bubble-float 4s infinite ease-in-out;
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.2s ease;
}

.water-bubble.visible {
    opacity: 1;
}

.water-bubble[data-color="rose"] {
    background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.8), #B87878 70%);
    opacity: 0.4;
}

.water-bubble[data-color="teal"] {
    background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.8), #78A8B8 70%);
    opacity: 0.4;
}

.water-bubble[data-color="gold"] {
    background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.8), #C8B878 70%);
    opacity: 0.4;
}

.water-bubble.visible[data-color="rose"] { opacity: 0.4; }
.water-bubble.visible[data-color="teal"] { opacity: 0.4; }
.water-bubble.visible[data-color="gold"] { opacity: 0.4; }

.water-bubble.popping {
    transform: scale(1.3);
    opacity: 0 !important;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.water-bubble::after {
    content: '';
    position: absolute;
    top: 20%;
    left: 25%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
}

@keyframes bubble-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* Glitch effect */
.glitch {
    animation: glitch-effect 0.2s ease;
}

@keyframes glitch-effect {
    0% { filter: none; transform: translate(0); }
    25% { filter: none; transform: translate(-2px, 0); box-shadow: 2px 0 0 #B87878, -2px 0 0 #78A8B8; }
    50% { filter: none; transform: translate(2px, 0); box-shadow: -2px 0 0 #B87878, 2px 0 0 #78A8B8; }
    75% { filter: none; transform: translate(-1px, 0); box-shadow: 1px 0 0 #B87878, -1px 0 0 #78A8B8; }
    100% { filter: none; transform: translate(0); box-shadow: none; }
}

/* Fade in utility */
.fade-in {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.fade-in.visible {
    opacity: 1;
}

/* Borders */
.content-section .display-heading {
    border-bottom: 1px solid #6A6A7E;
    padding-bottom: 8px;
    margin-bottom: 16px;
    display: inline-block;
}

/* Mobile */
@media (max-width: 768px) {
    .display-heading {
        font-size: 28px;
    }

    #hero .display-heading {
        font-size: 36px;
    }

    .memphis-diagram {
        margin: 0 0 60px 0;
        width: 100%;
    }

    .pull-quote {
        margin-left: 20px;
    }

    .bubble-cluster .water-bubble:nth-child(n+4) {
        display: none;
    }
}
