:root {
    --bg-color: #050505;
    --hero-bg: #0a041f;
    --text-color: #ffffff;
    --text-muted: #b3b3b3;
    --primary-accent: #a020f0;
    --secondary-accent: #4ade80;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-main: 'Outfit', sans-serif;
    --border-radius: 16px;
    --container-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* html { scroll-behavior: smooth; - Removed to prevent conflict with GSAP } */

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    line-height: 1.6;
    cursor: none;
    /* Hide default cursor for custom cursor */
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Custom Cursor */
.cursor-dot {
    width: 8px;
    height: 8px;
    background: var(--primary-accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease;
    mix-blend-mode: difference;
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(160, 32, 240, 0.5);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transition: transform 0.15s ease, width 0.2s, height 0.2s;
}

.cursor-outline.hover {
    width: 60px;
    height: 60px;
    background: rgba(160, 32, 240, 0.1);
}

/* Utilities */
.highlight {
    color: var(--primary-accent);
    background: linear-gradient(90deg, #b882ff, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.highlight-purple {
    color: #b882ff;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    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.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(160, 32, 240, 0.3);
}

.btn-primary {
    background: white;
    color: black;
}

.btn-primary.small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-dark {
    background: #111;
    color: white;
    border: 1px solid #333;
}

.hidden-element {
    opacity: 0;
    transform: translateY(30px);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 100;
    transition: background 0.3s, padding 0.3s, transform 0.3s;
}

.header.scrolled {
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(20px);
    padding: 15px 0;
    border-bottom: 1px solid var(--glass-border);
}

.header.hidden {
    transform: translateY(-100%);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    position: relative;
    display: inline-block;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    background: radial-gradient(circle at 50% 30%, #2a0a55 0%, #050505 60%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
    padding-top: 60px;
}

.hero-bg-glow {
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 200%;
    background: conic-gradient(from 180deg at 50% 50%, #0000 0deg, rgba(80, 20, 160, 0.2) 180deg, #0000 360deg);
    animation: rotate 20s linear infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes rotate {
    0% {
        transform: translateX(-50%) rotate(0deg);
    }

    100% {
        transform: translateX(-50%) rotate(360deg);
    }
}

/* Floating Shapes */
.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 10s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: var(--primary-accent);
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: var(--secondary-accent);
    top: 60%;
    right: 10%;
    animation-delay: -3s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: #ff6b6b;
    bottom: 20%;
    left: 30%;
    animation-delay: -6s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.hero-content {
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.hero-title {
    font-size: 4.5rem;
    line-height: 1.1;
    font-weight: 600;
    margin-bottom: 20px;
    overflow: hidden;
}

.hero-title .line {
    display: block;
    transform: translateY(100%);
    opacity: 0;
}

.highlight-text {
    background: linear-gradient(90deg, #b882ff, #ffffff, #b882ff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 3s linear infinite;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

.hero-icon {
    position: relative;
    z-index: 3;
}

.icon-img {
    max-width: 150px;
    filter: drop-shadow(0 10px 30px rgba(160, 32, 240, 0.3));
    transition: transform 0.3s ease;
}

.tags-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.tags-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.tag {
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(5px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.tag:hover::before {
    left: 100%;
}

.tag:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 10px 20px rgba(160, 32, 240, 0.2);
}

/* Services */
.services {
    padding: 100px 0;
    background: #ffffff;
    color: #111;
    position: relative;
    overflow: hidden;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 10px;
    overflow: hidden;
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 60px;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.services-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.service-card {
    display: flex;
    align-items: center;
    padding: 30px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.service-card:hover {
    background: #f9f9f9;
    transform: translateX(10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.service-icon-box {
    width: 60px;
    height: 60px;
    background: #f0f0ff;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 30px;
    color: var(--primary-accent);
    transition: all 0.3s ease;
}

.service-card:hover .service-icon-box {
    transform: scale(1.1) rotate(5deg);
    background: var(--primary-accent);
    color: white;
}

.service-content {
    flex: 1;
}

.service-content h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    position: relative;
    display: inline-block;
}

.service-content p {
    font-size: 0.9rem;
    color: #666;
    max-width: 600px;
}

.service-arrow {
    font-size: 1.5rem;
    opacity: 0;
    transition: all 0.3s ease;
    transform: translateX(-10px);
    color: var(--primary-accent);
}

.service-card:hover .service-arrow {
    opacity: 1;
    transform: translateX(0) scale(1.2);
}

/* Portfolio */
.portfolio {
    padding: 100px 0;
    background: var(--bg-color);
    position: relative;
}

.projects-container {
    display: flex;
    flex-direction: column;
    gap: 120px;
    margin-top: 80px;
}

.project-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    position: relative;
    opacity: 0;
    transform: translateY(50px);
}

.project-info {
    flex: 1;
    max-width: 350px;
}

.serif-title {
    font-family: 'Times New Roman', serif;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1;
    overflow: hidden;
}

.project-desc {
    color: #888;
    margin-bottom: 30px;
    font-size: 0.95rem;
    line-height: 1.7;
}

.btn-outline {
    border: 1px solid rgba(0, 0, 0, 0.2);
    padding: 10px 24px;
    border-radius: 50px;
    color: #111;
    font-size: 0.85rem;
    background: transparent;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn-outline:hover {
    background: #111;
    color: #fff;
    border-color: #111;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Row Specific Layouts */
.row-shades .project-image-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.phone-mockup {
    max-height: 500px;
    width: auto;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.square-img {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 20px;
    transition: transform 0.3s ease;
}

/* Float Animation */
.float-animation {
    animation: floatPhone 6s ease-in-out infinite;
}

.float-animation-delayed {
    animation: floatPhone 6s ease-in-out infinite;
    animation-delay: -3s;
}

@keyframes floatPhone {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(2deg);
    }
}

.row-food .project-image-large {
    flex: 2;
}

.menu-img {
    width: 100%;
    max-width: 500px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.menu-img:hover {
    transform: scale(1.05);
}

.grid-4-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    flex: 1;
}

.grid-4-images img {
    width: 100%;
    border-radius: 12px;
    aspect-ratio: 1/1;
    object-fit: cover;
    transition: all 0.3s ease;
}

.grid-4-images img:hover {
    transform: scale(1.05);
    z-index: 2;
}

.row-fennara {
    align-items: stretch;
}

.brand-block {
    flex: 1;
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.4s ease;
    transform-style: preserve-3d;
}

.brand-block:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
}

.brand-colors-row {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.color-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.color-circle:hover {
    transform: scale(1.2);
}

.app-card-preview {
    margin-top: 30px;
    border-radius: 16px;
    overflow: hidden;
    background: #f4f4f4;
    transition: transform 0.3s ease;
}

.card-img {
    width: 100%;
    display: block;
    transition: transform 0.3s ease;
}

.app-card-preview:hover .card-img {
    transform: scale(1.05);
}

.fennara-mockup {
    flex: 1.5;
    display: flex;
    align-items: center;
}

.wide-mockup {
    width: 100%;
    border-radius: 20px;
}

.three-phones-container {
    flex: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.phone-small {
    height: 400px;
    width: auto;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.phone-main {
    height: 500px;
    width: auto;
    z-index: 2;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border-radius: 30px;
    transition: all 0.3s ease;
}

.phone-small:hover,
.phone-main:hover {
    transform: translateY(-10px) scale(1.05);
    opacity: 1;
}

.shadow-lg {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* CTA Section */
.cta-section {
    padding: 100px 0;
}

.cta-box {
    background: linear-gradient(135deg, #aeffd8 0%, #b882ff 100%);
    border-radius: 30px;
    padding: 80px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #111;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.cta-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.cta-box:hover::before {
    opacity: 1;
}

.cta-text h2 {
    font-size: 3rem;
    line-height: 1.1;
}

/* Footer */
.footer {
    background: #020005;
    padding: 80px 0 30px;
    border-top: 1px solid #222;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.1rem;
    position: relative;
    display: inline-block;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-accent);
    transition: width 0.3s ease;
}

.footer-col:hover h4::after {
    width: 100%;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #888;
    font-size: 0.9rem;
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
}

.footer-col ul li a::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary-accent);
    transition: width 0.3s ease;
}

.footer-col ul li a:hover {
    color: #fff;
    transform: translateX(5px);
}

.footer-col ul li a:hover::before {
    width: 100%;
}

.footer-bottom {
    text-align: center;
    color: #444;
    font-size: 0.8rem;
    padding-top: 30px;
    border-top: 1px solid #111;
}

/* Responsive */
@media (max-width: 900px) {
    body {
        cursor: auto;
    }

    .cursor-dot,
    .cursor-outline {
        display: none;
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .portfolio-item.full-width {
        grid-column: span 2;
    }

    .hero-title {
        font-size: 3rem;
    }

    .cta-box {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .project-row {
        flex-direction: column;
    }

    .row-food.reverse-mobile {
        flex-direction: column-reverse;
    }
}

@media (max-width: 600px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-item.wide,
    .portfolio-item.full-width {
        grid-column: span 1;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .tags-row {
        gap: 10px;
    }

    .tag {
        padding: 6px 14px;
        font-size: 0.8rem;
    }

    .cta-text h2 {
        font-size: 2rem;
    }

    .three-phones-container {
        flex-direction: column;
    }

    .phone-small,
    .phone-main {
        height: auto;
        width: 80%;
    }
}