/*
Theme Name: Child
Author: blockStylist
Version: 1.3
Template: twentytwentyfive
*/

/* ==========================================================================
   1. EDITORIAL HERO LINKS (The Container) and logo
   ========================================================================== */
.editorial-hero-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 30px 0;
    width: 100%;
    /* Forces centering in any container (columns, groups, etc.) */
    justify-content: center; 
    align-items: center;
}

.custom-logo {
    width: 44px !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
}

/* ==========================================================================
   2. MONO-LINK BASE (Responsive & Anti-Overflow)
   ========================================================================== */
.mono-link {
    font-family: 'Fira Code', monospace;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    /* Target specific properties to avoid breaking entrance animations */
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease, letter-spacing 0.3s ease;
    box-sizing: border-box;
    
    /* Fluid Typography: Scales based on screen width */
    font-size: clamp(14px, 3.5vw, 16px);
    
    /* Responsive Overflow Fixes */
    max-width: 100%;
    white-space: normal;   /* Text wraps neatly if button is long */
    overflow-wrap: break-word; 
    line-height: 1.4;
    padding: 12px 24px;
}

/* PRIMARY: [ Black -> Clear ] */
.mono-link.primary {
    background-color: #000;
    color: #fff !important;
    border: 1px solid #000;
    font-weight: 700;
    border-radius: 4px;
}

.mono-link.primary:hover {
    letter-spacing: 1.5px;
    background-color: transparent !important; /* Becomes clear */
    color: #000 !important;
}

/* SECONDARY: [ The Shrinking Underline + Slide ] */
.mono-link.secondary {
    color: #000;
    padding: 10px 0;
    font-weight: 400;
    background: transparent;
}

.mono-link.secondary::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 4px;
    left: 0;
    background-color: #000;
    transition: transform 0.3s ease;
    transform-origin: right;
}

.mono-link.secondary:hover::after {
    transform: scaleX(0);
}

.mono-link.secondary:hover {
    transform: translateX(6px); /* The "smooth slide" */
    color: #666;
}

/* ==========================================================================
   3. SYSTEM COMPONENTS
   ========================================================================== */
.ws-pulse-dot {
    background-color: #4ab866;
    border-radius: 50%;
    position: relative;
    display: inline-block;
    width: 10px; height: 10px;
}

.ws-pulse-dot::after {
    content: "";
    width: 100%; height: 100%;
    background-color: inherit;
    border-radius: 50%;
    position: absolute;
    top: 0; left: 0;
    animation: ws-pulse 2s infinite;
}

@keyframes ws-pulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(3); opacity: 0; }
}

.sc-card {
    background: #fff;
    border: 1px solid #dcdcde;
    padding: 24px;
    border-radius: 12px;
}

.system-toc {
    border: 1px solid #e7e7e7;
    padding: 20px;
    max-width: 350px;
    font-family: 'Fira Code', monospace;
    background: #fff;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.system-toc:hover {
    box-shadow: 6px 6px 0px #000;
    transform: translate(-2px, -2px);
    border-color: #000;
}

/* ==========================================================================
   4. TERMINAL FOOTER
   ========================================================================== */
.terminal-footer {
    margin: 80px auto;
    padding: 60px 20px;
    border: 1px solid #eee;
    background: #fafafa;
    text-align: center;
    max-width: 600px;
    border-radius: 8px;
}

.terminal-btn {
    font-family: 'Fira Code', monospace;
    background: #000;
    color: #fff !important;
    padding: 18px 30px;
    font-size: clamp(16px, 4vw, 18px);
    border: 1px solid #000;
    transition: background 0.3s ease, color 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.terminal-btn:hover {
    background: transparent;
    color: #000 !important;
}

.cursor {
    display: inline-block;
    width: 10px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ==========================================================================
   5. MOBILE OPTIMIZATION
   ========================================================================== */
@media (max-width: 768px) {
    .editorial-hero-links {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .mono-link {
        width: 100%;
        max-width: 300px; 
    }

    .shortcode-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .system-toc {
        max-width: 100%;
    }
    
    .wp-block-heading {
        text-align: center;
        font-size: 2rem !important;
    }
}

/* 1. Reserve height for the Hero Cover to prevent jumping */
.wp-block-cover {
    min-height: 600px; /* Adjust this to match your actual hero height */
    background-color: #fafafa; /* Shows a clean background while image loads */
}

/* 2. Fix unsized Lottie player container */
dotlottie-player {
    display: block;
    min-width: 100px; 
    min-height: 100px;
    aspect-ratio: 1 / 1;
}

/* 3. Pre-emptively set the font for the Hero text */
.wp-block-cover h1, 
.wp-block-cover p {
    font-family: 'Vollkorn', serif; /* Use fallback serif while Vollkorn loads */
    font-display: swap;
}
