/* =====================================================
   VEA | Virtually Ever After — Main Stylesheet
   ===================================================== */

@font-face {
    font-family: 'Telegrama Render';
    src: url('https://raw.githubusercontent.com/decentralize-dfw/font/main/vea.ttf') format('truetype');
    font-display: block;
}

:root {
    --ui-color: #000000;
    --bg-color: #ffffff;
    --font-main: 'Telegrama Render', sans-serif;
    --panel-bg-opacity: 0.03;
    --panel-blur: 12px;
    --radius-l: 24px;
    --radius-s: 4px;
    --line: 1px;
    --color-grey: #d7d7d7;
    --color-shadow: rgba(0,0,0,.08);
    --accent-image: url('https://raw.githubusercontent.com/decentralize-dfw/vea-files/main/menu2.jpg');
}

html { scroll-behavior: smooth; }

* {
    box-sizing: border-box;
    scrollbar-width: none;
    -webkit-user-select: none;
    user-select: none;
}
*::-webkit-scrollbar { display: none; }

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--ui-color);
    margin: 0; padding: 0;
    overflow: hidden;
    width: 100vw; height: 100vh;
    text-transform: uppercase;
}

/* ========== LOADER ========== */
#loader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: white;
    z-index: 9999;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    transition: opacity 1s cubic-bezier(0.19, 1, 0.22, 1);
}
.loader-bar-container { width: 200px; height: 1px; background: #eee; position: relative; overflow: hidden; }
.loader-bar { height: 100%; background: #000; width: 0%; transition: width 0.4s ease; }

/* ========== HEADER ========== */
header {
    position: fixed;
    top: 0;
    z-index: 1000;
    padding: 30px 20px;
    display: flex;
    align-items: center;
    width: 100%;
    background: rgba(255,255,255,0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: var(--line) solid var(--color-grey);
}

@media (min-width: 769px) {
    header {
        left: 150px;
        width: calc(100% - 170px);
    }
}

.marquee-wrapper { flex-grow: 1; overflow: hidden; }
.text--loop {
    background: white;
    overflow: hidden;
    white-space: nowrap;
    display: flex;
    align-items: center;
    height: 28px;
    border: var(--line) solid var(--color-grey);
    border-radius: var(--radius-s);
    box-shadow: 1px 1px 1px var(--color-shadow);
    width: 100%;
    margin-left: 95px;
}
.marquee-content { display: inline-block; animation: marquee 35s linear infinite; font-size: 11px; letter-spacing: 1px; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.mobile-nav {
    display: none;
    gap: 15px;
    margin-left: auto;
}
.mobile-nav a { font-size: 10px; font-weight: bold; color: var(--ui-color); text-decoration: none; }

/* ========== MAIN CONTAINER ========== */
.main-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1vw;
    padding: 110px 1vw 1vw 1vw;
    height: 100vh;
    width: 100%;
}

.column {
    height: calc(100vh - 120px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 0;
}

#work-items, #how-items, #info-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.box--container {
    background: rgba(0,0,0, var(--panel-bg-opacity));
    border: var(--color-grey) solid var(--line);
    border-radius: var(--radius-l);
    padding: 1.8vw;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex;
    flex-direction: column;
    gap: 1.5vw;
    width: 100%;
}
.box--container:hover { box-shadow: 0 10px 30px var(--color-shadow); background: rgba(0,0,0, 0.05); }

.media-wrapper {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    position: relative;
}

video, img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    pointer-events: none;
}

.square-wrapper {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    background: #000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

.web-inner { width: 100%; height: 100%; position: relative; overflow: hidden; background: white; }

.html-preview {
    width: 200%; height: 200%; border: none; position: absolute; top: 0; left: 0;
    transform: scale(0.5); transform-origin: top left;
    pointer-events: auto;
}

/* ========== MEDIA CAROUSEL ========== */
.media-carousel {
    position: relative;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

.carousel-slide { display: none; width: 100%; position: relative; }
.carousel-slide.active { display: block; }

/* ── VIDEO MUTE BUTTON ── */
.video-mute-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0,0,0,0.28);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    opacity: 0.5;
    padding: 5px;
    transition: opacity 0.2s ease;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
}
.video-mute-btn:hover { opacity: 0.9; }
.video-mute-btn svg { width: 100%; height: 100%; display: block; }

/* ── TRANSITION OVERLAY ── */
.carousel-transition-overlay {
    position: absolute;
    inset: 0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.carousel-transition-overlay.visible { opacity: 1; }
.carousel-transition-overlay img {
    width: 48px;
    height: auto;
    opacity: 0.25;
    object-fit: contain;
}

.web-slide {
    width: 100%;
    aspect-ratio: 1;
    position: relative;
    overflow: hidden;
    background: white;
}

/* CAROUSEL NEXT/PREV BUTTONS */
.carousel-next-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.92);
    border: none;
    cursor: pointer;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
    color: #000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
    transition: background 0.2s, transform 0.2s;
    line-height: 1;
    padding: 0;
    font-family: sans-serif;
}
.carousel-next-btn:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev-btn {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.92);
    border: none;
    cursor: pointer;
    font-size: 22px;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 30;
    color: #000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
    transition: background 0.2s, transform 0.2s;
    line-height: 1;
    padding: 0;
    font-family: sans-serif;
}
.carousel-prev-btn:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

/* GLB VIEWER */
.glb-viewer { width: 100%; height: 100%; cursor: grab; background: #f4f4f4; }

/* ========== FROSTED OVERLAY ========== */
.overlay-backdrop {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.5s ease;
}

.click-btn {
    background: #000;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 10px;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    pointer-events: none;
}

.overlay-text {
    font-size: 8px;
    margin-top: 8px;
    opacity: 0.6;
}

/* ========== PDF TOOLBAR ========== */
.pdf-controls {
    position: absolute; bottom: 15px; left: 50%; transform: translateX(-50%);
    background: rgba(0,0,0,0.8); backdrop-filter: blur(4px);
    border-radius: 30px; padding: 6px 16px;
    display: flex; gap: 15px; align-items: center;
    z-index: 50; color: white; font-size: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    opacity: 0; transition: opacity 0.3s;
    pointer-events: none;
}
.web-inner:hover .pdf-controls { opacity: 1; pointer-events: auto; }
.pdf-btn { background: none; border: none; color: white; cursor: pointer; font-family: inherit; font-size: 10px; padding: 4px; }
.pdf-btn:hover { opacity: 0.7; }
.pdf-btn:disabled { opacity: 0.3; cursor: default; }

/* ========== TYPOGRAPHY ========== */
.panel-title { font-size: clamp(1.1rem, 1.8vw, 1.8rem); line-height: 1.1; margin-bottom: 5px; }
.panel-meta { font-size: 0.7rem; border-bottom: 1px solid rgba(0,0,0,0.15); padding-bottom: 8px; margin-bottom: 8px; display: flex; gap: 10px; flex-wrap: wrap; }
.panel-meta span { opacity: 0.75; letter-spacing: 0.04em; }
.panel-desc { font-size: clamp(0.75rem, 0.9vw, 1rem); line-height: 1.6; text-transform: none; color: #444; }

/* ========== SEO: SCREEN-READER ONLY ========== */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.tag-label { display: flex; align-items: center; gap: 8px; font-size: 9px; margin-bottom: 5px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background-image: var(--accent-image); background-size: cover; background-position: center; }

.btn-accent {
    background-image: var(--accent-image); background-size: cover; background-position: center;
    color: white; padding: 12px; border-radius: 12px; text-align: center; font-size: 11px;
    cursor: pointer; transition: opacity 0.2s, transform 0.2s; text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.btn-accent:hover { transform: scale(0.98); opacity: 0.9; }
.btn-accent.sending { opacity: 0.5; cursor: wait; }
.btn-accent.success { background: #000; }

.info-link { text-decoration: none; color: inherit; border-bottom: 1px solid rgba(0,0,0,0.1); display: block; padding: 5px 0; transition: opacity 0.2s; }
.info-link:hover { opacity: 0.5; }

/* ========== LOGO ========== */
.fixed-logo {
    position: fixed;
    top: 0px;
    left: 0px;
    z-index: 2000;
    width: auto;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 30px;
    pointer-events: none;
    gap: 15px;
}

.main-ico {
    position: relative;
    top: 0px;
    left: -20px;
    width: 60px;
    height: auto;
    pointer-events: auto;
}

.logo-text {
    position: relative;
    top: 4px;
    left: -30px;
    width: 180px;
    height: auto;
    pointer-events: auto;
}

/* ========== FOOTER ========== */
#footer-info {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(5px);
    color: black;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    z-index: 10000;
    white-space: nowrap;
    letter-spacing: 0.5px;
    pointer-events: none;
}
#footer-info a { pointer-events: auto; text-decoration: none; color: inherit; }

#legal-notice {
    position: fixed;
    bottom: 11px;
    left: 15px;
    font-size: 8px;
    z-index: 10001;
    color: black;
    user-select: none;
}
#legal-notice a { text-decoration: none; color: inherit; cursor: pointer; pointer-events: auto; }

/* ========== MOBILE LEGAL DOT ========== */
#legal-mobile-dot {
    display: none;
    width: 7px;
    height: 7px;
    background: rgba(0,0,0,0.55);
    border-radius: 50%;
    margin-left: 5px;
    text-decoration: none;
    pointer-events: auto;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
}
#legal-mobile-dot:hover,
#legal-mobile-dot:active { background: #000; }

/* ========== COOKIE CONSENT ========== */
#cookie-consent {
    position: fixed;
    bottom: 40px;
    left: 10px;
    background: rgba(255,255,255,0.7);
    border: 1px solid #000;
    padding: 6px 10px;
    font-size: 8px;
    border-radius: 8px;
    z-index: 10002;
    display: none;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    backdrop-filter: blur(5px);
}

.cookie-btn {
    background: none;
    border: 1px solid #000;
    padding: 2px 6px;
    font-family: inherit;
    font-size: 8px;
    cursor: pointer;
    border-radius: 4px;
    text-transform: uppercase;
}
.cookie-btn:hover { background: #000 !important; color: #fff !important; }

/* ========== MOBILE OVERRIDES ========== */
@media (max-width: 768px) {
    header { left: 0; padding: 20px 15px; justify-content: flex-end; top: 0; border-bottom: var(--line) solid var(--color-grey); }
    .marquee-wrapper { display: none; }
    .mobile-nav { display: flex; }
    .main-container { grid-template-columns: 1fr; padding: 80px 15px 15px 15px; overflow-y: auto; height: auto; gap: 20px; }
    .column { height: auto; overflow-y: visible; scroll-margin-top: 100px; }
    body { overflow-y: auto; }
    .box--container { padding: 20px; gap: 20px; }

    .fixed-logo {
        width: 100%;
        height: 60px;
        left: 0;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding: 0;
    }
    .main-ico {
        display: none;
    }
    .logo-text {
        position: absolute;
        top: 12px;
        left: 15px;
        width: 80px;
    }
    #legal-notice { display: none; }
    #legal-mobile-dot { display: block; }
    .pdf-controls { display: none !important; }
}

@media (max-width: 576px) {
    #footer-info {
        font-size: 9px;
        justify-content: flex-start;
        padding-left: 10px;
        box-sizing: border-box;
    }
    .desktop-only { display: none; }
    .full-legal { display: none; }
    .short-legal { display: inline; }
    #legal-notice { display: none; }
    #legal-mobile-dot { display: block; }
}
