/*
Theme Name: Moonlit Pillow Kingdom
Author: WordPress Telex
Description: A soft, classy storybook block theme for the Pillow District blog. Features a dreamy lavender-grey palette, warm amber glows, elegant serif typography, and a distinctive two-column book-spread layout.
Version: 0.1.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: moonlit-pillow-kingdom
Tags: block-theme, full-site-editing, blog

Moonlit Pillow Kingdom — whispers from the sleeping village.
*/

/* Storybook container */
.storybook-spread {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-radius: 20px;
    overflow: hidden;
    min-height: 75vh;
    position: relative;
    box-shadow:
        0 30px 60px rgba(74, 61, 92, 0.15),
        0 15px 35px rgba(74, 61, 92, 0.1);
}

.storybook-spread::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 50px;
    transform: translateX(-50%);
    background: linear-gradient(
        to right,
        rgba(74, 61, 92, 0.0) 0%,
        rgba(74, 61, 92, 0.06) 40%,
        rgba(74, 61, 92, 0.1) 50%,
        rgba(74, 61, 92, 0.04) 60%,
        rgba(74, 61, 92, 0.0) 100%
    );
    pointer-events: none;
    z-index: 5;
}

.storybook-spread > .wp-block-column:first-child {
    position: relative;
    overflow: hidden;
}

.storybook-spread > .wp-block-column:first-child::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, transparent 75%, rgba(74, 61, 92, 0.15) 100%);
    z-index: 2;
    pointer-events: none;
}

.storybook-spread > .wp-block-column:first-child img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.storybook-spread > .wp-block-column:last-child {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
}

.storybook-spread > .wp-block-column:last-child::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.04;
    background-image:
        linear-gradient(90deg, #4A3D5C 1px, transparent 1px),
        linear-gradient(0deg, #4A3D5C 1px, transparent 1px);
    background-size: 3px 3px;
    pointer-events: none;
    z-index: 1;
}

/* Glowing divider */
.glowing-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.glowing-divider::before,
.glowing-divider::after {
    content: '';
    height: 1px;
    width: 80px;
    background: linear-gradient(to right, transparent, rgba(240, 208, 128, 0.6));
}

.glowing-divider::after {
    background: linear-gradient(to left, transparent, rgba(240, 208, 128, 0.6));
}

.glowing-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: #E8C87A;
    box-shadow: 0 0 10px 2px rgba(232, 200, 122, 0.6);
}

.glowing-dot-small {
    width: 3px;
    height: 3px;
}

/* CTA button styling */
.storybook-cta .wp-block-button__link {
    background-color: transparent !important;
    border: 1px solid rgba(74, 61, 92, 0.25);
    border-radius: 50px;
    color: #4A3D5C !important;
    font-family: 'EB Garamond', serif;
    font-size: 1.1rem;
    padding: 1rem 2.5rem;
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
}

.storybook-cta .wp-block-button__link:hover {
    background-color: #4A3D5C !important;
    color: #F5F0E8 !important;
    border-color: #4A3D5C;
    box-shadow: 0 12px 24px rgba(74, 61, 92, 0.15);
}

/* Navigation link underline glow */
.moonlit-nav .wp-block-navigation-item a {
    position: relative;
    padding-bottom: 0.25rem;
    transition: color 0.4s ease;
}

.moonlit-nav .wp-block-navigation-item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background-color: #E8C87A;
    box-shadow: 0 0 8px rgba(232, 200, 122, 0.8);
    transition: width 0.4s ease;
}

.moonlit-nav .wp-block-navigation-item a:hover::after {
    width: 100%;
}

/* Logo dot */
.logo-dot::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #E8C87A;
    box-shadow: 0 0 12px 2px rgba(232, 200, 122, 0.8);
    margin-right: 0.75rem;
    vertical-align: middle;
}

/* Header cover styling */
.wp-block-cover .moonlit-nav .wp-block-navigation-item a {
    color: #F5F0E8;
}

.wp-block-cover .moonlit-nav .wp-block-navigation-item a:hover {
    color: #F0D080;
}

/* Section ambient background */
.ambient-bg {
    background-image:
        radial-gradient(circle at 15% 10%, rgba(212, 168, 67, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 85% 90%, rgba(245, 240, 232, 0.25) 0%, transparent 50%);
}

/* Feature cards */
.pillow-card {
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(74, 61, 92, 0.08);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.pillow-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(74, 61, 92, 0.14);
}

/* Equal cards */
.equal-cards > .wp-block-column {
    display: flex;
    flex-direction: column;
    flex-grow: 0;
}

.equal-cards > .wp-block-column > .wp-block-group {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.equal-cards .cta-bottom {
    margin-top: auto;
    justify-content: center;
}

/* Footer margin reset */
.wp-site-blocks > footer {
    margin-block-start: 0;
}

/* Separator glow */
.amber-glow-separator {
    border: none !important;
    height: 1px !important;
    background: linear-gradient(to right, transparent, rgba(240, 208, 128, 0.5), transparent) !important;
    box-shadow: 0 0 12px rgba(232, 200, 122, 0.3);
}

/* Smooth page entrance animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-section {
    animation: fadeInUp 0.8s ease both;
}

.fade-delay-1 { animation-delay: 0.1s; }
.fade-delay-2 { animation-delay: 0.25s; }
.fade-delay-3 { animation-delay: 0.4s; }

/* Responsive storybook */
@media (max-width: 992px) {
    .storybook-spread {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .storybook-spread::after {
        display: none;
    }

    .storybook-spread > .wp-block-column:first-child {
        height: 50vh;
    }

    .storybook-spread > .wp-block-column:first-child::after {
        background: linear-gradient(to bottom, transparent 80%, rgba(74, 61, 92, 0.1) 100%);
    }
}