/* ===========================================
   reiwa.boo - Cyberpunk Urban Chronicle
   Palette (Muted-Vintage):
     Faded Ink:    #1A1A24 (background)
     Vintage Neon: #E88A6A (primary accent)
     Dusty Teal:   #5A8A8A (secondary accent)
     Aged Paper:   #D8C8B0 (text)
     Worn Gold:    #B8A060 (tertiary accent)
     Dark Panel:   #24242E (card surfaces)
   =========================================== */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: #1A1A24;
    color: #D8C8B0;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

/* --- Rain Overlay --- */
#rain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    background:
        repeating-linear-gradient(
            100deg,
            transparent,
            transparent 98px,
            rgba(138, 170, 190, 0.04) 98px,
            rgba(138, 170, 190, 0.04) 99px
        ),
        repeating-linear-gradient(
            95deg,
            transparent,
            transparent 147px,
            rgba(138, 170, 190, 0.03) 147px,
            rgba(138, 170, 190, 0.03) 148px
        ),
        repeating-linear-gradient(
            105deg,
            transparent,
            transparent 73px,
            rgba(138, 170, 190, 0.035) 73px,
            rgba(138, 170, 190, 0.035) 74px
        );
    animation: rainDrift 4s linear infinite;
}

@keyframes rainDrift {
    0% { background-position: 0 0, 0 0, 0 0; }
    100% { background-position: -30px 400px, -15px 350px, -45px 450px; }
}

/* --- Typography --- */
.section-title {
    font-family: 'Source Sans 3', sans-serif;
    font-size: clamp(2.5rem, 5vw, 5rem);
    font-weight: 800;
    color: #D8C8B0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
}

/* --- Sections --- */
.section {
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.section--short {
    min-height: 60vh;
}

.section-inner {
    width: 100%;
    max-width: 1200px;
    padding: 4rem 2rem;
    position: relative;
    z-index: 2;
}

/* --- Bounce-Enter Animation --- */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: translateY(60px) scale(0.95);
    }
    60% {
        opacity: 1;
        transform: translateY(-10px) scale(1.02);
    }
    80% {
        transform: translateY(4px) scale(0.99);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.bounce-enter {
    opacity: 0;
    transform: translateY(60px);
}

.bounce-enter.visible {
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

/* --- Neon Sign --- */
.neon-sign {
    display: inline-block;
    padding: 1.5rem 3rem;
    border: 2px solid #E88A6A;
    border-radius: 4px;
    position: relative;
    margin-bottom: 2rem;
}

.neon-text {
    font-family: 'Source Sans 3', sans-serif;
    font-size: clamp(3rem, 7vw, 6rem);
    font-weight: 800;
    color: #E88A6A;
    text-shadow:
        0 0 7px #E88A6A,
        0 0 20px rgba(232, 138, 106, 0.5),
        0 0 40px rgba(232, 138, 106, 0.25),
        0 0 80px rgba(232, 138, 106, 0.15);
    animation: neonPulse 3s ease-in-out infinite;
}

.neon-sign--small .neon-text {
    font-size: clamp(1.5rem, 4vw, 3rem);
}

.neon-sign--small {
    padding: 1rem 2rem;
}

@keyframes neonPulse {
    0%, 100% {
        text-shadow:
            0 0 7px #E88A6A,
            0 0 20px rgba(232, 138, 106, 0.5),
            0 0 40px rgba(232, 138, 106, 0.25),
            0 0 80px rgba(232, 138, 106, 0.15);
    }
    50% {
        text-shadow:
            0 0 4px #E88A6A,
            0 0 12px rgba(232, 138, 106, 0.35),
            0 0 25px rgba(232, 138, 106, 0.15),
            0 0 50px rgba(232, 138, 106, 0.08);
    }
}

.neon-sign::before,
.neon-sign::after {
    content: '';
    position: absolute;
    background: #E88A6A;
    border-radius: 50%;
}

.neon-sign::before {
    width: 6px;
    height: 6px;
    top: -3px;
    left: 20%;
    box-shadow: 0 0 6px #E88A6A, 0 0 15px rgba(232, 138, 106, 0.4);
}

.neon-sign::after {
    width: 6px;
    height: 6px;
    top: -3px;
    right: 20%;
    box-shadow: 0 0 6px #E88A6A, 0 0 15px rgba(232, 138, 106, 0.4);
}

/* --- Hero Section --- */
#hero {
    background: linear-gradient(180deg, #1A1A24 0%, #24242E 100%);
}

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

.hero-tagline {
    font-family: 'Inter', sans-serif;
    font-size: 1.15rem;
    color: #5A8A8A;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-top: 0.5rem;
}

/* Skyline Silhouette */
.skyline-silhouette {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background: #24242E;
    clip-path: polygon(
        0% 100%,
        0% 60%,
        3% 60%,
        3% 40%,
        6% 40%,
        6% 55%,
        9% 55%,
        9% 25%,
        12% 25%,
        12% 30%,
        14% 30%,
        14% 15%,
        17% 15%,
        17% 35%,
        20% 35%,
        20% 50%,
        23% 50%,
        23% 20%,
        26% 20%,
        26% 10%,
        29% 10%,
        29% 30%,
        32% 30%,
        32% 45%,
        35% 45%,
        35% 22%,
        38% 22%,
        38% 8%,
        41% 8%,
        41% 28%,
        44% 28%,
        44% 40%,
        47% 40%,
        47% 18%,
        50% 18%,
        50% 5%,
        53% 5%,
        53% 25%,
        56% 25%,
        56% 38%,
        59% 38%,
        59% 15%,
        62% 15%,
        62% 32%,
        65% 32%,
        65% 12%,
        68% 12%,
        68% 28%,
        71% 28%,
        71% 42%,
        74% 42%,
        74% 20%,
        77% 20%,
        77% 35%,
        80% 35%,
        80% 50%,
        83% 50%,
        83% 30%,
        86% 30%,
        86% 45%,
        89% 45%,
        89% 55%,
        92% 55%,
        92% 38%,
        95% 38%,
        95% 50%,
        98% 50%,
        98% 65%,
        100% 65%,
        100% 100%
    );
    z-index: 1;
}

.skyline-silhouette--bottom {
    top: 0;
    bottom: auto;
    transform: scaleY(-1);
    background: #1A1A24;
}

/* Building Facades */
.building-facade {
    position: absolute;
    bottom: 0;
    width: 120px;
    height: 70%;
    z-index: 1;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 18px,
            #24242E 18px,
            #24242E 20px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 14px,
            #24242E 14px,
            #24242E 16px
        );
    background-color: #1A1A24;
}

.building-facade--left {
    left: 2%;
    border-right: 3px solid #24242E;
}

.building-facade--left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 18px,
            rgba(232, 138, 106, 0.06) 18px,
            rgba(232, 138, 106, 0.06) 20px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 14px,
            rgba(232, 138, 106, 0.06) 14px,
            rgba(232, 138, 106, 0.06) 16px
        );
}

.building-facade--right {
    right: 2%;
    border-left: 3px solid #24242E;
}

.building-facade--right::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 18px,
            rgba(90, 138, 138, 0.06) 18px,
            rgba(90, 138, 138, 0.06) 20px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 14px,
            rgba(90, 138, 138, 0.06) 14px,
            rgba(90, 138, 138, 0.06) 16px
        );
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
}

.scroll-arrow {
    display: block;
    width: 20px;
    height: 20px;
    border-right: 2px solid #5A8A8A;
    border-bottom: 2px solid #5A8A8A;
    transform: rotate(45deg);
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: rotate(45deg) translateY(0); opacity: 0.5; }
    50% { transform: rotate(45deg) translateY(8px); opacity: 1; }
}

/* --- Chronicle Section --- */
#chronicle {
    background: #1A1A24;
}

.window-grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.04;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 28px,
            #D8C8B0 28px,
            #D8C8B0 30px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 22px,
            #D8C8B0 22px,
            #D8C8B0 24px
        );
    z-index: 0;
}

.chronicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.chronicle-card {
    background: #24242E;
    border-radius: 4px;
    padding: 2rem;
    position: relative;
    border: 1px solid rgba(232, 138, 106, 0.1);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.chronicle-card:hover {
    border-color: rgba(232, 138, 106, 0.3);
    box-shadow: 0 0 20px rgba(232, 138, 106, 0.08);
}

.card-neon-bar {
    width: 40px;
    height: 3px;
    background: #E88A6A;
    margin-bottom: 1.25rem;
    box-shadow: 0 0 8px rgba(232, 138, 106, 0.4);
}

.card-title {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #E88A6A;
    margin-bottom: 0.75rem;
}

.card-text {
    color: #D8C8B0;
    line-height: 1.7;
    font-size: 0.95rem;
}

/* --- Cityscape Section --- */
#cityscape {
    background: linear-gradient(180deg, #24242E 0%, #1A1A24 100%);
    position: relative;
}

.cityscape-buildings {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    padding: 0 5%;
    z-index: 1;
}

.building {
    background: #24242E;
    position: relative;
    flex-shrink: 0;
}

.building--1 { width: 60px; height: 55%; }
.building--2 { width: 80px; height: 75%; }
.building--3 { width: 100px; height: 90%; }
.building--4 { width: 70px; height: 65%; }
.building--5 { width: 55px; height: 50%; }

.building-windows {
    position: absolute;
    top: 10px;
    left: 5px;
    right: 5px;
    bottom: 10px;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 12px,
            rgba(26, 26, 36, 0.8) 12px,
            rgba(26, 26, 36, 0.8) 16px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 8px,
            rgba(26, 26, 36, 0.8) 8px,
            rgba(26, 26, 36, 0.8) 12px
        );
    background-color: rgba(232, 138, 106, 0.08);
}

.building--2 .building-windows {
    background-color: rgba(90, 138, 138, 0.08);
}

.building--3 .building-windows {
    background-color: rgba(184, 160, 96, 0.08);
}

.building--4 .building-windows {
    background-color: rgba(232, 138, 106, 0.06);
}

.cityscape-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 700px;
    padding: 2rem;
}

.cityscape-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #D8C8B0;
}

/* --- Dispatches Section --- */
#dispatches {
    background: #1A1A24;
}

.dispatch-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 2rem;
}

.dispatch {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2rem 0;
    border-bottom: 1px solid rgba(90, 138, 138, 0.15);
    position: relative;
}

.dispatch:last-child {
    border-bottom: none;
}

.dispatch-marker {
    width: 12px;
    height: 12px;
    min-width: 12px;
    border-radius: 50%;
    background: #5A8A8A;
    margin-top: 0.5rem;
    box-shadow: 0 0 10px rgba(90, 138, 138, 0.4);
    position: relative;
}

.dispatch-marker::after {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: calc(100% + 2rem);
    background: rgba(90, 138, 138, 0.15);
}

.dispatch:last-child .dispatch-marker::after {
    display: none;
}

.dispatch-content {
    flex: 1;
}

.dispatch-date {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: #B8A060;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.dispatch-title {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: #E88A6A;
    margin: 0.35rem 0 0.5rem;
}

.dispatch-excerpt {
    color: #D8C8B0;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* --- Transmission End / Footer --- */
#transmission-end {
    background: linear-gradient(180deg, #1A1A24 0%, #24242E 100%);
}

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

.footer-text {
    color: #5A8A8A;
    font-size: 1rem;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.footer-copy {
    color: rgba(216, 200, 176, 0.3);
    font-size: 0.8rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .building-facade {
        width: 60px;
    }

    .chronicle-grid {
        grid-template-columns: 1fr;
    }

    .neon-text {
        font-size: clamp(2rem, 10vw, 3.5rem);
    }

    .neon-sign {
        padding: 1rem 1.5rem;
    }

    .dispatch {
        gap: 1rem;
    }

    .section-inner {
        padding: 3rem 1.25rem;
    }

    .cityscape-buildings {
        padding: 0 2%;
    }

    .building--1 { width: 40px; }
    .building--2 { width: 55px; }
    .building--3 { width: 70px; }
    .building--4 { width: 50px; }
    .building--5 { width: 35px; }
}
