/* ============================================
   parallel.quest — Flat-Design Pastel Storybook
   ============================================ */

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

:root {
    --deep-plum: #3A3040;
    --muted-plum: #5A5060;
    --pastel-rose: #D0A0B0;
    --pastel-lavender: #C0B0D0;
    --pastel-mint: #B0D0C0;
    --story-cream: #FBF6F4;
    --page-white: #FEFCFA;
    --column-rule: #D0C0D0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.9;
    color: var(--muted-plum);
    background-color: var(--story-cream);
    overflow-x: hidden;
    position: relative;
}

/* --- Noise Texture Overlay --- */
.noise-svg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.02;
}

/* --- Story Sections --- */
.story-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    position: relative;
    opacity: 0;
    transition: opacity 500ms ease-out, transform 500ms ease-out;
}

.story-section.visible {
    opacity: 1;
    transform: translateX(0) !important;
}

/* Alternating slide directions */
.story-section:nth-child(odd of .story-section) {
    transform: translateX(-40px);
}

.story-section:nth-child(even of .story-section) {
    transform: translateX(40px);
}

/* Section content container */
.section-content {
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
}

/* --- Hero Section --- */
.hero-section {
    min-height: 100vh;
    background-color: var(--story-cream);
    text-align: center;
}

.hero-title {
    font-family: 'Zilla Slab', serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: var(--deep-plum);
    letter-spacing: 0.04em;
    line-height: 1.1;
    margin-bottom: 16px;
}

.hero-title .accent-dot {
    color: var(--pastel-rose);
}

.hero-subtitle {
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: var(--muted-plum);
    margin-bottom: 40px;
    letter-spacing: 0.02em;
}

/* Hero Flourish */
.hero-flourish {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
}

.flourish-line {
    display: block;
    width: 60px;
    height: 1px;
    background-color: var(--pastel-rose);
}

.flourish-diamond {
    display: block;
    width: 8px;
    height: 8px;
    background-color: var(--pastel-rose);
    transform: rotate(45deg);
}

/* Hero Scroll Hint */
.hero-scroll-hint {
    margin-top: 48px;
    display: flex;
    justify-content: center;
}

.scroll-mouse {
    width: 20px;
    height: 34px;
    opacity: 0.5;
}

.scroll-dot {
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { cy: 10; opacity: 1; }
    50% { cy: 22; opacity: 0.3; }
}

/* --- Quest Markers --- */
.quest-marker {
    font-family: 'Zilla Slab', serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--pastel-rose);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 12px;
}

/* --- Section Headings --- */
.section-heading {
    font-family: 'Zilla Slab', serif;
    font-weight: 500;
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    color: var(--deep-plum);
    margin-bottom: 32px;
    line-height: 1.2;
}

/* --- Editorial Columns --- */
.editorial-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media (min-width: 640px) {
    .editorial-columns {
        grid-template-columns: 2fr 1fr;
        gap: 48px;
    }
}

.column-primary p {
    margin-bottom: 24px;
}

.column-primary p:last-child {
    margin-bottom: 0;
}

/* --- Pull Quote --- */
.column-pull-quote {
    display: flex;
    align-items: center;
    border-left: 1px solid var(--column-rule);
    padding-left: 24px;
}

.column-pull-quote blockquote {
    font-family: 'Zilla Slab', serif;
    font-weight: 500;
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    color: var(--deep-plum);
    line-height: 1.6;
    position: relative;
}

.quote-mark {
    color: var(--pastel-rose);
    font-size: 1.6em;
    line-height: 0;
    vertical-align: -0.15em;
}

/* --- Illustration Column --- */
.column-illustration {
    display: flex;
    align-items: center;
    justify-content: center;
}

.illustration-frame {
    background-color: var(--page-white);
    border: 1px solid var(--column-rule);
    border-radius: 4px;
    padding: 8px;
    width: 100%;
    max-width: 320px;
}

.chronicle-illustration {
    width: 100%;
    height: auto;
    display: block;
}

/* --- River Dividers --- */
.river-divider {
    position: relative;
    width: 100%;
    overflow: hidden;
    height: 80px;
}

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

.river-path {
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
}

.river-path-rose {
    stroke: var(--pastel-rose);
}

.river-path-lavender {
    stroke: var(--pastel-lavender);
}

.river-path-mint {
    stroke: var(--pastel-mint);
}

.river-divider-footer {
    height: 60px;
}

/* --- Storybook Grid (Cards) --- */
.storybook-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-top: 8px;
}

@media (min-width: 640px) {
    .storybook-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 28px;
    }
}

.story-card {
    background-color: var(--page-white);
    border: 1px solid var(--column-rule);
    border-radius: 4px;
    padding: 32px 24px;
    text-align: center;
    transition: transform 300ms ease, border-color 300ms ease;
}

.story-card:hover {
    transform: translateY(-4px);
    border-color: var(--pastel-rose);
}

.card-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
}

.card-icon svg {
    width: 100%;
    height: 100%;
}

.card-title {
    font-family: 'Zilla Slab', serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--deep-plum);
    margin-bottom: 12px;
}

.card-text {
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    font-size: 0.92rem;
    color: var(--muted-plum);
    line-height: 1.8;
}

/* --- Worlds Section --- */
.worlds-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    margin-top: 8px;
}

@media (min-width: 640px) {
    .worlds-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

.world-panel {
    background-color: var(--page-white);
    border: 1px solid var(--column-rule);
    border-radius: 4px;
    padding: 36px 24px 28px;
    position: relative;
    transition: transform 300ms ease, border-color 300ms ease;
}

.world-panel:hover {
    transform: translateY(-3px);
}

.world-panel-rose {
    border-top: 3px solid var(--pastel-rose);
}

.world-panel-rose:hover {
    border-color: var(--pastel-rose);
}

.world-panel-lavender {
    border-top: 3px solid var(--pastel-lavender);
}

.world-panel-lavender:hover {
    border-color: var(--pastel-lavender);
}

.world-panel-mint {
    border-top: 3px solid var(--pastel-mint);
}

.world-panel-mint:hover {
    border-color: var(--pastel-mint);
}

.world-number {
    font-family: 'Zilla Slab', serif;
    font-weight: 700;
    font-size: 2rem;
    color: var(--column-rule);
    margin-bottom: 12px;
    line-height: 1;
}

.world-panel-rose .world-number {
    color: var(--pastel-rose);
    opacity: 0.5;
}

.world-panel-lavender .world-number {
    color: var(--pastel-lavender);
    opacity: 0.5;
}

.world-panel-mint .world-number {
    color: var(--pastel-mint);
    opacity: 0.5;
}

.world-title {
    font-family: 'Zilla Slab', serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--deep-plum);
    margin-bottom: 12px;
    line-height: 1.3;
}

.world-desc {
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    font-size: 0.9rem;
    color: var(--muted-plum);
    line-height: 1.8;
}

/* --- Map Section --- */
.map-container {
    text-align: center;
}

.quest-map {
    width: 100%;
    max-width: 600px;
    height: auto;
    display: block;
    margin: 0 auto 20px;
    border-radius: 6px;
}

.map-caption {
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    font-size: 0.9rem;
    color: var(--pastel-lavender);
    font-style: italic;
    letter-spacing: 0.02em;
}

/* Map path drawing animation */
.map-path {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1.5s ease-out;
}

.map-path.hidden {
    stroke-dashoffset: 600;
}

.map-node {
    transition: r 400ms ease, opacity 400ms ease;
}

/* --- Invitation Section --- */
.invitation-content {
    text-align: center;
}

.invitation-text {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: var(--muted-plum);
    max-width: 560px;
    margin: 0 auto 32px;
    line-height: 1.9;
}

.invitation-motif {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}

.motif-svg {
    width: 200px;
    height: 60px;
}

.invitation-closing {
    font-family: 'Zilla Slab', serif;
    font-weight: 500;
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    color: var(--deep-plum);
    letter-spacing: 0.01em;
}

/* --- Footer --- */
.story-footer {
    text-align: center;
    padding: 40px 24px 60px;
    background-color: var(--story-cream);
}

.footer-text {
    font-family: 'Zilla Slab', serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--deep-plum);
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.footer-sub {
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    font-size: 0.8rem;
    color: var(--pastel-lavender);
    letter-spacing: 0.04em;
}

/* --- Responsive Adjustments --- */
@media (max-width: 480px) {
    .story-section {
        padding: 60px 16px;
    }

    .hero-title {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .editorial-columns {
        grid-template-columns: 1fr;
    }

    .column-pull-quote {
        border-left: none;
        border-top: 1px solid var(--column-rule);
        padding-left: 0;
        padding-top: 24px;
    }

    .storybook-grid {
        grid-template-columns: 1fr;
    }

    .worlds-grid {
        grid-template-columns: 1fr;
    }
}
