/* yamato.quest - Surreal Floating Gallery */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --deep-night: #0C0E18;
    --float-panel: #141828;
    --ethereal-blue: #4870B0;
    --ethereal-light: #90B0E0;
    --ethereal-pale: #C0D0F0;
    --marble-white: #E8E0E0;
    --marble-mid: #D0C8C8;
    --marble-dark: #B8B0B0;
    --path-line: rgba(72, 112, 176, 0.25);
    --text-light: #E0E8F8;
    --text-body: #B0C0D8;
    --text-location: #8098C0;
}

body {
    background: var(--deep-night);
    color: var(--text-light);
    font-family: 'Source Sans 3', sans-serif;
    font-size: 1rem;
    line-height: 1.8;
    font-weight: 400;
    overflow-x: hidden;
}

/* Quest Groups (Broken Grid) */
.quest-group {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    margin-bottom: clamp(4rem, 8vh, 8rem);
}

.block-primary {
    max-width: 640px;
    margin-left: 15%;
    background: var(--float-panel);
    padding: 32px;
    border-radius: 4px;
    position: relative;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.block-primary.visible { opacity: 1; }

.block-secondary {
    max-width: 360px;
    margin-left: auto;
    margin-right: 10%;
    position: relative;
    top: -40px;
    z-index: 1;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.5s ease 0.2s;
}
.block-secondary.visible { opacity: 1; }

/* Drift Animation */
.drift-a { animation: driftA 10s ease-in-out infinite; }
.drift-b { animation: driftB 12s ease-in-out infinite; }
@keyframes driftA {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}
@keyframes driftB {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}

/* Typography */
.quest-title {
    font-family: 'Libre Baskerville', serif;
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}
.hero-heading {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
}
.quest-location {
    font-family: 'Literata', serif;
    font-size: 0.85rem;
    font-style: italic;
    color: var(--text-location);
    display: block;
    margin-bottom: 0.75rem;
}
.quest-body {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 1rem;
    color: var(--text-body);
    line-height: 1.8;
}
.quest-aside {
    font-family: 'Literata', serif;
    font-size: 0.9rem;
    font-style: italic;
    color: var(--ethereal-pale);
    line-height: 1.6;
}

/* Marble Fragments */
.marble-frag {
    background: linear-gradient(135deg, var(--marble-white), var(--marble-mid), var(--marble-white), var(--marble-dark), var(--marble-white));
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}
.marble-frag.visible {
    opacity: 0.12;
    transform: scale(1);
}
.marble-hero {
    width: 120px;
    height: 120px;
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    z-index: 0;
    pointer-events: none;
}
.marble-hero.visible {
    opacity: 0.06;
    transform: translate(-50%, -50%) scale(1);
}
.marble-1 {
    width: 80px;
    height: 60px;
    clip-path: polygon(20% 0%, 100% 0%, 80% 100%, 0% 100%);
    margin-bottom: 8px;
}
.marble-2 {
    width: 60px;
    height: 80px;
    clip-path: polygon(50% 0%, 100% 40%, 80% 100%, 20% 100%, 0% 40%);
    margin-bottom: 8px;
}
.marble-3 {
    width: 100px;
    height: 50px;
    clip-path: polygon(10% 0%, 90% 0%, 100% 100%, 0% 100%);
    margin-bottom: 8px;
}
.marble-footer {
    width: 60px;
    height: 60px;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    margin: 0 auto 1rem;
}

/* Quest Path SVG */
.quest-path {
    display: block;
    width: 100px;
    height: 200px;
    margin: -2rem auto;
    position: relative;
    z-index: 1;
}
.path-line {
    stroke: var(--path-line);
    stroke-width: 1.5;
    stroke-dasharray: 4, 6;
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    transition: stroke-dashoffset 1.2s ease;
}
.quest-path.visible .path-line { stroke-dashoffset: 0; }
.path-dot {
    fill: var(--ethereal-blue);
    opacity: 0.5;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 4rem 2rem;
    position: relative;
}
.footer-text {
    font-family: 'Literata', serif;
    font-size: 0.85rem;
    font-style: italic;
    color: var(--text-location);
}

@media (max-width: 768px) {
    .block-primary { margin-left: 4%; max-width: 100%; }
    .block-secondary { margin-right: 4%; top: -20px; max-width: 100%; }
    .quest-group { padding: 0 1.5rem; }
}
