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

:root {
    --primary: #6366f1;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --dark-bg: #0f0f23;
    --darker-bg: #070714;
    --text-light: #fff;
    --text-gray: #94a3b8;
    --gradient-1: linear-gradient(135deg, #6366f1, #8b5cf6);
    --gradient-2: linear-gradient(135deg, #06b6d4, #3b82f6);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, .3);
    --transition: all .3s cubic-bezier(.4, 0, .2, 1)
}

html {
    scroll-behavior: smooth
}

body {
    font-family: Inter, sans-serif;
    background: var(--dark-bg);
    color: var(--text-light);
    overflow-x: hidden;
    line-height: 1.6
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px
}

/* Critical Loading Screen - Minimal */
#loading-screen {
    position: fixed;
    inset: 0;
    background: var(--darker-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity .5s
}

.loader {
    perspective: 1000px
}

.cube {
    width: 50px;
    height: 50px;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateCube 2s infinite linear
}

.face {
    position: absolute;
    width: 50px;
    height: 50px;
    background: var(--gradient-1);
    border: 1px solid rgba(255, 255, 255, .1)
}

.front {
    transform: rotateY(0) translateZ(25px)
}

.back {
    transform: rotateY(180deg) translateZ(25px)
}

.right {
    transform: rotateY(90deg) translateZ(25px)
}

.left {
    transform: rotateY(-90deg) translateZ(25px)
}

.top {
    transform: rotateX(90deg) translateZ(25px)
}

.bottom {
    transform: rotateX(-90deg) translateZ(25px)
}

@keyframes rotateCube {
    0% {
        transform: rotateX(0) rotateY(0)
    }

    100% {
        transform: rotateX(360deg) rotateY(360deg)
    }
}

/* Navigation - Optimized */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 15, 35, .9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    z-index: 1000;
    will-change: transform
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition)
}

.nav-link:hover {
    color: var(--primary)
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: var(--transition)
}

.nav-link:hover::after {
    width: 100%
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    margin: 3px 0;
    transition: var(--transition)
}

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

.video-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    overflow: hidden
}

.video-bg video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
    z-index: -2;
    will-change: auto
}

/* Optimized mask with better performance */
.mascara {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(15, 15, 35, .98) 0%, rgba(15, 15, 35, .95) 20%, rgba(15, 15, 35, .85) 40%, rgba(15, 15, 35, .65) 70%, rgba(15, 15, 35, .25) 100%);
    z-index: -1
}

.hero-content {
    text-align: center;
    z-index: 1;
    max-width: 800px;
    padding: 0 2rem;
    position: relative;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, .8)
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2
}

.glitch {
    position: relative;
    display: inline-block;
    animation: glitch 2s infinite
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%
}

.glitch::before {
    color: #f00;
    z-index: -1;
    animation: glitch-1 .5s infinite
}

.glitch::after {
    color: #0f0;
    z-index: -2;
    animation: glitch-2 .5s infinite
}

@keyframes glitch {

    0%,
    100% {
        transform: translate(0)
    }

    20% {
        transform: translate(-2px, 2px)
    }

    40% {
        transform: translate(-2px, -2px)
    }

    60% {
        transform: translate(2px, 2px)
    }

    80% {
        transform: translate(2px, -2px)
    }
}

@keyframes glitch-1 {

    0%,
    100% {
        transform: translate(0)
    }

    10% {
        transform: translate(-2px, -2px)
    }

    20% {
        transform: translate(2px, 2px)
    }
}

@keyframes glitch-2 {

    0%,
    100% {
        transform: translate(0)
    }

    10% {
        transform: translate(2px, -2px)
    }

    20% {
        transform: translate(-2px, 2px)
    }
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, .8)
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap
}

.btn-primary,
.btn-secondary {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden
}

.btn-primary {
    background: var(--gradient-1);
    color: var(--text-light);
    box-shadow: var(--shadow-glow)
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(99, 102, 241, .4)
}

.btn-secondary {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--primary)
}

.btn-secondary:hover {
    background: var(--primary);
    transform: translateY(-3px)
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%)
}

.mouse {
    width: 25px;
    height: 40px;
    border: 2px solid var(--text-light);
    border-radius: 15px;
    position: relative
}

.wheel {
    width: 3px;
    height: 10px;
    background: var(--text-light);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite
}

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

    50% {
        opacity: 1
    }

    100% {
        transform: translateX(-50%) translateY(10px);
        opacity: 0
    }
}

/* Sections - Optimized */
section {
    padding: 100px 0
}

.section-header {
    text-align: center;
    margin-bottom: 4rem
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-gray)
}

/* About Section */
.about {
    background: var(--darker-bg);
    overflow-x: hidden
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-light)
}

.about-text p {
    color: var(--text-gray);
    font-size: 1.1rem;
    margin-bottom: 2rem
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem
}

.stat {
    text-align: center
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary)
}

.stat-label {
    color: var(--text-gray);
    font-size: .9rem
}

.about-image {
    position: relative
}

.about-image img {
    width: 100%;
    border-radius: 20px;
    transition: var(--transition)
}

.logo-sobre {
    width: 80%;
    margin: -75px 0 -50px -25px;
    z-index: 99
}

.logo-ryart-sobre {
    width: 5%;
    position: absolute;
    margin: 150px 0 0 250px
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem
}

.service-card {
    background: rgba(255, 255, 255, .05);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, .1);
    backdrop-filter: blur(10px)
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, .2);
    border-color: var(--primary)
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-light)
}

.service-card p {
    color: var(--text-gray)
}

/* Portfolio */
.portfolio {
    background: var(--darker-bg)
}

.portfolio-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap
}

.filter-btn {
    padding: .8rem 1.5rem;
    background: transparent;
    color: var(--text-gray);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-size: .9rem
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--gradient-1);
    color: var(--text-light);
    border-color: transparent
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem
}

.portfolio-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
    transition: var(--transition)
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition)
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: rgba(99, 102, 241, .9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition);
    text-align: center;
    padding: 2rem
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1
}

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

.portfolio-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: .5rem
}

.portfolio-overlay p {
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, .8)
}

.btn-view {
    padding: .8rem 1.5rem;
    background: var(--text-light);
    color: var(--primary);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none
}

.btn-view:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, .3)
}

/* Contact */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-light)
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    color: var(--text-gray)
}

.contact-item i {
    font-size: 1.2rem;
    color: var(--primary);
    width: 20px
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem
}

.social-links a {
    width: 50px;
    height: 50px;
    background: var(--gradient-1);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.2rem
}

.social-links a:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow)
}

.contact-form {
    background: rgba(255, 255, 255, .05);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, .1)
}

.form-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem
}

.form-group input,
.form-group textarea {
    flex: 1;
    padding: 1rem;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 10px;
    color: var(--text-light);
    font-family: inherit;
    transition: var(--transition)
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .1)
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-gray)
}

.form-group textarea {
    resize: vertical;
    min-height: 120px
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    background: var(--gradient-1);
    color: var(--text-light);
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition)
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow)
}

/* Footer */
.footer {
    background: var(--darker-bg);
    border-top: 1px solid rgba(255, 255, 255, .1)
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    padding: 3rem 0
}

.footer-logo img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 1rem
}

.footer-logo h3 {
    font-size: 1.5rem;
    margin-bottom: .5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text
}

.footer-logo p {
    color: var(--text-gray);
    font-size: .9rem
}

.footer-links h4,
.footer-services h4,
.footer-contact h4 {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 1.1rem
}

.footer-links ul,
.footer-services ul {
    list-style: none
}

.footer-links li,
.footer-services li {
    margin-bottom: .5rem
}

.footer-links a,
.footer-services a,
.footer-contact a {
    color: var(--text-gray);
    text-decoration: none;
    transition: var(--transition);
    font-size: .9rem
}

.footer-links a:hover,
.footer-services a:hover,
.footer-contact a:hover {
    color: var(--primary)
}

.footer-social {
    display: flex;
    gap: .5rem;
    margin-top: 1rem
}

.footer-social a {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, .1);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
    font-size: .9rem
}

.footer-social a:hover {
    background: var(--primary);
    transform: translateY(-2px)
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1);
    padding: 1.5rem 0;
    text-align: center
}

.footer-bottom p {
    color: var(--text-gray);
    font-size: .9rem
}

.link-ryart {
    width: 100%;
    color: #94a3b8;
    text-decoration: none;
    transition: .3s
}

.link-ryart:hover {
    color: #8b5cf6
}

/* WhatsApp Float - Optimized */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000
}

.whatsapp-float a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    color: #fff;
    font-size: 30px;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(37, 211, 102, .4);
    transition: var(--transition);
    animation: pulse 2s infinite
}

.whatsapp-float a:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, .6)
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, .4)
    }

    50% {
        box-shadow: 0 4px 30px rgba(37, 211, 102, .7)
    }

    100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, .4)
    }
}


@media (max-width:1030px) {

    .logo-ryart-sobre {
        display: none;
    }
}

/* Responsive - Mobile First Approach */
@media (max-width:768px) {
    .hamburger {
        display: flex
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(15, 15, 35, .95);
        width: 100%;
        text-align: center;
        transition: .3s;
        backdrop-filter: blur(20px);
        padding: 2rem 0
    }

    .nav-menu.active {
        left: 0
    }

    .nav-menu li {
        margin: 1rem 0
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg)
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg)
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center
    }

    .btn-primary,
    .btn-secondary {
        width: 200px
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem
    }

    .stats {
        grid-template-columns: 1fr;
        gap: 1rem
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem
    }

    .form-group {
        flex-direction: column
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem
    }

    .section-title {
        font-size: 2rem
    }

    .portfolio-filter {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 1rem
    }

    .filter-btn {
        white-space: nowrap
    }

    .mascara {
        background: radial-gradient(ellipse at center, rgba(15, 15, 35, .99) 0%, rgba(15, 15, 35, .96) 15%, rgba(15, 15, 35, .88) 35%, rgba(15, 15, 35, .75) 60%, rgba(15, 15, 35, .35) 100%)
    }
}

@media (max-width:480px) {
    .footer-content {
        grid-template-columns: 1fr
    }

    .hero-title {
        font-size: 2.5rem
    }

    .hero-subtitle {
        font-size: 1.2rem
    }

    .services-grid,
    .portfolio-grid {
        grid-template-columns: 1fr
    }

    .nav-container {
        padding: 1rem
    }

    section {
        padding: 60px 0
    }

    .logo-sobre {
        margin: 0px 0 -50px 0px;
    }

    .whatsapp-float {
        bottom: 15px;
        right: 15px
    }

    .whatsapp-float a {
        width: 50px;
        height: 50px;
        font-size: 24px
    }
}

/* Performance Optimizations */
@media (prefers-reduced-motion:reduce) {

    .video-bg video,
    .glitch {
        animation: none
    }
}

/* Utility Classes */
.hidden {
    opacity: 0;
    visibility: hidden
}

.visible {
    opacity: 1;
    visibility: visible
}

.fade-in-up {
    animation: fadeInUp 1s ease forwards
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px
}

::-webkit-scrollbar-track {
    background: var(--darker-bg)
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-1);
    border-radius: 4px
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-2)
}

::selection {
    background: var(--primary);
    color: var(--text-light)
}

.glow {
    box-shadow: 0 0 20px rgba(99, 102, 241, .5)
}