:root {
    /* Paleta: Negre + groc / naranja */
    --primary-color: #ffb020; /* groc / amber */
    --primary-dark: #ff8c00; /* orange */
    --secondary-color: #ff6a00; /* orange més intens */
    --accent-color: #ffc857; /* acent clar */
    --background: #0b0b0b; /* fons general negre */
    --surface: #0f1113; /* surfaces lleugerament mes clars */
    --text-primary: #f8f8f8; /* text principal clar */
    --text-secondary: #e6e6e6;
    --text-muted: #c7c7c7;
    --border: rgba(255,255,255,0.06);
    --shadow: 0 1px 3px 0 rgba(0,0,0,0.6), 0 1px 2px -1px rgba(0,0,0,0.7);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.7), 0 6px 12px -6px rgba(0,0,0,0.75);
    --gradient: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
    overflow-x: hidden;
}

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

/* Navigation */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    position: relative;
    z-index: 100;
}

.logo h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.accent {
    color: var(--primary-color);
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s ease;
}

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

/* Language Selector */
.language-selector {
    position: relative;
    z-index: 110;
}

.language-selector select {
    background-color: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.language-selector select:hover {
    border-color: var(--primary-color);
}

.language-selector select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 10;
}

.badge {
    display: inline-block;
    background: linear-gradient(90deg, rgba(255,176,32,0.12), rgba(255,106,0,0.12));
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease-out;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-description strong { color: var(--text-primary); }

.hero-buttons {
    display: flex;
    gap: 1rem;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient);
    color: #0b0b0b;
    box-shadow: 0 8px 18px rgba(255,138,0,0.08), 0 6px 12px rgba(0,0,0,0.6);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid rgba(255,255,255,0.06);
}

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

/* Hero Visual */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 500px;
}

.ai-orb {
    position: relative;
    width: 220px;
    height: 220px;
    animation: float 6s ease-in-out infinite;
}

.orb-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: radial-gradient(circle at 30% 30%, rgba(255,186,48,1), rgba(255,110,0,1));
    border-radius: 50%;
    box-shadow: 0 0 50px rgba(99, 102, 241, 0.3);
    /* Usam una animacion especifica que preserva eth translate entà centrar eth cercle */
    animation: pulseCore 3s ease-in-out infinite;
}

.orb-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: 50%;
    animation: rotate 20s linear infinite;
}

.ring-1 {
    width: 120px;
    height: 120px;
    border-top-color: var(--primary-color);
}

.ring-2 {
    width: 160px;
    height: 160px;
    border-right-color: var(--secondary-color);
    animation-duration: 15s;
    animation-direction: reverse;
}

.ring-3 {
    width: 200px;
    height: 200px;
    border-bottom-color: var(--accent-color);
    animation-duration: 25s;
}

.floating-words {
    position: absolute;
    width: 100%;
    height: 100%;
}

.word {
    position: absolute;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--primary-color);
    box-shadow: 0 6px 18px rgba(0,0,0,0.6);
    animation: floatWord 8s ease-in-out infinite;
}

.word-1 {
    top: 10%;
    left: 20%;
    animation-delay: 0s;
}

.word-2 {
    top: 20%;
    right: 10%;
    animation-delay: 2s;
}

.word-3 {
    bottom: 30%;
    left: 10%;
    animation-delay: 4s;
}

.word-4 {
    bottom: 10%;
    right: 20%;
    animation-delay: 6s;
}

/* Features Section */
.features {
    padding: 6rem 0;
    background: var(--surface);
}

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

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

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

.feature-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(90deg, rgba(255,176,32,1), rgba(255,106,0,1));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-secondary);
}

/* Demo Section */
.demo {
    padding: 6rem 0;
}

/* Galeria */
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; align-items: stretch; }
.gallery-item { position: relative; overflow: hidden; border-radius: 16px; border: 1px solid var(--border); box-shadow: var(--shadow); background: #fff; aspect-ratio: 4 / 3; }
.gallery-item::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 70% 30%, rgba(99,102,241,.15), transparent 60%); opacity: 0; transition: opacity .35s ease; }
.gallery-item:hover::after { opacity: 1; }
.gallery-item img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .6s ease; }
.gallery-item:hover img { transform: scale(1.06); }
/* La tercera imagen centrada ocupa toda la fila */
.gallery-item.center { grid-column: 1 / -1; /* ocupa la fila completa pero limitado en ancho y centrado */
    width: calc(50% - 0.5rem);
    max-width: 600px;
    margin: 0 auto;
    align-self: stretch;
}
.gallery-item.center img { width: 100%; height: 100%; object-fit: cover; }

.demo-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.demo-text p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.demo-examples {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.example {
    padding: 1rem;
    background: var(--surface);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.example strong {
    color: var(--primary-color);
}

/* Chat Interface */
.chat-container {
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--border);
}

.chat-header {
    background: var(--gradient);
    color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    animation: pulse 2s ease-in-out infinite;
}

.chat-messages {
    padding: 1.5rem;
    max-height: 300px;
    overflow-y: auto;
}

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

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.ai-avatar {
    background: linear-gradient(90deg, rgba(255,176,32,1), rgba(255,106,0,1));
    color: #0b0b0b;
}

.message-content {
    background: var(--surface);
    padding: 1rem;
    border-radius: 12px;
    max-width: 80%;
}

.chat-input {
    padding: 1rem;
    background: var(--surface);
    display: flex;
    gap: 0.5rem;
}

.chat-input input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s ease;
}

.chat-input input:focus {
    border-color: var(--primary-color);
}

.send-btn {
    padding: 0.75rem;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.send-btn:hover {
    transform: scale(1.05);
}

/* About Section */
.about {
    padding: 6rem 0;
    background: var(--surface);
}

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

    .map-box {
        background: linear-gradient(135deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
        border-radius: 16px;
        border: 1px solid var(--border);
        box-shadow: var(--shadow);
        overflow: hidden;
        display: grid;
        grid-template-columns: 1fr;
    }

    .map-box iframe {
        width: 100%;
        height: 220px;
        border: 0;
        display: block;
    }

    /* Overlay para dar color coherente con la paleta sin bloquear el iframe */
    .map-box::before {
        content: '';
        position: absolute;
        inset: 0;
        pointer-events: none;
        background: linear-gradient(180deg, rgba(11,11,11,0.0), rgba(11,11,11,0.35));
        mix-blend-mode: multiply;
    }

    .map-box { position: relative; }
    .map-box iframe { filter: saturate(0.9) contrast(0.95) brightness(0.95); }

    .map-info {
        padding: 1rem;
    }

    .map-address {
        color: var(--primary-color);
        margin-bottom: 0.5rem;
        font-size: 1.1rem;
    }

    @media (min-width: 900px) {
        .about-content { grid-template-columns: 1fr 1fr; }
        .map-box { grid-template-columns: 1fr; }
        .map-box iframe { height: 260px; }
    }

.about-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.lead {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* RSVP */
.small-print { margin-top: .5rem; color: var(--text-muted); font-size: .9rem; }
.btn-large { padding: 1.1rem 2.2rem; font-size: 1.05rem; border-radius: 14px; }
.center-cta { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; }
.expo-poster { height: 220px; border-radius: 16px; border: 1px solid var(--border); box-shadow: var(--shadow); background: linear-gradient(135deg, rgba(99,102,241,.08), rgba(139,92,246,.08)); }

.stats {
    display: flex;
    gap: 2rem;
    margin: 2rem 0;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tech-stack {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.tech-item {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.tech-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.tech-item span {
    font-weight: 600;
    color: var(--primary-color);
}

/* Footer */
.footer {
    background: #060606;
    color: var(--text-secondary);
    padding: 3rem 0;
}

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

.footer-left h3 {
    margin-bottom: 0.5rem;
}

.footer-left p,
.footer-right p {
    color: var(--text-muted);
}

.footer-right {
    text-align: right;
}

/* Logos de partners debajo del footer */
.footer-logos { padding: 1.5rem 0 3rem; background: transparent; }
.partner-logos { display: flex; gap: 2rem; align-items: center; justify-content: center; }
.partner-logos img { height: 56px; width: auto; background: #ffffff; padding: 8px 12px; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.12); opacity: 0.98; filter: none; transition: transform .25s ease, box-shadow .25s ease; }
.partner-logos img:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,0.18); }

/* Ajustes de tamaño: central más grande, laterales más pequeños */
.partner-logos img:nth-child(2) { height: calc(56px * 1.5); padding: 10px 14px; }
.partner-logos img:nth-child(1), .partner-logos img:nth-child(3) { height: calc(56px * 0.7); padding: 6px 8px; }

@media (max-width: 480px) {
    .partner-logos img { height: 44px; padding: 6px 10px; }
    .partner-logos img:nth-child(2) { height: calc(44px * 1.5); padding: 8px 12px; }
    .partner-logos img:nth-child(1), .partner-logos img:nth-child(3) { height: calc(44px * 0.7); padding: 4px 6px; }
}

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

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Mantien translate(-50%, -50%) entà qu'eth core demore centrat mentre respira */
@keyframes pulseCore {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.9;
    }
}

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

@keyframes floatWord {
    0%, 100% {
        transform: translateY(0px);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content,
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .gallery-grid { grid-template-columns: 1fr 1fr; }
    
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-visual { height: 360px; }
    .ai-orb { width: 180px; height: 180px; }
    
    .nav-links {
        display: none;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .stats {
        justify-content: center;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .demo-text h2,
    .about-text h2 {
        font-size: 2rem;
    }
}
