/* --- CANVAS --- */
#grid-canvas {
    position: fixed;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    
    /* Safari / iOS WebKit Support */
    -webkit-mask-image: radial-gradient(circle at center, black 30%, transparent 90%);
    mask-image: radial-gradient(circle at center, black 30%, transparent 90%);
    
    touch-action: none; 
}

/* --- MAIN CONTAINER --- */
section.center {
    height: 100vh;
    height: 100dvh; /* iOS Fix */
    width: 100%;
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    
    position: relative;
    z-index: 1;
    padding: 0 1.5rem;

    /* 2. SELECT NONE */
    user-select: none;
    -webkit-user-select: none;
}

/* --- BADGE --- */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem; 
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    
    margin-bottom: 1rem;
    animation: slideUpFade 1.2s cubic-bezier(0.25, 1, 0.3, 1) 0s both;
    
    /* 3. INTERACTION BLOCKING */
    position: relative;
    z-index: 10; 
    cursor: default;
}

.status-badge span {
    font-family: var(--font-code);
    font-size: 0.53rem;
    color: #ddd;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.pulse-light {
    width: 5px;
    height: 5px;
    background-color: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 5px var(--accent-color);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.7); }
    70% { box-shadow: 0 0 0 5px rgba(0, 255, 136, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 255, 136, 0); }
}

/* --- TEXT CONTENT --- */
.welcome-container {
    width: 100%;
    max-width: 600px;
    margin-inline: auto;
    position: relative;
    
    /* 3. INTERACTION BLOCKING */
    z-index: 10; 
}

h1 {
    font-size: clamp(0.79rem, 2.2vw, 1.06rem);
    font-weight: 300;
    color: var(--text-secondary);
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
    
    /* 3. INTERACTION BLOCKING */
    cursor: default;
}

h1 .highlight {
    display: block;
    font-size: clamp(1.58rem, 5.28vw, 2.64rem);
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 0.1rem;
    letter-spacing: -0.03em;
    animation: slideUpFade 1.2s cubic-bezier(0.25, 1, 0.3, 1) 0.2s both; 
    will-change: transform, opacity, filter;
    
    /* 1. HOVER EFFECTS */
    transition: text-shadow 0.3s ease;
}

h1 .highlight:hover {
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.6), 
                 0 0 30px rgba(255, 255, 255, 0.2);
}

p.subtitle {
    font-size: clamp(0.79rem, 1.76vw, 0.97rem);
    color: var(--text-primary);
    font-weight: 400;
    margin: 0 0 clamp(1.5rem, 4vw, 2rem) 0;
    animation: slideUpFade 1.2s cubic-bezier(0.25, 1, 0.3, 1) 0.4s both;
    will-change: transform, opacity, filter;
    
    /* 3. INTERACTION BLOCKING */
    cursor: default;
}

p.subtitle span {
    display: block;
    font-family: var(--font-code);
    font-size: clamp(0.57rem, 1.32vw, 0.66rem);
    color: var(--text-secondary);
    margin-top: 0.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1.4;
}

/* --- BUTTONS --- */
.cta {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap; 
    gap: 0.8rem;
    justify-content: center;
    width: 100%;
    max-width: 480px; 
    margin: 0 auto;
    
    animation: slideUpFade 1.2s cubic-bezier(0.25, 1, 0.3, 1) 0.6s both;
    will-change: transform, opacity, filter;
}

.cta button {
    -webkit-appearance: none;
    appearance: none;
    border: none;
    
    flex: 1 1 auto;
    min-width: 123px;
    max-width: 194px;

    background: var(--text-primary);
    color: var(--bg-color);
    border-radius: 4px;
    padding: 0.7rem 1.06rem;
    
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.44rem;
    
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    
    -webkit-tap-highlight-color: transparent;

    /* 3. INTERACTION BLOCKING */
    position: relative;
    z-index: 10;
}

.cta button:active {
    transform: scale(0.96);
}

.cta button:hover {
    background: #cccccc;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255,255,255,0.2);
}

.cta button.secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255,255,255,0.3);
}

.cta button.secondary:hover {
    border-color: var(--text-primary);
    background: rgba(255,255,255,0.1);
}

.desktop-text {
    display: inline;
}
@media (max-width: 480px) {
    .desktop-text {
        display: none;
    }
}

/* --- ANIMATIONS --- */
@keyframes slideUpFade {
    0% { opacity: 0; transform: translateY(40px); filter: blur(12px); }
    100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* --- DEAD SCREEN --- */
#dead-screen {
    display: none;
}

@keyframes cry-animation {
    0% { transform: translateY(0); opacity: 0; }
    20% { opacity: 1; }
    100% { transform: translateY(20px); opacity: 0; }
}

@media (max-width: 300px), (max-height: 300px) {
    #welcome-section, #grid-canvas {
        display: none !important;
    }

    #dead-screen {
        position: fixed;
        inset: 0;
        background: #000;
        z-index: 9999;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        padding: 1rem;
    }

    #dead-screen h2 {
        font-family: var(--font-code);
        font-size: 1rem;
        margin-top: 1rem;
        color: var(--text-primary);
        text-transform: uppercase;
    }
    
    .tear {
        animation: cry-animation 2s infinite ease-in;
    }
}

/* --- FONT LOADING VISIBILITY --- */
/* By default, hide the icons */
.material-symbols-outlined {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

/* Only show icons when JS confirms fonts are loaded */
.fonts-loaded .material-symbols-outlined {
    opacity: 1;
}