/* okurairi.com - The Unsealing */
/* Palette: Frost Violet #6B5B8D, Frozen Coral #D4706A, Ice Blue #8AB4D0,
   Vault White #F0F2F5, Translucent Frost rgba(200,210,220,0.15),
   Storage Dark #2A2438, Thaw Gold #D4B060 */

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

body {
    background-color: #F0F2F5;
    color: #2A2438;
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.65;
    overflow-x: hidden;
}

/* Halftone */
.halftone-hero {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-image: radial-gradient(circle, #6B5B8D 1.5px, transparent 1.5px);
    background-size: 6px 6px;
    opacity: 0.1;
    pointer-events: none;
    z-index: 1;
}

.halftone-section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, #6B5B8D 1.5px, transparent 1.5px);
    background-size: 6px 6px;
    opacity: 0.08;
    pointer-events: none;
}

/* Hero */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    z-index: 2;
    padding: 40px 20px;
}

/* Kinetic Title */
.kinetic-title {
    font-family: 'Righteous', cursive;
    font-size: clamp(3rem, 8vw, 6rem);
    color: #6B5B8D;
    letter-spacing: 0.02em;
    display: flex;
    gap: 2px;
}

.k-char {
    display: inline-block;
    opacity: 0;
    transform: translateY(-100vh);
    animation: charFall 0.8s ease forwards, charWave 4s ease-in-out infinite;
    animation-delay: var(--delay, 0s), var(--wave-delay, 2s);
}

@keyframes charFall {
    0% { opacity: 0; transform: translateY(-100vh); }
    70% { opacity: 1; transform: translateY(15px); }
    85% { transform: translateY(-5px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes charWave {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

.hero-jp {
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    font-size: 16px;
    color: #6B5B8D;
    letter-spacing: 0.15em;
    opacity: 0.6;
}

/* Vault Door */
.vault-door {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    border: 8px solid #2A2438;
    position: relative;
    overflow: hidden;
    margin: 20px 0;
}

.vault-door.small {
    width: 180px;
    height: 180px;
    border-width: 4px;
}

.vault-half {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    background-color: #2A2438;
    transition: transform 1s ease;
}

.vault-left { left: 0; }
.vault-right { right: 0; }

.vault-door.opened .vault-left { transform: translateX(-110%); }
.vault-door.opened .vault-right { transform: translateX(110%); }

.closing-left { transform: translateX(-40%); }
.closing-right { transform: translateX(40%); }

.vault-bolts {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
}

.bolt {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #6B5B8D;
    background-color: #2A2438;
}

.vault-burst {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 200%;
    height: 200%;
    background-image: radial-gradient(circle, #6B5B8D 1.5px, transparent 1.5px);
    background-size: 8px 8px;
    opacity: 0;
    transition: transform 0.8s ease, opacity 0.8s ease;
    z-index: 1;
}

.vault-door.opened .vault-burst {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.15;
}

/* Speech Stamps */
.speech-stamp {
    position: relative;
    display: inline-block;
    cursor: default;
    transition: transform 0.3s ease-out;
    z-index: 5;
}

.speech-stamp:hover {
    transform: scale(1.12);
}

.vault-stamp {
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.3s ease-out;
}

.vault-stamp.visible {
    opacity: 1;
}

.artifact-stamp {
    position: absolute;
    z-index: 5;
}

.stamp-svg {
    width: 100%;
    height: auto;
}

.stamp-text {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Bungee', cursive;
    font-size: clamp(1rem, 2.5vw, 1.75rem);
    color: #D4706A;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.stamp-text.small {
    font-size: clamp(0.8rem, 2vw, 1.25rem);
}

/* Artifact Sections */
.artifact-section {
    position: relative;
    min-height: 60vh;
    padding: 80px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.artifact-section.alt {
    min-height: 70vh;
}

.artifact-inner {
    display: flex;
    align-items: center;
    gap: 60px;
    max-width: 1000px;
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.artifact-inner.visible {
    opacity: 1;
    transform: translateY(0);
}

.artifact-inner.reverse {
    flex-direction: row-reverse;
}

/* Artifact Blobs */
.artifact-blob {
    flex: 0 0 45%;
    aspect-ratio: 1;
    position: relative;
    border: 2px solid #8AB4D0;
    overflow: hidden;
}

.blob-1 { border-radius: 30% 70% 60% 40% / 50% 60% 30% 70%; }
.blob-2 { border-radius: 60% 40% 50% 50% / 40% 70% 30% 60%; }
.blob-3 { border-radius: 40% 60% 70% 30% / 60% 40% 50% 50%; }
.blob-4 { border-radius: 50% 50% 40% 60% / 30% 70% 60% 40%; }

.blob-fill {
    width: 100%;
    height: 100%;
}

.blob-fill.warm { background-color: #D4706A; opacity: 0.15; }
.blob-fill.cool { background-color: #8AB4D0; opacity: 0.15; }
.blob-fill.mixed { background: linear-gradient(135deg, rgba(212,112,106,0.15), rgba(138,180,208,0.15)); }

@supports (backdrop-filter: blur(8px)) {
    .artifact-blob {
        background: rgba(200, 210, 220, 0.15);
        backdrop-filter: blur(8px);
    }
}

/* Scale Hover */
.scale-hover {
    transition: transform 0.3s ease-out;
    cursor: default;
}

.scale-hover:hover {
    transform: scale(1.08);
}

/* Artifact Text */
.artifact-text {
    flex: 0 0 50%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.artifact-title {
    font-family: 'Righteous', cursive;
    font-size: clamp(1.75rem, 4vw, 3rem);
    color: #2A2438;
    letter-spacing: 0.02em;
}

.artifact-body {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.65;
    color: #2A2438;
}

.artifact-code {
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #8090A0;
}

/* Archive Room */
.archive-room {
    padding: 80px 40px;
    text-align: center;
}

.archive-title {
    font-family: 'Righteous', cursive;
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: #6B5B8D;
    margin-bottom: 40px;
}

.archive-cloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    margin-bottom: 40px;
}

.archive-blob {
    width: 120px;
    height: 120px;
    border: 2px solid #8AB4D0;
    border-radius: 40% 60% 50% 50% / 50% 40% 60% 50%;
    position: relative;
    overflow: hidden;
    animation: driftOrbit 15s infinite ease-in-out;
}

.archive-blob:nth-child(2) { border-radius: 50% 50% 40% 60% / 60% 50% 50% 40%; animation-delay: -3s; }
.archive-blob:nth-child(3) { border-radius: 60% 40% 50% 50% / 40% 60% 50% 50%; animation-delay: -6s; }
.archive-blob:nth-child(4) { border-radius: 45% 55% 55% 45% / 55% 45% 45% 55%; animation-delay: -9s; }
.archive-blob:nth-child(5) { border-radius: 55% 45% 45% 55% / 50% 50% 50% 50%; animation-delay: -12s; }
.archive-blob:nth-child(6) { border-radius: 50% 50% 60% 40% / 45% 55% 45% 55%; animation-delay: -2s; }

@keyframes driftOrbit {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(5px, -8px); }
    50% { transform: translate(-5px, -3px); }
    75% { transform: translate(3px, 5px); }
}

.mini-blob {
    width: 100%;
    height: 100%;
}

.mini-blob.warm { background-color: #D4706A; opacity: 0.12; }
.mini-blob.cool { background-color: #8AB4D0; opacity: 0.12; }
.mini-blob.mixed { background: linear-gradient(135deg, rgba(212,112,106,0.12), rgba(138,180,208,0.12)); }

.archive-text {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.65;
    color: #2A2438;
    max-width: 600px;
    margin: 0 auto;
}

/* Closing */
.closing {
    padding: 80px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    min-height: 50vh;
    justify-content: center;
}

.closing-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

.closing-line {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-style: italic;
    font-size: 18px;
    color: #6B5B8D;
    opacity: 0.7;
}

/* Mobile */
@media (max-width: 768px) {
    .artifact-inner,
    .artifact-inner.reverse {
        flex-direction: column;
    }

    .artifact-blob {
        flex: none;
        width: 200px;
        height: 200px;
    }

    .artifact-text {
        flex: none;
    }

    .artifact-section {
        padding: 60px 20px;
    }

    .artifact-stamp {
        display: none;
    }

    .vault-door {
        width: 240px;
        height: 240px;
    }

    .archive-blob {
        width: 90px;
        height: 90px;
    }
}

@media (max-width: 480px) {
    .vault-door {
        width: 180px;
        height: 180px;
    }
}
