/* ================================================
   mystical.quest — Muji Contemplative Quest Journal
   Palette: warm-earthy | Layout: f-pattern
   Typography: Nunito (humanist), Space Mono (data)
   ================================================ */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    color: #5A4A38;
    background-color: #F4F0E6;
    line-height: 1.9;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Candle Atmospheric Glows --- */
.candle-glow {
    position: fixed;
    pointer-events: none;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(200, 160, 100, 0.08), transparent);
    z-index: 0;
}

.candle-glow-1 {
    width: 600px;
    height: 600px;
    top: -100px;
    right: -150px;
}

.candle-glow-2 {
    width: 500px;
    height: 500px;
    bottom: 20%;
    left: -200px;
}

.candle-glow-3 {
    width: 400px;
    height: 400px;
    top: 50%;
    right: 10%;
}

.candle-glow-section {
    position: absolute;
    width: 450px;
    height: 450px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(200, 160, 100, 0.06), transparent);
    z-index: 0;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Nunito', sans-serif;
    color: #2A2418;
}

h2 {
    font-weight: 700;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
}

h3 {
    font-weight: 500;
    font-size: clamp(1.1rem, 1.8vw, 1.3rem);
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 4rem 2rem;
}

.hero-inner {
    max-width: 900px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: clamp(2.4rem, 5vw, 4rem);
    color: #2A2418;
    letter-spacing: 0.12em;
    margin-bottom: 0.6rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease-out 0.3s forwards;
}

.hero-subtitle {
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: #7A6A50;
    letter-spacing: 0.08em;
    margin-bottom: 3.5rem;
    opacity: 0;
    transform: translateY(15px);
    animation: fadeInUp 1s ease-out 0.6s forwards;
}

/* --- Icon Navigation --- */
.icon-nav {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-bottom: 4rem;
    opacity: 0;
    animation: fadeIn 1s ease-out 0.9s forwards;
}

.icon-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #7A6A50;
    transition: color 0.3s ease, transform 0.3s ease;
}

.icon-nav-item:hover {
    color: #6A8A60;
    transform: translateY(-3px);
}

.nav-icon {
    width: 32px;
    height: 32px;
}

.icon-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #7A6A50;
    transition: color 0.3s ease;
}

.icon-nav-item:hover .icon-label {
    color: #6A8A60;
}

/* --- Quest Stats --- */
.quest-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    opacity: 0;
    animation: fadeIn 1s ease-out 1.2s forwards;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.stat-number {
    font-family: 'Space Mono', monospace;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 400;
    color: #2A2418;
    line-height: 1;
}

.stat-label {
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    font-size: 0.85rem;
    color: #7A6A50;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* --- Section Base --- */
.section {
    position: relative;
    padding: 6rem 2rem;
}

.section-inner {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* --- F-Pattern Header --- */
.f-pattern-header {
    margin-bottom: 3rem;
}

.section-title {
    margin-bottom: 0.5rem;
}

.section-desc {
    font-weight: 300;
    color: #7A6A50;
    max-width: 480px;
    font-size: clamp(0.95rem, 1.2vw, 1.05rem);
}

/* --- Quest Cards --- */
.quest-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.quest-card {
    background: #FAF6EE;
    border: 1px solid #E0D8C8;
    border-radius: 8px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.quest-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.quest-card.visible:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(42, 36, 24, 0.06);
}

.quest-card-featured {
    grid-column: 1 / -1;
    background: #FAF6EE;
    border: 1px solid #E0D8C8;
    position: relative;
    overflow: hidden;
}

.quest-card-featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #6A8A60;
}

.quest-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.quest-icon {
    width: 28px;
    height: 28px;
    color: #7A6A50;
}

.quest-status {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.quest-status-active {
    color: #6A8A60;
    background: rgba(106, 138, 96, 0.1);
}

.quest-status-new {
    color: #7A6A50;
    background: rgba(122, 106, 80, 0.1);
}

.quest-title {
    margin-bottom: 0.5rem;
}

.quest-description {
    font-weight: 300;
    color: #5A4A38;
    margin-bottom: 1.2rem;
    line-height: 1.7;
}

/* --- Progress Bar --- */
.quest-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: #E0D8C8;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #6A8A60;
    border-radius: 2px;
    width: 0%;
    transition: width 1.2s ease-out;
}

.progress-text {
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    color: #7A6A50;
    min-width: 3rem;
    text-align: right;
}

/* --- Quest Meta --- */
.quest-meta {
    display: flex;
    justify-content: space-between;
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    color: #7A6A50;
}

/* --- Completed Quests --- */
.completed-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.completed-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid #E0D8C8;
    opacity: 0;
    transform: translateX(-15px);
}

.completed-item.visible {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.completed-item:last-child {
    border-bottom: none;
}

.completed-icon {
    width: 24px;
    height: 24px;
    color: #6A8A60;
    flex-shrink: 0;
}

.completed-info {
    flex: 1;
}

.completed-title {
    font-size: 1.05rem;
    margin-bottom: 0.15rem;
}

.completed-summary {
    font-weight: 300;
    font-size: 0.9rem;
    color: #7A6A50;
}

.completed-data {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    flex-shrink: 0;
}

.completed-count {
    font-family: 'Space Mono', monospace;
    font-size: 1.4rem;
    color: #2A2418;
    line-height: 1;
}

.completed-unit {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    color: #7A6A50;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- Journal Section --- */
.journal-entries {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.journal-entry {
    display: flex;
    gap: 2rem;
    padding: 2rem 0;
    border-bottom: 1px solid #E0D8C8;
    opacity: 0;
    transform: translateY(15px);
}

.journal-entry.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.journal-entry:last-child {
    border-bottom: none;
}

.journal-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    min-width: 50px;
    padding-top: 0.2rem;
}

.journal-day {
    font-family: 'Space Mono', monospace;
    font-size: 1.6rem;
    color: #2A2418;
    line-height: 1;
}

.journal-month {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    color: #7A6A50;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.journal-content {
    flex: 1;
}

.journal-title {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.journal-text {
    font-weight: 300;
    color: #5A4A38;
    line-height: 1.9;
    margin-bottom: 0.8rem;
}

.journal-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.journal-tag {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    color: #7A6A50;
    background: rgba(224, 216, 200, 0.5);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* --- Pathways Section --- */
.pathways-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.pathway-card {
    background: #FAF6EE;
    border: 1px solid #E0D8C8;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.pathway-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.pathway-card.visible:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(42, 36, 24, 0.06);
}

.pathway-icon-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 1.2rem;
}

.pathway-icon {
    width: 36px;
    height: 36px;
    color: #7A6A50;
    transition: color 0.3s ease;
}

.pathway-card:hover .pathway-icon {
    color: #6A8A60;
}

.pathway-title {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.pathway-desc {
    font-weight: 300;
    color: #7A6A50;
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1.2rem;
}

.pathway-stats {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 0.3rem;
}

.pathway-count {
    font-family: 'Space Mono', monospace;
    font-size: 1.3rem;
    color: #2A2418;
}

.pathway-unit {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    color: #7A6A50;
    text-transform: uppercase;
}

/* --- Reflection Section --- */
.reflection-content {
    max-width: 700px;
}

.reflection-quote {
    margin-bottom: 3rem;
    padding: 2rem;
    border-left: 3px solid #E0D8C8;
    background: #FAF6EE;
    border-radius: 0 8px 8px 0;
}

.quote-text {
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1.1rem, 1.5vw, 1.25rem);
    color: #5A4A38;
    line-height: 1.8;
}

.reflection-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.reflection-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.reflection-number {
    font-family: 'Space Mono', monospace;
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
    color: #2A2418;
    line-height: 1;
}

.reflection-label {
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    font-size: 0.8rem;
    color: #7A6A50;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* --- Timeline --- */
.reflection-timeline {
    position: relative;
    padding-left: 2rem;
}

.reflection-timeline::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #E0D8C8;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    padding-bottom: 1.5rem;
    opacity: 0;
    transform: translateX(-10px);
}

.timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #E0D8C8;
    flex-shrink: 0;
    margin-top: 0.35rem;
    position: relative;
    left: -1.75rem;
}

.timeline-marker-current {
    background: #6A8A60;
    box-shadow: 0 0 0 4px rgba(106, 138, 96, 0.15);
}

.timeline-content {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-left: -1.2rem;
}

.timeline-date {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    color: #7A6A50;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.timeline-text {
    font-weight: 300;
    color: #5A4A38;
    font-size: 0.95rem;
}

/* --- Footer --- */
.site-footer {
    padding: 3rem 2rem;
    text-align: center;
    border-top: 1px solid #E0D8C8;
}

.footer-inner {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.footer-mark {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #2A2418;
    letter-spacing: 0.06em;
}

.footer-divider {
    display: block;
    width: 30px;
    height: 1px;
    background: #E0D8C8;
}

.footer-note {
    font-weight: 300;
    font-size: 0.85rem;
    color: #7A6A50;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .quest-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .icon-nav {
        gap: 1.5rem;
        flex-wrap: wrap;
    }

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

    .quest-card-featured {
        grid-column: 1;
    }

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

    .reflection-stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .journal-entry {
        flex-direction: column;
        gap: 0.8rem;
    }

    .journal-date {
        flex-direction: row;
        gap: 0.5rem;
    }

    .section {
        padding: 4rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .quest-stats {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .reflection-stats-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .icon-nav {
        gap: 1rem;
    }

    .nav-icon {
        width: 28px;
        height: 28px;
    }
}
