/* ============================================================
   nonri.day Styles
   ============================================================ */

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #F0F2F8;
    color: #3D3F52;
    overflow-x: hidden;
    line-height: 1.6;
    font-size: 16px;
    font-weight: 400;
}

/* Container */
.container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background-color: #F0F2F8;
}

/* ============================================================
   Timeline SVG Thread - Thread Color: #B8C4D8
   ============================================================ */
.timeline-svg {
    position: fixed;
    top: 0;
    left: 50%;
    width: 1px;
    height: 100vh;
    transform: translateX(-50%);
    z-index: 10;
    pointer-events: none;
}

.timeline-thread {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawThread 1s ease-out 0.4s forwards;
    /* Thread color explicitly set to #B8C4D8 */
    stroke: #B8C4D8;
}

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

/* ============================================================
   Hero Section
   ============================================================ */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: #F0F2F8;
    z-index: 5;
}

.hero-title {
    font-family: 'Caveat', cursive;
    font-size: clamp(4rem, 12vw, 9rem);
    font-weight: 700;
    color: #2A2D3E;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    animation: fadeInTitle 1s ease-out 0.8s both;
}

.hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: #4A4E6A;
    font-weight: 400;
    max-width: 500px;
    margin: 0 auto;
    opacity: 0;
    animation: fadeIn 1s ease-out 1.2s forwards;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ============================================================
   Timeline Nodes
   ============================================================ */
.timeline-nodes {
    position: relative;
    z-index: 20;
}

.timeline-node {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 60px 20px;
    min-height: 300px;
    display: flex;
    align-items: center;
    opacity: 0;
    animation: fadeInNode 0.8s ease-out forwards;
}

.timeline-node[data-index="0"] { animation-delay: 1.4s; }
.timeline-node[data-index="1"] { animation-delay: 1.6s; }
.timeline-node[data-index="2"] { animation-delay: 1.8s; }
.timeline-node[data-index="3"] { animation-delay: 2.0s; }
.timeline-node[data-index="4"] { animation-delay: 2.2s; }
.timeline-node[data-index="5"] { animation-delay: 2.4s; }
.timeline-node[data-index="6"] { animation-delay: 2.6s; }
.timeline-node[data-index="7"] { animation-delay: 2.8s; }
.timeline-node[data-index="8"] { animation-delay: 3.0s; }
.timeline-node[data-index="9"] { animation-delay: 3.2s; }

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

.node-right {
    justify-content: flex-end;
    padding-right: calc(50% + 40px);
}

.node-left {
    justify-content: flex-start;
    padding-left: calc(50% + 40px);
}

.node-content {
    position: relative;
    max-width: 560px;
    background-color: #E8ECF4;
    padding: 40px;
    border: 1px solid #D4DAE8;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.timeline-node:hover .node-content {
    background-color: #D4DAE8;
    border-color: #C7A87C;
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(61, 63, 82, 0.08);
}

.timeline-node:active .node-content {
    background-color: #D4A0A0;
    border-color: #D4A0A0;
}

.node-illustration {
    position: absolute;
    width: 100px;
    height: 100px;
    top: 20px;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.node-right .node-illustration {
    right: -120px;
}

.node-left .node-illustration {
    left: -120px;
}

.timeline-node:hover .node-illustration {
    opacity: 0.6;
}

.node-heading {
    font-family: 'Caveat', cursive;
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 400;
    color: #4A4E6A;
    margin-bottom: 16px;
    margin-top: 0;
    word-spacing: 0.1em;
}

.node-text {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.95rem, 1.2vw, 1.05rem);
    line-height: 1.7;
    color: #3D3F52;
    margin: 0;
    word-wrap: break-word;
}

/* Timestamp styling with accent warm color */
.node-timestamp {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #C7A87C;
    margin-bottom: 12px;
    display: block;
    font-weight: 300;
}

/* Active/hover state for timestamps */
.timeline-node:hover .node-timestamp {
    color: #D4A0A0;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
    position: relative;
    z-index: 15;
    padding: 80px 20px;
    text-align: center;
    background-color: #F0F2F8;
}

.footer p {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: #8A8FB0;
    letter-spacing: 0.05em;
    margin: 0;
    opacity: 0;
    animation: fadeIn 1s ease-out 3.4s forwards;
}

/* ============================================================
   Scroll Trigger Animation
   ============================================================ */
.timeline-node.reveal {
    animation: fadeInNode 0.8s ease-out forwards;
}

/* ============================================================
   Responsive Design
   ============================================================ */
@media (max-width: 768px) {
    .node-right {
        justify-content: center;
        padding-right: 20px;
        padding-left: 20px;
    }

    .node-left {
        justify-content: center;
        padding-left: 20px;
        padding-right: 20px;
    }

    .node-right .node-illustration {
        position: relative;
        right: auto;
        top: auto;
        margin-bottom: 20px;
    }

    .node-left .node-illustration {
        position: relative;
        left: auto;
        top: auto;
        margin-bottom: 20px;
    }

    .node-content {
        max-width: 100%;
        padding: 30px;
    }

    .timeline-svg {
        display: none;
    }

    .hero {
        height: auto;
        padding: 60px 20px;
    }

    .hero-title {
        font-size: clamp(2.5rem, 8vw, 4rem);
    }
}

@media (max-width: 480px) {
    .node-content {
        padding: 20px;
    }

    .node-heading {
        font-size: clamp(1.4rem, 3vw, 1.8rem);
    }

    .node-text {
        font-size: 0.95rem;
    }

    .hero-title {
        font-size: clamp(2rem, 6vw, 3rem);
    }

    .hero-subtitle {
        font-size: 1rem;
    }
}

/* ============================================================
   Print Styles (Hidden by default)
   ============================================================ */
@media print {
    body {
        background-color: white;
    }

    .timeline-svg {
        display: none;
    }

    .timeline-node {
        page-break-inside: avoid;
    }
}
