/* ===== FONTS ===== */
@font-face {
    font-family: 'Konfus';
    src: url('/fonts/Konfus-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Reckless';
    src: url('/fonts/RecklessStandardM-TRIAL-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}
@font-face {
    font-family: 'Reckless';
    src: url('/fonts/RecklessStandardM-TRIAL-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Reckless';
    src: url('/fonts/RecklessStandardM-TRIAL-RegularItalic.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
}
@font-face {
    font-family: 'Reckless';
    src: url('/fonts/RecklessStandardM-TRIAL-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
}
@font-face {
    font-family: 'Reckless';
    src: url('/fonts/RecklessStandardM-TRIAL-SemiBold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
}
@font-face {
    font-family: 'Reckless';
    src: url('/fonts/RecklessStandardM-TRIAL-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}
@font-face {
    font-family: 'Geist Sans';
    src: url('https://cdn.jsdelivr.net/npm/geist@1.3.1/dist/fonts/geist-sans/Geist-Regular.woff2') format('woff2');
    font-weight: 400;
}
@font-face {
    font-family: 'Geist Sans';
    src: url('https://cdn.jsdelivr.net/npm/geist@1.3.1/dist/fonts/geist-sans/Geist-Medium.woff2') format('woff2');
    font-weight: 500;
}
@font-face {
    font-family: 'Geist Sans';
    src: url('https://cdn.jsdelivr.net/npm/geist@1.3.1/dist/fonts/geist-sans/Geist-SemiBold.woff2') format('woff2');
    font-weight: 600;
}
@font-face {
    font-family: 'Geist Sans';
    src: url('https://cdn.jsdelivr.net/npm/geist@1.3.1/dist/fonts/geist-sans/Geist-Bold.woff2') format('woff2');
    font-weight: 700;
}

/* ===== CSS VARIABLES ===== */
:root {
    --black: #101010;
    --white: #F7F7F7;
    --neon: #D4FC2D;
    --gray-1: #D9D9D9;
    --gray-2: #C1C1C1;
    --gray-3: #AAAAAA;
    --gray-4: #8C8C8C;
    --gray-5: #6F6E73;
}

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

html, body { overflow-x: hidden; }

body {
    background: var(--black);
    overflow-x: hidden;
    overflow-y: auto;
    width: 100vw;
    min-height: 100vh;
    min-height: 100svh;
    font-family: 'Geist Sans', -apple-system, sans-serif;
    cursor: grab;
    user-select: none;
    color: var(--white);
    transition: background 0.5s ease;
}
body.modal-open {
    background: #f7f7f7;
    overflow: hidden !important;
}
html:has(body.modal-open) {
    overflow: hidden !important;
}
body.modal-open .nucleo {
    opacity: 0;
    pointer-events: none;
}
body.modal-open .card img {
    filter: invert(1) blur(8px);
}
body.modal-open .artifact-image img {
    filter: invert(1);
}
body:active { cursor: grabbing; }

/* ===== TOP NAV ===== */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px 120px;
    z-index: 100;
    background: var(--black);
}

/* Logo (left) */
.nav-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.nav-logo a {
    display: flex;
    align-items: center;
}
.nav-logo img {
    width: 133px;
    height: 50px;
    object-fit: contain;
}

/* Navigation Links */
.nav-link {
    font-family: 'Geist Mono', monospace;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    letter-spacing: 0;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--white);
    transition: color 0.25s;
    white-space: nowrap;
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}
.nav-link:hover {
    color: var(--neon);
}
.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}
.nav-link.active::after {
    transform: scaleX(1);
}

/* Connect button */
.nav-contact {
    font-family: 'Geist Mono', monospace;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    letter-spacing: 0;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--black);
    background: var(--neon);
    padding: 10px;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    transition: color 0.3s ease;
    z-index: 0;
}
.nav-contact::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--black);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    z-index: -1;
}
.nav-contact:hover {
    color: var(--neon);
}
.nav-contact:hover::before {
    transform: scaleX(1);
}

/* Menu button (hamburger) - hidden on desktop */
.nav-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.nav-menu span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--white);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s ease;
    transform-origin: center;
}
.nav-menu:hover span { background: var(--neon); }

/* Hamburger → X animation */
.nav-menu.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-menu.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-menu.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Legacy - keep for compatibility */
.nav-index {
    display: none;
}
.nav-links {
    display: none;
}

/* ===== MAIN FOOTER (green neon bar) ===== */
.main-footer {
    position: relative;
    background: var(--neon);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 120px;
    z-index: 100;
}
.footer-left,
.footer-center,
.footer-right {
    display: flex;
    align-items: center;
    gap: 20px;
}
.footer-left {
    gap: 20px;
}
.footer-right {
    gap: 40px;
}
.footer-powered,
.footer-center span,
.footer-deck,
.footer-rooted {
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    line-height: 16px;
    color: var(--black);
    text-transform: uppercase;
}
.footer-powered,
.footer-deck {
    text-decoration: none;
    position: relative;
}
.footer-powered::after,
.footer-deck::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}
.footer-powered:hover::after,
.footer-deck:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}
.footer-logo {
    height: 15px;
    width: 135px;
    object-fit: contain;
}
.footer-contact {
    font-family: 'Geist Sans', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: var(--black);
}

/* ===== HEADER VARIANT FOR LIGHT PAGES ===== */
.page-light .top-nav {
    background: var(--white);
    border-bottom: 1px solid var(--gray-1);
}
.page-light .nav-link {
    color: var(--gray-4);
}
.page-light .nav-link { position: relative; }
.page-light .nav-link:hover {
    color: var(--black);
}
.page-light .nav-link.active {
    color: var(--black);
}
.page-light .nav-menu span {
    background: var(--black);
}
.page-light .nav-menu:hover span {
    background: var(--gray-4);
}

/* ===== SCENE ===== */
.scene {
    width: 100%;
    height: 100vh;
    height: 100svh;
    perspective: 1800px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transform-style: preserve-3d;
}
.sphere {
    width: 0;
    height: 0;
    position: relative;
    transform-style: preserve-3d;
}

/* Canvas for connection lines */
#connectionCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* ===== CARDS ===== */
.card {
    position: absolute;
    width: var(--card-w, 180px);
    height: var(--card-h, 240px);
    backface-visibility: hidden;
    border-radius: 0;
    cursor: pointer;
    transition: filter 0.3s, transform 0.3s;
    transform-style: preserve-3d;
    background: transparent;
    pointer-events: auto;
}
.card:hover,
.card.hovered {
    filter: brightness(1.15) !important;
}
.card.hovered {
    z-index: 50;
}

/* Transition clone for modal animation */
.artifact-transition-clone {
    border-radius: 0;
    overflow: visible;
}
.artifact-transition-clone img {
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.2));
}
.card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    transition: filter 0.5s ease, transform 0.3s ease;
    pointer-events: none;
    user-select: none;
}
.card:hover img,
.card.hovered img {
    transform: scale(1.08);
}
.card .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 12px;
    background: linear-gradient(transparent, rgba(16,16,16,0.9));
}
.card .overlay .number {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    color: var(--neon);
    letter-spacing: 1px;
    margin-bottom: 3px;
}
.card .overlay h3 {
    font-family: 'Reckless', Georgia, serif;
    font-size: 13px;
    font-weight: 400;
    color: var(--white);
    letter-spacing: 0.2px;
}
.card .overlay p {
    font-family: 'Geist Mono', monospace;
    font-size: 9px;
    color: var(--gray-4);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== CONTROLS (right side) ===== */
.controls {
    position: fixed;
    top: 130px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 100;
}
.controls button {
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--gray-4);
    letter-spacing: 0.3px;
    text-align: left;
}
.controls button:hover {
    background: rgba(255,255,255,0.08);
    color: var(--white);
}
.controls button.active {
    background: rgba(212,252,45,0.1);
    border-color: rgba(212,252,45,0.3);
    color: var(--neon);
}
.controls button .icon {
    margin-right: 6px;
}

/* ===== ZOOM ===== */
.zoom-controls {
    position: fixed;
    bottom: 28px;
    right: 20px;
    display: flex;
    gap: 4px;
    z-index: 100;
}
.zoom-controls button {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--gray-4);
    border-radius: 0;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Geist Mono', monospace;
    transition: all 0.2s;
}
.zoom-controls button:hover {
    background: rgba(255,255,255,0.08);
    color: var(--white);
}

/* ===== HINT ===== */
.hint {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    color: var(--gray-5);
    letter-spacing: 2px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    transition: opacity 0.6s;
}

/* ===== NUCLEO - Text in center of sphere ===== */
.nucleo {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.8s;
    transform: translateZ(0px);
    transform-style: preserve-3d;
    gap: 15px;
}
.nucleo.hidden { opacity: 0; }

.nucleo-powered {
    display: flex;
    align-items: center;
    pointer-events: auto;
    cursor: ns-resize;
    justify-content: center;
    gap: 5px;
}
.nucleo-powered span {
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    line-height: 16px;
    color: var(--white);
    text-transform: uppercase;
}
.nucleo-powered-link {
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    line-height: 16px;
    color: var(--white);
    text-transform: uppercase;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}
.nucleo-powered-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}
.nucleo-powered-link:hover {
    color: var(--neon);
}
.nucleo-powered-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}
.nucleo-powered img {
    height: 15px;
    width: auto;
}

.nucleo h1 {
    font-family: 'Konfus', 'Reckless', Georgia, serif;
    font-size: 57px;
    font-weight: 400;
    line-height: 64px;
    letter-spacing: 0;
    max-width: 1017px;
    padding: 0 20px;
    pointer-events: auto;
    cursor: ns-resize;
}
.nucleo h1 .line1 {
    display: block;
    color: var(--white);
}
.nucleo h1 .line2 {
    display: block;
    color: var(--neon);
}

.nucleo-cta {
    font-family: 'Geist Mono', monospace;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--black);
    background: var(--neon);
    padding: 10px;
    pointer-events: all;
    position: relative;
    overflow: hidden;
    transition: color 0.3s ease;
    z-index: 0;
}
.nucleo-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--black);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    z-index: -1;
}
.nucleo-cta:hover {
    color: var(--neon);
}
.nucleo-cta:hover::before {
    transform: scaleX(1);
}

/* Legacy styles for sub/cta if needed */
.center-copy .sub {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    color: var(--gray-4);
    letter-spacing: 2.5px;
    text-transform: uppercase;
    margin-top: 20px;
}
.center-copy .cta {
    display: inline-block;
    margin-top: 28px;
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    color: var(--neon);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 10px 24px;
    border: 1px solid rgba(212,252,45,0.3);
    pointer-events: all;
    cursor: pointer;
    transition: all 0.25s;
}
.center-copy .cta:hover {
    background: rgba(212,252,45,0.08);
    border-color: var(--neon);
}

/* ===== CAMERA PREVIEW ===== */
.cam-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 100;
    display: none;
    flex-direction: column;
    gap: 6px;
}
.cam-container.visible { display: flex; }

.cam-wrapper {
    position: relative;
    width: 180px;
    height: 135px;
    border-radius: 0;
    overflow: hidden;
    border: 1px solid rgba(212,252,45,0.25);
}
.cam-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}
.cam-wrapper canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: scaleX(-1);
}
.cam-label {
    font-family: 'Geist Mono', monospace;
    font-size: 9px;
    color: var(--gray-5);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.cam-label .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--neon);
    animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ===== GESTURE INDICATOR ===== */
.gesture-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    color: var(--neon);
    letter-spacing: 1px;
    text-transform: uppercase;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(16,16,16,0.7);
    padding: 8px 16px;
    border: 1px solid rgba(212,252,45,0.2);
    backdrop-filter: blur(8px);
}
.gesture-indicator.visible { opacity: 1; }

/* ===== TUTORIAL ===== */
.tutorial-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10,10,10,0.85);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
}
.tutorial-overlay.visible {
    opacity: 1;
    pointer-events: all;
}
.tutorial-card {
    max-width: 420px;
    width: 90%;
    padding: 36px 32px 28px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
}
.tutorial-badge {
    font-family: 'Geist Mono', monospace;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--neon);
    background: rgba(212,252,45,0.1);
    padding: 4px 10px;
    border: 1px solid rgba(212,252,45,0.2);
}
.tutorial-header h2 {
    font-family: 'Reckless', Georgia, serif;
    font-size: 22px;
    font-weight: 400;
    color: var(--white);
    margin-top: 16px;
    line-height: 1.3;
}
.tutorial-header p {
    font-family: 'Geist Sans', sans-serif;
    font-size: 13px;
    color: var(--gray-4);
    margin-top: 6px;
    line-height: 1.5;
}
.tutorial-gestures {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.tutorial-gesture {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    transition: border-color 0.2s;
}
.tutorial-gesture:hover {
    border-color: rgba(212,252,45,0.15);
}
.gesture-visual {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gesture-text h3 {
    font-family: 'Geist Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--white);
}
.gesture-text p {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    color: var(--gray-5);
    margin-top: 2px;
    letter-spacing: 0.3px;
}
.tutorial-btn {
    width: 100%;
    margin-top: 28px;
    padding: 14px;
    background: var(--neon);
    color: var(--black);
    border: none;
    font-family: 'Geist Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}
.tutorial-btn:hover { opacity: 0.85; }
.tutorial-skip {
    margin-top: 12px;
    text-align: center;
}
.tutorial-skip label {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    color: var(--gray-5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.tutorial-skip input[type="checkbox"] {
    accent-color: var(--neon);
}

/* ===== INDEX PANEL ===== */
.index-panel {
    position: fixed;
    top: 0;
    right: -380px;
    width: 380px;
    height: 100vh;
    background: rgba(16,16,16,0.95);
    backdrop-filter: blur(30px);
    border-left: 1px solid rgba(255,255,255,0.06);
    z-index: 200;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
    padding: 80px 28px 40px;
}
.index-panel.open { right: 0; }
.index-panel .panel-title {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    color: var(--neon);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 24px;
}
.index-panel .panel-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    background: none;
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--gray-4);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.index-panel .panel-close:hover {
    color: var(--white);
    border-color: rgba(255,255,255,0.2);
}
.index-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    cursor: pointer;
    transition: all 0.2s;
}
.index-item:hover { padding-left: 6px; }
.index-item .idx-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    flex-shrink: 0;
}
.index-item .idx-num {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    color: var(--neon);
    letter-spacing: 0.5px;
    min-width: 24px;
}
.index-item .idx-title {
    font-family: 'Reckless', Georgia, serif;
    font-size: 14px;
    font-weight: 400;
    color: var(--white);
}
.index-item .idx-desc {
    font-family: 'Geist Mono', monospace;
    font-size: 9px;
    color: var(--gray-5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* ===== ABOUT SECTION (bottom left) ===== */
.about-info {
    position: fixed;
    bottom: 70px;
    left: 28px;
    max-width: 260px;
    z-index: 80;
    pointer-events: none;
    transition: opacity 0.6s;
}
.about-info.hidden { opacity: 0; }
.about-info .about-label {
    font-family: 'Geist Mono', monospace;
    font-size: 9px;
    font-weight: 600;
    color: var(--neon);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.about-info p {
    font-family: 'Geist Sans', sans-serif;
    font-size: 11px;
    color: var(--gray-4);
    line-height: 1.6;
}

/* ===== LOADING ===== */
/* CASE STUDY — Curtain de entrada */
#csCurtain {
    position: fixed;
    inset: 0;
    background: var(--black);
    z-index: 9000;
    transform: translateY(0);
    pointer-events: none;
}

/* PAGE TRANSITION OVERLAY */
#pageTransitionOverlay {
    position: fixed;
    inset: 0;
    background: var(--black);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
}
#pageTransitionLabel {
    width: clamp(80px, 12vw, 160px);
    opacity: 0;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.6s;
}
.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}
#lottieLoader {
    width: 100vw;
    height: 100vh;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1280px) {
    .top-nav {
        padding: 20px 60px;
    }
    .nav-link {
        font-size: 12px;
    }
    .nav-contact {
        font-size: 12px;
        padding: 8px;
    }
    .main-footer {
        padding: 15px 60px;
    }
    .footer-powered,
    .footer-center span,
    .footer-rooted {
        font-size: 10px;
    }
    .footer-contact {
        font-size: 12px;
    }
}

@media (max-width: 1024px) {
    .top-nav {
        padding: 20px 40px;
    }
    .nav-link {
        font-size: 11px;
    }
    .nucleo h1 {
        font-size: 40px;
        line-height: 48px;
    }
    .main-footer {
        padding: 15px 40px;
    }
    .footer-center {
        display: none;
    }
}

@media (max-width: 768px) {
    .top-nav {
        padding: 15px 20px;
    }
    .nav-logo img {
        width: 100px;
        height: 38px;
    }
    .nav-link {
        display: none;
    }
    .nav-contact {
        font-size: 11px;
        padding: 8px 12px;
    }
    .nav-menu {
        display: flex;
    }
    /* nucleo overrides handled in mobile-first section below */
    .controls {
        top: auto;
        bottom: 100px;
        right: 10px;
    }
    .zoom-controls {
        right: 10px;
        bottom: 80px;
    }
    .about-info {
        display: none;
    }
    .main-footer {
        padding: 12px 20px;
    }
    .footer-left {
        gap: 10px;
    }
    .footer-right {
        display: none;
    }
    .footer-powered {
        font-size: 9px;
    }
    .footer-logo {
        height: 12px;
        width: auto;
    }
}


/* ============================================================
   ADMIN PANEL STYLES (kept separate from main experience)
   ============================================================ */

/* Admin-specific body styles */
body.admin-body {
    background: #f5f5f5;
    overflow: auto;
    width: auto;
    height: auto;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    cursor: default;
    user-select: auto;
    color: #333;
}

/* Admin Header */
.admin-header {
    background: #1a1a2e;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.admin-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 2px;
}

.admin-header nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    transition: background 0.3s;
}

.admin-header nav a:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Admin Main */
.admin-main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Admin Panel Grid */
.admin-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .admin-panel {
        grid-template-columns: 1fr;
    }
}

.add-content,
.content-list {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.add-content h2,
.content-list h2 {
    color: #1a1a2e;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #444;
}

.admin-body input[type="text"],
.admin-body input[type="file"],
.admin-body textarea,
.admin-body select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.admin-body input[type="text"]:focus,
.admin-body textarea:focus,
.admin-body select:focus {
    outline: none;
    border-color: #4a69bd;
}

.admin-body textarea {
    resize: vertical;
    min-height: 100px;
}

.separator {
    text-align: center;
    color: #999;
    margin: 1rem 0;
    font-size: 0.9rem;
}

/* Buttons */
.admin-body button,
.btn-primary,
.btn-danger {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary,
.admin-body button[type="submit"] {
    background: #4a69bd;
    color: white;
    width: 100%;
}

.btn-primary:hover,
.admin-body button[type="submit"]:hover {
    background: #3c5aa6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 105, 189, 0.3);
}

.btn-danger {
    background: #e74c3c;
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-danger:hover {
    background: #c0392b;
}

/* Content List */
.content-item {
    border: 1px solid #e8e8e8;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    background: #fafafa;
    transition: box-shadow 0.3s;
}

.content-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.item-header h3 {
    font-size: 1.1rem;
    color: #333;
}

.type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.type-text {
    background: #e8f4f8;
    color: #2980b9;
}

.type-image {
    background: #e8f8e8;
    color: #27ae60;
}

.type-video {
    background: #f8e8f8;
    color: #8e44ad;
}

.item-text {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.item-media {
    color: #999;
    font-size: 0.8rem;
    font-family: monospace;
}

.item-actions {
    margin-top: 1rem;
    text-align: right;
}

.empty-message {
    color: #999;
    text-align: center;
    padding: 2rem;
    font-style: italic;
}

/* Admin Footer */
.admin-footer {
    text-align: center;
    padding: 2rem;
    color: #777;
    font-size: 0.9rem;
}

/* ============================================================
   ARTIFACT DETAIL MODAL
   ============================================================ */
.artifact-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
}
.artifact-modal.open {
    opacity: 1;
    visibility: visible;
}
body.page-ds .artifact-modal,
body.page-cs .artifact-modal {
    background: var(--white);
}
.artifact-modal-bg { display: none; }
.artifact-modal-content {
    position: relative;
    width: 75%;
    height: 50vh;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    padding: 20px 30px;
    overflow: visible;
}

/* Footer visible sobre el modal */
body.modal-open .main-footer {
    z-index: 300;
}

/* Nav light mode when modal is open */
body.modal-open .top-nav {
    background: #f7f7f7;
    z-index: 300;
}
body.modal-open .nav-link {
    color: var(--black);
}
body.modal-open .nav-logo img {
    filter: brightness(0);
}
body.modal-open .nav-menu span {
    background: var(--black);
}
.artifact-back-row {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 877px;
}
.artifact-back-home {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Geist Mono', monospace;
    font-size: 14px;
    font-weight: 500;
    color: #101010;
    text-transform: uppercase;
    padding: 0;
    transition: opacity 0.2s;
}
.artifact-back-home:hover { opacity: 0.5; }
.artifact-nav-arrows {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}
.artifact-nav {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 4px 0;
    transition: opacity 0.2s;
}
.artifact-nav:hover { opacity: 0.5; }
.artifact-discover {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #101010;
    padding: 10px 20px;
    text-decoration: none;
    transition: opacity 0.2s;
}
.artifact-discover:hover { opacity: 0.8; }
.artifact-discover span {
    font-family: 'Geist Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    color: #f7f7f7;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.artifact-layout {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    width: 100%;
    max-width: 877px;
}
.artifact-image {
    flex: 0 0 260px;
    height: 260px;
    margin-top: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.artifact-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.3s, filter 0.5s ease;
}
.artifact-image img.animate-in {
    animation: artifactSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes artifactSlideIn {
    0% {
        opacity: 0;
        transform: rotate(0deg) scale(0.5);
    }
    100% {
        opacity: 1;
        transform: rotate(-15deg) scale(1);
    }
}
.artifact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.artifact-info h1 {
    font-family: 'Reckless', Georgia, serif;
    font-size: 24px;
    font-weight: 400;
    line-height: 30px;
    color: var(--black);
}
.artifact-category {
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    color: var(--black);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.artifact-adj {
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    color: var(--black);
    text-transform: uppercase;
}
.artifact-desc {
    font-family: 'Geist Sans', sans-serif;
    font-size: 13px;
    line-height: 20px;
    color: var(--black);
}
.artifact-related {
    margin-top: 48px;
}
.artifact-related h3 {
    font-family: 'Geist Mono', monospace;
    font-size: 16px;
    font-weight: 400;
    line-height: 22px;
    color: var(--black);
    margin-bottom: 10px;
}
.related-card {
    display: block;
    background: var(--neon);
    padding: 20px;
    text-decoration: none;
    transition: all 0.25s;
}
.related-card:hover {
    background: #c8f020;
}
.related-title {
    font-family: 'Geist Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    color: var(--black);
    text-transform: uppercase;
    letter-spacing: 0;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.related-card p {
    font-family: 'Geist Sans', sans-serif;
    font-size: 12px;
    line-height: 18px;
    color: var(--black);
}

/* Modal Responsive */
@media (max-width: 1024px) {
    .artifact-modal-content {
        padding: 20px 30px;
    }
    .artifact-layout {
        gap: 50px;
    }
    .artifact-info h1 {
        font-size: 42px;
    }
}
@media (max-width: 768px) {
    .artifact-modal-content {
        padding: 20px;
    }
    .artifact-layout {
        flex-direction: column;
        gap: 30px;
    }
    .artifact-image {
        flex: none;
        width: 100%;
        height: 250px;
    }
    .artifact-image img {
        transform: rotate(-10deg);
    }
    .artifact-info h1 {
        font-size: 32px;
    }
    .artifact-desc {
        font-size: 14px;
    }
}

/* ============================================================
   ARTIFACTS PAGE STYLES
   ============================================================ */

.page-artifacts {
    background: var(--white);
    min-height: 100vh;
    overflow: auto;
    cursor: default;
}

.page-artifacts .nav-logo img {
    filter: none;
}

.artifacts-page {
    padding-top: 80px;
    min-height: 100vh;
}

/* Breadcrumb */
.breadcrumb {
    padding: 20px 40px;
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.breadcrumb a {
    color: var(--gray-4);
    text-decoration: none;
    transition: color 0.2s;
}
.breadcrumb a:hover {
    color: var(--black);
}
.breadcrumb span {
    color: var(--gray-3);
}
.breadcrumb .current {
    color: var(--black);
    font-weight: 500;
}

/* Artifacts Header */
.artifacts-header {
    padding: 40px 40px 60px;
    text-align: left;
}
.artifacts-header h1 {
    font-family: 'Reckless', Georgia, serif;
    font-size: 48px;
    font-weight: 400;
    color: var(--black);
    margin-bottom: 8px;
}
.artifacts-header .subtitle {
    font-family: 'Geist Mono', monospace;
    font-size: 12px;
    color: var(--gray-4);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 1px solid var(--gray-1);
}

/* Category */
.category {
    padding: 40px;
    border-right: 1px solid var(--gray-1);
}
.category:last-child {
    border-right: none;
}
.category-title {
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    color: var(--black);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 4px;
}
.category-subtitle {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    color: var(--gray-4);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 30px;
}

/* Artifacts Grid inside category */
.artifacts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Artifact Card */
.artifact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s;
}
.artifact-card:hover {
    transform: translateY(-4px);
}
.artifact-card img {
    width: 100%;
    max-width: 100px;
    height: auto;
    object-fit: contain;
    margin-bottom: 12px;
    filter: grayscale(100%);
    transition: filter 0.3s;
}
.artifact-card:hover img {
    filter: grayscale(0%);
}
.artifact-name {
    font-family: 'Geist Mono', monospace;
    font-size: 9px;
    color: var(--gray-4);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

/* Page Footer */
.page-footer {
    padding: 40px;
    text-align: center;
    border-top: 1px solid var(--gray-1);
    margin-top: 60px;
}
.page-footer p {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    color: var(--gray-4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Responsive Artifacts Page */
@media (max-width: 1024px) {
    .categories-grid {
        grid-template-columns: 1fr;
    }
    .category {
        border-right: none;
        border-bottom: 1px solid var(--gray-1);
    }
    .artifacts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .breadcrumb {
        padding: 15px 20px;
        font-size: 10px;
    }
    .artifacts-header {
        padding: 20px 20px 40px;
    }
    .artifacts-header h1 {
        font-size: 32px;
    }
    .category {
        padding: 30px 20px;
    }
    .artifacts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}


/* ============================================================
   MOBILE-FIRST OVERRIDES (max-width: 768px)
   ============================================================ */

/* Mobile artifact screen - hidden by default */
.mob-artifact {
    display: none;
}

/* Mobile nav panel - hidden by default, desktop never sees it */
.mobile-nav-panel {
    display: none;
}


/* Hint text variants */
.hint-mobile { display: none; }
.hint-desktop { display: inline; }

@media (max-width: 768px) {

    /* --- Nav adjustments --- */
    .nav-contact { display: none; }

    /* --- Footer mobile (neon, stacked, debajo del fold) --- */
    .main-footer {
        position: relative;
        flex-direction: column;
        align-items: center;
        gap: 15px;
        padding: 30px;
        text-align: center;
    }
    .footer-left {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 20px;
    }
    .footer-logo {
        height: 15px;
        width: 135px;
        object-fit: contain;
    }
    .footer-center {
        display: flex !important; /* override 1024px hidden */
    }
    .footer-center span,
    .footer-powered { font-size: 11px; }
    .footer-right {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }
    .footer-rooted { font-size: 11px; }
    .footer-contact { font-size: 14px; font-family: 'Geist Sans', sans-serif; }

    /* Hint: mobile vs desktop text */
    .hint-desktop { display: none; }
    .hint-mobile { display: inline; }

    /* --- Hide desktop-only elements --- */
    .cam-container,
    .tutorial-overlay { display: none !important; }

    /* --- Nucleo (center copy) --- */
    .nucleo {
        padding: 0 24px;
        pointer-events: none;
    }
    .nucleo h1 {
        font-size: 30px;
        line-height: 36px;
    }
    .nucleo-cta {
        font-size: 12px;
        padding: 10px 18px;
        pointer-events: auto;
    }
    .nucleo-powered { display: flex; }

    /* --- Artifact modal on mobile: stack vertically --- */
    .artifact-layout {
        flex-direction: column;
        gap: 20px;
    }
    .artifact-image {
        width: 100%;
        height: 260px;
    }
    .artifact-image img {
        object-fit: contain;
    }
    .artifact-info {
        width: 100%;
    }

    /* Body scrollable en mobile para revelar footer */
    body {
        overflow-y: auto;
        height: auto;
    }
    /* La escena ocupa el primer viewport completo */
    .scene {
        height: 100svh;
    }

    /* Nav stays on top of the full-screen panel */
    .top-nav { z-index: 400; }

    /* --- Mobile Artifact Screen --- */
    .mob-artifact {
        display: flex;
        position: fixed;
        inset: 0;
        flex-direction: column;
        background: #f7f7f7;
        z-index: 500;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        overflow: hidden;
    }
    .mob-artifact.open {
        transform: translateX(0);
    }

    /* Nav dentro del artifact screen */
    .mob-artifact-nav {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 20px 30px;
        background: #f7f7f7;
        flex-shrink: 0;
    }
    .mob-artifact-logo {
        filter: brightness(0);
        width: 100px;
        height: 38px;
        object-fit: contain;
    }
    .mob-artifact-hamburger span {
        background: var(--black);
    }
    .mob-artifact-hamburger:hover span {
        background: var(--black);
    }

    /* Flechas de navegación */
    .mob-artifact-arrows {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 30px;
        background: #f7f7f7;
        flex-shrink: 0;
        border-bottom: 1px solid rgba(0,0,0,0.08);
    }
    .mob-arrow {
        background: none;
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        padding: 4px 0;
    }
    .mob-artifact-close-placeholder {
        width: 40px;
    }

    /* Contenido scrollable */
    .mob-artifact-scroll {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .mob-artifact-back {
        display: flex;
        align-items: center;
        gap: 10px;
        background: none;
        border: none;
        cursor: pointer;
        font-family: 'Geist Mono', monospace;
        font-size: 12px;
        font-weight: 500;
        color: var(--black);
        text-transform: uppercase;
        padding: 16px 30px;
        width: 100%;
    }
    .mob-artifact-image-wrap {
        width: 55%;
        aspect-ratio: 1 / 1;
        flex-shrink: 0;
        background: #f7f7f7;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        margin: 24px auto;
        padding: 20px;
    }
    .mob-artifact-image-wrap img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        filter: invert(1);
    }
    .mob-artifact-info {
        padding: 0 30px 30px;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    .mob-artifact-title {
        font-family: 'Reckless', serif;
        font-size: 32px;
        font-weight: 400;
        line-height: 40px;
        color: var(--black);
    }
    .mob-artifact-category {
        font-family: 'Geist Mono', monospace;
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 0.02em;
        text-transform: uppercase;
        color: var(--black);
    }
    .mob-artifact-adj {
        font-family: 'Geist Mono', monospace;
        font-size: 12px;
        font-weight: 500;
        text-transform: uppercase;
        color: var(--black);
    }
    .mob-artifact-desc {
        font-family: 'Geist Sans', sans-serif;
        font-size: 16px;
        font-weight: 400;
        line-height: 24px;
        color: var(--black);
    }
    .mob-stories-title {
        font-family: 'Geist Mono', monospace;
        font-size: 22px;
        font-weight: 400;
        line-height: 28px;
        color: var(--black);
        margin-bottom: 16px;
    }
    .mob-story-card {
        display: block;
        text-decoration: none;
        color: var(--black);
    }
    .mob-story-card-top {
        background: var(--neon);
        padding: 20px;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    .mob-story-name {
        font-family: 'Geist Mono', monospace;
        font-size: 14px;
        font-weight: 500;
        text-transform: uppercase;
        color: var(--black);
    }
    .mob-story-text {
        font-family: 'Geist Sans', sans-serif;
        font-size: 14px;
        font-weight: 400;
        line-height: 20px;
        color: var(--black);
    }
    .mob-story-card-cta {
        background: var(--black);
        padding: 20px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-family: 'Geist Mono', monospace;
        font-size: 12px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.02em;
        color: var(--white);
    }

    /* Footer dentro del artifact screen */
    .mob-artifact-footer-bar {
        position: relative !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 15px !important;
        padding: 30px !important;
        text-align: center;
        flex-shrink: 0;
    }
    .mob-artifact-footer-bar .footer-right { display: flex !important; flex-direction: column; align-items: center; gap: 5px; }
    .mob-artifact-footer-bar .footer-center { display: flex !important; }
    .mob-artifact-footer-bar .footer-left { flex-direction: row; align-items: center; justify-content: center; gap: 20px; }

    /* --- Mobile Nav Panel (full screen) --- */
    .mobile-nav-panel {
        display: flex;
        position: fixed;
        inset: 0;
        width: 100vw;
        height: 100vh;
        background: var(--black);
        z-index: 9999; /* siempre por encima de todo */
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    .mobile-nav-panel.open {
        transform: translateX(0);
    }
    /* X button inside the nav panel */
    .mobile-nav-close {
        position: absolute;
        top: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .mobile-nav-close span {
        display: block;
        width: 22px;
        height: 2px;
        background: var(--white);
        position: absolute;
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .mobile-nav-close span:nth-child(1) { transform: rotate(45deg); }
    .mobile-nav-close span:nth-child(2) { transform: rotate(-45deg); }
    .mobile-nav-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0;
        width: 100%;
        padding: 0 40px;
    }
    .mobile-nav-link {
        font-family: 'Geist Mono', monospace;
        font-size: 22px;
        font-weight: 500;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        text-decoration: none;
        color: var(--white);
        padding: 18px 0;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        transition: color 0.2s;
    }
    .mobile-nav-link:first-child { border-top: 1px solid rgba(255,255,255,0.08); }
    .mobile-nav-link.active { color: var(--neon); }
    .mobile-nav-link:hover { color: var(--neon); }
    .mobile-nav-link--cta {
        color: var(--neon);
        border: none;
        border-top: none;
        margin-top: 30px;
        padding: 16px 40px;
        border: 1px solid var(--neon);
        width: auto;
    }
}


/* ============================================================
   DECODED STORIES PAGE — mobile first
   ============================================================ */

body.page-ds {
    background: var(--black);
    overflow-y: auto;
    overflow-x: hidden;
    height: auto;
    min-height: 100dvh;
    cursor: default;
    color: var(--black);
}
body.page-ds:active { cursor: default; }
body.page-ds .top-nav { background: var(--black); position: sticky; top: 0; z-index: 100; }
body.page-ds .nav-link { color: var(--gray-4); }
body.page-ds .nav-link:hover { color: var(--white); }
body.page-ds .nav-link.active { color: var(--white); }
body.page-ds .nav-contact { color: var(--black); }
body.page-ds .nav-contact:hover { background: var(--neon); color: var(--black); }
body.page-ds .nav-menu span { background: var(--white); }
body.page-ds .main-footer { position: relative; }

/* Layout para páginas de contenido con scroll (nav igual al home) */
body.page-scroll {
    overflow-y: auto;
    overflow-x: hidden;
    height: auto;
    min-height: 100dvh;
    cursor: default;
    background: var(--white);
}
body.page-scroll .top-nav { position: sticky; top: 0; z-index: 100; }
body.page-scroll .main-footer { position: relative; }

.ds-hero { display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.ds-hero::-webkit-scrollbar { display: none; }
.ds-hero-img { flex: 0 0 100vw; width: 100vw; height: 70vw; max-height: 504px; object-fit: cover; object-position: left center; scroll-snap-align: start; display: block; }

.ds-content { background: #f7f7f7; padding: 30px; display: flex; flex-direction: column; gap: 25px; }

.ds-back { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--black); font-family: 'Geist Mono', monospace; font-size: 14px; font-weight: 500; text-transform: uppercase; }

.ds-title { font-family: 'Reckless', Georgia, serif; font-size: 48px; font-weight: 400; line-height: 56px; color: var(--black); margin: 0; }

.ds-section { display: flex; flex-direction: column; color: var(--black); }
.ds-section h2 { font-family: 'Geist Mono', monospace; font-size: 22px; font-weight: 400; line-height: 28px; color: var(--black); margin: 0 0 4px; }
.ds-section p { font-family: 'Geist Sans', sans-serif; font-size: 14px; line-height: 20px; color: var(--black); margin: 0; }

.ds-numbers { background: var(--neon); padding: 20px; display: flex; flex-direction: column; gap: 15px; }
.ds-numbers h2 { font-family: 'Geist Mono', monospace; font-size: 32px; font-weight: 400; line-height: 38px; color: var(--black); margin: 0; }
.ds-numbers-grid { display: flex; flex-wrap: wrap; gap: 12px 8px; }
.ds-stat { display: flex; flex-direction: column; flex: 1 1 130px; min-width: 0; }
.ds-stat-label { font-family: 'Geist Mono', monospace; font-size: 11px; font-weight: 600; line-height: 16px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--black); margin-bottom: 4px;}
.ds-stat-value { font-family: 'Konfus', 'Reckless', Georgia, serif; font-size: clamp(28px, 4vw, 48px); font-weight: 400; line-height: 1.1; color: var(--black); }
.ds-stat-note { font-family: 'Geist Mono', monospace; font-size: 11px; font-weight: 600; line-height: 16px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--black); margin-top: 2px; }

.ds-artifacts { display: flex; flex-direction: column; }
.ds-artifact-card { border: 1px solid var(--black); padding: 20px; display: flex; flex-direction: column; background: #f7f7f7; }
.ds-artifact-img-wrap { width: 131px; height: 150px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.ds-artifact-img { width: 100%; height: 100%; object-fit: contain; filter: invert(1); }
.ds-artifact-type { font-family: 'Geist Mono', monospace; font-size: 11px; font-weight: 600; line-height: 16px; letter-spacing: 0.02em; text-transform: uppercase; color: var(--black); display: block; }
.ds-artifact-name { font-family: 'Geist Sans', sans-serif; font-size: 14px; font-weight: 500; line-height: 20px; color: var(--black); display: block; }
.ds-artifact-adj { font-family: 'Geist Mono', monospace; font-size: 11px; font-weight: 500; line-height: 16px; text-transform: uppercase; color: var(--black); display: block; opacity: 0.6; }
.ds-artifact-desc { font-family: 'Geist Sans', sans-serif; font-size: 14px; line-height: 20px; color: var(--black); margin: 0; }

@media (min-width: 1024px) {
    .ds-main { display: flex; flex-direction: row; align-items: stretch; min-height: calc(100dvh - 110px); }
    .ds-hero { flex: 1; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 2fr 1fr; overflow: hidden; scroll-snap-type: none; height: calc(100dvh - 110px); }
    .ds-hero-img { flex: none; width: 100%; height: 100%; max-height: none; scroll-snap-align: none; }
    .ds-hero-img:first-child { grid-row: 1 / 2; grid-column: 1 / 3; object-position: left center; }
    .ds-hero-img:nth-child(2) { grid-row: 2 / 3; grid-column: 1 / 2; }
    .ds-hero-img:nth-child(3) { grid-row: 2 / 3; grid-column: 2 / 3; }
    .ds-content { width: 560px; flex-shrink: 0; background: white; overflow-y: auto; height: calc(100dvh - 110px); padding: 24px 28px; gap: 14px; }
    .ds-title { font-size: 40px; line-height: 48px; }
    .ds-section h2 { font-size: 13px; line-height: 18px; }
    .ds-section p { font-size: 11px; line-height: 16px; }
    .ds-numbers { padding: 14px; gap: 10px; }
    .ds-numbers h2 { font-size: 22px; line-height: 28px; }
    .ds-numbers-grid { flex-wrap: nowrap; gap: 8px; }
    .ds-stat { flex: 1 1 0; min-width: 0; }
    .ds-stat-label { font-size: 8px; letter-spacing: 0.04em; margin-bottom: 4px; }
    .ds-stat-value { font-size: clamp(16px, 4.5vw, 24px); }
    .ds-stat-note { font-size: 7px; letter-spacing: 0.03em; }
    .ds-back { font-size: 11px; }
    .ds-artifacts { flex-direction: row; height: 220px; }
    .ds-artifact-card { flex: 1; overflow: hidden; padding: 14px; }
    .ds-artifact-img-wrap { width: 70px; height: 80px; margin-bottom: 8px; }
    .ds-artifact-type { font-size: 10px; }
    .ds-artifact-name { font-size: 12px; line-height: 16px; }
    .ds-artifact-desc { font-size: 11px; line-height: 15px; }
}

/* =============================================
   THREE A'S SECTION (Archetypes / Artifacts / Activations)
   ============================================= */
.three-as-section {
    display: none;
    background-color: #d4fc2d;
    position: relative;
    overflow: hidden;
    min-height: 1068px;
    width: 100%;
}

.three-as-content {
    position: relative;
    margin: 0 auto;
    width: 877px;
    max-width: 60%;
    padding-top: 92px;
    padding-bottom: 100px;
    color: #101010;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 130px;
}

.three-as-block {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.three-as-label {
    font-family: 'Geist Mono', monospace;
    font-weight: 400;
    font-size: 22px;
    line-height: 28px;
    color: #101010;
    margin: 0;
}

.three-as-body {
    font-family: 'Konfus', 'Reckless', Georgia, serif;
    font-weight: 400;
    font-size: 32px;
    line-height: 40px;
    color: #101010;
    margin: 0;
}

/* Artifact decoratives */
.three-as-artifact {
    position: absolute;
    pointer-events: none;
}

.three-as-artifact img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.three-as-domino {
    width: 220px;
    top: 21px;
    left: calc(72% + 20px);
    transform: rotate(-14.86deg);
}

.three-as-mortar {
    width: 370px;
    top: 341px;
    left: 60px;
    transform: rotate(16deg);
}

.three-as-chair {
    width: 340px;
    top: 544px;
    left: calc(78% - 100px);
    transform: rotate(-18.11deg);
}

/* Mobile */
@media (max-width: 768px) {
    .three-as-section {
        min-height: 1492px;
    }

    .three-as-content {
        margin-left: 50%;
        transform: translateX(-50%);
        width: 337px;
        padding-top: 92px;
        gap: 150px;
    }

    .three-as-label {
        font-family: 'Geist Mono', monospace;
        font-weight: 400;
        font-size: 22px;
        line-height: 28px;
    }

    .three-as-body {
        font-family: 'Konfus', 'Reckless', Georgia, serif;
        font-size: 28px;
        line-height: 36px;
    }

    .three-as-domino {
        width: 150px;
        top: 3px;
        left: calc(100% - 32px);
        transform: translateX(-50%) rotate(-14.86deg);
    }

    .three-as-mortar {
        width: 220px;
        top: 423px;
        left: -100px;
        transform: rotate(16deg);
    }

    .three-as-chair {
        width: 230px;
        top: 892px;
        left: calc(100% - 62px);
        transform: translateX(-50%) rotate(-18.11deg);
    }
}
