/* ---- Fonts Locals (Millora de Rendiment) i Variables Globals ---- */
/* Assegura't que tens els fitxers de la font a la carpeta /fonts */
@font-face {
    font-family: 'Satoshi';
    src: url('fonts/Satoshi-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap; /* Clau per a l'optimització del rendiment */
}
@font-face {
    font-family: 'Satoshi';
    src: url('fonts/Satoshi-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-color: #0A0A0A;
    --text-color: #F5F5F5;
    --main-color: #0076be;
    --font-family: 'Satoshi', sans-serif;
}

/* ---- Reset i Configuració Base ---- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    -webkit-font-smoothing: antialiased;
    cursor: none;
}
a, button { cursor: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--main-color); } /* Accessibilitat */

/* ---- Fons Animat Subtil ---- */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: radial-gradient(ellipse at center, rgba(0,118,190,0.1) 0%, rgba(0,118,190,0) 70%);
    z-index: -1;
    opacity: 0.5;
}

/* ---- Preloader ---- */
.preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background-color: var(--bg-color); display: grid; place-items: center;
    z-index: 1000; transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
}
.preloader.loaded { opacity: 0; visibility: hidden; }
.logo-svg { animation: pulse 1.8s infinite ease-in-out; height: 60px; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }

/* ---- Cursor Personalitzat ---- */
.cursor {
    width: 20px; height: 20px; border: 2px solid var(--main-color);
    border-radius: 50%; position: fixed; pointer-events: none;
    transform: translate(-50%, -50%); z-index: 9999;
    transition: width 0.3s, height 0.3s, background-color 0.3s, border-color 0.3s;
}
.cursor.grow {
    width: 60px; height: 60px; background-color: rgba(0, 118, 190, 0.2);
    border-color: transparent;
}

/* ---- Estructura General i Capçalera ---- */
header, footer, section { padding: 5rem 10%; }
.fade-in { animation: fadeIn 1s ease-out 0.8s forwards; opacity: 0; }
@keyframes fadeIn { to { opacity: 1; } }
header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
    display: flex; justify-content: space-between; align-items: center; padding-top: 2rem;
}
.nav-link { color: var(--text-color); text-decoration: none; font-weight: 500; position: relative; }
.nav-link::after {
    content: ''; position: absolute; width: 0; height: 1px;
    display: block; margin-top: 5px; right: 0; background: var(--text-color);
    transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; left: 0; }

/* ---- Seccions ---- */
.scroll-reveal {
    opacity: 0; transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.6, 0.01, 0.05, 0.95), transform 1s cubic-bezier(0.6, 0.01, 0.05, 0.95);
}
.scroll-reveal.visible { opacity: 1; transform: translateY(0); }

.hero { min-height: 100vh; display: flex; align-items: center; }
.hero-title { font-size: clamp(2.5rem, 8vw, 6rem); font-weight: 700; line-height: 1.1; }
.hero-title span { display: none; }
.hero-title span.active { display: block; animation: fadeInText 1s; }
@keyframes fadeInText { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.manifest h2, .impacte h2 { font-size: clamp(2rem, 5vw, 4rem); font-weight: 500; margin-bottom: 2rem; max-width: 25ch; }
.manifest p { font-size: 1.25rem; line-height: 1.7; max-width: 60ch; }
.metode { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 4rem; }
.pillar h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 1rem; color: var(--main-color); }
.pillar p { line-height: 1.6; }
.impacte { text-align: center; min-height: 60vh; display: grid; place-items: center; }

/* ---- Peu de pàgina (Footer) i CTA Magnètic ---- */
footer { text-align: center; }
footer h3 { font-size: clamp(2rem, 5vw, 4rem); font-weight: 500; margin-bottom: 1rem; }
.cta-subtitle { max-width: 40ch; margin: 0 auto 3rem auto; opacity: 0.8; }
.magnetic-link {
    display: inline-block; position: relative; padding: 1.5rem 3rem;
    border: 2px solid var(--text-color); border-radius: 100px;
    color: var(--text-color); text-decoration: none; font-size: 1.2rem; font-weight: 500;
    transition: transform 0.4s cubic-bezier(0.2, 1, 0.2, 1);
}
.magnetic-text {
    display: inline-block;
    transition: transform 0.4s cubic-bezier(0.2, 1, 0.2, 1);
}
.footer-info { margin-top: 5rem; }
.divider { color: var(--main-color); margin: 0 0.5rem; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    header, footer, section { padding: 4rem 5%; }
    .cursor { display: none; }
    body { cursor: auto; }
    a, button { cursor: pointer; }
    header { position: relative; }
}