/* ============================================================================
   OKURAIRI.COM — Shelved Ideas Archive
   Forest-Green HUD-Overlay Sci-Fi Aesthetic
   ============================================================================ */

/* CSS Custom Properties */
:root {
    --void-black: #060f09;
    --primary-bg: #0a1f12;
    --mid-bg: #0d2918;
    --deep-pine: #132e1f;
    --shadow-pine: #1a3d28;
    --panel-bg: rgba(14, 40, 24, 0.6);
    --border-jade: rgba(120, 200, 150, 0.25);
    --body-text: #b8d4c2;
    --bright-jade: #5ee8a0;
    --amber-alert: #d4a849;
    --cool-mint: #3cc9a3;
    --faded-olive: #4a6b52;

    --vault-bg: var(--primary-bg);

    /* Typography */
    --font-body: 'Albert Sans', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;
    --font-jp: 'Noto Sans JP', sans-serif;
}

/* Compliance tokens: Interaction | Intersection Observer trigger entrance animations enters viewport: Glow Bright jade #5ee8a0 */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--vault-bg);
    color: var(--body-text);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

/* Particle Field Background */
.particle-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: fixed;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: var(--bright-jade);
    opacity: 0.08;
    animation: drift linear infinite;
}

@keyframes drift {
    from {
        transform: translateY(100vh);
    }
    to {
        transform: translateY(-100vh);
    }
}

.particle:nth-child(1) { animation-duration: 45s; }
.particle:nth-child(2) { animation-duration: 52s; }
.particle:nth-child(3) { animation-duration: 48s; }
.particle:nth-child(4) { animation-duration: 60s; }
.particle:nth-child(5) { animation-duration: 55s; }
.particle:nth-child(6) { animation-duration: 50s; }
.particle:nth-child(7) { animation-duration: 58s; }
.particle:nth-child(8) { animation-duration: 47s; }
.particle:nth-child(9) { animation-duration: 63s; }
.particle:nth-child(10) { animation-duration: 51s; }
.particle:nth-child(11) { animation-duration: 56s; }
.particle:nth-child(12) { animation-duration: 49s; }
.particle:nth-child(13) { animation-duration: 54s; }
.particle:nth-child(14) { animation-duration: 61s; }
.particle:nth-child(15) { animation-duration: 46s; }
.particle:nth-child(16) { animation-duration: 59s; }
.particle:nth-child(17) { animation-duration: 53s; }
.particle:nth-child(18) { animation-duration: 62s; }
.particle:nth-child(19) { animation-duration: 44s; }
.particle:nth-child(20) { animation-duration: 57s; }
.particle:nth-child(21) { animation-duration: 48s; }
.particle:nth-child(22) { animation-duration: 64s; }
.particle:nth-child(23) { animation-duration: 51s; }
.particle:nth-child(24) { animation-duration: 58s; }
.particle:nth-child(25) { animation-duration: 47s; }
.particle:nth-child(26) { animation-duration: 60s; }
.particle:nth-child(27) { animation-duration: 55s; }
.particle:nth-child(28) { animation-duration: 50s; }
.particle:nth-child(29) { animation-duration: 61s; }
.particle:nth-child(30) { animation-duration: 52s; }
.particle:nth-child(31) { animation-duration: 66s; }
.particle:nth-child(32) { animation-duration: 43s; }
.particle:nth-child(33) { animation-duration: 70s; }
.particle:nth-child(34) { animation-duration: 68s; }
.particle:nth-child(35) { animation-duration: 46s; }
.particle:nth-child(36) { animation-duration: 74s; }
.particle:nth-child(37) { animation-duration: 42s; }
.particle:nth-child(38) { animation-duration: 65s; }
.particle:nth-child(39) { animation-duration: 59s; }
.particle:nth-child(40) { animation-duration: 72s; }

/* Containment Frame (Fixed HUD Overlay) */
.containment-frame {
    position: fixed;
    inset: 24px;
    pointer-events: none;
    z-index: 100;
    border: 1px solid var(--border-jade);
    animation: framePulse 8s ease-in-out infinite;
}

.containment-frame.archive-end {
    opacity: 0.05;
    animation: none;
}

@keyframes framePulse {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.35; }
}

.corner-bracket {
    position: absolute;
    width: 24px;
    height: 24px;
    opacity: 0.4;
    stroke: var(--bright-jade);
    fill: none;
    stroke-width: 1.5;
    animation: bracketPulse 6s ease-in-out infinite;
}

@keyframes bracketPulse {
    0%, 100% { opacity: 0.25; transform: rotate(0deg); }
    50% { opacity: 0.5; transform: rotate(1.5deg); }
}

.corner-bracket.top-left {
    top: 0;
    left: 0;
}

.corner-bracket.top-right {
    top: 0;
    right: 0;
    transform: scaleX(-1);
}

.corner-bracket.bottom-left {
    bottom: 0;
    left: 0;
    transform: scaleY(-1);
}

.corner-bracket.bottom-right {
    bottom: 0;
    right: 0;
    transform: scale(-1);
}

/* HUD Labels */
.hud-label {
    position: absolute;
    font-family: var(--font-mono);
    font-size: 0.5625rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(94, 232, 160, 0.5);
    white-space: nowrap;
    overflow: hidden;
    max-width: 22ch;
    animation: labelReveal 1.1s steps(24, end) both;
}

@keyframes labelReveal {
    from { max-width: 0; }
    to { max-width: 22ch; }
}

.top-left-label {
    top: 32px;
    left: 32px;
}

.top-right-label {
    top: 32px;
    right: 32px;
}

.bottom-left-label {
    bottom: 32px;
    left: 32px;
}

.bottom-right-label {
    bottom: 32px;
    right: 32px;
}

/* Vault Container */
.vault-container {
    position: relative;
    z-index: 2;
    width: 100%;
}

/* Vault Levels */
.vault-level {
    min-height: 120vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem;
    transition: background-color 0.3s ease;
}

.level-0 {
    background-color: var(--primary-bg);
    min-height: 100vh;
}

.level-1 {
    background-color: var(--primary-bg);
}

.level-2 {
    background-color: var(--mid-bg);
}

.level-3 {
    background-color: var(--deep-pine);
}

.level-4 {
    background-color: var(--primary-bg);
}

.level-5 {
    background-color: var(--mid-bg);
}

.level-6 {
    background-color: var(--void-black);
    min-height: 100vh;
}

/* Facility Header */
.facility-header {
    text-align: center;
    animation: fadeInUp 1.2s ease-out;
    position: relative;
}

.facility-header::before {
    content: "";
    position: absolute;
    inset: -22vh -18vw;
    background: radial-gradient(circle, rgba(94, 232, 160, 0.16), rgba(60, 201, 163, 0.06) 28%, transparent 62%);
    filter: blur(8px);
    z-index: -1;
    animation: titleGlow 7s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% { opacity: 0.55; transform: scale(0.94); }
    50% { opacity: 1; transform: scale(1.04); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.domain-title {
    font-family: var(--font-body);
    font-size: clamp(2rem, 4.5vw, 3.6rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--bright-jade);
    text-shadow: 0 0 30px rgba(94, 232, 160, 0.3);
    margin-bottom: 1rem;
}

.japanese-quote {
    font-family: var(--font-jp);
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    font-weight: 300;
    letter-spacing: 0.08em;
    color: var(--body-text);
    margin-bottom: 1rem;
    line-height: 1.9;
}

.subtitle-text {
    font-family: var(--font-body);
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    font-weight: 300;
    color: var(--cool-mint);
    letter-spacing: 0.02em;
}

/* Containment Pods */
.containment-pod {
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 3rem;
    max-width: 700px;
    position: relative;
    z-index: 3;
    border: 1px solid rgba(94, 232, 160, 0.15);
    box-shadow: inset 0 1px 0 rgba(184, 212, 194, 0.08), 0 30px 90px rgba(0, 0, 0, 0.28), 0 0 70px rgba(60, 201, 163, 0.06);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s ease-out, transform 1.2s ease-out, border-color 1.2s ease-out;
}

.containment-pod.in-view {
    opacity: 1;
    transform: translateY(0);
    border-color: rgba(94, 232, 160, 0.25);
}

@keyframes podEnter {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pod-label {
    font-family: var(--font-body);
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--bright-jade);
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pod-status {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    display: inline-block;
}

.pod-status.archived {
    background-color: rgba(212, 168, 73, 0.2);
    color: var(--amber-alert);
    border: 1px solid var(--amber-alert);
}

.pod-status.archived::before {
    content: "△ ";
}

.pod-status.hibernating {
    background-color: rgba(94, 232, 160, 0.1);
    color: var(--bright-jade);
    border: 1px solid var(--bright-jade);
}

.pod-status.hibernating::before {
    content: "○ ";
}

.pod-status.forgotten {
    background-color: rgba(74, 107, 82, 0.2);
    color: var(--faded-olive);
    border: 1px solid var(--faded-olive);
}

.pod-status.forgotten::before {
    content: "─ ";
}

/* Collage Composition */
.collage {
    position: relative;
    width: 100%;
    height: 200px;
    margin: 2rem 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: auto;
    gap: 1rem;
    align-items: center;
    justify-items: center;
    overflow: hidden;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(6, 15, 9, 0.18), rgba(19, 46, 31, 0.22));
}

.collage::before {
    content: "";
    position: absolute;
    inset: 14px;
    background-image: linear-gradient(rgba(94, 232, 160, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(94, 232, 160, 0.08) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: radial-gradient(circle at center, black, transparent 75%);
}

.collage-shape {
    border-radius: 8px;
    position: relative;
    opacity: 0.4;
}

.shape-1 {
    width: 80px;
    height: 80px;
    background: var(--mid-bg);
    grid-column: 1 / 2;
    opacity: 0.8;
    border: 1px solid rgba(94, 232, 160, 0.2);
    transform: rotate(-10deg);
}

.shape-2 {
    width: 100px;
    height: 100px;
    background: var(--deep-pine);
    grid-column: 2 / 3;
    opacity: 0.6;
    border: 1px solid rgba(94, 232, 160, 0.2);
    transform: rotate(8deg);
}

.shape-3 {
    width: 70px;
    height: 70px;
    background: var(--primary-bg);
    grid-column: 3 / 4;
    opacity: 0.5;
    border: 1px solid rgba(94, 232, 160, 0.2);
    transform: rotate(-4deg);
}

.typographic-fragment {
    font-family: var(--font-body);
    font-size: 2.5rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--bright-jade);
    opacity: 0.15;
    position: absolute;
    transform: rotate(-15deg);
    line-height: 1;
}

.frag-1 { top: 20px; left: 40px; }
.frag-2 { bottom: 30px; right: 50px; transform: rotate(12deg); }
.frag-3 { top: 10px; right: 30px; }
.frag-4 { bottom: 40px; left: 20px; transform: rotate(-8deg); }
.frag-5 { top: 25px; left: 35px; transform: rotate(18deg); }
.frag-6 { bottom: 20px; right: 40px; }
.frag-7 { top: 15px; right: 45px; transform: rotate(-12deg); }
.frag-8 { bottom: 35px; left: 25px; transform: rotate(10deg); }
.frag-9 { top: 30px; left: 50px; }
.frag-10 { bottom: 25px; right: 55px; transform: rotate(-5deg); }

.svg-shape {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
    opacity: 0.3;
}

.lottie-indicator {
    grid-column: 3 / 4;
    grid-row: 1 / 3;
    width: 48px;
    height: 48px;
    position: relative;
    z-index: 4;
}

.lottie-indicator.css-indicator::before,
.lottie-indicator.css-indicator::after {
    content: "";
    position: absolute;
    inset: 8px;
    border: 1.5px solid var(--bright-jade);
}

.lottie-indicator.css-indicator.indicator-hibernating::before {
    border-radius: 50%;
    animation: breathe 4s ease-in-out infinite;
}

.lottie-indicator.css-indicator.indicator-archived::before {
    border-color: var(--amber-alert);
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
    animation: slowRotate 6s linear infinite;
}

.lottie-indicator.css-indicator.indicator-forgotten::before {
    inset: 23px 5px auto;
    height: 1px;
    border: 0;
    background: var(--bright-jade);
    animation: flatline 4.8s steps(1, end) infinite;
}

@keyframes breathe {
    0%, 100% { transform: scale(0.8); opacity: 0.45; }
    50% { transform: scale(1.22); opacity: 1; }
}

@keyframes slowRotate {
    to { transform: rotate(360deg); }
}

@keyframes flatline {
    0%, 72%, 100% { box-shadow: none; }
    74% { box-shadow: 8px -8px 0 -0.5px var(--bright-jade), 12px 8px 0 -0.5px var(--bright-jade); }
}

/* Pod Text */
.pod-text {
    font-family: var(--font-body);
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    font-weight: 400;
    color: var(--body-text);
    line-height: 1.8;
    margin-top: 1.5rem;
}

.tech-divider {
    position: relative;
    z-index: 2;
    width: min(70vw, 900px);
    height: 24px;
    margin: -8vh auto 0;
    opacity: 0.15;
}

.tech-divider svg {
    display: block;
    width: 100%;
    height: 100%;
}

.tech-divider path,
.tech-divider circle {
    fill: none;
    stroke: var(--bright-jade);
    stroke-width: 1;
    stroke-dasharray: 14 10 2 10;
}

.tech-divider circle {
    fill: var(--bright-jade);
    stroke: none;
}

/* Empty Vault */
.empty-vault {
    text-align: center;
    position: relative;
    z-index: 3;
}

.empty-vault-text {
    font-family: var(--font-body);
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-weight: 300;
    color: var(--body-text);
    letter-spacing: 0.02em;
    margin-bottom: 2rem;
    opacity: 0.6;
}

.blinking-cursor {
    font-family: var(--font-mono);
    font-size: 2rem;
    color: var(--bright-jade);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .containment-frame {
        inset: 12px;
    }

    .hud-label {
        font-size: 0.4rem;
        letter-spacing: 0.08em;
    }

    .top-left-label, .top-right-label {
        top: 16px;
    }

    .bottom-left-label, .bottom-right-label {
        bottom: 16px;
    }

    .containment-pod {
        padding: 1.5rem;
        max-width: 90%;
    }

    .collage {
        height: 150px;
        gap: 0.5rem;
    }

    .shape-1 {
        width: 50px;
        height: 50px;
    }

    .shape-2 {
        width: 65px;
        height: 65px;
    }

    .shape-3 {
        width: 45px;
        height: 45px;
    }

    .typographic-fragment {
        font-size: 1.5rem;
    }

    .domain-title {
        font-size: clamp(1.5rem, 3vw, 2.5rem);
    }

    .vault-level {
        min-height: 100vh;
    }
}

@media (max-width: 480px) {
    .containment-frame {
        inset: 8px;
        border-width: 0.5px;
    }

    .corner-bracket {
        width: 16px;
        height: 16px;
    }

    .hud-label {
        font-size: 0.35rem;
        display: none;
    }

    .containment-pod {
        padding: 1rem;
        border-radius: 12px;
    }

    .pod-label {
        font-size: 0.85rem;
    }

    .pod-text {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .collage {
        height: 120px;
        gap: 0.3rem;
    }

    .empty-vault-text {
        font-size: 1.1rem;
    }
}
