/* ============================================
   PIXEL EM FOCO - PORTFÓLIO DE DESIGN
   Stylesheet Principal
   ============================================ */

@import url('extended.css');

/* ============================================
   1. RESET E VARIÁVEIS
   ============================================ */

:root {
    /* Paleta Modo Claro */
    --bg-body: #F4F6F8;
    --bg-header: #FFFFFF;
    --text-primary: #1C1E21;
    --text-secondary: #4E5D6C;
    --btn-primary: #C8943B;
    --btn-hover: #C8943B;
    --link-color: #4A4A4A;
    --border-color: #D0D7DE;
    --highlight: #7E57C2;
    --github-btn: #7E57C2;
    
    /* Cores Principais (mantidas para compatibilidade) */
    --color-primary: #C8943B;
    --color-primary-dark: #A57830;
    --color-primary-light: #DAA84E;
    
    /* Cores Neutras */
    --color-dark: #1C1E21;
    --color-dark-gray: #4E5D6C;
    --color-gray: #D0D7DE;
    --color-light-gray: #4E5D6C;
    --color-white: #FFFFFF;
    --color-off-white: #F4F6F8;
    
    /* Cores de Estado */
    --color-success: #00D4AA;
    --color-error: #FF3B3B;
    --color-warning: #FFA900;
    
    /* Tipografia */
    --font-primary: 'Inter', 'Poppins', sans-serif;
    --font-secondary: 'Playfair Display', serif;
    
    /* Tamanhos de Fonte */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;
    --font-size-5xl: 3rem;
    
    /* Espaçamento */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 6rem;
    
    /* Bordas */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 20px;
    --border-radius-full: 9999px;
    
    /* Sombras */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.25);
    
    /* Transições */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-all: all 0.3s ease;
    
    /* Z-index */
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-body);
    overflow-x: hidden;
}

/* ============================================
   2. TIPOGRAFIA
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

h1 { font-size: var(--font-size-5xl); }
h2 { font-size: var(--font-size-4xl); }
h3 { font-size: var(--font-size-3xl); }
h4 { font-size: var(--font-size-2xl); }
h5 { font-size: var(--font-size-xl); }
h6 { font-size: var(--font-size-lg); }

p {
    margin-bottom: var(--spacing-sm);
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: var(--transition-base);
}

a:hover {
    color: var(--highlight);
}

/* ============================================
   3. LAYOUT & CONTAINERS
   ============================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-md);
    }
}

/* ============================================
   4. NAVEGAÇÃO
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--bg-header);
    backdrop-filter: blur(10px);
    z-index: var(--z-fixed);
    padding: var(--spacing-sm) 0;
    transition: var(--transition-base);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.navbar.scrolled {
    background: var(--bg-header);
    box-shadow: var(--shadow-md);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: var(--font-size-xl);
    font-weight: 700;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.logo-pixel {
    color: var(--color-primary);
}

.logo-em {
    color: var(--color-light-gray);
    font-weight: 300;
}

.logo-foco {
    color: var(--color-white);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
    align-items: center;
}

.nav-menu a {
    color: var(--color-white);
    font-weight: 500;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-md);
    transition: var(--transition-base);
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: var(--transition-base);
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--color-primary);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 80%;
}

/* Menu Toggle (Mobile) */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--color-white);
    transition: var(--transition-base);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 60px;
        right: -100%;
        width: 250px;
        height: calc(100vh - 60px);
        background: var(--color-dark-gray);
        flex-direction: column;
        align-items: flex-start;
        padding: var(--spacing-lg);
        transition: var(--transition-base);
        box-shadow: var(--shadow-lg);
    }
    
    .nav-menu.active {
        right: 0;
    }
}

/* ============================================
   5. LOADER
   ============================================ */

.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity var(--transition-slow), visibility var(--transition-slow);
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-animation {
    text-align: center;
}

.loader-circle {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(108, 92, 231, 0.2);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--spacing-sm);
}

.loader-text {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--color-primary);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ============================================
   6. HERO SECTION
   ============================================ */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 80px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(108, 92, 231, 0.1) 0%, 
        rgba(15, 15, 15, 0.9) 50%, 
        rgba(108, 92, 231, 0.1) 100%);
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-content {
    position: relative;
    z-index: var(--z-base);
    text-align: center;
}

.hero-subtitle {
    display: block;
    font-size: var(--font-size-lg);
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: fadeInDown 1s ease;
}

.hero-main {
    display: block;
    font-size: var(--font-size-5xl);
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    background: linear-gradient(90deg, var(--color-white) 0%, var(--color-primary-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-description {
    font-size: var(--font-size-xl);
    color: var(--color-light-gray);
    max-width: 600px;
    margin: 0 auto var(--spacing-xl);
    line-height: 1.8;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.6s both;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: var(--spacing-xl);
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    animation: fadeIn 1s ease 1s both;
}

.mouse {
    width: 25px;
    height: 40px;
    border: 2px solid var(--color-primary);
    border-radius: 15px;
    margin: 0 auto var(--spacing-xs);
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s ease-in-out infinite;
}

@keyframes scroll {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(15px);
    }
}

.scroll-indicator p {
    font-size: var(--font-size-sm);
    color: var(--color-light-gray);
    text-transform: uppercase;
    letter-spacing: 2px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================
   7. BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: var(--font-size-base);
    font-weight: 600;
    border-radius: var(--border-radius-lg);
    cursor: pointer;
    transition: var(--transition-base);
    border: 2px solid transparent;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
}

.btn-outline:hover {
    background: var(--color-white);
    color: var(--color-dark);
}

.btn-light {
    background: var(--color-white);
    color: var(--color-dark);
}

.btn-light:hover {
    background: var(--color-light-gray);
}

.btn-whatsapp {
    background: #25D366;
    color: var(--color-white);
}

.btn-whatsapp:hover {
    background: #20BA5A;
    box-shadow: var(--shadow-lg);
}

/* ============================================
   8. SECTIONS
   ============================================ */

section {
    padding: var(--spacing-3xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.section-title {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--color-primary);
    border-radius: var(--border-radius-full);
}

.section-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-light-gray);
    max-width: 600px;
    margin: var(--spacing-md) auto 0;
}

.section-cta {
    text-align: center;
    margin-top: var(--spacing-2xl);
}

/* ============================================
   9. PAGE HEADER
   ============================================ */

.page-header {
    padding: calc(80px + var(--spacing-3xl)) 0 var(--spacing-2xl);
    text-align: center;
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-dark-gray) 100%);
}

.page-title {
    font-size: var(--font-size-5xl);
    margin-bottom: var(--spacing-md);
}

.page-subtitle {
    font-size: var(--font-size-xl);
    color: var(--color-light-gray);
    max-width: 700px;
    margin: 0 auto;
}

/* ============================================
   10. SERVICES SECTION
   ============================================ */

.services {
    background: var(--color-dark-gray);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.service-card {
    background: var(--color-gray);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-lg);
    transition: var(--transition-base);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-primary);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-3xl);
    color: var(--color-white);
    margin-bottom: var(--spacing-md);
}

.service-card h3 {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--spacing-sm);
}

.service-card p {
    color: var(--color-light-gray);
    margin-bottom: var(--spacing-md);
}

.service-tools {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.service-tools li {
    background: rgba(108, 92, 231, 0.1);
    color: var(--color-primary-light);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-sm);
}

/* ============================================
   11. PROJECTS GRID
   ============================================ */

.projects-grid,
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--spacing-lg);
}

.project-item,
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius-lg);
    aspect-ratio: 4/3;
}

.project-image,
.gallery-image {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.project-image img,
.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.project-item:hover .project-image img,
.gallery-item:hover .gallery-image img {
    transform: scale(1.1);
}

.project-overlay,
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(15, 15, 15, 0.95) 100%);
    display: flex;
    align-items: flex-end;
    padding: var(--spacing-lg);
    opacity: 0;
    transition: var(--transition-base);
}

.project-item:hover .project-overlay,
.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.project-info,
.gallery-info {
    transform: translateY(20px);
    transition: var(--transition-base);
}

.project-item:hover .project-info,
.gallery-item:hover .gallery-info {
    transform: translateY(0);
}

.project-category,
.gallery-category {
    display: inline-block;
    background: var(--color-primary);
    color: var(--color-white);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-sm);
}

.project-info h3,
.gallery-info h3 {
    font-size: var(--font-size-xl);
    margin-bottom: var(--spacing-xs);
}

.project-info p,
.gallery-info p {
    color: var(--color-light-gray);
    margin-bottom: var(--spacing-sm);
}

.gallery-tools {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    flex-wrap: wrap;
}

.gallery-tools span {
    background: rgba(255, 255, 255, 0.1);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-xs);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.project-link,
.gallery-link {
    color: var(--color-primary-light);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.project-link:hover,
.gallery-link:hover {
    gap: var(--spacing-sm);
}

@media (max-width: 768px) {
    .projects-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-main {
        font-size: var(--font-size-3xl);
    }
    
    .section-title {
        font-size: var(--font-size-3xl);
    }
}

/* ============================================
   12. DARK MODE
   ============================================ */

[data-theme="dark"] {
    /* Paleta Modo Escuro */
    --bg-body: #0D1117;
    --bg-header: #161B22;
    --text-primary: #E6EDF3;
    --text-secondary: #8B949E;
    --btn-primary: #C8943B;
    --btn-hover: #C8943B;
    --link-color: #4A4A4A;
    --border-color: #30363D;
    --highlight: #9B6BFF;
    --github-btn: #7E57C2;
    
    /* Cores ajustadas para modo escuro */
    --color-dark: #E6EDF3;
    --color-dark-gray: #161B22;
    --color-gray: #30363D;
    --color-light-gray: #8B949E;
    --color-white: #E6EDF3;
    --color-off-white: #0D1117;
    
    /* Sombras ajustadas para modo escuro */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .navbar {
    background: var(--bg-header);
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .service-card {
    background: var(--color-gray);
    border-color: var(--border-color);
}

[data-theme="dark"] .loader {
    background: var(--bg-body);
}

[data-theme="dark"] .btn-outline {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

[data-theme="dark"] .btn-outline:hover {
    background: var(--text-primary);
    color: var(--bg-body);
}

[data-theme="dark"] .btn-light {
    background: var(--color-gray);
    color: var(--text-primary);
}

[data-theme="dark"] .btn-light:hover {
    background: var(--border-color);
}
