/* ========================================
   (oriGem) Website Redesign
   Premium Parallax Single Page
   ======================================== */

/* CSS Variables */
:root {
    --color-bg: #0a0a0f;
    --color-bg-alt: #111118;
    --color-text: #ffffff;
    --color-text-muted: #8a8a9a;
    --color-accent: #ff3b3b;
    --color-accent-glow: rgba(255, 59, 59, 0.3);
    --color-gradient-1: #1a1a2e;
    --color-gradient-2: #16213e;
    
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: auto; /* Lenis handles smooth scroll */
}

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

a {
    color: inherit;
    text-decoration: none;
}

/* Custom Cursor */
.cursor {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--color-accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease, width 0.3s ease, height 0.3s ease, background 0.3s ease;
    mix-blend-mode: difference;
}

.cursor-follower {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease-out, width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
}

/* Cosmic Dust Particles */
.cosmic-dust {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9997;
    opacity: 0.8;
    box-shadow: 0 0 6px currentColor;
}

body:has(a:hover) .cursor,
body:has(button:hover) .cursor {
    width: 16px;
    height: 16px;
    background: var(--color-text);
}

body:has(a:hover) .cursor-follower,
body:has(button:hover) .cursor-follower {
    width: 60px;
    height: 60px;
    border-color: var(--color-accent);
}

/* Loader */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    gap: 2rem;
}

.loader-logo {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
}

.loader-bar {
    width: 200px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.loader-progress {
    width: 0%;
    height: 100%;
    background: var(--color-accent);
    animation: loadProgress 1.5s var(--ease-out-expo) forwards 0.3s;
}

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

@keyframes loadProgress {
    to { width: 100%; }
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    mix-blend-mode: difference;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-links {
    display: flex;
    gap: 3rem;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-text);
    transition: width 0.4s var(--ease-out-expo);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Section Title */
.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 600;
    margin-bottom: 3rem;
    text-align: center;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.8), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 160px 120px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 230px 80px, rgba(255,255,255,0.4), transparent),
        radial-gradient(2px 2px at 300px 150px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 350px 50px, rgba(255,255,255,0.5), transparent),
        radial-gradient(2px 2px at 420px 180px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 500px 90px, rgba(255,255,255,0.4), transparent),
        radial-gradient(2px 2px at 580px 130px, rgba(255,255,255,0.6), transparent);
    background-size: 600px 200px;
    animation: twinkle 8s ease-in-out infinite alternate;
}

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

.hero-content {
    text-align: center;
    z-index: 2;
}

.hero-tagline-pre {
    font-size: 1.125rem;
    font-weight: 300;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(20px);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(4rem, 15vw, 12rem);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 1.5rem;
}

.title-char {
    display: inline-block;
}

.title-bracket {
    display: inline-block;
}

.title-inner {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
    white-space: nowrap;
}

.bracket-left {
    transform-origin: right center;
}

.bracket-right {
    transform-origin: left center;
}

.hero-tagline {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    font-weight: 300;
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto 3rem;
    opacity: 0;
    transform: translateY(30px);
}

.hero-cta {
    opacity: 0;
    transform: translateY(30px);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    background: transparent;
    border: 1px solid var(--color-text);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: none;
    transition: all 0.4s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--color-text);
    transition: left 0.4s var(--ease-out-expo);
    z-index: -1;
}

.btn-primary:hover {
    color: var(--color-bg);
}

.btn-primary:hover::before {
    left: 0;
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    opacity: 0;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--color-text), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { transform: scaleY(1); opacity: 1; }
    50% { transform: scaleY(0.5); opacity: 0.5; }
}

.scroll-indicator span {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

/* Manifesto Section */
.manifesto {
    position: relative;
    min-height: 100vh;
    padding: 10rem 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.manifesto-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, var(--color-gradient-2) 0%, var(--color-bg) 70%);
    opacity: 0.5;
}

.manifesto-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    width: 100%;
}

.manifesto-intro {
    text-align: center;
    margin-bottom: 6rem;
}

.manifesto-lead {
    font-size: clamp(1.25rem, 3vw, 2rem);
    font-weight: 300;
    color: var(--color-text-muted);
    max-width: 700px;
    margin: 0 auto;
}

.manifesto-pillars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
}

.pillar {
    flex: 1;
    max-width: 400px;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    text-align: center;
    transition: all 0.6s var(--ease-out-expo);
}

.pillar:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-10px);
}

.pillar-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-accent);
}

.pillar h3 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.pillar p {
    font-size: 1rem;
    color: var(--color-text-muted);
    line-height: 1.8;
}

.pillar-divider {
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
}

/* Serviços Section */
.servicos {
    padding: 10rem 0;
    overflow: hidden;
}

.servicos .section-title {
    padding: 0 4rem;
}

.servicos-wrapper {
    position: relative;
    overflow: hidden;
}

.servicos-track {
    display: flex;
    gap: 2rem;
    padding: 2rem 4rem;
    will-change: transform;
}

.servico-card {
    flex-shrink: 0;
    width: 350px;
    padding: 3rem;
    background: var(--color-bg-alt);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.5s var(--ease-out-expo);
}

.servico-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-accent-glow) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.servico-card:hover {
    transform: translateY(-10px);
    border-color: var(--color-accent);
}

.servico-card:hover::before {
    opacity: 1;
}

.servico-number {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-accent);
    letter-spacing: 0.1em;
}

.servico-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.planet-icon {
    width: 80px;
    height: 80px;
}

.planet-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 20px rgba(255,255,255,0.2));
    animation: planetFloat 6s ease-in-out infinite;
}

.servico-card:nth-child(1) .planet-icon svg { animation-delay: 0s; }
.servico-card:nth-child(2) .planet-icon svg { animation-delay: 1.5s; }
.servico-card:nth-child(3) .planet-icon svg { animation-delay: 3s; }
.servico-card:nth-child(4) .planet-icon svg { animation-delay: 4.5s; }
.servico-card:nth-child(5) .planet-icon svg { animation-delay: 6s; }

@keyframes planetFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(3deg); }
}

.servico-card h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.servico-card p {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

/* Diferencial Section */
.diferencial {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10rem 4rem;
    position: relative;
    overflow: hidden;
}

.diferencial-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    width: 100%;
    gap: 6rem;
}

.diferencial-text {
    flex: 1;
}

.diferencial-text h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 2rem;
}

.highlight {
    color: var(--color-accent);
    font-weight: 700;
}

.diferencial-sub {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    line-height: 1.8;
}

.astronaut-container {
    position: relative;
    width: 400px;
    height: 400px;
    flex-shrink: 0;
}

.astronaut-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 280px;
    height: auto;
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 0 40px rgba(255, 59, 59, 0.4));
}

@keyframes float {
    0%, 100% { transform: translate(-50%, -50%) translateY(0); }
    50% { transform: translate(-50%, -50%) translateY(-20px); }
}

.orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.orbit-1 {
    width: 300px;
    height: 300px;
    animation: rotate 20s linear infinite;
}

.orbit-2 {
    width: 400px;
    height: 400px;
    animation: rotate 30s linear infinite reverse;
}

.orbit::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: var(--color-accent);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--color-accent);
}

@keyframes rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Portfolio Section */
.portfolio {
    padding: 10rem 4rem;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.portfolio-item {
    position: relative;
    aspect-ratio: 16/10;
    border-radius: 1rem;
    overflow: hidden;
    cursor: none;
}

.portfolio-image {
    width: 100%;
    height: 100%;
    transition: transform 0.8s var(--ease-out-expo);
    background: var(--color-bg-alt);
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-item:hover .portfolio-image {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    transform: translateY(100%);
    transition: transform 0.5s var(--ease-out-expo);
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(0);
}

.portfolio-overlay h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.portfolio-overlay span {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.inscricao-link {
    color: var(--color-accent);
    text-decoration: underline;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.inscricao-link:hover {
    opacity: 0.8;
}

/* Clientes Section - Grid Centrada */
.clientes {
    padding: 6rem 0;
    overflow: hidden;
    background: var(--color-bg);
}

.clientes .section-title {
    padding: 0 4rem;
    margin-bottom: 4rem;
}

.clientes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 4rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 4rem;
    align-items: center;
    justify-items: center;
}

.cliente-logo {
    max-height: 65px;
    max-width: 150px;
    width: auto;
    height: auto;
    opacity: 1;
    transition: all 0.4s ease;
    object-fit: contain;
}

.cliente-logo:hover {
    opacity: 0.7;
    transform: scale(1.1);
}

.logo-mobile-duplicate {
    display: none;
}

.logo-brim {
    max-height: 85px !important;
    max-width: 180px !important;
}

.logo-pequeno {
    max-height: 45px !important;
    max-width: 110px !important;
}

/* Contacto Section */
.contacto {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10rem 4rem;
    background: var(--color-bg-alt);
}

.contacto-content {
    max-width: 600px;
    width: 100%;
    text-align: center;
}

.contacto-lead {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: 4rem;
}

.contacto-form {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.form-group {
    position: relative;
    text-align: left;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-group textarea {
    resize: none;
}

.form-group label {
    position: absolute;
    top: 1rem;
    left: 0;
    font-size: 1rem;
    color: var(--color-text-muted);
    pointer-events: none;
    transition: all 0.3s ease;
}

.form-group input:focus ~ label,
.form-group input:valid ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:valid ~ label {
    top: -1rem;
    font-size: 0.75rem;
    color: var(--color-accent);
}

.form-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.4s var(--ease-out-expo);
}

.form-group input:focus ~ .form-line,
.form-group textarea:focus ~ .form-line {
    width: 100%;
}

.btn-submit {
    margin-top: 2rem;
    align-self: center;
}

/* Footer */
.footer {
    padding: 6rem 4rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-tagline {
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-links a {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--color-text);
}

.footer-copy {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* Responsive */
@media (max-width: 1024px) {
    .nav {
        padding: 1rem 2rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .manifesto-pillars {
        flex-direction: column;
    }
    
    .pillar-divider {
        width: 1px;
        height: 60px;
        background: linear-gradient(to bottom, transparent, var(--color-accent), transparent);
    }
    
    .diferencial-content {
        flex-direction: column;
        text-align: center;
    }
    
    .astronaut-container {
        width: 300px;
        height: 300px;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav {
        padding: 1rem 1.5rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-tagline-pre,
    .hero-tagline {
        font-size: 1rem;
    }
    
    .manifesto,
    .diferencial,
    .portfolio,
    .contacto {
        padding: 4rem 1.5rem;
    }
    
    .servicos {
        padding: 4rem 0;
    }
    
    .clientes {
        padding: 4rem 0;
    }
    
    .clientes .section-title {
        padding: 0 1.5rem;
        margin-bottom: 2rem;
    }
    
    /* Mobile: Marquee horizontal */
    .clientes-grid {
        display: flex;
        flex-wrap: nowrap;
        gap: 3rem;
        padding: 0;
        margin: 0;
        max-width: none;
        width: max-content;
        animation: marquee-mobile 30s linear infinite;
        will-change: transform;
        -webkit-animation: marquee-mobile 30s linear infinite;
    }
    
    .logo-mobile-duplicate {
        display: block;
    }
    
    .cliente-logo {
        max-height: 50px;
        max-width: 120px;
        flex-shrink: 0;
    }
    
    .logo-brim {
        max-height: 65px !important;
        max-width: 140px !important;
    }
    
    .logo-pequeno {
        max-height: 40px !important;
        max-width: 100px !important;
    }
    
    @keyframes marquee-mobile {
        from { 
            transform: translateX(0); 
        }
        to { 
            transform: translateX(-50%); 
        }
    }
    
    @-webkit-keyframes marquee-mobile {
        from { 
            -webkit-transform: translateX(0); 
        }
        to { 
            -webkit-transform: translateX(-50%); 
        }
    }
    
    .astronaut-container {
        width: 200px;
        height: 200px;
    }
    
    .astronaut-img {
        width: 150px;
    }
    
    .diferencial-text h2 {
        font-size: 1.75rem;
    }
    
    .diferencial-sub {
        font-size: 1rem;
    }
    
    .cursor,
    .cursor-follower {
        display: none;
    }
    
    body {
        cursor: auto;
    }
    
    .section-title {
        font-size: 2rem;
    }
}
