
:root {
    --bg: #f7f7f7;
    --white: #ffffff;

    --grey-light: #efefef;
    --grey-border: #e2e2e2;

    --text: #252525;
    --text-soft: #747474;
    --text-light: #999999;

    --dark: #292929;

    --container: 1180px;
}


/* =========================================================
   RESET
========================================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Manrope", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;

    /* Compensa el header fixed */
    padding-top: 82px;
}

body.modal-open,
body.menu-open {
    overflow: hidden;
}

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

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

button,
input,
textarea,
select {
    font: inherit;
}

.container {
    width: min(var(--container), calc(100% - 48px));
    margin: auto;
}


/* =========================================================
   HEADER FIXE SUPERIOR
========================================================= */

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;

    width: 100%;
    height: 82px;

    z-index: 10000;

    background: rgba(247, 247, 247, 0.92);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    border-bottom: 1px solid rgba(0,0,0,.06);
}

.header-inner {
    height: 82px;

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 30px;
}


/* =========================================================
   LOGO HEADER
========================================================= */

.logo {
    display: flex;
    align-items: center;

    position: relative;

    z-index: 10002;
}

.logo img {
    max-height: 34px;
    width: auto;
}


/* =========================================================
   NAVEGACIÓ ESCRIPTORI
========================================================= */

nav {
    display: flex;

    align-items: center;

    gap: 34px;
}

nav a {
    font-size: 12px;

    color: #707070;

    transition: color .2s;
}

nav a:hover {
    color: #111;
}


/* =========================================================
   BOTÓ MENÚ MÒBIL
========================================================= */

.menu-toggle {
    display: none;

    width: 44px;
    height: 44px;

    padding: 0;

    border: 0;
    background: transparent;

    position: relative;

    cursor: pointer;

    z-index: 10002;
}

.menu-toggle span {
    position: absolute;

    left: 9px;

    width: 26px;
    height: 1px;

    background: #292929;

    transition:
        transform .35s ease,
        top .35s ease,
        opacity .35s ease;
}

.menu-toggle span:first-child {
    top: 17px;
}

.menu-toggle span:last-child {
    top: 26px;
}

.menu-toggle.active span:first-child {
    top: 21px;

    transform: rotate(45deg);
}

.menu-toggle.active span:last-child {
    top: 21px;

    transform: rotate(-45deg);
}


/* =========================================================
   HERO
========================================================= */

.hero {
    min-height: calc(100vh - 82px);
    min-height: calc(100svh - 82px);

    display: flex;

    align-items: center;

    position: relative;
}

.hero-content {
    max-width: 850px;
}


/* Logo principal */

.hero-logo {
    margin-bottom: 48px;
}

.hero-logo img {
    width: min(420px, 80vw);
    height: auto;
}


/* Etiqueta */

.eyebrow {
    display: block;

    font-size: 11px;

    letter-spacing: 3px;
    text-transform: uppercase;

    color: var(--text-light);

    margin-bottom: 32px;
}


/* Titular */

.hero h1 {
    font-size: clamp(52px, 7vw, 94px);

    font-weight: 300;

    line-height: 1.03;

    letter-spacing: -4px;

    color: #202020;

    margin-bottom: 38px;
}

.hero h1 span {
    color: #888;
}


/* Text */

.hero-description {
    max-width: 620px;

    font-size: 17px;
    font-weight: 300;

    line-height: 1.8;

    color: var(--text-soft);

    margin-bottom: 44px;
}


/* =========================================================
   BOTONS
========================================================= */

.buttons {
    display: flex;

    gap: 14px;

    flex-wrap: wrap;
}

.btn {
    min-height: 50px;

    padding: 0 27px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    font-size: 12px;

    letter-spacing: .3px;

    transition:
        background .25s,
        border-color .25s,
        color .25s,
        transform .25s;

    border-radius: 2px;
}

.btn-primary {
    background: #292929;

    color: white;
}

.btn-primary:hover {
    background: #111;

    transform: translateY(-2px);
}

.btn-secondary {
    border: 1px solid #d4d4d4;

    color: #555;
}

.btn-secondary:hover {
    border-color: #999;

    color: #111;
}


/* =========================================================
   HERO LINE
========================================================= */

.hero-line {
    position: absolute;

    bottom: 42px;
    left: 50%;

    width: 1px;
    height: 55px;

    background: #ccc;
}


/* =========================================================
   SECCIONS
========================================================= */

section {
    padding: 125px 0;
}

.section-white {
    background: var(--white);
}

.section-grey {
    background: var(--grey-light);
}

.section-dark {
    background: #292929;

    color: white;
}

.section-header {
    margin-bottom: 75px;
}

.section-number {
    display: block;

    font-size: 11px;

    letter-spacing: 3px;
    text-transform: uppercase;

    color: var(--text-light);

    margin-bottom: 18px;
}

.section-header h2 {
    max-width: 760px;

    font-size: clamp(35px, 4vw, 54px);

    font-weight: 300;

    line-height: 1.2;

    letter-spacing: -2px;

    color: #292929;
}


/* =========================================================
   SERVEIS
========================================================= */

.services {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 18px;
}

.service {
    min-height: 300px;

    padding: 40px;

    background: #f8f8f8;

    border: 1px solid #ededed;

    display: flex;

    flex-direction: column;

    transition:
        transform .3s,
        border-color .3s,
        background .3s;
}

.service:hover {
    transform: translateY(-5px);

    border-color: #d0d0d0;

    background: #fafafa;
}

.service-number {
    font-size: 11px;

    color: #aaa;

    margin-bottom: auto;
}

.service h3 {
    font-size: 20px;

    font-weight: 500;

    margin-bottom: 16px;
}

.service p {
    font-size: 14px;

    line-height: 1.8;

    color: #777;
}


/* =========================================================
   TRRZNA / SOBRE NOSALTRES
========================================================= */

.about-grid {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 100px;

    align-items: start;
}

.about-title {
    font-size: clamp(30px, 3vw, 44px);

    line-height: 1.35;

    font-weight: 300;

    letter-spacing: -1px;

    color: #333;
}

.about-text {
    font-size: 15px;

    line-height: 1.9;

    color: #707070;
}

.about-text p + p {
    margin-top: 22px;
}


/* =========================================================
   COM TREBALLEM
========================================================= */

.section-dark .section-number {
    color: #777;
}

.section-dark .section-header h2 {
    color: white;
}

.process {
    margin-top: 80px;

    border-top: 1px solid #444;
}

.process-item {
    display: grid;

    grid-template-columns: 80px 1fr 2fr;

    align-items: center;

    gap: 30px;

    min-height: 105px;

    border-bottom: 1px solid #444;
}

.process-number {
    font-size: 11px;

    color: #777;
}

.process-title {
    font-size: 20px;

    font-weight: 400;
}

.process-description {
    font-size: 13px;

    color: #999;

    max-width: 500px;
}


/* =========================================================
   FRASE
========================================================= */

.statement {
    padding: 170px 0;

    background: #f7f7f7;

    text-align: center;
}

.statement p {
    max-width: 900px;

    margin: auto;

    font-size: clamp(35px, 5vw, 65px);

    font-weight: 300;

    line-height: 1.25;

    letter-spacing: -2px;

    color: #333;
}

.statement span {
    color: #aaa;
}


/* =========================================================
   CONTACTE
========================================================= */

.contact {
    background: white;

    text-align: center;

    padding: 150px 20px;
}

.contact .eyebrow {
    margin-bottom: 25px;
}

.contact h2 {
    font-size: clamp(42px, 5vw, 68px);

    font-weight: 300;

    letter-spacing: -2px;

    margin-bottom: 25px;
}

.contact p {
    max-width: 520px;

    margin: 0 auto 40px;

    font-size: 15px;

    color: #777;

    line-height: 1.8;
}


/* =========================================================
   FOOTER
========================================================= */

footer {
    padding: 45px 0;

    border-top: 1px solid #e2e2e2;

    background: white;
}

.footer-inner {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 30px;
}

.footer-logo {
    font-size: 16px;

    letter-spacing: 7px;

    font-weight: 500;
}

.footer-right {
    display: flex;

    align-items: center;

    gap: 26px;

    font-size: 11px;

    color: #999;
}

.footer-link {
    cursor: pointer;

    transition: color .2s;
}

.footer-link:hover {
    color: #333;
}


/* =========================================================
   MODALS
========================================================= */

.modal-overlay {
    position: fixed;

    inset: 0;

    background: rgba(20,20,20,.55);

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    display: none;

    align-items: center;
    justify-content: center;

    padding: 24px;

    z-index: 50000;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    width: min(760px, 100%);

    max-height: 82vh;

    overflow-y: auto;

    background: white;

    border: 1px solid #e5e5e5;

    padding: 48px;

    box-shadow: 0 30px 80px rgba(0,0,0,.18);

    position: relative;
}

.modal-close {
    position: absolute;

    top: 22px;
    right: 24px;

    width: 38px;
    height: 38px;

    border: none;

    background: #f3f3f3;

    color: #555;

    font-size: 22px;

    cursor: pointer;

    transition:
        background .2s,
        color .2s;
}

.modal-close:hover {
    background: #292929;

    color: white;
}

.modal-title {
    font-size: 32px;

    font-weight: 300;

    letter-spacing: -1px;

    margin-bottom: 30px;

    padding-right: 50px;
}

.modal-content {
    font-size: 14px;

    line-height: 1.9;

    color: #666;
}

.modal-content h3 {
    font-size: 16px;

    font-weight: 500;

    color: #333;

    margin-top: 30px;
    margin-bottom: 10px;
}

.modal-content p + p {
    margin-top: 15px;
}


/* =========================================================
   LOADER TRRZNA
========================================================= */

#trrzna-loader {
    position: fixed;

    inset: 0;

    z-index: 99999;

    background: #202020;

    display: flex;

    align-items: center;
    justify-content: center;

    transition:
        opacity .8s ease,
        visibility .8s ease;
}

#trrzna-loader.loader-hidden {
    opacity: 0;

    visibility: hidden;

    pointer-events: none;
}

.loader-content {
    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;
}

.loader-logo {
    display: flex;

    align-items: center;

    gap: clamp(20px, 3vw, 45px);

    font-family: "Manrope", sans-serif;

    font-size: clamp(28px, 5vw, 58px);

    font-weight: 300;

    color: #f2f2f2;

    letter-spacing: .05em;
}

.loader-letter,
.loader-r {
    position: relative;

    display: inline-block;

    opacity: 0;

    transform: translateY(8px);

    animation: letterAppear .7s ease forwards;
}

.loader-letter:nth-child(1) {
    animation-delay: .15s;
}

.loader-r:nth-child(2) {
    animation-delay: .30s;
}

.loader-r:nth-child(3) {
    animation-delay: .45s;
}

.loader-letter:nth-child(4) {
    animation-delay: .60s;
}

.loader-letter:nth-child(5) {
    animation-delay: .75s;
}

.loader-letter:nth-child(6) {
    animation-delay: .90s;
}

.r-ghost {
    position: absolute;

    top: 0;
    left: 0;

    color: #aaa;

    opacity: 0;

    pointer-events: none;
}

.r-ghost-1 {
    animation: ghostRight 1.4s ease .7s;
}

.r-ghost-2 {
    animation: ghostLeft 1.4s ease .8s;
}

.r-ghost-3 {
    animation: ghostRightWide 1.4s ease .75s;
}

.r-ghost-4 {
    animation: ghostLeftWide 1.4s ease .85s;
}

.loader-line {
    width: 0;
    height: 1px;

    margin-top: 38px;

    background: #999;

    animation: loaderLine 1.2s ease 1.25s forwards;
}

.loader-subtitle {
    margin-top: 22px;

    font-size: 9px;

    letter-spacing: 4px;

    color: #888;

    opacity: 0;

    animation: subtitleAppear .7s ease 1.65s forwards;
}


/* =========================================================
   ANIMACIONS LOADER
========================================================= */

@keyframes letterAppear {

    from {
        opacity: 0;

        transform: translateY(8px);
    }

    to {
        opacity: 1;

        transform: translateY(0);
    }

}

@keyframes ghostRight {

    0% {
        opacity: 0;

        transform: translateX(0);
    }

    30% {
        opacity: .35;
    }

    70% {
        opacity: .15;

        transform: translateX(35px);
    }

    100% {
        opacity: 0;

        transform: translateX(0);
    }

}

@keyframes ghostLeft {

    0% {
        opacity: 0;

        transform: translateX(0);
    }

    30% {
        opacity: .25;
    }

    70% {
        opacity: .1;

        transform: translateX(-25px);
    }

    100% {
        opacity: 0;

        transform: translateX(0);
    }

}

@keyframes ghostRightWide {

    0% {
        opacity: 0;

        transform: translateX(0);
    }

    30% {
        opacity: .30;
    }

    70% {
        opacity: .12;

        transform: translateX(45px);
    }

    100% {
        opacity: 0;

        transform: translateX(0);
    }

}

@keyframes ghostLeftWide {

    0% {
        opacity: 0;

        transform: translateX(0);
    }

    30% {
        opacity: .25;
    }

    70% {
        opacity: .1;

        transform: translateX(-35px);
    }

    100% {
        opacity: 0;

        transform: translateX(0);
    }

}

@keyframes loaderLine {

    from {
        width: 0;

        opacity: 0;
    }

    to {
        width: 90px;

        opacity: 1;
    }

}

@keyframes subtitleAppear {

    from {
        opacity: 0;

        transform: translateY(5px);
    }

    to {
        opacity: 1;

        transform: translateY(0);
    }

}


/* =========================================================
   RESPONSIVE TABLET / MÒBIL
========================================================= */

@media screen and (max-width: 850px) {

    .menu-toggle {
        display: block;
    }

    #main-nav {
        position: fixed;

        top: 0;
        left: 0;

        width: 100%;
        height: 100vh;
        height: 100dvh;

        padding: 100px 10vw 60px;

        display: flex;

        flex-direction: column;

        justify-content: center;
        align-items: flex-start;

        gap: 0;

        background: rgba(247,247,247,.985);

        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);

        opacity: 0;
        visibility: hidden;

        transform: translateY(-15px);

        pointer-events: none;

        transition:
            opacity .35s ease,
            visibility .35s ease,
            transform .35s ease;

        z-index: 10001;
    }

    #main-nav.active {
        opacity: 1;
        visibility: visible;

        transform: translateY(0);

        pointer-events: auto;
    }

    #main-nav a {
        display: block;

        width: 100%;

        padding: 20px 0;

        font-size: clamp(25px, 7vw, 38px);

        font-weight: 300;

        letter-spacing: -1px;

        color: #292929;

        border-bottom: 1px solid #ddd;
    }

    #main-nav a:first-child {
        border-top: 1px solid #ddd;
    }

    #main-nav a::before {
        display: inline-block;

        width: 45px;

        font-size: 10px;

        letter-spacing: 1px;

        color: #aaa;

        vertical-align: middle;
    }

    #main-nav a:nth-child(1)::before {
        content: "01";
    }

    #main-nav a:nth-child(2)::before {
        content: "02";
    }

    #main-nav a:nth-child(3)::before {
        content: "03";
    }

    #main-nav a:nth-child(4)::before {
        content: "04";
    }

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

    .service {
        min-height: 230px;
    }

    .service-number {
        margin-bottom: 45px;
    }

    .about-grid {
        grid-template-columns: 1fr;

        gap: 50px;
    }

    .process-item {
        grid-template-columns: 45px 1fr;

        padding: 28px 0;
    }

    .process-description {
        grid-column: 2;

        padding-bottom: 10px;
    }

    section {
        padding: 90px 0;
    }

}


/* =========================================================
   RESPONSIVE MÒBIL PETIT
========================================================= */

@media screen and (max-width: 500px) {

    body {
        padding-top: 72px;
    }

    .container {
        width: calc(100% - 30px);
    }

    header {
        height: 72px;
    }

    .header-inner {
        height: 72px;
    }

    .logo img {
        max-height: 28px;
    }

    .hero {
        min-height: calc(100vh - 72px);
        min-height: calc(100svh - 72px);
    }

    .hero-logo {
        margin-bottom: 38px;
    }

    .hero-logo img {
        width: min(330px, 90vw);
    }

    .hero h1 {
        letter-spacing: -2px;
    }

    .hero-description {
        font-size: 15px;
    }

    .buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .statement {
        padding: 110px 20px;
    }

    .footer-inner {
        flex-direction: column;

        align-items: flex-start;
    }

    .footer-right {
        flex-wrap: wrap;

        align-items: flex-start;

        gap: 12px 20px;
    }

    .modal {
        padding: 38px 25px 30px;
    }

    .modal-title {
        font-size: 27px;
    }

    .loader-logo {
        gap: 17px;

        font-size: 30px;
    }

    .loader-subtitle {
        font-size: 8px;

        letter-spacing: 3px;
    }

}


/* =========================================================
   ACCESSIBILITAT: REDUIR MOVIMENT
========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }

}
