/* Inter Font - Self-hosted */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/inter/inter-v13-latin-700.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('fonts/inter/inter-v13-latin-800.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url('fonts/inter/inter-v13-latin-900.woff2') format('woff2');
}

/* Source Sans 3 Font - Self-hosted */
@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/source-sans-3/source-sans-3-v15-latin-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/source-sans-3/source-sans-3-v15-latin-600.woff2') format('woff2');
}

/* Merriweather Font - Self-hosted */
@font-face {
    font-family: 'Merriweather';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/merriweather/merriweather-v30-latin-700.woff2') format('woff2');
}

@font-face {
    font-family: 'Merriweather';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url('fonts/merriweather/merriweather-v30-latin-900.woff2') format('woff2');
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #0a0a0a;
    color: #fff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

body.page-transition {
    opacity: 0;
}

.container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 3rem;
    padding: 5rem;
    max-width: min(90vw, 90vh);
    margin: auto;
}

.tile-wrapper {
    perspective: 1000px;
    position: relative;
    min-height: 250px;
    aspect-ratio: 1 / 1;
    height: 30vh;
}

.tile {
    background: linear-gradient(135deg, #1c1b1b 0%, #0d0d0d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 1.5s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, background 0.3s ease;
    position: relative;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    min-height: 250px;
    transform-style: preserve-3d;
    width: 100%;
    height: 100%;
}


.tile-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s ease;
}

.tile:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
}

.tile-wrapper.static {
    pointer-events: none;
    aspect-ratio: 1 / 1;
}

.tile.static {
    background: transparent;
    cursor: default;
    font-family: 'Merriweather', serif;
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: -2px;
    animation: none;
    box-shadow: none;
}

.tile.static:hover {
    box-shadow: none;
}

.tile.static .tile-inner span {
    text-align: center;
    line-height: 1.1;
}

.tm {
    font-size: 0.4em;
    vertical-align: super;
    font-weight: 700;
}

.tile:not(.static) .tile-inner span {
    font-family: 'Merriweather', serif;
    background: linear-gradient(135deg, #ffffff 0%, #a8a8a8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

footer {
    background-color: #0a0a0a;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    border-top: 1px solid #333;
    font-family: 'Source Sans 3', sans-serif !important;
    font-size: 12px;
}

.footer-links {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    flex: 1;
    justify-content: center;
    align-items: center;
}

.copyright-text {
    color: #999;
    font-size: 12px;
    padding: 0 0.1rem;
    white-space: nowrap;
}

.copyright-text::after {
    content: '|';
    color: #999;
    margin-left: 0.1rem;
}

.footer-links a {
    color: #999;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.3s ease;
    padding: 0 0.1rem;
    white-space: nowrap;
}

.footer-links a:not(:last-child)::after {
    content: '|';
    color: #999;
    margin-left: 0.1rem;
}

.footer-links a:hover {
    color: #fff;
}

.language-dropdown {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
}

.lang-button {
    background: #0a0a0a;
    color: #fff;
    border: none;
    padding: 6px 10px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 80px;
    text-align: left;
    font-family: 'Source Sans 3', sans-serif;
}

.lang-button:hover {
    background: #444;
}

.lang-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: #333333;
    border: 1px solid #555;
    border-radius: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
    min-width: 80px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    margin-bottom: 2px;
}

.language-dropdown:hover .lang-menu {
    opacity: 1;
    visibility: visible;
}

.lang-menu li {
    margin: 0;
    padding: 0;
}

.lang-menu a {
    display: block;
    padding: 8px 10px;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.2s ease;
    font-size: 11px;
    font-weight: 400;
}

.lang-menu a:hover {
    background-color: #444;
}

.lang-menu a.active {
    background-color: #555;
    font-weight: 500;
}

@media (max-width: 1200px) {
    .container {
        padding: 3rem;
        gap: 2rem;
    }

    .tile-wrapper {
        min-height: 200px;
    }

    .tile {
        min-height: 200px;
        font-size: 2rem;
    }

    .tile.static {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 2rem;
        gap: 1.5rem;
    }

    .tile-wrapper {
        min-height: 150px;
    }

    .tile {
        font-size: 1.5rem;
        min-height: 150px;
        border-radius: 15px;
    }

    .tile.static {
        font-size: 2rem;
    }

    footer {
        justify-content: center;
        flex-direction: column;
    }

    .footer-links {
        justify-content: center;
        order: 2;
    }

    .language-dropdown {
        order: 1;
        align-self: center;
    }

    .lang-button {
        min-width: 70px;
        font-size: 10px;
        padding: 5px 8px;
    }

    .lang-menu {
        min-width: 70px;
        right: 50%;
        transform: translateX(50%);
    }
}
