/* ═══════════════════════════════════════════════════════════
   SISTEMA CREATIVO - CUSTOM THEME STYLES
   Estilos custom que complementan Tailwind
   ═══════════════════════════════════════════════════════════ */

/* ── Lenis Smooth Scroll ───────────────────────────────── */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-scrolling iframe { pointer-events: none; }

/* ── Body Base ─────────────────────────────────────────── */
body {
    background-color: #050505;
    color: #f4f4f0;
    overflow-x: hidden;
    width: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Links: reset visited/active colors ────────────────── */
a, a:link, a:visited, a:hover, a:active, a:focus {
    color: inherit;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

/* Restore explicit color classes */
.text-white  { color: #fff !important; }
.text-accent { color: rgb(204 255 0) !important; }
.text-black  { color: #000 !important; }
.text-cream  { color: #f4f4f0 !important; }
.text-gray-300 { color: rgb(209 213 219) !important; }
.text-gray-400 { color: rgb(156 163 175) !important; }
.text-gray-500 { color: rgb(107 114 128) !important; }
.text-gray-600 { color: rgb(75 85 99) !important; }

/* ── Custom Cursor ─────────────────────────────────────── */
@media (hover: none) and (pointer: coarse) {
    .cursor-dot, .cursor-outline { display: none !important; }
}

.cursor-dot, .cursor-outline {
    position: fixed;
    top: 0; left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}
.cursor-dot { width: 8px; height: 8px; background-color: rgb(204 255 0); }
.cursor-outline { width: 40px; height: 40px; border: 1px solid rgba(204, 255, 0, 0.5); transition: width 0.2s, height 0.2s; }

/* ── Typography Effects ────────────────────────────────── */
.text-outline {
    -webkit-text-stroke: 1px #ffffff;
    color: transparent;
    transition: all 0.5s ease;
}
.group:hover .text-outline {
    -webkit-text-stroke: 1px rgb(204 255 0);
    color: rgb(204 255 0);
}
.text-outline-white {
    -webkit-text-stroke: 1px #ffffff;
    color: transparent;
}

/* ── Video Background ──────────────────────────────────── */
.video-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(5,5,5,0.2), rgba(5,5,5,0.9));
    z-index: 1;
}

/* ── Loader ────────────────────────────────────────────── */
.loader {
    position: fixed; inset: 0; background: #050505; z-index: 10000;
    display: flex; justify-content: center; align-items: center;
}

/* ── Gallery Images ────────────────────────────────────── */
.grid-gallery-img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.grid-gallery-item:hover .grid-gallery-img {
    transform: scale(1.05);
}

/* ── Video Container ───────────────────────────────────── */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 0.5rem;
}
.video-container iframe {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
}

/* ── Process Tabs ──────────────────────────────────────── */
.process-content {
    display: none;
    opacity: 0;
    transform: translateY(20px);
}
.process-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}
.process-tab.active {
    color: rgb(204 255 0);
    padding-left: 1.5rem;
    font-style: italic;
}
.process-tab.active::before {
    content: '>';
    position: absolute;
    left: 0; top: 50%; transform: translateY(-50%);
    color: rgb(204 255 0);
    font-family: 'Space Mono', monospace;
}

/* ── Service Accordion ─────────────────────────────────── */
.service-details {
    height: 0;
    overflow: hidden;
    transition: height 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.service-item.active .service-details {
    height: auto;
}
.service-item.active .arrow-icon {
    transform: rotate(90deg);
    color: rgb(204 255 0);
}

/* ── Project Modal ─────────────────────────────────────── */
.project-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: #000;
    z-index: 9999;
    transform: translateY(100%);
    overflow-y: auto;
    display: none;
}
.modal-close-btn {
    position: fixed;
    top: 1.5rem; right: 1.5rem;
    z-index: 10000;
    mix-blend-mode: difference;
    cursor: pointer;
    padding: 10px;
    background: rgba(0,0,0,0.5);
    border-radius: 5px;
    border: none;
}

/* ── Trashy / Chaotic Elements ─────────────────────────── */
.trashy-img {
    position: absolute;
    z-index: 0;
    opacity: 0.6;
    mix-blend-mode: exclusion;
    pointer-events: none;
}

.glitch-effect:hover {
    animation: glitch-anim 0.3s cubic-bezier(.25,.46,.45,.94) both infinite;
    color: rgb(204 255 0);
}
@keyframes glitch-anim {
    0%   { transform: translate(0) }
    20%  { transform: translate(-2px, 2px) }
    40%  { transform: translate(-2px, -2px) }
    60%  { transform: translate(2px, 2px) }
    80%  { transform: translate(2px, -2px) }
    100% { transform: translate(0) }
}

.cursor-blink { animation: blink 1s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ── Mobile Menu ───────────────────────────────────────── */
#mobile-menu {
    position: fixed;
    inset: 0;
    background: #050505;
    z-index: 9999;
    transform: translateX(100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
}
.mobile-link {
    font-family: 'Syne', sans-serif;
    -webkit-text-stroke: 1px white;
    color: transparent !important;
    transition: all 0.2s;
    line-height: 1.1;
    padding: 5px 0;
    width: 100%;
    text-align: center;
}
.mobile-link:visited {
    color: transparent !important;
    -webkit-text-stroke: 1px white;
}
.mobile-link:active,
.mobile-link:focus {
    color: rgb(204 255 0) !important;
    -webkit-text-stroke: 1px rgb(204 255 0);
    font-style: italic;
}

.trashy-close {
    position: absolute;
    top: 2rem; right: 2rem;
    font-family: 'Space Mono', monospace;
    font-size: 1rem;
    color: rgb(204 255 0);
    cursor: pointer;
    border: 2px solid rgb(204 255 0);
    padding: 0.5rem 1rem;
    transform: rotate(3deg);
    transition: all 0.2s;
    background: #000;
    z-index: 20;
}
.trashy-close:hover {
    background: rgb(204 255 0);
    color: #000;
    transform: rotate(0deg) scale(1.1);
}

/* ── Trashy Gallery Items ──────────────────────────────── */
.trash-item {
    position: relative;
    overflow: hidden;
    background: #000;
}
.trash-item::before {
    content: 'REC';
    position: absolute;
    top: 10px; left: 10px;
    font-family: 'Space Mono', monospace;
    font-size: 0.6rem;
    color: #ff0000;
    z-index: 10;
    pointer-events: none;
    animation: blink 2s infinite;
}
.trash-overlay {
    position: absolute;
    inset: 0;
    background: rgba(204, 255, 0, 0.05);
    mix-blend-mode: exclusion;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 5;
}
.trash-item:hover .trash-overlay { opacity: 1; }

/* ── Mobile UX / SEO Fixes ─────────────────────────────── */
html, body { max-width: 100%; overflow-x: hidden; }
img, video, iframe { max-width: 100%; }
button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
input, textarea, select { font-size: 16px; } /* Prevents iOS zoom */

/* ── Internal Pages: padding for fixed header ──────────── */
body.page-inner main {
    padding-top: 80px;
}
@media (max-width: 768px) {
    body.page-inner main {
        padding-top: 64px;
    }
}

/* ── Footer link fix ───────────────────────────────────── */
footer a:visited, footer a:visited span { color: inherit; }

/* ── Blog: Single post styles ──────────────────────────── */
.entry-content h2 { font-size: 1.75rem; font-weight: 700; margin: 2rem 0 1rem; color: #fff; }
.entry-content h3 { font-size: 1.5rem; font-weight: 600; margin: 1.5rem 0 0.75rem; color: #fff; }
.entry-content p { margin-bottom: 1.5rem; color: #d1d5db; line-height: 1.8; }
.entry-content ul, .entry-content ol { margin: 0 0 1.5rem 2rem; color: #d1d5db; }
.entry-content li { margin-bottom: 0.5rem; }
.entry-content a { color: rgb(204 255 0); border-bottom: 1px solid transparent; transition: border-color 0.3s; }
.entry-content a:hover { border-bottom-color: rgb(204 255 0); }
.entry-content blockquote {
    border-left: 4px solid rgb(204 255 0);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: rgba(255,255,255,0.05);
    font-style: italic;
    color: #e5e7eb;
}
.entry-content img { border-radius: 0.5rem; margin: 1.5rem 0; }
.entry-content pre {
    background: #0d1117;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0.5rem;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}
.entry-content code {
    background: rgba(255,255,255,0.1);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 0.875em;
}
.entry-content pre code { background: transparent; padding: 0; }
