/*
 * Dora -- Industrial Royal Design System
 * Version: 2.0.0
 * Aesthetic: Royal Blue, Industrial Glass, Surgical Typography.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Outfit:wght@500;700;900&display=swap');

:root {
    --dora-royal-blue: #003366;
    --dora-royal-deep: #000a14;
    --dora-accent-cyan: #00f2ff;
    --dora-glass-blur: 16px;
    --dora-radius: 5px;
    --dora-shadow-3d: 6px 6px 0px rgba(0, 0, 0, 0.9);
    --dora-glow-cyan: 0 0 15px rgba(0, 242, 255, 0.4);
    --dora-font-heading: 'Outfit', sans-serif;
    --dora-font-body: 'Inter', sans-serif;
    
    /* Crossfade Timing */
    --dora-fade-duration: 5s;
    --dora-fade-count: 5;
    --dora-total-duration: calc(var(--dora-fade-duration) * var(--dora-fade-count));
}

/* Base Industrial Dark Mode */
body {
    background-color: var(--dora-royal-deep) !important;
    color: #ffffff !important;
}

/* 5px Radius Precision (Hard-Locked) */
.dora-glass, 
.wp-block-cover, 
.wp-block-group,
.wp-block-post-template > li,
.wp-block-post-featured-image img,
.wp-block-button__link {
    border-radius: 5px !important;
}

/* Typography Overrides */
h1, h2, h3, h4, .dora-heading {
    font-family: var(--dora-font-heading) !important;
    font-weight: 900 !important;
}

body, p, .dora-subtext, .wp-block-post-excerpt {
    font-family: var(--dora-font-body) !important;
    line-height: 1.6;
}

/* Glassmorphism Token (Liquid Evolution - UI Friendly) */
.dora-glass,
.is-style-dora-glass {
    backdrop-filter: blur(var(--dora-glass-blur));
    border: 1px solid rgba(0, 242, 255, 0.08);
    box-shadow: 0 12px 48px 0 rgba(0, 0, 0, 0.6);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dora-glass:hover,
.is-style-dora-glass:hover {
    box-shadow: 0 16px 64px 0 rgba(0, 0, 0, 0.8);
    border-color: rgba(0, 242, 255, 0.4);
}

/* 3D Text Effects (Natural Casing) */
.dora-heading {
    text-shadow: var(--dora-shadow-3d) !important;
    color: #ffffff !important;
    letter-spacing: 0.05em; /* Reduced letter-spacing for natural casing */
}

.dora-accent-text {
    color: var(--dora-accent-cyan) !important;
    text-shadow: var(--dora-glow-cyan);
}

/* Industrial Buttons */
.wp-block-button__link {
    background-color: var(--dora-royal-blue) !important;
    border: 1px solid var(--dora-accent-cyan) !important;
    border-radius: 5px !important;
    text-shadow: none !important;
    transition: all 0.2s ease-in-out;
}

.wp-block-button__link:hover {
    background-color: var(--dora-accent-cyan) !important;
    color: var(--dora-royal-deep) !important;
    box-shadow: var(--dora-glow-cyan);
}

/* Native Industrial Slider (Scroll Snap) */
.dora-slider {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    scroll-behavior: smooth !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 1rem !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    scroll-padding: 2rem;
}

/* Industrial Archive Grid */
.wp-block-post-template.is-grid {
    gap: 2rem !important;
}

.wp-block-post-template > li {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding: 0 !important;
    overflow: hidden;
}

.wp-block-post-template > li:hover {
    border-color: var(--dora-accent-cyan) !important;
}

/* Crossfade Stacker Logic (JS-Free) */
.dora-crossfade-stacker .wp-block-post-template {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: 1fr !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.dora-crossfade-stacker .wp-block-post-template > li {
    grid-area: 1 / 1;
    opacity: 0;
    visibility: hidden;
    animation: dora-fade var(--dora-total-duration) infinite;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

/* 5-Item Animation Loop */
.dora-crossfade-stacker .wp-block-post-template > li:nth-child(1) { animation-delay: 0s; }
.dora-crossfade-stacker .wp-block-post-template > li:nth-child(2) { animation-delay: var(--dora-fade-duration); }
.dora-crossfade-stacker .wp-block-post-template > li:nth-child(3) { animation-delay: calc(var(--dora-fade-duration) * 2); }
.dora-crossfade-stacker .wp-block-post-template > li:nth-child(4) { animation-delay: calc(var(--dora-fade-duration) * 3); }
.dora-crossfade-stacker .wp-block-post-template > li:nth-child(5) { animation-delay: calc(var(--dora-fade-duration) * 4); }

@keyframes dora-fade {
    0% { opacity: 0; visibility: hidden; }
    5% { opacity: 1; visibility: visible; }
    20% { opacity: 1; visibility: visible; }
    25% { opacity: 0; visibility: hidden; }
    100% { opacity: 0; visibility: hidden; }
}

.dora-meta-row {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 1rem;
}
