/* ============================================
   mujun.quest — Watercolor Dashboard
   Palette: Honeyed Neutral
   Typography: Playfair Display, Lora, Source Sans 3
   ============================================ */

/* --- Palette Reference ---
   Warm Parchment:     #F5EBD8
   Diluted Honey:      #E8D5A8
   Aged Amber:         #B8860B
   Burnt Sienna Wash:  #C4956A
   Ink Walnut:         #4A3728
   Soft Umber:         #5C4A3A
   Rose Quartz Tint:   #D4B5A0
   Espresso Shadow:    #2C1E14
   Champagne Mist:     #F9F2E4
*/

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: #F5EBD8;
    color: #5C4A3A;
    font-family: 'Lora', Georgia, serif;
    font-size: clamp(0.95rem, 1.1vw, 1.1rem);
    line-height: 1.85;
    overflow-x: hidden;
    position: relative;
}

/* --- SVG Filters (hidden) --- */
.svg-filters {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

/* --- Marble Texture Background --- */
.marble-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.05;
    background: linear-gradient(135deg, #D4B5A0 0%, #E8D5A8 50%, #D4B5A0 100%);
    filter: url(#marble-1);
}

/* --- Grid Dot Paper Underlay --- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.04;
    background-image: radial-gradient(circle, #4A3728 0.8px, transparent 0.8px);
    background-size: 24px 24px;
}

/* ============================================
   HERO PANEL
   ============================================ */
.hero-panel {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1;
}

.hero-watercolor-wash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(200, 149, 106, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse at 75% 60%, rgba(232, 213, 168, 0.22) 0%, transparent 55%),
        radial-gradient(ellipse at 50% 80%, rgba(212, 181, 160, 0.12) 0%, transparent 50%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
}

.hero-domain {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 7rem);
    color: #4A3728;
    letter-spacing: -0.01em;
    line-height: 1.1;
    opacity: 0;
    animation: hero-fade-in 1.5s ease-out 0.3s forwards;
}

.hero-subtitle {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 1.1rem;
    color: #5C4A3A;
    margin-top: 1.2rem;
    opacity: 0;
    transform: translateY(12px);
    animation: hero-subtitle-in 1s ease-out 1.5s forwards;
}

.hero-divider {
    width: 120px;
    height: 1px;
    background-color: rgba(74, 55, 40, 0.15);
    margin: 1.8rem auto 0;
    transform: scaleX(0);
    animation: divider-draw 0.8s ease-out 3s forwards;
}

/* Hero corner wash marks */
.hero-corner-wash {
    position: absolute;
    width: 300px;
    height: 300px;
    pointer-events: none;
    z-index: 1;
    border-radius: 50%;
}

.hero-corner-wash--tl {
    top: -80px;
    left: -80px;
    background: radial-gradient(circle, rgba(196, 149, 106, 0.2) 0%, transparent 70%);
    /* Burnt Sienna Wash: #C4956A */
}

.hero-corner-wash--br {
    bottom: -80px;
    right: -80px;
    background: radial-gradient(circle, rgba(232, 213, 168, 0.18) 0%, transparent 70%);
}

/* --- Hero Animations --- */
@keyframes hero-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes hero-subtitle-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes divider-draw {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

/* ============================================
   DASHBOARD SECTIONS
   ============================================ */
.dashboard-section {
    position: relative;
    z-index: 1;
    padding: 0 1.5vw;
}

/* Section divider lines */
.section-divider {
    width: 60%;
    max-width: 600px;
    height: 1px;
    background-color: rgba(74, 55, 40, 0.08);
    margin: 3rem auto;
}

/* ============================================
   DASHBOARD GRID
   ============================================ */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5vw;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.dashboard-grid--3col > .widget:nth-child(1) {
    grid-column: 1 / 5;
}
.dashboard-grid--3col > .widget:nth-child(2) {
    grid-column: 5 / 9;
}
.dashboard-grid--3col > .widget:nth-child(3) {
    grid-column: 9 / 13;
}

.dashboard-grid--full > .widget {
    grid-column: 1 / 13;
}

.dashboard-grid--4col > .widget:nth-child(1) {
    grid-column: 1 / 4;
}
.dashboard-grid--4col > .widget:nth-child(2) {
    grid-column: 4 / 7;
}
.dashboard-grid--4col > .widget:nth-child(3) {
    grid-column: 7 / 10;
}
.dashboard-grid--4col > .widget:nth-child(4) {
    grid-column: 10 / 13;
}

/* ============================================
   WIDGET BASE
   ============================================ */
.widget {
    position: relative;
    background: rgba(245, 235, 216, 0.9);
    border: 1px solid rgba(74, 55, 40, 0.12);
    border-radius: 2px;
    overflow: visible;
    /* Fade-reveal initial state */
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.widget.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Watercolor bleed pseudo-elements */
.widget--bleed-right::after {
    content: '';
    position: absolute;
    top: 20%;
    right: -30px;
    width: 40px;
    height: 60%;
    background: linear-gradient(to right, rgba(232, 213, 168, 0.25), transparent);
    pointer-events: none;
    border-radius: 0 50% 50% 0;
}

.widget--bleed-left::after {
    content: '';
    position: absolute;
    top: 15%;
    left: -25px;
    width: 35px;
    height: 55%;
    background: linear-gradient(to left, rgba(196, 149, 106, 0.2), transparent);
    pointer-events: none;
    border-radius: 50% 0 0 50%;
}

.widget--bleed-bottom::after {
    content: '';
    position: absolute;
    bottom: -25px;
    left: 25%;
    width: 50%;
    height: 30px;
    background: linear-gradient(to bottom, rgba(212, 181, 160, 0.2), transparent);
    pointer-events: none;
    border-radius: 0 0 50% 50%;
}

/* Widget tag (utility text) */
.widget-tag {
    display: inline-block;
    font-family: 'Source Sans 3', 'Helvetica Neue', sans-serif;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(74, 55, 40, 0.55);
    padding: 1.2rem 2rem 0;
}

/* Widget heading */
.widget-heading {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    color: #4A3728;
    letter-spacing: 0.03em;
    padding: 0.6rem 2rem 0;
    line-height: 1.3;
}

/* Widget body */
.widget-body {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 1.05rem;
    color: #5C4A3A;
    line-height: 1.85;
    padding: 0.8rem 2.5rem 2rem;
}

/* ============================================
   TEXT PANELS
   ============================================ */
.widget--text {
    padding: 0;
}

.widget--text .widget-heading {
    padding-top: 1.5rem;
}

/* ============================================
   METRIC PANELS
   ============================================ */
.widget--metric {
    text-align: center;
    padding: 2.5rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 260px;
}

.metric-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.6;
}

.metric-value {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 900;
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: #B8860B;
    letter-spacing: -0.02em;
    line-height: 1.2;
    text-shadow: 2px 2px 8px rgba(184, 134, 11, 0.15);
    position: relative;
    z-index: 1;
}

.metric-label {
    font-family: 'Lora', Georgia, serif;
    font-variant: small-caps;
    font-size: 0.95rem;
    color: #5C4A3A;
    letter-spacing: 0.05em;
    margin-top: 0.6rem;
    position: relative;
    z-index: 1;
}

/* Metric decoration: concentric circles */
.metric-circles {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.metric-circle {
    position: absolute;
    border: 1px dashed rgba(74, 55, 40, 0.15);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.metric-circle--1 {
    width: 180px;
    height: 180px;
}

.metric-circle--2 {
    width: 130px;
    height: 130px;
}

.metric-circle--3 {
    width: 80px;
    height: 80px;
}

/* Metric decoration: waveform */
.metric-waveform {
    position: absolute;
    bottom: 20px;
    left: 10%;
    width: 80%;
    height: 40px;
    opacity: 0.5;
}

/* Metric decoration: dot pattern */
.metric-dots {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, rgba(74, 55, 40, 0.08) 1px, transparent 1px);
    background-size: 16px 16px;
}

/* ============================================
   NARRATIVE PANEL
   ============================================ */
.widget--narrative {
    position: relative;
    padding: 0;
    overflow: hidden;
}

.narrative-watercolor-wash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 10% 20%, rgba(196, 149, 106, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 70%, rgba(232, 213, 168, 0.2) 0%, transparent 55%),
        radial-gradient(ellipse at 45% 90%, rgba(212, 181, 160, 0.1) 0%, transparent 45%);
    z-index: 0;
}

.narrative-content {
    position: relative;
    z-index: 1;
    padding: 3rem 4rem;
    max-width: 900px;
    margin: 0 auto;
}

.widget-heading--narrative {
    font-weight: 700;
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    padding: 0 0 1rem;
    text-align: center;
}

.widget-body--narrative {
    font-style: normal;
    padding: 0 0 1.5em;
    font-size: clamp(0.95rem, 1.1vw, 1.1rem);
}

.widget-body--narrative:last-child {
    padding-bottom: 0;
}

/* ============================================
   VISUALIZATION PANELS
   ============================================ */
.widget--viz {
    padding: 0;
    min-height: 220px;
    display: flex;
    flex-direction: column;
}

.widget--viz .widget-tag {
    padding-bottom: 0.5rem;
}

.viz-container {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

/* Concentric circles visualization */
.viz-circles {
    position: relative;
}

.viz-circle {
    position: absolute;
    border: 1px dashed rgba(74, 55, 40, 0.2);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.viz-circle--1 { width: 150px; height: 150px; }
.viz-circle--2 { width: 120px; height: 120px; }
.viz-circle--3 { width: 90px; height: 90px; }
.viz-circle--4 { width: 60px; height: 60px; }
.viz-circle--5 { width: 30px; height: 30px; }

.viz-dot {
    width: 6px;
    height: 6px;
    background: #B8860B;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 8px rgba(184, 134, 11, 0.3);
}

/* Gradient bar visualization */
.viz-bars {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
    padding: 1.5rem 2rem;
}

.viz-bar {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #E8D5A8, #F5EBD8);
}

.viz-bar--1 { width: 90%; }
.viz-bar--2 { width: 65%; }
.viz-bar--3 { width: 82%; }
.viz-bar--4 { width: 45%; }
.viz-bar--5 { width: 73%; }
.viz-bar--6 { width: 55%; }
.viz-bar--7 { width: 88%; }

/* Waveform visualization */
.viz-wave {
    padding: 1rem;
}

.viz-waveform-svg {
    width: 100%;
    height: auto;
    max-height: 120px;
}

.wave-path--1 {
    stroke: rgba(196, 149, 106, 0.35);
    stroke-width: 1.5;
}

.wave-path--2 {
    stroke: rgba(184, 134, 11, 0.2);
    stroke-width: 1;
}

.wave-path--3 {
    stroke: rgba(212, 181, 160, 0.25);
    stroke-width: 1.2;
}

/* Timeline visualization */
.viz-timeline {
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
}

.viz-timeline-track {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    width: 100%;
    height: 60px;
    border-bottom: 1px solid rgba(74, 55, 40, 0.12);
    padding: 0 0.5rem;
}

.viz-tick {
    width: 1px;
    background-color: rgba(74, 55, 40, 0.2);
}

.viz-tick--major {
    height: 40px;
    background-color: rgba(184, 134, 11, 0.35);
    width: 2px;
}

.viz-tick--minor {
    height: 20px;
}

.viz-dot-grid {
    width: 100%;
    height: 50px;
    background-image: radial-gradient(circle, rgba(74, 55, 40, 0.06) 1.2px, transparent 1.2px);
    background-size: 12px 12px;
}

/* ============================================
   CLOSING PANEL (FOOTER)
   ============================================ */
.closing-panel {
    position: relative;
    z-index: 1;
    background-color: #2C1E14;
    margin-top: 3rem;
    padding: 5rem 2rem;
    text-align: center;
}

.closing-content {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.closing-content.revealed {
    opacity: 1;
    transform: translateY(0);
}

.closing-domain {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 400;
    font-size: clamp(2rem, 5vw, 4rem);
    color: #F9F2E4;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.closing-tagline {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 1rem;
    color: rgba(249, 242, 228, 0.6);
    margin-top: 1rem;
}

.closing-divider {
    width: 80px;
    height: 1px;
    background-color: rgba(249, 242, 228, 0.15);
    margin: 2rem auto;
}

.closing-year {
    font-family: 'Source Sans 3', 'Helvetica Neue', sans-serif;
    font-weight: 300;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(249, 242, 228, 0.35);
}

/* ============================================
   RESPONSIVE: TABLET (768-1024px)
   ============================================ */
@media (max-width: 1024px) and (min-width: 769px) {
    .dashboard-grid--3col > .widget:nth-child(1) {
        grid-column: 1 / 7;
    }
    .dashboard-grid--3col > .widget:nth-child(2) {
        grid-column: 7 / 13;
    }
    .dashboard-grid--3col > .widget:nth-child(3) {
        grid-column: 1 / 7;
    }

    .dashboard-grid--4col > .widget:nth-child(1) {
        grid-column: 1 / 7;
    }
    .dashboard-grid--4col > .widget:nth-child(2) {
        grid-column: 7 / 13;
    }
    .dashboard-grid--4col > .widget:nth-child(3) {
        grid-column: 1 / 7;
    }
    .dashboard-grid--4col > .widget:nth-child(4) {
        grid-column: 7 / 13;
    }

    .narrative-content {
        padding: 2.5rem 3rem;
    }
}

/* ============================================
   RESPONSIVE: MOBILE (<768px)
   ============================================ */
@media (max-width: 768px) {
    .hero-panel {
        height: 85vh;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .dashboard-grid--3col > .widget:nth-child(1),
    .dashboard-grid--3col > .widget:nth-child(2),
    .dashboard-grid--3col > .widget:nth-child(3) {
        grid-column: 1 / -1;
    }

    .dashboard-grid--4col > .widget:nth-child(1),
    .dashboard-grid--4col > .widget:nth-child(2),
    .dashboard-grid--4col > .widget:nth-child(3),
    .dashboard-grid--4col > .widget:nth-child(4) {
        grid-column: 1 / -1;
    }

    .dashboard-grid--full > .widget {
        grid-column: 1 / -1;
    }

    .narrative-content {
        padding: 2rem 1.5rem;
    }

    .widget-body {
        padding: 0.8rem 1.5rem 1.5rem;
    }

    .widget-tag {
        padding: 1rem 1.5rem 0;
    }

    .widget-heading {
        padding: 0.5rem 1.5rem 0;
    }

    .metric-value {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }

    .widget--metric {
        min-height: 200px;
    }

    .widget--viz {
        min-height: 180px;
    }

    .closing-panel {
        padding: 3.5rem 1.5rem;
    }

    /* Hide bleed effects on mobile for cleanliness */
    .widget--bleed-right::after,
    .widget--bleed-left::after,
    .widget--bleed-bottom::after {
        display: none;
    }

    .dashboard-section {
        padding: 0 1rem;
    }

    .section-divider {
        margin: 2rem auto;
    }

    .hero-corner-wash {
        width: 200px;
        height: 200px;
    }
}

/* ============================================
   UTILITY & SELECTION
   ============================================ */
::selection {
    background: rgba(184, 134, 11, 0.2);
    color: #4A3728;
}

::-moz-selection {
    background: rgba(184, 134, 11, 0.2);
    color: #4A3728;
}
