/* ========================================
   bability.pro - Cottagecore Data Garden
   Palette: #F7F5F0, #2B2D42, #3D3D3D, #8D99AE,
            #C2A0A0, #7B9E6B, #B8B8D1, #D4CFC7, #2B3A2E, #F0ECE3
   Fonts: Playfair Display, Libre Baskerville, VT323
   ======================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    background: #F7F5F0;
    color: #3D3D3D;
    font-family: 'Libre Baskerville', serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.7;
    letter-spacing: 0.005em;
    overflow-x: hidden;
}

/* ---- Wordmark ---- */
.wordmark {
    position: fixed;
    top: 24px;
    left: 24px;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 16px;
    color: #2B2D42;
    opacity: 0.5;
    z-index: 50;
    transition: opacity 0.6s ease;
}

.wordmark.faded {
    opacity: 0;
}

/* ---- Frost Panel (signature effect) ---- */
.frost-panel {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(141, 153, 174, 0.25);
    border-radius: 12px;
    transition: box-shadow 0.3s ease;
}

.frost-panel:hover {
    box-shadow: 0 8px 32px rgba(43, 45, 66, 0.08);
}

/* ---- Compass ---- */
.compass-wrapper {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
    animation: compassSpin 120s linear infinite;
}

@keyframes compassSpin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ---- Hero Background Vines ---- */
.hero-bg-vines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

.hero-bg-vines svg {
    width: 100%;
    height: 100%;
}

/* ---- Hero ---- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.hero-panel {
    width: min(90vw, 720px);
    padding: 64px 48px;
    border-radius: 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.marble-vein-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(42px, 7vw, 96px);
    letter-spacing: -0.01em;
    line-height: 1.08;
    color: #2B2D42;
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    font-family: 'Libre Baskerville', serif;
    font-style: italic;
    font-size: 20px;
    color: #8D99AE;
    margin-top: 16px;
    position: relative;
    z-index: 1;
}

/* ---- Marble Dividers ---- */
.marble-divider {
    width: 100%;
    height: 80px;
}

.marble-divider svg {
    width: 100%;
    height: 80px;
}

/* ---- Garden Rooms (shared) ---- */
.garden-room {
    position: relative;
    z-index: 1;
    padding: 60px 24px;
}

.room-content {
    max-width: 680px;
    margin: 0 auto;
}

.text-column {
    max-width: 680px;
}

.chart-wide {
    max-width: 960px;
}

.gallery-container {
    max-width: 1120px;
}

.section-heading {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(28px, 4vw, 52px);
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: #2B2D42;
    margin-bottom: 32px;
}

.body-text {
    font-family: 'Libre Baskerville', serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.7;
    color: #3D3D3D;
    margin-bottom: 24px;
    max-width: 65ch;
}

/* ---- Room 2: Cascade Cards ---- */
.cascade-cards {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-top: 40px;
}

.cascade-card {
    padding: 32px;
    position: relative;
    max-width: 420px;
    border: 1px solid #D4CFC7;
}

.metric-label {
    font-family: 'VT323', monospace;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8D99AE;
    display: block;
    margin-bottom: 8px;
}

.metric-value {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 48px;
    color: #2B2D42;
    display: block;
    line-height: 1.1;
}

.metric-unit {
    font-family: 'VT323', monospace;
    font-size: 14px;
    letter-spacing: 0.08em;
    color: #8D99AE;
    display: block;
    margin-top: 8px;
}

.card-pedestal {
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, #D4CFC7, transparent);
    border-radius: 0 0 12px 12px;
}

/* ---- Room 3: Greenhouse ---- */
.room-greenhouse {
    background: #2B3A2E;
    padding: 80px 24px;
}

.greenhouse-overlay {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 16px;
    padding: 48px;
    max-width: 1060px;
    margin: 0 auto;
}

.area-chart-container {
    margin: 32px 0;
}

.area-chart {
    width: 100%;
    height: auto;
}

/* ---- Chart Containers & Skeleton ---- */
.chart-container {
    position: relative;
    margin: 40px 0;
}

.skeleton {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
    transition: opacity 400ms ease 800ms;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
}

.skeleton-line {
    height: 16px;
    border-radius: 8px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    background-color: rgba(141, 153, 174, 0.12);
    background-size: 200% 100%;
    animation: shimmer 1.8s ease-in-out infinite;
}

.skeleton-line.short {
    width: 60%;
}

.skeleton-area {
    height: 200px;
    border-radius: 8px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    background-color: rgba(141, 153, 174, 0.12);
    background-size: 200% 100%;
    animation: shimmer 1.8s ease-in-out infinite;
}

.skeleton-dots {
    position: relative;
    width: 100%;
    height: 100%;
}

.skeleton-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    background-color: rgba(141, 153, 174, 0.12);
    background-size: 200% 100%;
    animation: shimmer 1.8s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.chart {
    opacity: 0;
    transition: opacity 400ms ease 1000ms;
}

.chart-container.revealed .skeleton {
    opacity: 0;
}

.chart-container.revealed .chart {
    opacity: 1;
}

.chart-label {
    font-family: 'VT323', monospace;
    font-size: 14px;
    letter-spacing: 0.08em;
}

.vine-chart,
.scatter-chart {
    width: 100%;
    height: auto;
}

/* ---- Room 4: Walled Garden ---- */
.walled-layout {
    max-width: 960px;
    display: grid;
    grid-template-columns: 40% 60%;
    gap: 48px;
}

.walled-narrow {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.data-callout {
    padding: 16px 20px;
}

.callout-value {
    font-family: 'VT323', monospace;
    font-size: 32px;
    color: #2B2D42;
    display: block;
    margin-top: 4px;
    letter-spacing: 0.04em;
}

/* ---- Room 5: The Gate ---- */
.room-gate {
    padding: 120px 24px;
    text-align: center;
}

.closing-text {
    font-family: 'Libre Baskerville', serif;
    font-style: italic;
    font-size: 22px;
    line-height: 1.6;
    color: #2B2D42;
    max-width: 580px;
    margin: 0 auto 48px;
}

.domain-echo {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 28px;
    color: #8D99AE;
    opacity: 0.4;
}

/* ---- Decorative Botanicals ---- */
.botanical-decor {
    position: absolute;
    pointer-events: none;
}

.decor-herb-leaf {
    top: 80px;
    right: 10%;
}

.decor-herb-fern {
    bottom: 60px;
    left: 6%;
}

.decor-gallery {
    top: 40px;
    right: 8%;
}

.decor-greenhouse {
    bottom: 30px;
    right: 12%;
}

.decor-walled {
    bottom: 40px;
    left: 5%;
}

/* ---- Scroll Reveal ---- */
.scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 600ms ease-out, transform 600ms ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    body {
        font-size: 16px;
        line-height: 1.65;
    }

    .hero-panel {
        width: 92vw;
        padding: 40px 24px;
    }

    .hero-subtitle {
        font-size: 17px;
    }

    .garden-room {
        padding: 40px 16px;
    }

    .room-greenhouse {
        padding: 50px 16px;
    }

    .marble-divider {
        height: 40px;
    }

    .marble-divider svg {
        height: 40px;
    }

    .cascade-cards .cascade-card {
        margin-left: 0 !important;
    }

    .walled-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .body-text {
        font-size: 16px;
        line-height: 1.65;
    }

    .greenhouse-overlay {
        padding: 24px;
    }

    .chart-container svg {
        aspect-ratio: 16/9;
    }

    .metric-value {
        font-size: 36px;
    }

    .closing-text {
        font-size: 19px;
    }

    .botanical-decor {
        display: none;
    }
}