/* yamato.quest - Chrome-metallic Japanese minimal with 3D depth planes */

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

:root {
    --void-black: #0a0a0f;
    --deep-navy: #1a1a2a;
    --dark-surface: #3a3a4a;
    --mid-chrome: #6a6a7a;
    --chrome: #8888a0;
    --silver: #b8c4d8;
    --pale-chrome: #e0e4f0;
    --deep-red: #2a1a1a;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--void-black);
    color: var(--pale-chrome);
    font-family: 'Crimson Pro', serif;
    font-weight: 300;
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Perspective container for 3D depth */
.perspective-container {
    perspective: 1200px;
    perspective-origin: 50% 50%;
    position: relative;
    min-height: 100vh;
}

/* Depth planes */
.depth-plane {
    position: relative;
    transform-style: preserve-3d;
}

.bg-plane {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transform: translateZ(-200px) scale(1.17);
    pointer-events: none;
    z-index: 0;
}

.content-plane {
    position: relative;
    z-index: 1;
}

.fg-plane {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transform: translateZ(100px) scale(0.92);
    pointer-events: none;
    z-index: 2;
}

/* Blob container */
.blob-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.chrome-blob {
    position: absolute;
    opacity: 0.12;
    filter: drop-shadow(0 0 40px rgba(192, 192, 200, 0.1));
    animation: blobFloat 8s ease-in-out infinite;
}

@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(3px, -3px) scale(1.01); }
    50% { transform: translate(-2px, 3px) scale(0.99); }
    75% { transform: translate(3px, 2px) scale(1.01); }
}

/* Crystalline grid */
.crystalline-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.04;
}

/* Particle container */
.particle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--silver);
    border-radius: 50%;
    opacity: 0;
    animation: particleDrift 12s ease-in-out infinite;
}

@keyframes particleDrift {
    0% { opacity: 0; transform: translateY(0); }
    20% { opacity: 0.4; }
    80% { opacity: 0.4; }
    100% { opacity: 0; transform: translateY(-100px); }
}

/* Navigation */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: linear-gradient(180deg, rgba(10, 10, 15, 0.9) 0%, transparent 100%);
}

.nav-domain {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--chrome);
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: var(--mid-chrome);
    text-decoration: none;
    position: relative;
    transition: color 0.4s ease;
    letter-spacing: 0.05em;
}

.nav-link::after {
    content: attr(data-label);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    letter-spacing: 0.15em;
    color: var(--mid-chrome);
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
    margin-top: 4px;
}

.nav-link:hover {
    color: var(--pale-chrome);
}

.nav-link:hover::after {
    opacity: 0.6;
}

/* Underline draw animation on nav links */
.nav-link::before {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--silver);
    transition: width 0.5s ease;
}

.nav-link:hover::before {
    width: 100%;
}

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

.section-content {
    max-width: 900px;
    width: 100%;
}

/* Void Section */
.void-section {
    min-height: 100vh;
}

.void-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 60px;
}

.title-kanji {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-size: clamp(60px, 12vw, 120px);
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--pale-chrome);
    line-height: 1;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.title-kanji.visible {
    opacity: 1;
    transform: translateY(0);
}

.title-latin {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-size: clamp(14px, 2vw, 18px);
    font-weight: 400;
    letter-spacing: 0.3em;
    color: var(--chrome);
    opacity: 0;
    transition: opacity 1s ease 0.5s;
}

.title-latin.visible {
    opacity: 0.7;
}

.void-passage {
    font-family: 'Crimson Pro', serif;
    font-size: 18px;
    font-weight: 300;
    line-height: 1.9;
    color: var(--silver);
    max-width: 600px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease 0.8s, transform 1s ease 0.8s;
}

.void-passage.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Fracture Section */
.fracture-section {
    background: linear-gradient(180deg, transparent 0%, rgba(42, 26, 26, 0.15) 50%, transparent 100%);
}

.fracture-title {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-size: clamp(32px, 6vw, 64px);
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--pale-chrome);
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fracture-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.fracture-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.fracture-cell {
    border-top: 1px solid var(--dark-surface);
    padding-top: 24px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fracture-cell.visible {
    opacity: 1;
    transform: translateY(0);
}

.cell-index {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.1em;
    color: var(--mid-chrome);
    display: block;
    margin-bottom: 16px;
}

.cell-text {
    font-family: 'Crimson Pro', serif;
    font-size: 16px;
    font-weight: 300;
    font-style: italic;
    line-height: 1.8;
    color: var(--silver);
}

/* Convergence Section */
.convergence-section {
    min-height: 80vh;
}

.convergence-title {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-size: clamp(32px, 6vw, 64px);
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--pale-chrome);
    margin-bottom: 48px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.convergence-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.convergence-passage {
    margin-bottom: 60px;
}

.passage-text {
    font-family: 'Crimson Pro', serif;
    font-size: 20px;
    font-weight: 300;
    line-height: 2;
    color: var(--silver);
    max-width: 650px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.passage-text.visible {
    opacity: 1;
    transform: translateY(0);
}

.passage-text em {
    font-style: italic;
    color: var(--pale-chrome);
}

.convergence-sigil {
    width: 160px;
    height: 160px;
    margin-top: 40px;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.convergence-sigil.visible {
    opacity: 0.6;
}

/* Colophon */
.colophon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 80px 40px;
    border-top: 1px solid var(--dark-surface);
}

.colophon-domain {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--mid-chrome);
}

.colophon-timestamp {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 300;
    color: var(--dark-surface);
    letter-spacing: 0.05em;
}

.colophon-kanji {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: var(--mid-chrome);
    opacity: 0.4;
    margin-top: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .section {
        padding: 80px 24px;
    }
    .fracture-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .top-nav {
        padding: 16px 20px;
    }
    .nav-links {
        gap: 20px;
    }
}
