@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Inter+Tight:wght@500;600;700&display=swap");

:root{
  --black:#050505;
  --white:#ffffff;
  --text:#555751;
  --muted:#8a8c86;
  --line:#e3e3dc;
  --soft:#f2f2ee;
  --shell:min(1320px,calc(100% - 40px));
}

*{box-sizing:border-box}

html{scroll-behavior:smooth}

body{
  margin:0;
  background:#fff;
  color:var(--black);
  font-family:Inter,Arial,sans-serif;
}

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

button,
input{
  font:inherit;
}

.shell{
  width:var(--shell);
  margin:auto;
}

.kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:var(--muted) !important;
  font-size:10px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.12em;
}

.kicker:before{
  content:"";
  width:5px;
  height:5px;
  border-radius:50%;
  background:currentColor;
}

.section{
  padding:108px 0;
  background:#fff;
}

.section-head{
  display:grid;
  grid-template-columns:1fr .72fr;
  gap:60px;
  align-items:end;
  margin-bottom:48px;
}

.section-head h2{
  margin:0;
  color:var(--black) !important;
  font:600 clamp(44px,5.7vw,78px)/.95 "Inter Tight",Inter,sans-serif;
  letter-spacing:-.055em;
}

.section-head p{
  margin:0;
  color:var(--text) !important;
  font-size:14px;
  line-height:1.72;
}

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

.projects-hero{
  position:relative;
  height:calc(100vh - 72px);
  min-height:650px;
  background:#fff;
  color:var(--black) !important;
  overflow:hidden;
  border-bottom:1px solid var(--line);
}

.project-slide{
  position:absolute;
  inset:0;
  opacity:0;
  pointer-events:none;
  transition:opacity .7s ease;
}

.project-slide.is-active{
  opacity:1;
  pointer-events:auto;
}

.project-slide__visual{
  position:absolute;
  inset:0;
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  filter:grayscale(1) brightness(1.08);
  transform:scale(1.015);
}

/* ERP / processos */
.project-slide:nth-child(1) .project-slide__visual{
  background-image:url("https://images.unsplash.com/photo-1517245386807-bb43f82c33c4?auto=format&fit=crop&w=1800&q=82");
}

/* Automatització */
.project-slide:nth-child(2) .project-slide__visual{
  background-image:url("https://images.unsplash.com/photo-1790614108104-337c880ec536?auto=format&fit=crop&w=1800&q=82");
}

/* Software a mida */
.project-slide:nth-child(3) .project-slide__visual{
  background-image:url("https://images.unsplash.com/photo-1758873268745-dd2cf0d677b5?auto=format&fit=crop&w=1800&q=82");
}

.project-slide__visual:after{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(90deg,
      rgba(255,255,255,.97) 0%,
      rgba(255,255,255,.91) 38%,
      rgba(255,255,255,.58) 62%,
      rgba(255,255,255,.18) 100%
    ),
    linear-gradient(0deg,
      rgba(255,255,255,.28),
      rgba(255,255,255,.02) 55%
    );
}

.project-slide__inner{
  position:relative;
  z-index:2;
  width:var(--shell);
  height:100%;
  margin:auto;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  padding-bottom:82px;
}

.project-slide .kicker{
  color:var(--muted) !important;
}

.project-slide h1{
  margin:16px 0 0;
  max-width:980px;
  color:var(--black) !important;
  font:600 clamp(60px,8vw,118px)/.86 "Inter Tight",Inter,sans-serif;
  letter-spacing:-.064em;
}

.project-slide p{
  margin:24px 0 0;
  max-width:620px;
  color:var(--text) !important;
  font-size:14px;
  line-height:1.7;
}

.carousel-dots{
  position:absolute;
  z-index:5;
  right:calc((100% - min(1320px,calc(100% - 40px)))/2);
  bottom:82px;
  display:flex;
  gap:8px;
}

.carousel-dot{
  width:34px;
  height:3px;
  border:0;
  background:#cfcfc8;
  cursor:pointer;
  padding:0;
}

.carousel-dot.is-active{
  background:var(--black);
}

/* =========================================================
   ESTADÍSTIQUES
   ========================================================= */

.stats{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:12px;
}

.stat{
  min-height:180px;
  border:1px solid var(--line);
  border-radius:24px;
  padding:24px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  background:#fff;
  color:var(--black) !important;
  box-shadow:0 8px 28px rgba(0,0,0,.02);
}

.stat strong{
  color:var(--black) !important;
  font:600 clamp(42px,5vw,72px)/.9 "Inter Tight",Inter,sans-serif;
  letter-spacing:-.05em;
}

.stat span{
  color:var(--text) !important;
  font-size:11px;
  line-height:1.45;
}

.stat small{
  color:var(--muted) !important;
  font-size:8px;
  text-transform:uppercase;
  letter-spacing:.09em;
}

/* =========================================================
   PROJECTES
   ========================================================= */

.project-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:18px;
}

.project-card{
  border:1px solid var(--line);
  border-radius:28px;
  overflow:hidden;
  background:#fff;
  color:var(--black) !important;
  box-shadow:0 8px 30px rgba(0,0,0,.02);
  transition:
    transform .22s ease,
    box-shadow .22s ease,
    border-color .22s ease;
}

.project-card:hover{
  transform:translateY(-3px);
  border-color:#d8d8d1;
  box-shadow:0 14px 32px rgba(0,0,0,.04);
}

.project-card__visual{
  aspect-ratio:16/10;
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  filter:grayscale(1);
  transition:transform .35s ease,filter .35s ease;
}

.project-card:hover .project-card__visual{
  transform:scale(1.015);
  filter:grayscale(.88);
}

/* Sistema de gestió operativa */
.project-card:nth-child(1) .project-card__visual{
  background-image:url("https://images.unsplash.com/photo-1790614108104-337c880ec536?auto=format&fit=crop&w=1400&q=82");
}

/* Portal de clients */
.project-card:nth-child(2) .project-card__visual{
  background-image:url("https://images.unsplash.com/photo-1770048532658-14834b7acef8?auto=format&fit=crop&w=1400&q=82");
}

/* Automatització de fluxos */
.project-card:nth-child(3) .project-card__visual{
  background-image:url("https://images.unsplash.com/photo-1517245386807-bb43f82c33c4?auto=format&fit=crop&w=1400&q=82");
}

/* Dashboard de direcció */
.project-card:nth-child(4) .project-card__visual{
  background-image:url("https://images.unsplash.com/photo-1763038311036-6d18805537e5?auto=format&fit=crop&w=1400&q=82");
}

.project-card__body{
  padding:26px;
  background:#fff;
}

.project-card__meta{
  display:flex;
  justify-content:space-between;
  gap:20px;
  color:var(--muted) !important;
  font-size:9px;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.project-card__meta span{
  color:var(--muted) !important;
}

.project-card h3{
  margin:16px 0 0;
  color:var(--black) !important;
  font:600 36px/1 "Inter Tight",Inter,sans-serif;
  letter-spacing:-.04em;
}

.project-card p{
  margin:14px 0 0;
  color:var(--text) !important;
  font-size:12px;
  line-height:1.6;
}

/* =========================================================
   GLOBAL LIGHT OVERRIDES
   Per evitar estils heretats foscos d'altres components
   ========================================================= */

.projects-hero,
.projects-hero *,
.section,
.section *{
  text-shadow:none !important;
}

.projects-hero{
  background:#fff !important;
}

.project-slide__inner,
.project-card,
.stat{
  background-color:transparent;
}

.project-card,
.stat{
  background:#fff !important;
}

.project-slide h1,
.project-card h3,
.section-head h2,
.stat strong{
  color:#050505 !important;
}

.project-slide p,
.project-card p,
.section-head p,
.stat span{
  color:#555751 !important;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media(max-width:900px){
  .section-head{
    grid-template-columns:1fr;
  }

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

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

  .carousel-dots{
    right:20px;
  }
}

@media(max-width:650px){
  :root{
    --shell:calc(100% - 24px);
  }

  .section{
    padding:76px 0;
  }

  .projects-hero{
    height:78svh;
    min-height:600px;
  }

  .project-slide__inner{
    padding-bottom:70px;
  }

  .project-slide h1{
    font-size:56px;
  }

  .carousel-dots{
    bottom:34px;
    left:12px;
    right:auto;
  }

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

  .stat{
    min-height:150px;
    padding:18px;
  }

  .project-card{
    border-radius:22px;
  }

  .project-card h3{
    font-size:31px;
  }
}
