/* ============================================
   paragram.dev - Chrome-Metallic Timeline
   Palette: #E8E8F0, #C0C0D0, #404050, #D0D0E0, #C8808A, #282838, #6878B0
   Font: Playfair Display
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 400;
    color: #404050;
    background: #E8E8F0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   Studio Entrance
   ============================================ */

#studio-entrance {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(170deg, #E8E8F0 0%, #D0D0E0 30%, #C0C0D0 70%, #E8E8F0 100%);
    background-size: 200% 200%;
    animation: chromeShift 30s ease infinite;
    overflow: hidden;
}

@keyframes chromeShift {
    0% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
    100% { background-position: 0% 0%; }
}

.bokeh-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.bokeh-circle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: bokehPulse 6s ease-in-out infinite;
}

@keyframes bokehPulse {
    0%, 100% { opacity: 0.08; transform: scale(1); }
    50% { opacity: 0.18; transform: scale(1.1); }
}

.entrance-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.domain-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: clamp(28px, 3.5vw, 52px);
    letter-spacing: 0.01em;
    color: #404050;
    opacity: 0;
    animation: fadeInTitle 800ms ease-out 200ms forwards;
}

@keyframes fadeInTitle {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.domain-subtitle {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 400;
    font-size: clamp(13px, 1vw, 16px);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #6878B0;
    margin-top: 16px;
    opacity: 0;
    animation: fadeInTitle 800ms ease-out 600ms forwards;
}

.waveform-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    z-index: 2;
}

.wave-path {
    stroke-dasharray: 2200;
    stroke-dashoffset: 2200;
    animation: traceWave 1200ms ease-out 400ms forwards;
}

.wave-blue-2 {
    animation-delay: 700ms;
}

@keyframes traceWave {
    to { stroke-dashoffset: 0; }
}

/* ============================================
   Timeline Section
   ============================================ */

#timeline-section {
    position: relative;
    padding: 120px 0 80px;
    background: linear-gradient(180deg, #E8E8F0 0%, #D0D0E0 50%, #C0C0D0 100%);
    background-size: 100% 200%;
    animation: chromeShift 30s ease infinite;
}

.timeline-axis {
    position: absolute;
    left: 50%;
    top: 0;
    width: 1px;
    height: 0;
    background: #404050;
    transform: translateX(-50%);
    transition: height 1000ms ease-out;
    z-index: 1;
}

.timeline-axis.drawn {
    height: 100%;
}

/* ============================================
   Timeline Nodes
   ============================================ */

.timeline-node {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: flex-start;
    opacity: 0;
    transition: opacity 400ms ease, transform 400ms ease;
}

.timeline-node.visible {
    opacity: 1;
    transform: translateX(0) !important;
}

.node-left {
    justify-content: flex-start;
    transform: translateX(-60px);
}

.node-right {
    justify-content: flex-end;
    transform: translateX(60px);
}

.timeline-marker {
    position: absolute;
    left: 50%;
    top: 20px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #D0D0E0;
    border: 1px solid #404050;
    transform: translateX(-50%);
    z-index: 3;
    transition: transform 300ms ease, box-shadow 300ms ease;
}

.timeline-node:hover .timeline-marker {
    transform: translateX(-50%) scale(1.3);
    box-shadow: 0 0 12px rgba(208, 208, 224, 0.6);
}

.timeline-connector {
    position: absolute;
    top: 24px;
    height: 0.5px;
    background: #404050;
    z-index: 2;
    opacity: 0.5;
}

.node-left .timeline-connector {
    left: calc(50% + 4px);
    right: calc(50% - 60px - 520px / 2 + 40px);
    width: 56px;
}

.node-right .timeline-connector {
    right: calc(50% + 4px);
    left: calc(50% - 60px + 520px / 2 - 40px);
    width: 56px;
    right: auto;
}

.node-left .timeline-connector {
    right: auto;
    left: calc(50% + 4px);
    width: 56px;
}

.node-right .timeline-connector {
    left: auto;
    right: calc(50% + 4px);
    width: 56px;
}

.timeline-content {
    width: 520px;
    max-width: 100%;
    padding: 28px 32px;
    background: rgba(232, 232, 240, 0.5);
    border: 1px solid rgba(192, 192, 208, 0.4);
    border-radius: 2px;
    transition: border-color 300ms ease, background 300ms ease;
}

.node-left .timeline-content {
    margin-right: auto;
    margin-left: calc(50% - 520px - 60px);
}

.node-right .timeline-content {
    margin-left: auto;
    margin-right: calc(50% - 520px - 60px);
}

.timeline-node:hover .timeline-content {
    border-color: #C8808A;
    background: rgba(232, 232, 240, 0.7);
}

.timeline-date {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 400;
    font-size: 13px;
    font-style: italic;
    color: #6878B0;
    display: block;
    margin-bottom: 8px;
}

.timeline-heading {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: clamp(20px, 2vw, 28px);
    letter-spacing: 0.01em;
    color: #404050;
    margin-bottom: 12px;
}

.timeline-summary {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 400;
    font-size: clamp(15px, 1vw, 17px);
    line-height: 1.85;
    color: #404050;
}

.timeline-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 400ms ease, opacity 400ms ease;
    opacity: 0;
}

.timeline-details.open {
    max-height: 600px;
    opacity: 1;
}

.timeline-details p {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 400;
    font-size: clamp(15px, 1vw, 17px);
    line-height: 1.85;
    color: #404050;
    margin-top: 16px;
}

.disclosure-toggle {
    display: inline-block;
    margin-top: 16px;
    padding: 0;
    background: none;
    border: none;
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 400;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #C8808A;
    cursor: pointer;
    transition: color 200ms ease;
    position: relative;
}

.disclosure-toggle::after {
    content: '';
    display: block;
    width: 100%;
    height: 0.5px;
    background: #C8808A;
    opacity: 0;
    transition: opacity 200ms ease;
    margin-top: 2px;
}

.disclosure-toggle:hover::after {
    opacity: 1;
}

.disclosure-toggle:hover {
    color: #6878B0;
}

.disclosure-toggle.expanded {
    color: #6878B0;
}

/* ============================================
   Waveform Sections
   ============================================ */

.waveform-section {
    position: relative;
    height: 80px;
    overflow: hidden;
}

.waveform-ambient {
    width: 100%;
    height: 100%;
}

.wave-path-ambient {
    stroke-dasharray: 2200;
    stroke-dashoffset: 2200;
    transition: stroke-dashoffset 1200ms ease;
}

.wave-path-ambient.drawn {
    stroke-dashoffset: 0;
}

/* ============================================
   Reflection Pool (Footer)
   ============================================ */

#reflection-pool {
    position: relative;
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #C0C0D0 0%, #404050 40%, #282838 100%);
    overflow: hidden;
    padding: 80px 40px;
}

.ripple-waveform {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
}

.wave-path-ripple {
    animation: rippleShift 8s linear infinite;
}

@keyframes rippleShift {
    from { transform: translateX(0); }
    to { transform: translateX(-50px); }
}

.final-marker {
    position: relative;
    width: 12px;
    height: 12px;
    background: #D0D0E0;
    border: 1px solid #C8808A;
    border-radius: 50%;
    margin-bottom: 40px;
    z-index: 2;
    left: auto;
    top: auto;
    transform: none;
    animation: finalMarkerPulse 4s ease-in-out infinite;
}

@keyframes finalMarkerPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(200, 128, 138, 0.3); }
    50% { box-shadow: 0 0 20px 4px rgba(200, 128, 138, 0.15); }
}

.reflection-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.reflection-text {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 400;
    font-size: clamp(15px, 1.5vw, 20px);
    font-style: italic;
    line-height: 1.85;
    color: #D0D0E0;
    max-width: 480px;
    margin: 0 auto 24px;
}

.reflection-label {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 400;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #C8808A;
}

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

@media (max-width: 1100px) {
    .node-left .timeline-content,
    .node-right .timeline-content {
        margin-left: auto;
        margin-right: auto;
        width: 90%;
        max-width: 520px;
    }

    .timeline-node {
        justify-content: center;
    }

    .node-left .timeline-connector,
    .node-right .timeline-connector {
        display: none;
    }

    .timeline-marker {
        display: none;
    }
}

@media (max-width: 600px) {
    .timeline-content {
        padding: 20px 24px;
    }

    #studio-entrance {
        height: 100svh;
    }
}
