/* showa.boo - Retro Showa Era Haunted History */
/* Palette: #f2e8d5 #2a1f14 #8b7355 #c4956a #4a7a3a #1a1a1a #e8e0d0 #a83232 */

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

html {
    background-color: #f2e8d5;
}

body {
    font-family: 'Zen Kaku Gothic New', 'Source Sans 3', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.8;
    color: #2a1f14;
    background-color: #f2e8d5;
    overflow-x: hidden;
}

/* ===== Newspaper Section ===== */
#newspaper {
    min-height: 100vh;
    padding: 40px 5vw;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

#newspaper-inner {
    max-width: 900px;
    width: 100%;
    transform: rotate(-1deg);
    background: #f2e8d5;
    padding: 40px;
    border: 1px solid #8b7355;
    position: relative;
    clip-path: polygon(0 0, 100% 0, 100% 95%, 97% 97%, 93% 94%, 88% 98%, 82% 95%, 76% 97%, 70% 94%, 64% 98%, 57% 95%, 50% 97%, 43% 94%, 36% 98%, 30% 95%, 23% 97%, 17% 94%, 10% 98%, 5% 95%, 0 97%);
}

.newspaper-header {
    text-align: center;
    border-bottom: 2px solid #2a1f14;
    padding-bottom: 24px;
    margin-bottom: 32px;
    position: relative;
}

.paper-date {
    font-family: 'Shippori Mincho', serif;
    font-size: 14px;
    color: #8b7355;
    margin-bottom: 8px;
}

.headline-vertical {
    font-family: 'Shippori Mincho', serif;
    font-weight: 700;
    font-size: 48px;
    color: #2a1f14;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    display: inline-block;
    height: 250px;
    margin: 16px auto;
}

.paper-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 24px;
    color: #2a1f14;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.newspaper-columns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
}

.news-col {
    border-right: 1px solid #8b7355;
    padding-right: 20px;
}

.news-col:last-child {
    border-right: none;
    padding-right: 0;
}

.col-headline {
    font-family: 'Shippori Mincho', serif;
    font-weight: 700;
    font-size: 20px;
    color: #2a1f14;
    margin-bottom: 12px;
}

.news-text {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-size: 14px;
    line-height: 1.9;
    color: #2a1f14;
}

.photo-col {
    border-right: none;
}

.halftone-photo {
    width: 100%;
    aspect-ratio: 4/3;
    background: #c4956a;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.halftone-photo::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, #2a1f14 1px, transparent 1px);
    background-size: 4px 4px;
    opacity: 0.3;
    pointer-events: none;
}

.photo-text {
    font-family: 'Shippori Mincho', serif;
    font-size: 14px;
    color: #2a1f14;
    opacity: 0.7;
}

/* ===== Hanko Seal ===== */
.hanko-seal {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #a83232;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    bottom: 60px;
    right: 40px;
}

.hanko-char {
    font-family: 'Shippori Mincho', serif;
    font-weight: 700;
    font-size: 22px;
    color: #f2e8d5;
}

/* ===== CRT Television ===== */
#television {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 5vw;
    background: #2a1f14;
}

.crt-frame {
    width: 600px;
    max-width: 90vw;
    aspect-ratio: 4/3;
    border: 20px solid #2a1f14;
    border-radius: 50% / 10%;
    background: #1a1a1a;
    position: relative;
    box-shadow: 0 0 40px rgba(74, 122, 58, 0.15), inset 0 0 30px rgba(74, 122, 58, 0.1);
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.crt-frame.visible {
    opacity: 1;
}

.crt-screen {
    width: 100%;
    height: 100%;
    border-radius: 40% / 8%;
    overflow: hidden;
    position: relative;
    background: #1a1a1a;
    filter: contrast(1.1) brightness(0.95);
}

.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        transparent,
        transparent 1px,
        rgba(0, 0, 0, 0.08) 1px,
        rgba(0, 0, 0, 0.08) 2px
    );
    pointer-events: none;
    z-index: 2;
}

.crt-content {
    padding: 40px 32px;
    text-align: center;
    color: #c4956a;
}

.crt-title {
    font-family: 'DotGothic16', monospace;
    font-size: 24px;
    color: #4a7a3a;
    margin-bottom: 24px;
    text-shadow: 0 0 8px rgba(74, 122, 58, 0.4);
}

.crt-text {
    font-family: 'DotGothic16', monospace;
    font-size: 16px;
    color: #c4956a;
    line-height: 2;
    min-height: 80px;
    text-align: left;
}

.crt-subtitle {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    color: #8b7355;
    margin-top: 24px;
}

/* ===== Manga Section ===== */
#manga {
    padding: 60px 5vw;
    background: #f2e8d5;
}

.manga-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 0;
    max-width: 900px;
    margin: 0 auto;
}

.manga-panel {
    border: 3px solid #1a1a1a;
    padding: 24px;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.manga-panel.visible {
    opacity: 1;
}

.panel-1 {
    grid-column: 3 / 4;
    grid-row: 1 / 2;
}

.panel-2 {
    grid-column: 1 / 3;
    grid-row: 1 / 2;
    min-height: 250px;
}

.panel-3 {
    grid-column: 2 / 4;
    grid-row: 2 / 3;
}

.panel-4 {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
}

.panel-5 {
    grid-column: 1 / 4;
    grid-row: 3 / 4;
    text-align: center;
    padding: 32px;
}

.panel-content {
    position: relative;
    z-index: 2;
}

.panel-title {
    font-family: 'Shippori Mincho', serif;
    font-weight: 700;
    font-size: 24px;
    color: #2a1f14;
    margin-bottom: 12px;
}

.panel-text {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-size: 15px;
    line-height: 1.8;
    color: #2a1f14;
}

.panel-impact {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 48px;
    color: #2a1f14;
    text-align: center;
    position: relative;
    z-index: 2;
}

.panel-whisper {
    font-family: 'Shippori Mincho', serif;
    font-size: 18px;
    color: #8b7355;
    font-style: italic;
}

/* Speed Lines */
.speed-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.speed-lines svg {
    width: 100%;
    height: 100%;
}

.speed-line {
    stroke: #1a1a1a;
    stroke-width: 0.5;
    stroke-opacity: 0.4;
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    transition: stroke-dashoffset 0.8s ease;
}

.manga-panel.visible .speed-line {
    stroke-dashoffset: 0;
}

/* ===== Ghost Section ===== */
#ghost {
    min-height: 100vh;
    background: #e8e0d0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ghost-echoes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.echo {
    position: absolute;
    opacity: 0.12;
}

.echo-headline {
    font-family: 'Shippori Mincho', serif;
    font-weight: 700;
    font-size: 60px;
    color: #2a1f14;
    top: 15%;
    left: 10%;
    transform: rotate(-5deg);
}

.echo-crt {
    font-family: 'DotGothic16', monospace;
    font-size: 36px;
    color: #4a7a3a;
    top: 40%;
    right: 15%;
}

.echo-manga {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 72px;
    color: #1a1a1a;
    bottom: 25%;
    left: 20%;
    transform: rotate(3deg);
}

.echo-date {
    font-family: 'Shippori Mincho', serif;
    font-size: 24px;
    color: #8b7355;
    top: 60%;
    left: 60%;
}

#ghost-center {
    position: relative;
    z-index: 2;
    text-align: center;
}

#ghost-title {
    font-family: 'Shippori Mincho', serif;
    font-weight: 700;
    font-size: clamp(48px, 10vw, 96px);
    color: #2a1f14;
    animation: ghostPulse 3s ease-in-out infinite;
}

@keyframes ghostPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.hanko-ghost {
    position: absolute;
    bottom: 60px;
    right: 60px;
    animation: hankoRotate 10s linear infinite;
}

@keyframes hankoRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    .crt-frame {
        opacity: 1;
        transition: none;
    }

    .manga-panel {
        opacity: 1;
        transition: none;
    }

    .speed-line {
        stroke-dashoffset: 0;
        transition: none;
    }

    #ghost-title {
        animation: none;
        opacity: 1;
    }

    .hanko-ghost {
        animation: none;
    }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .newspaper-columns {
        grid-template-columns: 1fr;
    }

    .news-col {
        border-right: none;
        border-bottom: 1px solid #8b7355;
        padding-right: 0;
        padding-bottom: 16px;
        margin-bottom: 16px;
    }

    .headline-vertical {
        font-size: 36px;
        height: 180px;
    }

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

    .panel-1, .panel-2, .panel-3, .panel-4, .panel-5 {
        grid-column: 1;
        grid-row: auto;
    }

    .crt-frame {
        border-width: 12px;
    }
}
