/* misty.day — Blobitecture Design System */
/* Colors: #1A0F2B #2B1D3A #5B3A8C #9B7FCC #C47A2D #2D8C7A #E8DFF0 #F0ECF5 */

/* ==================== RESET & BASE ==================== */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Lora', serif;
    font-weight: 400;
    font-size: clamp(16px, 1.2vw, 20px);
    line-height: 1.65;
    letter-spacing: 0.01em;
    color: #2B1D3A;
    background-color: #F0ECF5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ==================== NOISE SVG OVERLAY ==================== */

.noise-svg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.04;
}

/* ==================== FOG LAYERS ==================== */

.fog-layer {
    position: fixed;
    pointer-events: none;
    z-index: 1;
    border-radius: 50%;
}

.fog-layer--wisteria {
    width: 150vw;
    height: 150vh;
    top: -25vh;
    right: -25vw;
    background: radial-gradient(ellipse at center, rgba(91, 58, 140, 0.12), transparent 70%);
}

.fog-layer--amber {
    width: 100vw;
    height: 100vh;
    bottom: -20vh;
    left: -20vw;
    background: radial-gradient(ellipse at center, rgba(196, 122, 45, 0.08), transparent 70%);
}

.fog-layer--teal {
    width: 80vw;
    height: 80vh;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse at center, rgba(45, 140, 122, 0.06), transparent 70%);
}

/* ==================== HERO SECTION ==================== */

.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1A0F2B;
    overflow: hidden;
    z-index: 2;
}

.hero__blob {
    position: absolute;
    width: clamp(300px, 50vw, 600px);
    height: clamp(300px, 50vw, 600px);
    background: #5B3A8C;
    border-radius: 40% 60% 55% 45% / 50% 35% 65% 50%;
    animation: blob-morph 12s ease-in-out infinite;
    opacity: 0.85;
    filter: blur(2px);
}

.hero__blob--secondary {
    width: clamp(200px, 30vw, 400px);
    height: clamp(200px, 30vw, 400px);
    background: #9B7FCC;
    opacity: 0.2;
    border-radius: 60% 40% 45% 55% / 35% 65% 35% 65%;
    animation: blob-morph-reverse 15s ease-in-out infinite;
    filter: blur(20px);
}

@keyframes blob-morph {
    0%, 100% {
        border-radius: 40% 60% 55% 45% / 50% 35% 65% 50%;
    }
    25% {
        border-radius: 55% 45% 40% 60% / 35% 65% 45% 55%;
    }
    50% {
        border-radius: 60% 40% 65% 35% / 55% 45% 35% 65%;
    }
    75% {
        border-radius: 35% 65% 50% 50% / 65% 40% 60% 40%;
    }
}

@keyframes blob-morph-reverse {
    0%, 100% {
        border-radius: 60% 40% 45% 55% / 35% 65% 35% 65%;
    }
    25% {
        border-radius: 45% 55% 60% 40% / 65% 35% 55% 45%;
    }
    50% {
        border-radius: 35% 65% 40% 60% / 50% 50% 50% 50%;
    }
    75% {
        border-radius: 50% 50% 55% 45% / 40% 60% 40% 60%;
    }
}

.hero__content {
    position: relative;
    z-index: 3;
    text-align: center;
    mix-blend-mode: lighten;
}

.hero__title {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: clamp(48px, 8vw, 120px);
    letter-spacing: 0.02em;
    line-height: 1.1;
    color: #E8DFF0;
}

.hero__subtitle {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #9B7FCC;
    margin-top: 40px;
}

/* ==================== IDENTITY BAND ==================== */

.identity-band {
    position: relative;
    z-index: 2;
    background-color: #2B1D3A;
    border-top: 1px solid rgba(155, 127, 204, 0.15);
    border-bottom: 1px solid rgba(155, 127, 204, 0.15);
    padding: 24px 0;
}

.identity-band__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(24px, 4vw, 56px);
    display: flex;
    align-items: center;
    gap: 20px;
}

.identity-band__name {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: 18px;
    font-variant: small-caps;
    letter-spacing: 0.08em;
    color: #E8DFF0;
}

.identity-band__divider {
    width: 40px;
    height: 1px;
    background: #2D8C7A;
    flex-shrink: 0;
}

.identity-band__tagline {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: 13px;
    letter-spacing: 0.06em;
    color: #9B7FCC;
    text-transform: uppercase;
}

/* ==================== BENTO GRID ==================== */

.bento {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
}

.bento__grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 0;
    position: relative;
}

/* Ghost grid lines behind bento */
.bento__grid::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: repeating-linear-gradient(
        to right,
        rgba(91, 58, 140, 0.06) 0px,
        rgba(91, 58, 140, 0.06) 1px,
        transparent 1px,
        transparent calc(100% / 12)
    );
    pointer-events: none;
    z-index: 0;
}

/* Cell spans */
.bento__cell--span-6-2 {
    grid-column: span 6;
    grid-row: span 2;
}

.bento__cell--span-3-2 {
    grid-column: span 3;
    grid-row: span 2;
}

.bento__cell--span-4-1 {
    grid-column: span 4;
    grid-row: span 1;
}

.bento__cell {
    position: relative;
    min-height: 200px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    opacity: 0;
    transform: scale(0.92) translateY(30px);
    filter: blur(6px);
    transition: opacity 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                filter 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.bento__cell.is-visible {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
}

.bento__cell-inner {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: inherit;
    border-radius: 24px;
    padding: clamp(24px, 4vw, 56px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

/* Cell themes */
.bento__cell-inner--dark {
    background-color: #1A0F2B;
    color: #E8DFF0;
}

.bento__cell-inner--light {
    background-color: #F0ECF5;
    color: #2B1D3A;
}

.bento__cell-inner--art {
    position: relative;
    overflow: hidden;
    padding: 0;
}

.bento__cell-inner--blueprint {
    background-color: #2B1D3A;
    position: relative;
    overflow: hidden;
}

/* Art cells with triadic colors */
.art-cell--wisteria {
    background: linear-gradient(135deg, #1A0F2B, #5B3A8C);
}

.art-cell--teal {
    background: linear-gradient(135deg, #1A0F2B, #2D8C7A);
}

.art-cell--amber {
    background: linear-gradient(135deg, #2B1D3A, #C47A2D);
}

.art-cell--mixed {
    background: linear-gradient(135deg, #5B3A8C, #2D8C7A, #C47A2D);
}

/* ==================== BLOB DECORATIONS ==================== */

.blob-decoration {
    position: absolute;
    border-radius: 40% 60% 55% 45% / 50% 35% 65% 50%;
    animation: blob-morph 10s ease-in-out infinite;
}

.blob-decoration--1 {
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
    background: rgba(155, 127, 204, 0.25);
    animation-delay: -2s;
}

.blob-decoration--2 {
    width: 45%;
    height: 45%;
    bottom: 10%;
    right: 10%;
    background: rgba(91, 58, 140, 0.15);
    animation-delay: -5s;
    animation-duration: 14s;
}

.blob-decoration--3 {
    width: 65%;
    height: 65%;
    top: 10%;
    left: 20%;
    background: rgba(45, 140, 122, 0.3);
    animation-delay: -3s;
}

.blob-decoration--4 {
    width: 40%;
    height: 40%;
    bottom: 15%;
    right: 15%;
    background: rgba(45, 140, 122, 0.15);
    animation-delay: -7s;
    animation-duration: 16s;
}

.blob-decoration--5 {
    width: 75%;
    height: 75%;
    top: 10%;
    left: 10%;
    background: rgba(196, 122, 45, 0.25);
    animation-delay: -1s;
}

.blob-decoration--6 {
    width: 50%;
    height: 50%;
    bottom: 5%;
    right: 5%;
    background: rgba(196, 122, 45, 0.12);
    animation-delay: -4s;
    animation-duration: 13s;
}

.blob-decoration--7 {
    width: 60%;
    height: 60%;
    top: 20%;
    left: 10%;
    background: rgba(91, 58, 140, 0.2);
    animation-delay: -6s;
}

.blob-decoration--8 {
    width: 50%;
    height: 50%;
    bottom: 10%;
    right: 20%;
    background: rgba(45, 140, 122, 0.15);
    animation-delay: -8s;
    animation-duration: 11s;
}

/* ==================== BLUEPRINT LINES ==================== */

.blueprint-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.bp-line {
    position: absolute;
    background: rgba(91, 58, 140, 0.2);
}

.bp-line--h {
    width: 80%;
    height: 1px;
    top: 30%;
    left: 10%;
}

.bp-line--h2 {
    width: 60%;
    height: 1px;
    top: 55%;
    left: 20%;
}

.bp-line--h3 {
    width: 70%;
    height: 1px;
    top: 75%;
    left: 15%;
}

.bp-line--v {
    width: 1px;
    height: 60%;
    top: 20%;
    left: 35%;
}

.bp-line--v2 {
    width: 1px;
    height: 50%;
    top: 25%;
    left: 70%;
}

.bp-line--d1 {
    width: 120%;
    height: 1px;
    top: 40%;
    left: -10%;
    transform: rotate(25deg);
    transform-origin: center;
}

.bp-line--d2 {
    width: 100%;
    height: 1px;
    top: 60%;
    left: 0;
    transform: rotate(-15deg);
    transform-origin: center;
}

.bp-circle {
    position: absolute;
    width: 60px;
    height: 60px;
    border: 1px solid rgba(91, 58, 140, 0.2);
    border-radius: 50%;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.bp-circle--2 {
    width: 80px;
    height: 80px;
    top: 35%;
    left: 30%;
}

.bp-circle--3 {
    width: 40px;
    height: 40px;
    top: 65%;
    left: 70%;
}

/* ==================== TYPOGRAPHY ==================== */

.bento__game-title {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.1;
    letter-spacing: 0.02em;
    margin-bottom: 12px;
}

.gradient-text {
    background: linear-gradient(135deg, #5B3A8C, #C47A2D, #2D8C7A);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bento__caption {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #2D8C7A;
}

.bento__label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #2D8C7A;
    margin-bottom: 16px;
}

.bento__body-text {
    font-family: 'Lora', serif;
    font-weight: 400;
    font-size: clamp(16px, 1.2vw, 20px);
    line-height: 1.65;
    letter-spacing: 0.01em;
    color: #2B1D3A;
}

.bento__cell-inner--dark .bento__body-text {
    color: #E8DFF0;
}

/* ==================== CODA ==================== */

.coda {
    position: relative;
    z-index: 2;
    height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1A0F2B;
    overflow: hidden;
}

.coda__blob {
    position: absolute;
    width: clamp(200px, 30vw, 400px);
    height: clamp(200px, 30vw, 400px);
    background: #5B3A8C;
    border-radius: 55% 45% 60% 40% / 45% 55% 45% 55%;
    animation: blob-morph 18s ease-in-out infinite;
    opacity: 0.15;
    filter: blur(40px);
}

.coda__text {
    position: relative;
    z-index: 2;
    font-family: 'Libre Baskerville', serif;
    font-weight: 400;
    font-size: clamp(18px, 2.5vw, 32px);
    font-style: italic;
    color: #9B7FCC;
    letter-spacing: 0.03em;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.coda__text.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== RESPONSIVE ==================== */

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

    .bento__cell--span-6-2 {
        grid-column: span 6;
        grid-row: span 1;
    }

    .bento__cell--span-3-2 {
        grid-column: span 3;
        grid-row: span 1;
    }

    .bento__cell--span-4-1 {
        grid-column: span 6;
        grid-row: span 1;
    }

    .identity-band__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .identity-band__divider {
        display: none;
    }
}

@media (max-width: 480px) {
    .bento__grid {
        grid-template-columns: 1fr;
    }

    .bento__cell--span-6-2,
    .bento__cell--span-3-2,
    .bento__cell--span-4-1 {
        grid-column: span 1;
        grid-row: span 1;
    }

    .bento__cell {
        min-height: 180px;
    }
}
