/* ============================================
   daitoua.com - Holographic Archive Styles
   Colors: #0D0509 #1A0A12 #2D1420 #4ECDC4 #4FD1C5 #7A5C4A #8B2F4F #C47DFF #C4A68A #E8D5C4 #F0E2D0 #FF6B9D
   Fonts: Space Grotesk, Inter
   ============================================ */

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

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

body {
    font-family: 'Inter', sans-serif;
    background-color: #0D0509;
    color: #E8D5C4;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ---- SVG Filters (hidden) ---- */
.svg-filters {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* ---- Holographic Overlay ---- */
.holographic-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(196, 125, 255, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(78, 205, 196, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(255, 107, 157, 0.05) 0%, transparent 50%);
    mix-blend-mode: screen;
    animation: holographicShift 20s ease-in-out infinite;
}

@keyframes holographicShift {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    33% { opacity: 0.8; transform: scale(1.05); }
    66% { opacity: 0.5; transform: scale(0.98); }
}

/* ---- Particle Canvas ---- */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 2;
    opacity: 0.4;
}

/* ---- Archive Container ---- */
.archive-container {
    position: relative;
    z-index: 3;
    perspective: 1200px;
    width: 100%;
}

/* ---- Sections ---- */
.archive-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 10vh 5vw;
}

.section-inner {
    max-width: 900px;
    width: 100%;
    position: relative;
}

.asymmetric-left {
    margin-left: 5vw;
    margin-right: 15vw;
}

.asymmetric-right {
    margin-left: 15vw;
    margin-right: 5vw;
}

/* ---- Hero Section ---- */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-section .section-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.era-marker {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 40px;
}

.era-line {
    display: block;
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #C47DFF, transparent);
}

.era-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 0.3em;
    color: #C47DFF;
    text-shadow: 0 0 20px rgba(196, 125, 255, 0.5);
}

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    line-height: 1.0;
    margin-bottom: 30px;
    transform-style: preserve-3d;
    transition: transform 0.15s ease-out;
}

.title-line {
    display: block;
    font-size: clamp(64px, 12vw, 128px);
    letter-spacing: 0.12em;
    color: #E8D5C4;
    text-shadow:
        0 0 40px rgba(196, 125, 255, 0.3),
        0 0 80px rgba(255, 107, 157, 0.15);
    background: linear-gradient(135deg, #E8D5C4, #C47DFF, #FF6B9D, #4ECDC4);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: holographicText 8s ease-in-out infinite;
}

@keyframes holographicText {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.title-sub {
    display: block;
    font-size: clamp(24px, 4vw, 48px);
    letter-spacing: 0.3em;
    color: #C47DFF;
    text-shadow: 0 0 30px rgba(196, 125, 255, 0.4);
    margin-top: 8px;
}

.hero-tagline {
    font-family: 'Inter', sans-serif;
    font-size: clamp(14px, 1.5vw, 18px);
    font-weight: 300;
    color: #C4A68A;
    letter-spacing: 0.08em;
    max-width: 500px;
    line-height: 1.6;
    margin-bottom: 60px;
    opacity: 0.8;
}

/* ---- Scroll Indicator ---- */
.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    animation: scrollPulse 2s ease-in-out infinite;
}

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

.scroll-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    letter-spacing: 0.25em;
    color: #7A5C4A;
}

.scroll-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.scroll-arrow span {
    display: block;
    width: 12px;
    height: 12px;
    border-right: 1px solid #C47DFF;
    border-bottom: 1px solid #C47DFF;
    transform: rotate(45deg);
    opacity: 0.4;
}

.scroll-arrow span:nth-child(1) { animation: scrollArrowAnim 1.5s ease-in-out infinite 0s; }
.scroll-arrow span:nth-child(2) { animation: scrollArrowAnim 1.5s ease-in-out infinite 0.15s; }
.scroll-arrow span:nth-child(3) { animation: scrollArrowAnim 1.5s ease-in-out infinite 0.3s; }

@keyframes scrollArrowAnim {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.8; }
}

/* ---- Era Header ---- */
.era-header {
    margin-bottom: 60px;
    position: relative;
}

.year-marker {
    display: inline-block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(48px, 8vw, 96px);
    font-weight: 500;
    letter-spacing: 0.12em;
    color: #E8D5C4;
    line-height: 1.0;
    text-transform: uppercase;
    transform-style: preserve-3d;
    transition: transform 0.15s ease-out;
    text-shadow:
        0 0 60px rgba(196, 125, 255, 0.2),
        0 0 120px rgba(255, 107, 157, 0.1);
}

.era-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(14px, 2vw, 20px);
    font-weight: 400;
    letter-spacing: 0.25em;
    color: #C47DFF;
    margin-top: 12px;
    text-shadow: 0 0 20px rgba(196, 125, 255, 0.3);
}

.holographic-border {
    margin-top: 20px;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent,
        #C47DFF,
        #4ECDC4,
        #FF6B9D,
        #C47DFF,
        transparent
    );
    background-size: 200% 100%;
    animation: borderShimmer 4s linear infinite;
    opacity: 0.6;
}

@keyframes borderShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ---- Content Cards ---- */
.content-card {
    position: relative;
    margin-bottom: 40px;
    transform-style: preserve-3d;
    transition: transform 0.15s ease-out;
    cursor: default;
}

.card-glow {
    position: absolute;
    inset: -1px;
    border-radius: 4px;
    background: linear-gradient(
        135deg,
        rgba(196, 125, 255, 0.3),
        rgba(78, 205, 196, 0.2),
        rgba(255, 107, 157, 0.3),
        rgba(196, 125, 255, 0.2)
    );
    background-size: 300% 300%;
    animation: cardGlow 6s ease-in-out infinite;
    opacity: 0.5;
    z-index: -1;
    filter: blur(1px);
}

@keyframes cardGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.card-content {
    background: linear-gradient(
        145deg,
        rgba(45, 20, 32, 0.85),
        rgba(26, 10, 18, 0.95)
    );
    border: 1px solid rgba(196, 125, 255, 0.15);
    border-radius: 4px;
    padding: 40px;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.card-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(196, 125, 255, 0.4), rgba(78, 205, 196, 0.3), transparent);
}

.card-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(196, 125, 255, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(78, 205, 196, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

.content-card:hover .card-glow {
    opacity: 0.8;
}

.content-card:hover .card-content {
    border-color: rgba(196, 125, 255, 0.3);
}

.card-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: 500;
    letter-spacing: 0.06em;
    color: #F0E2D0;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.card-text {
    font-family: 'Inter', sans-serif;
    font-size: clamp(14px, 1.2vw, 16px);
    font-weight: 300;
    line-height: 1.8;
    color: #C4A68A;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.card-metadata {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid rgba(122, 92, 74, 0.3);
    position: relative;
    z-index: 1;
}

.metadata-tag {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 10px;
    letter-spacing: 0.2em;
    color: #FF6B9D;
    padding: 4px 12px;
    border: 1px solid rgba(255, 107, 157, 0.3);
    border-radius: 2px;
    text-shadow: 0 0 10px rgba(255, 107, 157, 0.3);
}

.metadata-ref {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 10px;
    letter-spacing: 0.15em;
    color: #7A5C4A;
}

/* ---- Epilogue Section ---- */
.epilogue-section .section-inner {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.epilogue-content {
    max-width: 600px;
    transform-style: preserve-3d;
    transition: transform 0.15s ease-out;
}

.epilogue-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 500;
    letter-spacing: 0.15em;
    color: #E8D5C4;
    margin-bottom: 24px;
    text-shadow: 0 0 40px rgba(196, 125, 255, 0.2);
}

.epilogue-text {
    font-family: 'Inter', sans-serif;
    font-size: clamp(14px, 1.2vw, 16px);
    font-weight: 300;
    line-height: 1.8;
    color: #C4A68A;
    margin-bottom: 48px;
    opacity: 0.8;
}

.archive-stamp {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px 40px;
    border: 1px solid rgba(139, 47, 79, 0.5);
    position: relative;
}

.archive-stamp::before {
    content: '';
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(139, 47, 79, 0.3);
}

.stamp-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    letter-spacing: 0.3em;
    color: #8B2F4F;
    text-shadow: 0 0 15px rgba(139, 47, 79, 0.4);
}

.stamp-date {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    letter-spacing: 0.2em;
    color: #7A5C4A;
}

/* ---- Scroll Reveal Animation ---- */
.era-section .era-header,
.era-section .content-card {
    opacity: 0;
    transform: translateY(40px) translateZ(-30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.era-section.is-visible .era-header {
    opacity: 1;
    transform: translateY(0) translateZ(0);
}

.era-section.is-visible .content-card {
    opacity: 1;
    transform: translateY(0) translateZ(0);
}

.era-section.is-visible .content-card:nth-child(2) {
    transition-delay: 0.15s;
}

.era-section.is-visible .content-card:nth-child(3) {
    transition-delay: 0.3s;
}

.era-section.is-visible .content-card:nth-child(4) {
    transition-delay: 0.45s;
}

.epilogue-section .epilogue-content {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.epilogue-section.is-visible .epilogue-content {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Era-specific accent colors ---- */
[data-era="meiji"] .holographic-border {
    background: linear-gradient(90deg, transparent, #C4A68A, #E8D5C4, #C4A68A, transparent);
    background-size: 200% 100%;
    animation: borderShimmer 4s linear infinite;
}

[data-era="taisho"] .holographic-border {
    background: linear-gradient(90deg, transparent, #C47DFF, #FF6B9D, #C47DFF, transparent);
    background-size: 200% 100%;
    animation: borderShimmer 4s linear infinite;
}

[data-era="early-showa"] .holographic-border {
    background: linear-gradient(90deg, transparent, #FF6B9D, #8B2F4F, #FF6B9D, transparent);
    background-size: 200% 100%;
    animation: borderShimmer 4s linear infinite;
}

[data-era="pacific-war"] .holographic-border {
    background: linear-gradient(90deg, transparent, #4ECDC4, #C47DFF, #4ECDC4, transparent);
    background-size: 200% 100%;
    animation: borderShimmer 4s linear infinite;
}

/* ---- Scanline Effect ---- */
.archive-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(13, 5, 9, 0.03) 2px,
        rgba(13, 5, 9, 0.03) 4px
    );
    pointer-events: none;
    z-index: 100;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .archive-section {
        padding: 8vh 6vw;
    }

    .asymmetric-left,
    .asymmetric-right {
        margin-left: 4vw;
        margin-right: 4vw;
    }

    .card-content {
        padding: 24px;
    }

    .era-marker {
        gap: 16px;
    }

    .era-line {
        width: 40px;
    }

    .card-metadata {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .hero-tagline {
        padding: 0 16px;
    }

    .card-content {
        padding: 20px;
    }
}
