/* ============================================================
   musical.quest — Styles
   Zen-contemplative, classical concert program aesthetic
   ============================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #F5F0E8;
    color: #1A1A18;
    font-family: 'Lora', Georgia, serif;
    font-weight: 400;
    font-size: clamp(16px, 1.1vw, 18px);
    line-height: 2.0;
    overflow-x: hidden;
    position: relative;
}

/* ============================================================
   Marble Texture Overlay
   ============================================================ */

#marble-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    /* Marble vein color: #D8D0C0 */
    background:
        linear-gradient(135deg, transparent 40%, #D8D0C0 42%, transparent 44%),
        linear-gradient(225deg, transparent 35%, #D8D0C0 37%, transparent 39%),
        linear-gradient(160deg, transparent 55%, #D8D0C0 57%, transparent 59%),
        linear-gradient(200deg, transparent 20%, #D8D0C0 22%, transparent 24%),
        linear-gradient(170deg, transparent 65%, #D8D0C0 67%, transparent 69%),
        linear-gradient(310deg, transparent 45%, #D8D0C0 47%, transparent 49%);
    opacity: 0.08;
    filter: url(#marble-filter);
}

/* ============================================================
   Tuning Silence — Hero Section
   ============================================================ */

#tuning-silence {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.title-container {
    text-align: center;
}

#domain-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 300;
    font-size: clamp(20px, 2.5vw, 36px);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #1A1A18;
    opacity: 0;
    transition: opacity 1500ms ease;
}

#domain-title.visible {
    opacity: 1;
}

#title-rule {
    width: 0;
    height: 1px;
    background-color: #888888;
    margin: 24px auto 0;
    transition: width 800ms ease;
}

#title-rule.visible {
    width: 60%;
}

/* ============================================================
   Movement Sections
   ============================================================ */

.movement {
    position: relative;
    z-index: 1;
    padding: 120px 0;
    min-height: 80vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.movement-content {
    display: flex;
    align-items: flex-start;
    max-width: 900px;
    width: 100%;
    padding: 0 40px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 800ms ease, transform 800ms ease;
}

.movement-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.movement-numeral {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: clamp(48px, 6vw, 120px);
    letter-spacing: 0.02em;
    color: #2A2A28;
    opacity: 0;
    line-height: 1;
    min-width: 120px;
    text-align: right;
    padding-right: 40px;
    transition: opacity 600ms ease;
    user-select: none;
}

.movement-numeral.visible {
    opacity: 0.2;
}

.movement-text {
    max-width: 600px;
    flex: 1;
}

.movement-text h2 {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: clamp(24px, 3vw, 40px);
    letter-spacing: 0.02em;
    color: #2A2A28;
    margin-bottom: 32px;
    line-height: 1.2;
}

.movement-text p {
    margin-bottom: 24px;
    color: #1A1A18;
}

.movement-text .metadata {
    font-family: 'Lora', Georgia, serif;
    font-weight: 400;
    font-style: italic;
    font-size: 13px;
    color: #888888;
    margin-top: 16px;
}

.movement-rule {
    border: none;
    height: 1px;
    background-color: #888888;
    width: 40%;
    margin: 32px 0;
    transition: width 400ms ease;
}

.movement-rule:hover {
    width: 50%;
}

/* ============================================================
   Ripple Interlude Zones
   ============================================================ */

.ripple-interlude {
    position: relative;
    z-index: 1;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: crosshair;
}

.section-rule {
    border: none;
    height: 1px;
    background-color: #888888;
    width: 30%;
    transition: width 400ms ease;
}

.section-rule:hover {
    width: 40%;
}

/* Ripple zone inside movements */
.ripple-zone {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

/* Ripple circles */
.ripple {
    position: absolute;
    border: 1px solid #B8962E;
    border-radius: 50%;
    opacity: 0.4;
    pointer-events: none;
    animation: ripple-expand 1.5s ease-out forwards;
}

@keyframes ripple-expand {
    0% {
        width: 0;
        height: 0;
        opacity: 0.4;
    }
    100% {
        width: 400px;
        height: 400px;
        opacity: 0;
    }
}

/* Small ripples for mouse move in ripple zones */
.ripple-small {
    position: absolute;
    border: 1px solid #B8962E;
    border-radius: 50%;
    opacity: 0.3;
    pointer-events: none;
    animation: ripple-small-expand 1s ease-out forwards;
}

@keyframes ripple-small-expand {
    0% {
        width: 0;
        height: 0;
        opacity: 0.3;
    }
    100% {
        width: 120px;
        height: 120px;
        opacity: 0;
    }
}

/* ============================================================
   Final Note Section
   ============================================================ */

#final-note {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.final-content {
    text-align: center;
    opacity: 0;
    transition: opacity 1200ms ease;
}

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

#pulsing-dot {
    width: 12px;
    height: 12px;
    background-color: #1A1A18;
    border-radius: 50%;
    margin: 0 auto 40px;
    animation: pulse 2s ease-in-out infinite;
}

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

#final-text {
    font-family: 'Lora', Georgia, serif;
    font-weight: 400;
    font-style: italic;
    font-size: 13px;
    color: #888888;
    letter-spacing: 0.05em;
}

/* ============================================================
   Link Styles
   ============================================================ */

a {
    color: #4A6888;
    text-decoration: none;
    position: relative;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #4A6888;
    opacity: 0;
    transition: opacity 300ms ease;
}

a:hover::after {
    opacity: 1;
}

/* ============================================================
   Responsive Adjustments
   ============================================================ */

@media (max-width: 768px) {
    .movement-content {
        flex-direction: column;
        padding: 0 24px;
    }

    .movement-numeral {
        text-align: left;
        padding-right: 0;
        min-width: auto;
        margin-bottom: 16px;
        font-size: clamp(36px, 10vw, 64px);
    }

    .ripple-interlude {
        height: 120px;
    }
}
