/* ══════════════════════════════════════════
   HOME — humbert.
   Estils de la portada. Compartit per /, /ca/ i /en/
   perquè les tres versions no tornin a divergir.
   ══════════════════════════════════════════ */

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

html, body {
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Section base ── */
.section {
    position: relative;
}
.section--dark {
    background: #000;
    color: #fff;
}
.section--light {
    background: #fff;
    color: #000;
}

.section__inner {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: clamp(4.5rem, 9vh, 6.5rem) clamp(1.2rem, 3vw, 4rem) clamp(4rem, 8vh, 5.5rem);
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh; /* mòbil: descompta la barra del navegador */
}

/* ── Logo (fixed top-left) ── */
.logo {
    position: fixed;
    top: 2rem;
    left: clamp(1.2rem, 3vw, 4rem);
    z-index: 9999;
    height: clamp(1.1rem, 1.8vw, 1.6rem);
    transition: opacity 0.3s ease;
    text-decoration: none;
}
.logo:hover { opacity: 0.6; }
.logo img { height: 100%; width: auto; display: block; }
.logo__dark { display: block; }
.logo__light { display: none; }
body.nav-light .logo__dark { display: block; }
body.nav-light .logo__light { display: none; }
body.nav-dark .logo__dark { display: none; }
body.nav-dark .logo__light { display: block; }

/* ── Nav (top-right) ── */
.topnav {
    position: fixed;
    top: 2rem;
    right: clamp(3rem, 5vw, 5rem);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: clamp(1.2rem, 2vw, 2rem);
}
.topnav__link {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(0.65rem, 0.85vw, 0.78rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
    transition: opacity 0.3s ease;
}
.topnav__link:hover { opacity: 0.5; }
body.nav-dark .topnav__link { color: #fff; }
body.nav-light .topnav__link { color: #000; }

/* ── Language selector ── */
.topnav__lang {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(0.55rem, 0.75vw, 0.68rem);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
body.nav-dark .topnav__lang { color: rgba(255,255,255,0.4); }
body.nav-light .topnav__lang { color: rgba(0,0,0,0.4); }
body.nav-dark .topnav__lang strong { color: #fff; }
body.nav-light .topnav__lang strong { color: #000; }
.topnav__lang a { font-size: inherit; letter-spacing: inherit; }

.counter {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(0.6rem, 0.8vw, 0.72rem);
    letter-spacing: 0.15em;
    transition: color 0.5s ease;
    pointer-events: none;
    opacity: 0.4;
}
.counter--dark { color: #fff; }
.counter--light { color: #000; }
.counter.pulse {
    animation: counterPulse 0.3s ease;
}
@keyframes counterPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* ── Navigation dots override ── */
#fp-nav ul li a span,
.fp-slidesNav ul li a span {
    background: #fff !important;
    width: 8px !important;
    height: 8px !important;
    margin: -4px 0 0 -4px !important;
}
#fp-nav ul li a.active span,
.fp-slidesNav ul li a.active span {
    width: 12px !important;
    height: 12px !important;
    margin: -6px 0 0 -6px !important;
}
#fp-nav ul li .fp-tooltip {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
body.nav-light #fp-nav ul li a span { background: #000 !important; }
body.nav-light #fp-nav ul li .fp-tooltip { color: #000; }
body.nav-dark #fp-nav ul li a span { background: #fff !important; }
body.nav-dark #fp-nav ul li .fp-tooltip { color: #fff; }

/* ── Giant text ── */
.giant {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 13vw, 14rem);
    line-height: 0.92;
    letter-spacing: -0.03em;
    text-transform: uppercase;
}
.giant--who {
    font-size: clamp(2.2rem, 11vw, 12rem);
}
.giant--statement {
    font-size: clamp(2rem, 10vw, 11rem);
    line-height: 0.92;
}
.giant--contact {
    /* 12vw i no més: "LET'S TALK?" és la cadena llarga i ha de cabre en una línia */
    font-size: clamp(2.3rem, 12vw, 13rem);
    line-height: 0.9;
    max-width: 100%;
    overflow-wrap: break-word;
}

/* ── Scroll arrow between sections ── */
.scroll-arrow {
    position: absolute;
    bottom: clamp(1.5rem, 3vh, 2.5rem);
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    opacity: 0.3;
    animation: bounceArrow 2s ease-in-out infinite;
    text-decoration: none;
    color: inherit;
}
@keyframes bounceArrow {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ── Subtitle ── */
.subtitle {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.6vw, 1.35rem);
    line-height: 1.55;
    max-width: 40ch;
    margin-top: clamp(1.5rem, 3vw, 3rem);
}

/* ── Hero label ── */
.hero__label {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: clamp(0.65rem, 0.9vw, 0.8rem);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    position: absolute;
    bottom: clamp(5rem, 8vh, 7rem);
    left: clamp(1.2rem, 3vw, 4rem);
    opacity: 0.5;
}

/* ── Scroll indicator ── */
.scroll-indicator {
    position: absolute;
    bottom: clamp(1.5rem, 3vh, 2.5rem);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}
.scroll-indicator__line {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.3);
    position: relative;
    overflow: hidden;
}
.scroll-indicator__line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    animation: scrollPulse 1.8s ease-in-out infinite;
}
@keyframes scrollPulse {
    0% { top: -100%; }
    50% { top: 100%; }
    100% { top: 100%; }
}

/* ── Photo (Section 2) ── */
.photo-bg {
    position: absolute;
    right: 0;
    top: 0;
    width: 45%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}
.photo-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    filter: grayscale(100%) contrast(1.1);
    opacity: 0.3;
}

/* ── Numbers (one line) ── */
.numbers-line {
    display: flex;
    align-items: baseline;
    gap: clamp(1rem, 3vw, 2.5rem);
    flex-wrap: wrap;
}
.numbers-line__item {
    display: flex;
    align-items: baseline;
    gap: clamp(0.4rem, 0.8vw, 0.7rem);
}
.numbers-line__value {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 8vw, 8rem);
    line-height: 1;
    letter-spacing: -0.03em;
}
.numbers-line__label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(0.8rem, 1.8vw, 1.6rem);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.5;
}
.numbers-line__sep {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.5rem, 4vw, 4rem);
    opacity: 0.2;
    margin: 0 clamp(0.3rem, 1vw, 1rem);
}

/* ── Projects list (Ahora / Portfolio) ── */
.projects__title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4.5rem);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin-bottom: clamp(1.5rem, 3vw, 3rem);
}
.projects__title--small {
    font-size: clamp(1.5rem, 4vw, 3.5rem);
    margin-bottom: clamp(1rem, 2vw, 2rem);
}
.project-row {
    border-top: 1px solid rgba(255,255,255,0.15);
    padding: clamp(1rem, 2vw, 1.8rem) 0;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 2rem;
    transition: transform 0.3s ease;
}
.section--light .project-row {
    border-top-color: rgba(0,0,0,0.15);
}
.project-row:last-child {
    border-bottom: 1px solid rgba(255,255,255,0.15);
}
.section--light .project-row:last-child {
    border-bottom-color: rgba(0,0,0,0.15);
}
.project-row:hover {
    transform: translateX(8px);
}
.project-row__left {
    display: flex;
    align-items: baseline;
    gap: clamp(0.6rem, 1.5vw, 1.5rem);
    flex-wrap: wrap;
}
.project-row__name {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(1rem, 2vw, 1.6rem);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.project-row__badge {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0.25em 0.7em;
    border: 1px solid currentColor;
    border-radius: 2px;
    opacity: 0.7;
    white-space: nowrap;
}
.project-row__desc {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(0.8rem, 1.1vw, 0.95rem);
    line-height: 1.4;
    opacity: 0.55;
    flex: 1;
    min-width: 200px;
}
.project-row__link {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: clamp(0.7rem, 0.9vw, 0.85rem);
    text-transform: lowercase;
    letter-spacing: 0.02em;
    opacity: 0.4;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}
.project-row__link:hover {
    opacity: 1;
}

/* ── Portfolio compact ── */
.project-row--compact {
    padding: clamp(0.6rem, 1.2vw, 1rem) 0;
}
.project-row--compact .project-row__name {
    font-size: clamp(0.85rem, 1.5vw, 1.2rem);
}
.project-row--compact .project-row__desc {
    font-size: clamp(0.72rem, 1vw, 0.85rem);
}
.project-row--compact .project-row__badge {
    font-size: 0.55rem;
}

/* ── Media logos ── */
.media-logos {
    display: flex;
    align-items: center;
    gap: clamp(1.5rem, 5vw, 5rem);
    flex-wrap: wrap;
    margin-top: clamp(1rem, 2.5vw, 2.5rem);
}
.media-logo {
    display: block;
    height: clamp(2.2rem, 5vw, 4.5rem);
    /* Els wordmarks amples (El Periódico, Ouest-France) es menjaven la tira
       si només se'ls limitava l'alçada. */
    max-width: clamp(110px, 15vw, 175px);
    opacity: 0.6;
    transition: opacity 0.3s ease;
}
.media-logo:hover {
    opacity: 1;
}
.media-logo img {
    height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
    filter: brightness(0) invert(1);
}
.media-logo--text {
    display: flex;
    align-items: center;
    height: clamp(2.2rem, 5vw, 4.5rem);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(0.9rem, 1.8vw, 1.4rem);
    color: #fff;
    text-decoration: none;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    letter-spacing: 0.02em;
}
.media-logo--text:hover {
    opacity: 1;
}

/* ── Press strip (eclipsi.info) ── */
.press {
    margin-top: clamp(1.8rem, 4vh, 3.2rem);
    padding-top: clamp(1.2rem, 3vh, 2rem);
    border-top: 1px solid rgba(255,255,255,0.15);
}
.press__head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem clamp(0.8rem, 2vw, 1.6rem);
}
.press__title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(1rem, 2vw, 1.6rem);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid rgba(255,255,255,0.35);
    padding-bottom: 0.1em;
    transition: border-color 0.3s ease, opacity 0.3s ease;
}
.press__title--plain {
    border-bottom: 0;
    padding-bottom: 0;
    opacity: 0.55;
    font-size: clamp(0.9rem, 1.6vw, 1.2rem);
    letter-spacing: 0.02em;
}
.press__title:hover {
    border-bottom-color: #fff;
}
.press__tag {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0.25em 0.7em;
    border: 1px solid currentColor;
    border-radius: 2px;
    opacity: 0.55;
    white-space: nowrap;
}
.press__outlets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem clamp(0.8rem, 1.8vw, 1.5rem);
    margin-top: clamp(0.8rem, 2vh, 1.2rem);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(0.82rem, 1.4vw, 1.15rem);
    letter-spacing: 0.01em;
    opacity: 0.65;
}
.press__outlets span {
    white-space: nowrap;
}
.press__outlets .press__more {
    opacity: 0.5;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}
.press__stat {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.75rem, 1vw, 0.9rem);
    line-height: 1.5;
    opacity: 0.45;
    margin-top: clamp(0.6rem, 1.5vh, 1rem);
    max-width: 62ch;
}


.press__more-link {
    display: inline-block;
    margin-top: clamp(0.8rem, 1.8vh, 1.2rem);
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: clamp(0.78rem, 1vw, 0.9rem);
    letter-spacing: 0.02em;
    color: inherit;
    text-decoration: none;
    opacity: 0.55;
    border-bottom: 1px solid currentColor;
    padding-bottom: 0.1em;
    transition: opacity 0.3s ease;
}
.press__more-link:hover { opacity: 1; }

/* ── Contact ── */
.contact-lead {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.95rem, 1.5vw, 1.25rem);
    line-height: 1.55;
    max-width: 42ch;
    margin-top: clamp(1.2rem, 2.5vw, 2rem);
    opacity: 0.6;
}
.contact-email {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: clamp(1rem, 2.5vw, 2rem);
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgba(0,0,0,0.3);
    padding-bottom: 0.15em;
    transition: border-color 0.3s ease;
    align-self: flex-start;   /* si no, el flex l'estira i el subratllat va d'un extrem a l'altre */
    max-width: 100%;
    overflow-wrap: break-word;
    margin-top: clamp(1.2rem, 2.5vw, 2rem);
}
.contact-email:hover {
    border-bottom-color: #000;
}
.contact-social {
    margin-top: clamp(1.2rem, 2.5vw, 2rem);
    display: flex;
    flex-wrap: wrap;
    align-self: flex-start;
    gap: 0.2rem clamp(1rem, 2vw, 2rem);
}
.contact-social a {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: clamp(0.75rem, 1vw, 0.9rem);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: inherit;
    text-decoration: none;
    opacity: 0.4;
    transition: opacity 0.3s ease;
    padding: 0.6rem 0;   /* àrea de toc decent al mòbil */
}
.contact-social a:hover {
    opacity: 1;
}
.contact-footer {
    position: absolute;
    bottom: clamp(1.5rem, 3vh, 2.5rem);
    left: clamp(1.2rem, 3vw, 4rem);
    right: clamp(1.2rem, 3vw, 4rem);
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(0.65rem, 0.8vw, 0.75rem);
    opacity: 0.3;
    letter-spacing: 0.05em;
    pointer-events: none;
}

/* Mentre hi ha el banner de galetes, el copyright puja perquè no quedi a sota */
body.has-cookie-banner .contact-footer {
    bottom: clamp(4.5rem, 9vh, 5.5rem);
}

/* ── Fade animation ── */
.fade {
    opacity: 0;
    transform: translateY(30px) scale(0.97);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.fade.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.fade-d1 { transition-delay: 0.12s; }
.fade-d2 { transition-delay: 0.24s; }
.fade-d3 { transition-delay: 0.36s; }
.fade-d4 { transition-delay: 0.48s; }
.fade-d5 { transition-delay: 0.60s; }
.fade-d6 { transition-delay: 0.72s; }
.fade-d7 { transition-delay: 0.84s; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .topnav {
        top: 1.2rem;
        right: 1.2rem;
        gap: 0.8rem;
    }
    .topnav__link {
        font-size: 0.6rem;
        letter-spacing: 0.08em;
    }
    .topnav__lang {
        font-size: 0.5rem;
        gap: 0.25rem;
    }
    .counter {
        display: none;
    }
    .logo {
        top: 1.2rem;
        left: 1.2rem;
        height: 1rem;
    }
    .scroll-arrow {
        font-size: 1.2rem;
    }

    /* Just el necessari per no passar per sota del logo i del peu */
    .section__inner {
        padding: clamp(3rem, 6vh, 4rem) 1.2rem clamp(2.4rem, 5vh, 3.2rem);
    }
    .photo-bg {
        width: 100%;
        opacity: 0.15;
    }
    .numbers-line {
        flex-direction: column;
        gap: 0.8rem;
    }
    .numbers-line__sep {
        display: none;
    }
    .project-row {
        flex-direction: column;
        gap: 0.4rem;
    }
    .project-row__link {
        align-self: flex-start;
    }
    .media-logos {
        gap: 1.2rem 1.5rem;
    }
    .media-logo,
    .media-logo--text {
        height: 1.9rem;
    }
    .media-logo--text {
        font-size: 0.8rem;
    }
    .hero__label {
        bottom: clamp(4rem, 6vh, 5rem);
        left: 1.2rem;
        font-size: 0.6rem;
    }
    .contact-footer {
        left: 1.2rem;
        right: 1.2rem;
    }
    #fp-nav {
        right: 8px !important;
    }
    #fp-nav ul li a span {
        width: 6px !important;
        height: 6px !important;
        margin: -3px 0 0 -3px !important;
    }
    #fp-nav ul li a.active span {
        width: 8px !important;
        height: 8px !important;
        margin: -4px 0 0 -4px !important;
    }
}

@media (max-width: 480px) {
    .giant {
        font-size: clamp(2rem, 12vw, 4.5rem);
    }
    .giant--who {
        font-size: clamp(1.8rem, 10vw, 4rem);
    }
    .giant--statement {
        font-size: clamp(1.6rem, 9vw, 3.5rem);
    }
    .giant--contact {
        font-size: clamp(1.9rem, 11vw, 4rem);
    }
    .subtitle {
        font-size: 0.9rem;
    }
    .contact-lead {
        font-size: 0.88rem;
    }
    .numbers-line__value {
        font-size: clamp(2rem, 10vw, 4rem);
    }
    .numbers-line__label {
        font-size: 0.7rem;
    }
    .press__outlets {
        font-size: 0.8rem;
        gap: 0.3rem 0.9rem;
    }
    .press__stat {
        font-size: 0.72rem;
    }
    /* El portfolio són set files: en mòbil petit han d'anar més justes
       per no haver de fer scroll dins de la secció */
    .projects__title--small {
        font-size: 1.2rem;
        margin-bottom: 0.4rem;
    }
    .section__inner {
        padding: clamp(2.6rem, 6vh, 3.4rem) 1.2rem clamp(2rem, 5vh, 2.8rem);
    }
    .project-row--compact {
        padding: 0.22rem 0;
        gap: 0.1rem;
    }
    .project-row--compact .project-row__name {
        font-size: 0.82rem;
    }
    .project-row--compact .project-row__desc {
        font-size: 0.7rem;
        line-height: 1.35;
    }
    .project-row--compact .project-row__link {
        font-size: 0.65rem;
    }
    /* A la portada la fila de "Projectes" cap al menú lateral de punts;
       el que no pot desaparèixer mai és el contacte. */
    .topnav__link--projects,
    .topnav__link--about {
        display: none;
    }
}

/* Mòbil en horitzontal i pantalles baixes: tot més compacte perquè hi càpiga */
@media (max-height: 560px) and (orientation: landscape) {
    .section__inner {
        padding: 3rem clamp(1.2rem, 3vw, 4rem) 2.2rem;
    }
    .giant { font-size: clamp(1.6rem, 7.5vh, 4rem); }
    .giant--who,
    .giant--statement,
    .giant--contact { font-size: clamp(1.5rem, 7vh, 3.5rem); }
    .subtitle,
    .contact-lead {
        font-size: 0.85rem;
        margin-top: 0.8rem;
        max-width: 52ch;
    }
    .contact-email {
        font-size: 1rem;
        margin-top: 0.9rem;
    }
    .contact-social {
        margin-top: 0.4rem;
    }
    .contact-social a { padding: 0.35rem 0; }
    .projects__title { font-size: clamp(1.2rem, 4.5vh, 2rem); margin-bottom: 0.6rem; }
    .project-row { padding: 0.3rem 0; }
    .project-row--compact { padding: 0.22rem 0; }
    .media-logo,
    .media-logo--text { height: 1.7rem; }
    .press { margin-top: 1rem; padding-top: 0.8rem; }
    .hero__label { bottom: 3.2rem; }
    .scroll-indicator__line { height: 24px; }
}

@media (prefers-reduced-motion: reduce) {
    .fade {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .scroll-arrow,
    .scroll-indicator__line::after,
    .counter.pulse {
        animation: none;
    }
    .project-row:hover { transform: none; }
}
