/* license.broker — Blobitecture Pastoral Bento */

:root {
    --morning-ice: #D6E4F0;
    --lavender-veil: #E0D4EC;
    --rose-breath: #F0DDE4;
    --twilight-slate: #3A4A6B;
    --meadow-dew: #7BAE8E;
    --honeysuckle: #D4A76A;
    --parchment-mist: #F5F2EE;
    --cloud-white: #FAFBFD;
    --haze-gray: #7A8599;
    --ice-edge: #C8D5E8;
}

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

body {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    color: var(--twilight-slate);
    background: var(--parchment-mist);
    line-height: 1.65;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

/* Noise texture background */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    filter: url(#pastoral-noise);
    background: var(--parchment-mist);
    z-index: -2;
    pointer-events: none;
}

/* Grid-lines pattern */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(200, 213, 232, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(200, 213, 232, 0.12) 1px, transparent 1px);
    background-size: 80px 80px;
    z-index: -1;
    pointer-events: none;
}

/* ---- Scenes ---- */
.scene {
    position: relative;
    z-index: 1;
    padding: clamp(2rem, 5vw, 6rem) clamp(1rem, 4vw, 4rem);
}

/* ---- Reveal ---- */
[data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ============ BENTO GRID ============ */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* ---- Cell annotations ---- */
.cell-annotation {
    font-family: 'Caveat', cursive;
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--haze-gray);
    display: block;
    margin-bottom: 0.5rem;
    text-align: center;
}

/* ---- Blob Breathing Keyframes ---- */
@keyframes blob-breathe-a {
    0%   { border-radius: 60% 40% 55% 45% / 45% 55% 40% 60%; }
    25%  { border-radius: 55% 45% 60% 40% / 50% 50% 45% 55%; }
    50%  { border-radius: 50% 50% 45% 55% / 55% 45% 50% 50%; }
    75%  { border-radius: 45% 55% 50% 50% / 40% 60% 55% 45%; }
    100% { border-radius: 60% 40% 55% 45% / 45% 55% 40% 60%; }
}

@keyframes blob-breathe-b {
    0%   { border-radius: 50% 80% 45% 70% / 70% 45% 80% 50%; }
    25%  { border-radius: 55% 75% 50% 65% / 65% 50% 75% 55%; }
    50%  { border-radius: 45% 70% 55% 60% / 60% 55% 70% 45%; }
    75%  { border-radius: 50% 75% 48% 68% / 68% 48% 78% 52%; }
    100% { border-radius: 50% 80% 45% 70% / 70% 45% 80% 50%; }
}

@keyframes blob-breathe-c {
    0%   { border-radius: 40% 60% 35% 65% / 55% 35% 60% 40%; }
    25%  { border-radius: 45% 55% 40% 60% / 50% 40% 55% 45%; }
    50%  { border-radius: 38% 62% 42% 58% / 52% 38% 62% 42%; }
    75%  { border-radius: 42% 58% 37% 63% / 48% 42% 58% 38%; }
    100% { border-radius: 40% 60% 35% 65% / 55% 35% 60% 40%; }
}

@keyframes blob-breathe-d {
    0%   { border-radius: 70% 30% 65% 35% / 35% 65% 30% 70%; }
    25%  { border-radius: 65% 35% 60% 40% / 40% 60% 35% 65%; }
    50%  { border-radius: 68% 32% 62% 38% / 38% 62% 32% 68%; }
    75%  { border-radius: 72% 28% 67% 33% / 33% 67% 28% 72%; }
    100% { border-radius: 70% 30% 65% 35% / 35% 65% 30% 70%; }
}

@keyframes blob-breathe-e {
    0%   { border-radius: 45% 55% 50% 50% / 60% 40% 55% 45%; }
    25%  { border-radius: 50% 50% 55% 45% / 55% 45% 50% 50%; }
    50%  { border-radius: 48% 52% 47% 53% / 58% 42% 52% 48%; }
    75%  { border-radius: 43% 57% 52% 48% / 62% 38% 57% 43%; }
    100% { border-radius: 45% 55% 50% 50% / 60% 40% 55% 45%; }
}

/* ---- Bento Cells ---- */
.bento-cell {
    position: relative;
    background: linear-gradient(160deg, rgba(214, 228, 240, 0.4), rgba(250, 251, 253, 0.25));
    backdrop-filter: blur(12px) saturate(1.4);
    -webkit-backdrop-filter: blur(12px) saturate(1.4);
    border: 1px solid rgba(200, 213, 232, 0.4);
    box-shadow: 0 8px 32px rgba(100, 120, 180, 0.08), 0 2px 8px rgba(100, 120, 180, 0.04);
    padding: 2rem;
    overflow: hidden;
    transition: all 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.bento-cell:hover {
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    background: linear-gradient(160deg, rgba(214, 228, 240, 0.55), rgba(250, 251, 253, 0.4));
    transform: scale(1.015);
    box-shadow: 0 12px 48px rgba(100, 120, 180, 0.14), 0 4px 12px rgba(100, 120, 180, 0.06);
}

.bento-cell:hover .cell-inner svg animate {
    animation-play-state: running;
}

/* Blob shape assignment */
[data-blob="a"] { animation: blob-breathe-a 12s ease-in-out infinite; }
[data-blob="b"] { animation: blob-breathe-b 11s ease-in-out infinite; }
[data-blob="c"] { animation: blob-breathe-c 13s ease-in-out infinite; }
[data-blob="d"] { animation: blob-breathe-d 10s ease-in-out infinite; }
[data-blob="e"] { animation: blob-breathe-e 14s ease-in-out infinite; }

.bento-cell:hover {
    animation-play-state: paused;
}

/* ---- Cell Inner ---- */
.cell-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
}

/* ============ HERO CELL ============ */
.hero-cell {
    grid-column: 1 / 9;
    grid-row: 1 / 4;
    background: linear-gradient(135deg, rgba(214, 228, 240, 0.45), rgba(224, 212, 236, 0.35), rgba(240, 221, 228, 0.3));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.hero-icon {
    margin-bottom: 1rem;
}

.hero-heading {
    font-family: 'Baloo 2', cursive;
    font-weight: 700;
    font-size: clamp(2.2rem, 5vw, 4rem);
    color: var(--twilight-slate);
    letter-spacing: -0.01em;
    line-height: 1.15;
    margin-bottom: 0.5rem;
}

.hero-text {
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    color: var(--twilight-slate);
    opacity: 0.85;
    max-width: 420px;
    line-height: 1.65;
}

/* ============ STAT CELLS ============ */
.stat-cell {
    grid-column: span 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.stat-cell:nth-child(2) { grid-column: 9 / 13; grid-row: 1; }
.stat-cell:nth-child(3) { grid-column: 9 / 13; grid-row: 2; }
.stat-cell:nth-child(4) { grid-column: 9 / 13; grid-row: 3; }

.stat-icon {
    margin-bottom: 0.5rem;
}

.stat-title {
    font-family: 'Baloo 2', cursive;
    font-weight: 500;
    font-size: 1.2rem;
    color: var(--twilight-slate);
    margin-bottom: 0.25rem;
}

.stat-text {
    font-size: 0.9rem;
    color: var(--haze-gray);
    line-height: 1.5;
}

/* ============ FOOTPATH (Narrative Band) ============ */
.scene-footpath {
    background: linear-gradient(180deg, rgba(245, 242, 238, 0.6), rgba(250, 251, 253, 0.4));
    padding: clamp(3rem, 6vw, 6rem) clamp(1rem, 4vw, 4rem);
    text-align: center;
    position: relative;
}

.scene-footpath::before {
    content: '';
    position: absolute;
    inset: 0;
    filter: url(#dense-noise);
    background: var(--parchment-mist);
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
}

.footpath-inner {
    position: relative;
    z-index: 1;
}

.footpath-quote {
    font-family: 'Caveat', cursive;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    color: var(--twilight-slate);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.4;
}

/* ============ GARDEN BEDS (Content Bento) ============ */
.scene-garden {
    padding: clamp(2rem, 5vw, 6rem) clamp(1rem, 4vw, 4rem);
}

.bento-lower {
    grid-template-columns: repeat(12, 1fr);
}

.bento-lower .content-cell:nth-child(1) { grid-column: 1 / 7; }
.bento-lower .content-cell:nth-child(2) { grid-column: 7 / 13; }
.bento-lower .content-cell:nth-child(3) { grid-column: 1 / 5; }
.bento-lower .content-cell:nth-child(4) { grid-column: 5 / 9; }
.bento-lower .content-cell:nth-child(5) { grid-column: 9 / 13; }
.bento-lower .content-cell:nth-child(6) { grid-column: 3 / 11; }

.content-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 220px;
}

.cell-icon {
    margin-bottom: 0.75rem;
}

.cell-title {
    font-family: 'Baloo 2', cursive;
    font-weight: 500;
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    color: var(--twilight-slate);
    margin-bottom: 0.25rem;
}

.cell-text {
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    color: var(--twilight-slate);
    opacity: 0.85;
    max-width: 320px;
    line-height: 1.55;
}

/* ============ HORIZON (Footer) ============ */
.scene-horizon {
    background: linear-gradient(180deg, rgba(123, 174, 142, 0.08), rgba(245, 242, 238, 0.02));
    padding: clamp(4rem, 8vw, 8rem) clamp(2rem, 5vw, 6rem);
    text-align: center;
    position: relative;
}

.scene-horizon::before {
    content: '';
    position: absolute;
    inset: 0;
    filter: url(#dense-noise);
    background: var(--parchment-mist);
    opacity: 0.4;
    z-index: 0;
    pointer-events: none;
}

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

.horizon-wordmark {
    font-family: 'Baloo 2', cursive;
    font-weight: 700;
    font-size: clamp(1.4rem, 3vw, 2rem);
    color: var(--twilight-slate);
    margin-bottom: 1rem;
}

.horizon-text {
    font-size: 0.85rem;
    color: var(--haze-gray);
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Frost crystals */
.frost-crystals {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.crystal {
    width: 8px;
    height: 8px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: var(--ice-edge);
    opacity: 0.4;
}

/* ---- Light pools behind cells ---- */
.hero-cell::before {
    content: '';
    position: absolute;
    inset: -10%;
    background: radial-gradient(ellipse at center, rgba(214, 228, 240, 0.2) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

/* ---- Mobile ---- */
@media (max-width: 767px) {
    .bento-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .hero-cell {
        grid-column: 1;
        grid-row: auto;
        min-height: 300px;
    }

    .stat-cell:nth-child(2),
    .stat-cell:nth-child(3),
    .stat-cell:nth-child(4) {
        grid-column: 1;
        grid-row: auto;
    }

    .bento-lower .content-cell:nth-child(1),
    .bento-lower .content-cell:nth-child(2),
    .bento-lower .content-cell:nth-child(3),
    .bento-lower .content-cell:nth-child(4),
    .bento-lower .content-cell:nth-child(5),
    .bento-lower .content-cell:nth-child(6) {
        grid-column: 1;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .bento-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .hero-cell {
        grid-column: 1 / 5;
        grid-row: 1 / 3;
    }

    .stat-cell:nth-child(2) { grid-column: 5 / 7; grid-row: 1; }
    .stat-cell:nth-child(3) { grid-column: 5 / 7; grid-row: 2; }
    .stat-cell:nth-child(4) { grid-column: 1 / 7; grid-row: 3; }

    .bento-lower .content-cell:nth-child(1) { grid-column: 1 / 4; }
    .bento-lower .content-cell:nth-child(2) { grid-column: 4 / 7; }
    .bento-lower .content-cell:nth-child(3) { grid-column: 1 / 3; }
    .bento-lower .content-cell:nth-child(4) { grid-column: 3 / 5; }
    .bento-lower .content-cell:nth-child(5) { grid-column: 5 / 7; }
    .bento-lower .content-cell:nth-child(6) { grid-column: 2 / 6; }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    [data-reveal] {
        opacity: 1;
        transform: none;
    }

    .bento-cell {
        border-radius: 24px;
    }
}
