/* showa.boo - Ghost History of the Showa Era */
/* Colors: #1a1a2e (deep base), #6c757d (muted gray), #4a90d9 (primary blue), #f5f0e8 (warm off-white), #e8b84b (accent gold) */
/* Fonts: Inter (body), Staatliches (retro display headings) */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #1a1a2e;
    color: #f5f0e8;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ========================================
   HUD OVERLAY FRAME
   ======================================== */

#hud-frame {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.hud-corner {
    position: absolute;
    width: 40px;
    height: 40px;
    border-color: #e8b84b;
    border-style: solid;
    opacity: 0.6;
}

.hud-tl {
    top: 12px;
    left: 12px;
    border-width: 2px 0 0 2px;
}

.hud-tr {
    top: 12px;
    right: 12px;
    border-width: 2px 2px 0 0;
}

.hud-bl {
    bottom: 12px;
    left: 12px;
    border-width: 0 0 2px 2px;
}

.hud-br {
    bottom: 12px;
    right: 12px;
    border-width: 0 2px 2px 0;
}

.hud-bar {
    position: absolute;
    left: 60px;
    right: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Staatliches', cursive;
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #e8b84b;
    opacity: 0.7;
}

.hud-bar-top {
    top: 18px;
}

.hud-bar-bottom {
    bottom: 18px;
}

/* ========================================
   FISH LAYER
   ======================================== */

#fish-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
    overflow: hidden;
}

.fish {
    position: absolute;
    width: 80px;
    height: 40px;
    opacity: 0.25;
    filter: grayscale(100%);
    transition: filter 0.5s ease, opacity 0.5s ease;
}

.fish:hover {
    filter: grayscale(0%);
    opacity: 0.9;
    pointer-events: auto;
}

.fish.color-active {
    filter: grayscale(0%);
    opacity: 0.9;
}

.fish.color-active .fish-body {
    fill: #4a90d9;
}

.fish.color-active .fish-tail {
    fill: #e8b84b;
}

.fish-1 {
    top: 20%;
    left: -100px;
    animation: swimRight 25s linear infinite;
    animation-delay: 0s;
}

.fish-2 {
    top: 55%;
    right: -100px;
    transform: scaleX(-1);
    width: 60px;
    height: 30px;
    animation: swimLeft 30s linear infinite;
    animation-delay: 5s;
}

.fish-3 {
    top: 75%;
    left: -100px;
    width: 50px;
    height: 25px;
    animation: swimRight 35s linear infinite;
    animation-delay: 12s;
}

@keyframes swimRight {
    0% { transform: translateX(-120px) translateY(0px); }
    25% { transform: translateX(25vw) translateY(-20px); }
    50% { transform: translateX(50vw) translateY(10px); }
    75% { transform: translateX(75vw) translateY(-15px); }
    100% { transform: translateX(calc(100vw + 120px)) translateY(0px); }
}

@keyframes swimLeft {
    0% { transform: scaleX(-1) translateX(-120px) translateY(0px); }
    25% { transform: scaleX(-1) translateX(25vw) translateY(15px); }
    50% { transform: scaleX(-1) translateX(50vw) translateY(-10px); }
    75% { transform: scaleX(-1) translateX(75vw) translateY(20px); }
    100% { transform: scaleX(-1) translateX(calc(100vw + 120px)) translateY(0px); }
}

/* ========================================
   HERO SECTION
   ======================================== */

#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, #1a1a2e 0%, #0d0d1a 100%);
}

.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(245, 240, 232, 0.015) 2px,
        rgba(245, 240, 232, 0.015) 4px
    );
    pointer-events: none;
}

.noise-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    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.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    pointer-events: none;
}

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

.hero-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-bottom: 20px;
}

.title-kanji {
    font-family: 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 300;
    letter-spacing: 20px;
    color: #6c757d;
    opacity: 0.7;
}

.title-main {
    font-family: 'Staatliches', cursive;
    font-size: clamp(72px, 14vw, 160px);
    letter-spacing: 15px;
    line-height: 1;
    color: #f5f0e8;
    text-shadow: 0 0 60px rgba(74, 144, 217, 0.2);
}

.title-sub {
    font-family: 'Staatliches', cursive;
    font-size: clamp(36px, 7vw, 80px);
    letter-spacing: 10px;
    color: #e8b84b;
    line-height: 1;
}

.hero-tagline {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: #6c757d;
    margin-bottom: 40px;
}

.hero-line-art {
    width: 300px;
    margin: 0 auto 60px;
}

.line-illustration {
    width: 100%;
    height: auto;
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    animation: fadeInUp 2s ease infinite alternate;
}

.scroll-indicator span {
    font-family: 'Staatliches', cursive;
    font-size: 11px;
    letter-spacing: 4px;
    color: #6c757d;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 1px solid #e8b84b;
    border-bottom: 1px solid #e8b84b;
    transform: rotate(45deg);
    animation: bounceDown 1.5s ease infinite;
}

@keyframes fadeInUp {
    from { opacity: 0.4; }
    to { opacity: 1; }
}

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

/* ========================================
   SECTION HEADERS (HUD PANELS)
   ======================================== */

.section-header {
    padding: 80px 40px 40px;
}

.hud-panel {
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid rgba(232, 184, 75, 0.3);
    padding: 15px 25px;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}

.hud-panel::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    width: 12px;
    height: 12px;
    border-top: 2px solid #e8b84b;
    border-left: 2px solid #e8b84b;
}

.hud-panel::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 12px;
    height: 12px;
    border-bottom: 2px solid #e8b84b;
    border-right: 2px solid #e8b84b;
}

.panel-marker {
    font-family: 'Staatliches', cursive;
    font-size: 36px;
    color: #e8b84b;
    line-height: 1;
}

.section-title {
    font-family: 'Staatliches', cursive;
    font-size: clamp(24px, 4vw, 36px);
    letter-spacing: 5px;
    color: #f5f0e8;
    flex: 1;
}

.panel-years {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    letter-spacing: 3px;
    color: #6c757d;
    text-transform: uppercase;
}

/* ========================================
   TIMELINE SECTION
   ======================================== */

#timeline {
    padding-bottom: 100px;
}

.timeline-track {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, transparent, #6c757d 10%, #6c757d 90%, transparent);
    transform: translateX(-50%);
}

.timeline-entry {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.timeline-entry:nth-child(even) {
    flex-direction: row-reverse;
}

.entry-year {
    font-family: 'Staatliches', cursive;
    font-size: 48px;
    color: #e8b84b;
    width: 50%;
    text-align: right;
    padding-right: 40px;
    line-height: 1;
}

.timeline-entry:nth-child(even) .entry-year {
    text-align: left;
    padding-right: 0;
    padding-left: 40px;
}

.entry-content {
    width: 50%;
    padding-left: 40px;
}

.timeline-entry:nth-child(even) .entry-content {
    padding-left: 0;
    padding-right: 40px;
    text-align: right;
}

.entry-content h3 {
    font-family: 'Staatliches', cursive;
    font-size: 20px;
    letter-spacing: 3px;
    color: #f5f0e8;
    margin-bottom: 8px;
}

.entry-content p {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 300;
    color: #6c757d;
    line-height: 1.7;
}

.entry-dot {
    position: absolute;
    left: 50%;
    top: 8px;
    width: 12px;
    height: 12px;
    background: #1a1a2e;
    border: 2px solid #e8b84b;
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 2;
    transition: background 0.3s ease;
}

.timeline-entry.visible .entry-dot {
    background: #e8b84b;
    box-shadow: 0 0 15px rgba(232, 184, 75, 0.4);
}

/* ========================================
   CARD FLIP GALLERY
   ======================================== */

#gallery {
    padding-bottom: 100px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 40px;
    perspective: 1200px;
}

.flip-card {
    height: 320px;
    cursor: pointer;
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border: 1px solid rgba(108, 117, 125, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
}

.flip-card-front {
    background: linear-gradient(145deg, rgba(26, 26, 46, 0.95), rgba(13, 13, 26, 0.95));
}

.flip-card-front::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(to right, transparent, #e8b84b, transparent);
    opacity: 0.5;
}

.flip-card-back {
    background: linear-gradient(145deg, #1a1a2e, #0d0d1a);
    border-color: #e8b84b;
    transform: rotateY(180deg);
    gap: 15px;
}

.card-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
}

.card-icon svg {
    width: 100%;
    height: 100%;
}

.card-title {
    font-family: 'Staatliches', cursive;
    font-size: 22px;
    letter-spacing: 3px;
    color: #f5f0e8;
    margin-bottom: 8px;
}

.card-hint {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    letter-spacing: 3px;
    color: #6c757d;
    text-transform: uppercase;
}

.flip-card-back h3 {
    font-family: 'Staatliches', cursive;
    font-size: 24px;
    letter-spacing: 3px;
    color: #e8b84b;
}

.flip-card-back p {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 300;
    color: #f5f0e8;
    line-height: 1.7;
    opacity: 0.85;
}

.card-tag {
    font-family: 'Staatliches', cursive;
    font-size: 14px;
    letter-spacing: 3px;
    color: #4a90d9;
    padding: 5px 15px;
    border: 1px solid rgba(74, 144, 217, 0.3);
}

/* ========================================
   SCENES SECTION
   ======================================== */

#scenes {
    padding-bottom: 100px;
}

.scenes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 40px;
}

.scene-panel {
    border: 1px solid rgba(108, 117, 125, 0.2);
    padding: 30px;
    text-align: center;
    background: rgba(26, 26, 46, 0.5);
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.scene-panel.visible {
    opacity: 1;
    transform: translateY(0);
}

.scene-panel:hover {
    border-color: rgba(232, 184, 75, 0.5);
    box-shadow: 0 0 30px rgba(232, 184, 75, 0.05);
}

.scene-illustration {
    width: 100%;
    max-width: 280px;
    height: auto;
    margin-bottom: 20px;
}

.scene-label {
    font-family: 'Staatliches', cursive;
    font-size: 16px;
    letter-spacing: 4px;
    color: #6c757d;
    text-transform: uppercase;
}

/* ========================================
   INFO SECTION
   ======================================== */

#info {
    padding-bottom: 100px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 40px;
}

.info-block {
    text-align: center;
    padding: 50px 30px;
    border: 1px solid rgba(108, 117, 125, 0.15);
    background: rgba(26, 26, 46, 0.3);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.info-block.visible {
    opacity: 1;
    transform: translateY(0);
}

.info-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: #e8b84b;
}

.info-number {
    font-family: 'Staatliches', cursive;
    font-size: 64px;
    color: #f5f0e8;
    line-height: 1;
    margin-bottom: 15px;
}

.info-label {
    font-family: 'Staatliches', cursive;
    font-size: 16px;
    letter-spacing: 4px;
    color: #e8b84b;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.info-detail {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 300;
    color: #6c757d;
    line-height: 1.7;
}

/* ========================================
   FOOTER
   ======================================== */

#footer {
    padding: 60px 40px;
    border-top: 1px solid rgba(108, 117, 125, 0.15);
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
}

.footer-title {
    font-family: 'Staatliches', cursive;
    font-size: 28px;
    letter-spacing: 8px;
    color: #f5f0e8;
}

.footer-tagline {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    letter-spacing: 5px;
    color: #6c757d;
    text-transform: uppercase;
}

.footer-line {
    margin-bottom: 30px;
}

.footer-line svg {
    width: 100%;
    max-width: 600px;
    height: auto;
}

.footer-meta {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-meta span {
    font-family: 'Staatliches', cursive;
    font-size: 11px;
    letter-spacing: 3px;
    color: #6c757d;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0 20px;
    }

    .flip-card {
        height: 280px;
    }

    .scenes-grid {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }

    .info-grid {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }

    .timeline-line {
        left: 20px;
    }

    .timeline-entry,
    .timeline-entry:nth-child(even) {
        flex-direction: column;
        padding-left: 50px;
    }

    .entry-year,
    .timeline-entry:nth-child(even) .entry-year {
        width: 100%;
        text-align: left;
        padding: 0;
        font-size: 36px;
        margin-bottom: 8px;
    }

    .entry-content,
    .timeline-entry:nth-child(even) .entry-content {
        width: 100%;
        padding: 0;
        text-align: left;
    }

    .entry-dot {
        left: 20px;
    }

    .hud-bar {
        left: 20px;
        right: 20px;
        font-size: 9px;
    }

    .section-header {
        padding: 60px 20px 30px;
    }

    .hud-panel {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 18px;
    }

    .footer-meta {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .card-grid {
        grid-template-columns: 1fr;
    }

    .title-main {
        letter-spacing: 8px;
    }

    .title-sub {
        letter-spacing: 5px;
    }
}
