/* ============================================
   SolarBox — Landing Page Styles
   ============================================ */

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

:root {
    /* Brand — colors corporatius SolarBox */
    --orange-50: #fdf3ee;
    --orange-100: #fbe3d6;
    --orange-200: #f5c4a8;
    --orange-300: #ee9e71;
    --orange-400: #e47639;
    --orange-500: #D4511E;  /* Taronja corporatiu */
    --orange-600: #b8441a;
    --orange-700: #963815;
    --orange-800: #742c10;
    --orange-900: #5a220d;

    --gray-50: #fafafa;
    --gray-100: #f4f4f5;
    --gray-200: #e4e4e7;
    --gray-300: #d4d4d8;
    --gray-400: #a1a1aa;
    --gray-500: #71717a;
    --gray-600: #5C5C5C;  /* Gris corporatiu (text logo) */
    --gray-700: #3f3f46;
    --gray-800: #27272a;
    --gray-900: #18181b;

    --white: #ffffff;
    --black: #09090b;

    /* Semantic */
    --primary: var(--orange-500);
    --primary-hover: var(--orange-600);
    --primary-light: var(--orange-50);
    --text: var(--gray-900);
    --text-muted: var(--gray-600);
    --bg: var(--gray-50);
    --bg-alt: var(--gray-50);
    --border: var(--gray-200);

    /* Type — Exo 2: geomètrica, tech, encaixa amb el logo */
    --font: 'Exo 2', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* Radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --duration: 200ms;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
    overflow-wrap: break-word;
    word-break: break-word;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Container --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    font-family: var(--font);
    font-weight: 600;
    font-size: var(--text-sm);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-lg);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    white-space: nowrap;
}

.btn--primary {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.btn--primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn--outline {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}

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

.btn--outline-light {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,0.4);
}

.btn--outline-light:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--white);
}

.btn--sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
}

.btn--lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: var(--space-4) 0;
    transition: all 300ms var(--ease);
    background: transparent;
}

.navbar--scrolled {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
    padding: var(--space-3) 0;
}

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

.navbar__logo {
    display: flex;
    align-items: center;
}

.navbar__logo-img {
    height: 67px;
    width: auto;
}

.navbar__links {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    list-style: none;
    margin-top: 4px;
}

.navbar__links a {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-muted);
    transition: color var(--duration) var(--ease);
}

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

.navbar__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
}

.navbar__toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 300ms var(--ease);
}

/* Lang switcher */
.lang-switcher {
    display: flex;
    gap: 2px;
    margin-left: var(--space-4);
    background: var(--gray-100);
    border-radius: var(--radius-full);
    padding: 2px;
}

.lang-switcher__btn {
    background: none;
    border: none;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-full);
    transition: all var(--duration) var(--ease);
    line-height: 1;
}

.lang-switcher__btn:hover {
    color: var(--text);
}

.lang-switcher__btn.active {
    background: var(--white);
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    padding-top: var(--space-20);
    padding-bottom: var(--space-8);
    overflow: hidden;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(212,81,30,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(212,81,30,0.05) 0%, transparent 40%),
        var(--bg);
}

/* SVG flow lines — full hero coverage */
.hero__flow-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Icones flotants disperses */
.hero__icon {
    position: absolute;
    z-index: 2;
    pointer-events: none;
}

.hero__icon img {
    object-fit: contain;
}

/* Sol: dalt-esquerra */
.hero__icon--sun {
    top: 15%;
    left: calc(13% + 80px);
    transform: translate(-50%, -50%);
    transition: opacity 1s ease;
}
.hero__icon--sun img {
    width: clamp(60px, 8vw, 120px);
    height: clamp(60px, 8vw, 120px);
}

/* Lluna: mateixa posició que sol, oculta per defecte */
.hero__icon--moon {
    opacity: 0;
}
.hero__icon--moon img {
    width: clamp(78px, 10vw, 156px);
    height: clamp(78px, 10vw, 156px);
}

/* Transicions dia/nit per SVG flows */
.flow-day, .flow-night {
    transition: opacity 1s ease;
}

/* PAN: centre amb aureola */
.hero__icon--x {
    top: 22%;
    left: calc(43% + 40px);
    transform: translate(-50%, -50%);
}
.hero__icon--x img {
    width: clamp(105px, 20vw, 293px);
    height: clamp(105px, 20vw, 293px);
    object-fit: contain;
    position: relative;
    z-index: 1;
}
.hero__icon--x::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(300px, 65vw, 960px);
    height: clamp(300px, 65vw, 960px);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212,81,30,0.18) 0%, rgba(212,81,30,0.07) 50%, transparent 70%);
    pointer-events: none;
    animation: aureolaBreath 3s ease-in-out infinite;
}

@keyframes aureolaBreath {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.15); opacity: 0.7; }
}

/* Casa: dalt-dreta */
.hero__icon--home {
    top: calc(15% - 25px);
    left: calc(85% - 50px - 50px);
    transform: translate(-50%, -50%);
}
.hero__icon--home img {
    width: clamp(60px, 9vw, 130px);
    height: clamp(60px, 9vw, 130px);
}

/* Rack bateries: dreta-centre */
.hero__icon--bat {
    top: calc(35% - 50px);
    left: 80%;
    transform: translate(-50%, -50%);
}
.hero__icon--bat img {
    width: clamp(80px, 19vw, 280px);
    height: clamp(80px, 19vw, 280px);
}

/* Xarxa elèctrica: centre-baix */
.hero__icon--grid {
    top: calc(55% - 100px - 65px);
    left: calc(57% + 80px);
    transform: translate(-50%, -50%);
}
.hero__icon--grid img {
    width: clamp(55px, 10vw, 144px);
    height: clamp(55px, 10vw, 144px);
}

.hero__inner {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    margin-top: clamp(-175px, -15vh, -80px);
    padding: var(--space-8) var(--space-8);
}

.hero__title {
    font-size: var(--text-3xl);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-6);
}

.text-gradient {
    background: linear-gradient(135deg, var(--orange-500), var(--orange-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__claim {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 0.01em;
    margin-bottom: var(--space-4);
}

.hero__subtitle {
    font-size: var(--text-xl);
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: var(--space-10);
    max-width: 520px;
}

.hero__actions {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
}

/* --- Sections --- */
.section {
    padding: var(--space-24) 0;
}

.section--alt {
    background: var(--bg-alt);
}

.section--cta {
    background: linear-gradient(135deg, var(--orange-600), var(--orange-500));
    color: var(--white);
    text-align: center;
    padding: var(--space-20) 0;
}

.section--cta h2 {
    font-size: var(--text-4xl);
    font-weight: 800;
    margin-bottom: var(--space-4);
}

.section--cta p {
    font-size: var(--text-lg);
    opacity: 0.9;
    margin-bottom: var(--space-10);
}

.section--cta .hero__actions {
    justify-content: center;
}

.section__header {
    text-align: center;
    margin-bottom: var(--space-16);
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.section__tag {
    display: inline-block;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-4);
}

.section__title {
    font-size: var(--text-4xl);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-4);
}

.section__subtitle {
    font-size: var(--text-lg);
    color: var(--text-muted);
    line-height: 1.7;
}

.section__cta {
    text-align: center;
    margin-top: var(--space-12);
}

/* --- Features Grid (Avantatges) --- */
.features-grid-section {
    background: var(--gray-50);
    padding: var(--space-6) 0 var(--space-12);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-10);
    max-width: 960px;
    margin: 0 auto;
}

.feature-item {
    text-align: center;
}

.feature-item__icon {
    width: 56px;
    height: 56px;
    margin: 0 auto var(--space-3);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    border-radius: 50%;
}

.feature-item__icon .material-symbols-outlined {
    font-size: 28px;
    color: var(--white);
}

.feature-item__title {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text);
    margin-bottom: var(--space-1);
}

.feature-item__desc {
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: 1.4;
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-8);
    }
}

@media (max-width: 480px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
}

/* --- Product Hero Image --- */
.product-hero {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-8);
    margin-bottom: var(--space-12);
    flex-wrap: wrap;
}

.product-hero__img {
    max-width: 420px;
    width: calc(50% - var(--space-4));
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.15));
    border-radius: var(--radius-lg);
}

/* --- Product Grid --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
}

.product-card {
    padding: var(--space-8);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    transition: all 300ms var(--ease);
}

.product-card:hover {
    border-color: var(--orange-200);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.product-card__icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-6);
}

.product-card__icon img {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.product-card h3 {
    font-size: var(--text-lg);
    font-weight: 700;
    margin-bottom: var(--space-3);
}

.product-card p {
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: 1.7;
}

/* --- Advantages --- */
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-8);
}

.advantage {
    text-align: center;
}

.advantage__img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: var(--space-4);
}

.advantage__number {
    font-size: var(--text-5xl);
    font-weight: 800;
    color: var(--orange-100);
    line-height: 1;
    margin-bottom: var(--space-4);
}

.advantage h3 {
    font-size: var(--text-lg);
    font-weight: 700;
    margin-bottom: var(--space-3);
}

.advantage p {
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: 1.7;
}

/* --- Steps --- */
.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-8);
    position: relative;
}

.steps::before {
    content: '';
    position: absolute;
    top: 28px;
    left: 12.5%;
    width: 75%;
    height: 2px;
    background: var(--orange-200);
}

.step {
    text-align: center;
    position: relative;
}

.step__icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius-full);
    font-size: var(--text-xl);
    font-weight: 800;
    margin: 0 auto var(--space-6);
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 15px rgba(212,81,30,0.3);
}

.step h3 {
    font-size: var(--text-lg);
    font-weight: 700;
    margin-bottom: var(--space-3);
}

.step p {
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: 1.7;
}

/* --- Blog Grid --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-8);
    align-items: stretch;
}

.blog-grid__empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    padding: var(--space-12);
    font-size: var(--text-lg);
}

.blog-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    transition: all 300ms var(--ease);
    display: flex;
    flex-direction: column;
    border-top: 3px solid var(--primary);
}

.blog-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--orange-200);
    border-top-color: var(--primary);
}

.blog-card__body {
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card__date {
    display: block;
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: var(--space-3);
}

.blog-card__title {
    font-size: var(--text-lg);
    font-weight: 700;
    margin-bottom: var(--space-3);
    line-height: 1.35;
    color: var(--text);
}

.blog-card__excerpt {
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: 1.7;
    flex: 1;
}

.blog-card__read {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--primary);
    margin-top: var(--space-4);
    transition: gap var(--duration) var(--ease);
}

.blog-card:hover .blog-card__read {
    gap: var(--space-3);
}

/* --- Footer --- */
.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding-top: var(--space-16);
}

.footer__inner {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: var(--space-12);
    padding-bottom: var(--space-12);
    border-bottom: 1px solid var(--gray-800);
}

.footer__brand {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.footer__brand .navbar__logo-img {
    filter: none;
}

.footer__tagline {
    color: var(--gray-400);
    font-size: var(--text-sm);
    line-height: 1.6;
    margin-top: var(--space-3);
    max-width: 300px;
}

.footer__col {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.footer__col h4 {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--white);
    margin-bottom: var(--space-2);
}

.footer__col a {
    font-size: var(--text-sm);
    transition: color var(--duration) var(--ease);
}

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

.footer__bottom {
    padding: var(--space-6) 0;
}

.footer__bottom p {
    font-size: var(--text-sm);
    color: var(--gray-600);
}

/* --- Scroll Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 600ms var(--ease), transform 600ms var(--ease);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Sobre nosaltres / Contacte --- */
.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-12);
    align-items: start;
}

.about__text p {
    color: var(--gray-700);
    line-height: 1.8;
    margin-bottom: var(--space-6);
    font-size: var(--text-lg);
}

.about__badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-top: var(--space-6);
}

.about__badge {
    display: inline-block;
    background: var(--orange-50, #fff3ed);
    color: var(--primary);
    font-weight: 600;
    font-size: var(--text-sm);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    border: 1px solid rgba(212, 81, 30, 0.2);
}

.about__contact h3 {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-6);
}

.about__info {
    list-style: none;
    padding: 0;
}

.about__info li {
    color: var(--gray-700);
    margin-bottom: var(--space-4);
    font-size: var(--text-base);
}

.about__info a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--duration) var(--ease);
}

.about__info a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* --- Responsive --- */

/* Pantalles curtes (portàtils 14", 768px alçada) */
@media (max-height: 800px) and (min-width: 1025px) {
    .hero {
        min-height: 90vh;
        padding-top: var(--space-16);
    }

    .hero__inner {
        margin-top: -60px;
    }

    .hero__title {
        font-size: var(--text-2xl);
    }

    .hero__subtitle {
        font-size: var(--text-base);
        margin-bottom: var(--space-6);
    }

    /* Icones més petites i compactes */
    .hero__icon--sun img {
        width: clamp(50px, 6vw, 80px);
        height: clamp(50px, 6vw, 80px);
    }

    .hero__icon--x img {
        width: clamp(90px, 15vw, 200px);
        height: clamp(90px, 15vw, 200px);
    }

    .hero__icon--x::before {
        width: clamp(200px, 40vw, 600px);
        height: clamp(200px, 40vw, 600px);
    }

    .hero__icon--home img {
        width: clamp(50px, 7vw, 90px);
        height: clamp(50px, 7vw, 90px);
    }

    .hero__icon--bat img {
        width: clamp(60px, 13vw, 180px);
        height: clamp(60px, 13vw, 180px);
    }

    .hero__icon--grid img {
        width: clamp(45px, 7vw, 100px);
        height: clamp(45px, 7vw, 100px);
    }
}

/* Pantalla petita en alçada i amplada (portàtil 14" amb escala) */
@media (max-height: 700px) {
    .hero {
        min-height: auto;
        padding-top: var(--space-16);
        padding-bottom: var(--space-4);
    }

    .hero__inner {
        margin-top: -40px;
    }

    .section {
        padding: var(--space-12) 0;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .hero__inner {
        margin-top: -80px;
    }

    .hero__title {
        font-size: var(--text-2xl);
    }

    .section__title {
        font-size: var(--text-3xl);
    }

    .advantages-grid,
    .steps {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps::before {
        display: none;
    }

    .footer__inner {
        grid-template-columns: 1fr 1fr;
    }
}

/* Mòbil */
@media (max-width: 768px) {
    /* ── Navbar ── */
    .navbar__links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        height: 100dvh;
        background: var(--white);
        flex-direction: column;
        padding: var(--space-20) var(--space-8);
        gap: var(--space-6);
        box-shadow: var(--shadow-xl);
        transition: right 300ms var(--ease);
        overflow-y: auto;
    }

    .navbar__links.open {
        right: 0;
    }

    .navbar__toggle {
        display: flex;
        min-width: 44px;
        min-height: 44px;
        align-items: center;
        justify-content: center;
    }

    .lang-switcher {
        margin-left: auto;
        margin-right: var(--space-3);
    }

    .navbar__toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

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

    .navbar__toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .navbar__links a {
        font-size: var(--text-base);
        padding: var(--space-2) 0;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .navbar__logo-img {
        height: 48px;
    }

    /* ── Hero ── */
    .hero {
        min-height: auto;
        padding-top: calc(80px + var(--space-6));
        padding-bottom: var(--space-6);
    }

    .hero__inner {
        text-align: center;
        margin-top: 0;
        padding: var(--space-6);
    }

    .hero__title {
        font-size: var(--text-xl);
    }

    .hero__claim {
        font-size: var(--text-base);
    }

    .hero__subtitle {
        font-size: var(--text-base);
        margin-left: auto;
        margin-right: auto;
    }

    .hero__actions {
        justify-content: center;
        flex-direction: column;
        gap: var(--space-3);
    }

    .hero__actions .btn {
        width: 100%;
        min-height: 48px;
    }

    /* Icones hero: compactes a la part superior */
    .hero__icon--sun { top: 3%; left: 8%; }
    .hero__icon--x { top: 8%; left: 50%; }
    .hero__icon--home { top: 3%; left: 85%; }
    .hero__icon--bat { top: 28%; left: 85%; }
    .hero__icon--grid { top: 38%; left: 60%; }

    .hero__icon--x::before {
        width: clamp(180px, 50vw, 400px);
        height: clamp(180px, 50vw, 400px);
    }

    .hero__flow-svg { opacity: 0.35; }

    /* ── Seccions: reduir padding ── */
    .section {
        padding: var(--space-12) 0;
    }

    .section__header {
        margin-bottom: var(--space-8);
    }

    .section--cta {
        padding: var(--space-12) 0;
    }

    .section--cta h2 {
        font-size: var(--text-2xl);
    }

    .section--cta .hero__actions {
        flex-direction: column;
        align-items: center;
    }

    .section--cta .hero__actions .btn {
        width: 100%;
        max-width: 320px;
    }

    /* ── Features grid ── */
    .features-grid-section {
        padding: var(--space-4) 0 var(--space-8);
    }

    /* ── Grids a 1 columna ── */
    .product-grid,
    .blog-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    .advantages-grid,
    .steps {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    /* ── Product cards: menys padding ── */
    .product-card {
        padding: var(--space-6);
    }

    /* ── Product hero: stack vertical ── */
    .product-hero {
        gap: var(--space-4);
    }

    .product-hero__img {
        width: 80%;
        max-width: 300px;
    }

    /* ── About ── */
    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .about__text p {
        font-size: var(--text-base);
    }

    /* ── Footer ── */
    .footer {
        padding-top: var(--space-10);
    }

    .footer__inner {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .footer__links {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--space-6);
    }
}

/* Mòbil petit */
@media (max-width: 480px) {
    .navbar__logo-img {
        height: 36px;
    }

    .hero__title {
        font-size: var(--text-lg);
    }

    .hero__claim {
        font-size: var(--text-sm);
    }

    .hero__subtitle {
        font-size: var(--text-sm);
        line-height: 1.6;
    }

    .hero__inner {
        padding: var(--space-4);
    }

    .hero__flow-svg { opacity: 0.25; }

    .section {
        padding: var(--space-8) 0;
    }

    .section__title {
        font-size: var(--text-xl);
    }

    .section__subtitle {
        font-size: var(--text-sm);
    }

    .section--cta h2 {
        font-size: var(--text-xl);
    }

    .container {
        padding: 0 var(--space-4);
    }

    .features-grid {
        gap: var(--space-4);
    }

    .feature-item__icon {
        width: 48px;
        height: 48px;
    }

    .feature-item__icon .material-symbols-outlined {
        font-size: 22px;
    }

    .advantage__img {
        width: 48px;
        height: 48px;
    }

    .step__icon {
        width: 44px;
        height: 44px;
        font-size: var(--text-base);
    }

    .footer__links {
        grid-template-columns: 1fr;
    }

    .blog-card__body {
        padding: var(--space-4);
    }
}

/* --- Safe areas (iPhone notch) --- */
@supports (padding: env(safe-area-inset-top)) {
    .navbar {
        padding-top: calc(var(--space-4) + env(safe-area-inset-top));
    }
    .footer__bottom {
        padding-bottom: calc(var(--space-6) + env(safe-area-inset-bottom));
    }
}

/* --- Touch: botons amb àrea mínima 44px --- */
@media (pointer: coarse) {
    .btn {
        min-height: 44px;
    }
    .lang-switcher__btn {
        min-width: 36px;
        min-height: 36px;
        padding: 8px 12px;
    }
    .footer__col a {
        padding: var(--space-2) 0;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* ================================================================
   FOOTER CTA
   ================================================================ */
.footer__cta {
    text-align: center;
    padding: var(--space-8) 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: var(--space-6);
}

/* ================================================================
   MODAL — ANÀLISI GRATUÏT
   ================================================================ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}
.modal-overlay.open {
    display: flex;
}
.modal {
    background: #111111;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-xl);
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: var(--space-8) var(--space-8) var(--space-6);
    position: relative;
    box-shadow: 0 24px 64px rgba(0,0,0,0.6);
    animation: modalIn 0.3s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal__close {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    background: none;
    border: none;
    color: #999;
    font-size: 1.75rem;
    cursor: pointer;
    line-height: 1;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    transition: color 0.2s, background 0.2s;
}
.modal__close:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}
.modal__title {
    font-size: var(--text-2xl);
    font-weight: 700;
    margin-bottom: var(--space-2);
    color: #ffffff;
}
.modal__desc {
    color: #b0b0b0;
    font-size: var(--text-sm);
    margin-bottom: var(--space-6);
    line-height: 1.5;
}
.modal__form {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}
.form-group label {
    font-size: var(--text-sm);
    font-weight: 600;
    color: #e0e0e0;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"] {
    padding: 0.65rem 0.85rem;
    background: #1a1a1a;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-md);
    color: #ffffff;
    font-size: var(--text-base);
    font-family: inherit;
    transition: border-color 0.2s;
}
.form-group input::placeholder {
    color: #666;
}
.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}
.form-group input[type="file"] {
    font-size: var(--text-sm);
    color: #999;
    cursor: pointer;
}
.form-group input[type="file"]::file-selector-button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    margin-right: var(--space-2);
    transition: background 0.2s;
}
.form-group input[type="file"]::file-selector-button:hover {
    background: var(--primary-dark);
}
.form-hint {
    font-size: 0.78rem;
    color: #888;
}
.form-group--row {
    flex-direction: row;
    gap: var(--space-4);
}
.form-group--row > .form-group {
    flex: 1;
}
.form-privacy {
    display: flex;
    gap: var(--space-2);
    align-items: flex-start;
    font-size: 0.78rem;
    color: #999;
    line-height: 1.45;
    padding: var(--space-3);
    background: rgba(255,255,255,0.04);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.08);
}
.form-privacy svg {
    flex-shrink: 0;
    margin-top: 1px;
    opacity: 0.5;
}
.modal__submit {
    width: 100%;
    margin-top: var(--space-2);
}
.modal__status {
    text-align: center;
    font-size: var(--text-sm);
    min-height: 1.4em;
}
.modal__status.success { color: #4ade80; }
.modal__status.error { color: #f87171; }
.modal__status.loading { color: var(--text-muted); }

@media (max-width: 600px) {
    .modal {
        padding: var(--space-5) var(--space-4) var(--space-4);
    }
    .form-group--row {
        flex-direction: column;
    }
}
