/* ============================================
   tanso.tech - Graffiti Timeline Mural
   Forest-green urban palette
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    font-weight: 400;
    background-color: #0A1A10;
    color: #D0E8D0;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* --- Grain Overlay --- */
#grain-svg {
    position: absolute;
    width: 0;
    height: 0;
}

#grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.05;
    filter: url(#grain-filter);
    background: transparent;
}

#grain-overlay::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    background-size: 256px 256px;
    opacity: 1;
}

/* --- Street Grid Underlay --- */
#street-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background:
        repeating-linear-gradient(
            0deg,
            transparent 0 29px,
            rgba(42, 74, 48, 0.05) 29px 30px
        ),
        repeating-linear-gradient(
            90deg,
            transparent 0 29px,
            rgba(42, 74, 48, 0.05) 29px 30px
        );
}

/* --- City Silhouettes --- */
#city-silhouettes {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.06;
}

#city-silhouettes svg {
    width: 100%;
    height: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
}

/* --- Timeline Spine --- */
#timeline-spine {
    position: fixed;
    left: 60px;
    top: 0;
    width: 2px;
    height: 100%;
    background: #2A4A30;
    z-index: 2;
    transform-origin: top;
    transform: scaleY(0);
    transition: transform 0.8s ease-out;
}

#timeline-spine.visible {
    transform: scaleY(1);
}

/* --- Hero Section --- */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 10;
}

.hero-title {
    font-family: 'Jost', sans-serif;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    color: #80C060;
    letter-spacing: 0.02em;
    text-shadow:
        0 0 40px rgba(128, 192, 96, 0.4),
        0 0 80px rgba(128, 192, 96, 0.2),
        0 0 120px rgba(128, 192, 96, 0.1);
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: clamp(0.875rem, 2vw, 1.125rem);
    color: #8A9A8A;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 400;
}

.hero-scroll-indicator {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.scroll-line {
    display: block;
    width: 2px;
    height: 60px;
    background: linear-gradient(to bottom, #4A8A50, transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% {
        opacity: 0.3;
        transform: scaleY(0.6);
    }
    50% {
        opacity: 1;
        transform: scaleY(1);
    }
}

/* --- Timeline Sections --- */
.timeline-section {
    position: relative;
    z-index: 10;
    padding: 2rem 0;
}

/* --- Timeline Entry --- */
.timeline-entry {
    position: relative;
    margin-left: 100px;
    max-width: 600px;
    padding: 2rem 0;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.timeline-entry.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Timeline Marker --- */
.timeline-marker {
    position: absolute;
    left: -52px;
    top: 2.5rem;
    display: flex;
    align-items: center;
}

.marker-dot {
    display: block;
    width: 12px;
    height: 12px;
    background: #4A8A50;
    border: 2px solid #80C060;
    position: relative;
    z-index: 5;
}

.marker-line {
    display: block;
    width: 40px;
    height: 2px;
    background: #2A4A30;
}

/* --- Timeline Card --- */
.timeline-card {
    background: rgba(10, 26, 16, 0.8);
    border-left: 3px solid #4A8A50;
    padding: 1.5rem 2rem;
    position: relative;
}

.timeline-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(
            0deg,
            transparent 0 29px,
            rgba(42, 74, 48, 0.03) 29px 30px
        );
    pointer-events: none;
}

.entry-year {
    font-family: 'Jost', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: #80C060;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.5rem;
}

.entry-title {
    font-family: 'Jost', sans-serif;
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 700;
    color: #D0E8D0;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.entry-text {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.95rem;
    color: #8A9A8A;
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* --- Underline-Draw Links --- */
.entry-link {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.85rem;
    color: #4A8A50;
    text-decoration: none;
    font-weight: 500;
    letter-spacing: 0.05em;
    background: linear-gradient(#4A8A50, #4A8A50) no-repeat bottom left;
    background-size: 0% 2px;
    transition: background-size 0.4s ease-out, color 0.3s ease;
    padding-bottom: 2px;
    display: inline-block;
}

.entry-link:hover {
    background-size: 100% 2px;
    color: #80C060;
}

/* --- Closing Section --- */
#closing {
    position: relative;
    z-index: 10;
    padding: 6rem 0 4rem;
    text-align: center;
}

.closing-content {
    max-width: 500px;
    margin: 0 auto;
    padding: 0 2rem;
}

.timeline-end-marker {
    width: 2px;
    height: 60px;
    background: linear-gradient(to bottom, #2A4A30, transparent);
    margin: 0 auto 2rem;
}

.closing-title {
    font-family: 'Jost', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #80C060;
    text-shadow:
        0 0 30px rgba(128, 192, 96, 0.3),
        0 0 60px rgba(128, 192, 96, 0.15);
    margin-bottom: 1rem;
}

.closing-text {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.95rem;
    color: #8A9A8A;
    line-height: 1.7;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    #timeline-spine {
        left: 30px;
    }

    .timeline-entry {
        margin-left: 60px;
        max-width: calc(100% - 80px);
    }

    .timeline-marker {
        left: -38px;
    }

    .marker-line {
        width: 26px;
    }

    .timeline-card {
        padding: 1.25rem 1.5rem;
    }

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

@media (max-width: 480px) {
    #timeline-spine {
        left: 20px;
    }

    .timeline-entry {
        margin-left: 45px;
        max-width: calc(100% - 60px);
    }

    .timeline-marker {
        left: -30px;
    }

    .marker-line {
        width: 18px;
    }

    .timeline-card {
        padding: 1rem 1.25rem;
    }

    .marker-dot {
        width: 10px;
        height: 10px;
    }
}

/* --- Selection --- */
::selection {
    background: rgba(74, 138, 80, 0.3);
    color: #D0E8D0;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #0A1A10;
}

::-webkit-scrollbar-thumb {
    background: #2A4A30;
}

::-webkit-scrollbar-thumb:hover {
    background: #4A8A50;
}
