/* ===== 42 — Directory Gateway (Homepage) =====
   Skeuomorphic folder-grid entrance. Folders are pure CSS (gradients +
   shadows) — no image asset exists for this, and a CSS component scales
   cleanly and stays theme-consistent. Loads immediately, no pre-loader. */

@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Space+Grotesk:wght@700&display=swap');

:root {
    --bg: #0D0D0E;
    --ink: #FFFFFF;
    --grey: #A0A0A0;
    --accent-hover: #1E56C8;
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: 'Space Mono', 'Courier Prime', monospace;
    position: fixed;
    inset: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ===== Top-Left Logo ===== */
.directory-logo {
    position: fixed;
    top: 28px;
    left: 32px;
    z-index: 40;
    height: 46px;
    width: auto;
}

/* ===== Top-Right Log In ===== */
.directory-login {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--ink);
    padding: 9px 18px;
    font-family: 'Space Mono', monospace;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.directory-login:hover {
    border-color: var(--accent-hover);
    color: var(--accent-hover);
}

/* ===== Folder Grid Stage ===== */
.directory-stage {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    padding: 24px;
}

.folder-row {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.folder-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: 128px;
}

.folder-icon {
    position: relative;
    width: 92px;
    height: 70px;
    filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.6));
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.folder-item:hover .folder-icon,
.folder-item:focus-visible .folder-icon {
    transform: translateY(-4px);
}

.folder-tab {
    position: absolute;
    top: 0;
    left: 0;
    width: 42%;
    height: 13px;
    background: linear-gradient(180deg, #f2f2f3 0%, #cfcfd2 100%);
    border-radius: 3px 6px 0 0;
}

.folder-body {
    position: absolute;
    top: 9px;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 3px;
    background: linear-gradient(165deg, #f0f0f2 0%, #c7c7cb 35%, #97979c 70%, #7d7d82 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        inset 0 -10px 14px rgba(0, 0, 0, 0.18);
}

.folder-body::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 8px;
    right: 8px;
    height: 30%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
    border-radius: 2px;
    pointer-events: none;
}

.folder-label {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: center;
    color: var(--ink);
    transition: color 0.2s ease;
}

.folder-item:hover .folder-label,
.folder-item:focus-visible .folder-label {
    color: var(--accent-hover);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .folder-row {
        gap: 1.4rem;
    }

    .folder-item {
        width: 108px;
    }

    .folder-icon {
        width: 78px;
        height: 60px;
    }
}

@media (max-width: 640px) {
    .directory-logo {
        top: 20px;
        left: 20px;
        height: 34px;
    }

    .directory-login {
        top: 16px;
        right: 16px;
        padding: 8px 14px;
    }

    .directory-stage {
        gap: 1.8rem;
    }

    .folder-row {
        gap: 1.1rem;
    }

    .folder-item {
        width: 92px;
        gap: 10px;
    }

    .folder-icon {
        width: 68px;
        height: 52px;
    }

    .folder-label {
        font-size: 0.58rem;
    }
}

@media (max-width: 768px) {
    .directory-stage {
        padding-top: 16px;
        padding-bottom: 16px;
    }
}
