@import url('https://fonts.cdnfonts.com/css/dejavu-sans');
@import url('https://cdn.web-fonts.ge/fonts/bpg-extrasquare-mtavruli/css/bpg-extrasquare-mtavruli.min.css');

:root {
    --bg-color: #000;
    --text-color: #fff;
    --text-muted: rgba(255, 255, 255, 0.5);
    --accent: #fff;
    --font-main: 'BPG ExtraSquare Mtavruli', 'DejaVu Sans', sans-serif;
    --transition-fast: 0.3s ease;
    --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    background: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    overflow: hidden;
    /* Prevent scrolling, handled by panels and modals */
    height: 100dvh;
    width: 100vw;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 25px 4vw;
    z-index: 100;
    mix-blend-mode: difference;
}

.header-left {
    display: flex;
    justify-content: flex-start;
}

.logo {
    display: flex;
    justify-content: center;
}

.logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 65px;
    /* Increased size */
    width: auto;
    display: block;
    transition: var(--transition-fast);
}

.logo a:hover .logo-img {
    opacity: 0.8;
    transform: scale(1.05);
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.header-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 30px;
}

.lang-switcher button {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-main);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.lang-switcher button.active {
    color: var(--text-color);
}

.menu-toggle {
    cursor: pointer;
    font-size: 1rem;
    letter-spacing: 0.2em;
}

/* Background System */
.bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    z-index: 0;
}

.bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.bg-layer.active {
    opacity: 1;
}

.overlay-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 100%);
    pointer-events: none;
}

/* Main Split Panels */
.portal-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    display: flex;
    z-index: 10;
}

.portal-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 8vh;
    text-decoration: none;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    /* Subtle dividers */
    transition: flex var(--transition-slow);
}

.portal-panel:last-child {
    border-right: none;
}

.portal-title {
    font-size: clamp(2rem, 4vw, 4.5rem);
    /* Decreased base size for desktop */
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.4);
    letter-spacing: 0.15em;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    transition: all var(--transition-slow);
}

/* Hover States for Desktop */
@media (hover: hover) and (pointer: fine) {
    .portal-panel:hover {
        flex: 1.2;
    }

    .portal-panel:hover .portal-title {
        color: var(--text-color);
        -webkit-text-stroke: 1px transparent;
        transform: rotate(180deg) scale(1.03);
        /* Reduced scale for elegance */
        text-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
        /* Subtle cyan neon glow */
    }
}

/* Modal Content System */
.content-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    background: var(--bg-color);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-slow);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.content-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-close {
    position: fixed;
    top: 30px;
    right: 4vw;
    font-size: 1rem;
    letter-spacing: 0.2em;
    cursor: pointer;
    z-index: 210;
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--text-muted);
}

.modal-content {
    margin: auto;
    padding: 120px 5vw;
    max-width: 1200px;
    width: 100%;
}

.modal-title {
    font-size: clamp(2rem, 4vw, 4rem);
    /* Decreased desktop size */
    margin-bottom: 60px;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px var(--text-color);
}

.modal-title span {
    color: var(--text-color);
    -webkit-text-stroke: 0;
}

/* Modal Internal Layouts */
.services-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.service-row {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 20px;
}

.service-row h3 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.service-row p {
    color: var(--text-muted);
    font-family: 'DejaVu Sans', sans-serif;
    line-height: 1.6;
}

.events-list-minimal {
    display: flex;
    flex-direction: column;
}

.event-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 40px;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 30px 0;
}

.event-row .date {
    font-size: 1.5rem;
    text-align: center;
}

.event-row .date span {
    display: block;
    font-size: 3rem;
    line-height: 1;
}

.event-row .details h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.event-row .details p {
    color: var(--text-muted);
    font-family: 'DejaVu Sans', sans-serif;
}

.event-row .details .artists {
    margin-top: 5px;
    font-size: 0.9rem;
    color: #fff;
}

.outline-btn {
    display: inline-block;
    padding: 15px 30px;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    text-decoration: none;
    letter-spacing: 0.1em;
    transition: var(--transition-fast);
}

.outline-btn:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

/* About Layout */
.text-heavy p {
    font-family: 'DejaVu Sans', sans-serif;
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-muted);
    max-width: 800px;
    margin-bottom: 20px;
}

.text-heavy .lead-text {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-bottom: 30px;
}

.about-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 50px;
}

.modal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
}

/* Contact Layout */
.brutalist-contact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
    margin-top: 50px;
}

.contact-block h3 {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    letter-spacing: 0.2em;
}

.contact-block a {
    font-size: 2rem;
    color: var(--text-color);
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

.contact-block a:hover {
    opacity: 0.5;
}

/* Fullscreen Menu Overlay */
.full-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    background: var(--bg-color);
    z-index: 500;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-slow);
}

.full-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.menu-close {
    position: absolute;
    top: 30px;
    right: 4vw;
    font-size: 2rem;
    cursor: pointer;
}

.overlay-nav ul {
    list-style: none;
    text-align: center;
}

.overlay-nav a {
    display: block;
    font-size: clamp(2rem, 4vw, 4rem);
    /* Decreased desktop size */
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.5);
    text-decoration: none;
    margin: 20px 0;
    transition: all var(--transition-fast);
}

.overlay-nav a:hover {
    color: var(--text-color);
    -webkit-text-stroke: 1px transparent;
    transform: scale(1.05);
}

.menu-footer {
    position: absolute;
    bottom: max(30px, env(safe-area-inset-bottom, 30px));
    width: 100%;
    text-align: center;
    font-family: 'DejaVu Sans', sans-serif;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.social-links-minimal {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.social-links-minimal a {
    color: var(--text-color);
    font-size: 1.5rem;
    text-decoration: none;
    transition: var(--transition-fast);
}

.social-links-minimal a:hover {
    color: var(--text-muted);
    transform: translateY(-5px);
}


/* Responsive Adjustments */
/* Tablet & Medium Screens */
@media (max-width: 1024px) {
    .portal-title {
        font-size: clamp(1.8rem, 3.5vw, 3.5rem);
        /* Appropriate scaling for tablet sideways text */
        letter-spacing: 0.1em;
    }

    .modal-content {
        padding: 100px 5vw;
    }

    .modal-title {
        font-size: clamp(1.8rem, 3.5vw, 3.5rem);
        /* Decreased tablet size */
    }
}

/* Mobile Screens */
@media (max-width: 768px) {

    /* Hide the interactive background system on mobile to keep it stark black */
    .bg-container {
        display: none;
    }

    body {
        background: var(--bg-color);
        /* pure black */
    }

    .portal-grid {
        flex-direction: column;
        justify-content: center;
        /* Center vertically on the screen */
        align-items: center;
        /* Center horizontally */
    }

    .portal-panel {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        justify-content: center;
        padding: 5vh 0;
        /* consistent vertical padding */
        min-height: auto;
        /* Let content dictate height instead of locking to 25vh */
        background: transparent;
    }

    .portal-panel:last-child {
        border-bottom: none;
    }

    .portal-title {
        writing-mode: horizontal-tb;
        transform: none;
        -webkit-text-stroke: 1px rgba(255, 255, 255, 0.4);
        color: transparent;
        font-size: clamp(1.8rem, 8vw, 3rem);
        /* Perfect size for horizontal mobile */
        letter-spacing: 0.12em;
        transition: var(--transition-fast);
        text-align: center;
    }

    .portal-panel:hover .portal-title,
    .portal-panel:active .portal-title {
        -webkit-text-stroke: 1px transparent;
        color: var(--text-color);
        transform: none !important;
        /* Force disable rotation and scaling on mobile */
        text-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
    }

    .event-row {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 20px;
    }

    .modal-close {
        top: 20px;
        right: 5vw;
        background: rgba(0, 0, 0, 0.8);
        /* Better visibility on mobile */
        padding: 5px 10px;
        border-radius: 5px;
    }

    header {
        padding: 15px 4vw;
        /* Back to tighter padding */
        grid-template-columns: 1fr auto 1fr;
    }

    .logo-img {
        height: 50px;
        /* Slightly refined size */
        filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
    }

    .portal-panel {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        justify-content: center;
        padding: 1.5vh 0;
        /* Significantly reduced padding for closer grouping */
        min-height: auto;
        background: transparent;
        flex: none;
    }

    .portal-grid {
        justify-content: center;
        align-content: center;
        /* Ensure panels are grouped tight in the center */
        padding-top: 60px;
        /* Reduced header space push */
    }

    .full-menu-overlay {
        background: rgba(0, 0, 0, 0.98);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
    }

    .overlay-nav a {
        font-size: clamp(1.8rem, 8vw, 3rem);
        color: #fff;
        -webkit-text-stroke: 0;
        margin: 20px 0;
        /* Reduced margin */
        letter-spacing: 0.15em;
    }

    .social-links-minimal a {
        font-size: 1.8rem;
    }

    .header-right {
        gap: 15px;
    }

    .text-heavy p {
        font-size: 1rem;
    }

    .brutalist-contact {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .contact-block a {
        font-size: 1.5rem;
    }

    .about-images {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 30px;
    }
}

/* Very Small Mobile */
@media (max-width: 480px) {
    .portal-title {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
        /* Ensure it fits on tiny screens e.g. iPhone SE */
        letter-spacing: 0.1em;
    }

    .logo a {
        font-size: 1rem;
    }

    .menu-toggle {
        font-size: 0.8rem;
    }

    .lang-switcher button {
        font-size: 0.8rem;
    }
}